Intelligent Metering Load Alert Method and Device Based on Machine Learning Algorithms
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-12
- Publication Date
- 2026-08-14
AI Technical Summary
[0004]为解决上述技术问题,本发明提供了一种基于机器学习算法驱动的智能计量负荷提示方法及装置,通过机器学习算法深度挖掘用电规律,动态优化阈值,彻底解决固定阈值适配性差的问题
[0029]By using a machine learning model that integrates gradient boosting regression and backpropagation neural networks, the system deeply mines and extracts three core features: user electricity consumption habits, seasonal changes, and time-of-day scenarios. Based on these multi-dimensional features, it outputs dynamic rated load thresholds that are adapted to the current scenario in real time, replacing the fixed static thresholds of traditional solutions. This approach can accurately adapt to electricity consumption characteristics across all scenarios, including peak electricity consumption, off-peak hours, seasonal climate fluctuations, and differences between weekdays and holidays, completely solving the problems of warning failure during peak hours and frequent false alarms during off-peak hours in traditional solutions.
Smart Images

Figure CN122571378A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of load safety monitoring technology, and more specifically, to a method and device for intelligent metering load alerts based on machine learning algorithms. Background Technology
[0002] With the improvement of residents' living standards and the rapid expansion of small-scale commercial electricity consumption scenarios, the penetration rate of high-power electrical equipment in households and micro-businesses continues to rise. Peak-to-valley fluctuations and periodic surges in electricity load are becoming increasingly prominent, leading to frequent safety accidents such as circuit breaker tripping, equipment burnout, and even electrical fires caused by line overload. At the same time, the demand for refined management of user-side electricity consumption and energy conservation is becoming increasingly urgent. Real-time monitoring, intelligent early warning, and safety protection of electricity load have become core research directions in the fields of power metering and electricity safety.
[0003] Traditional mechanical or fixed-threshold load monitoring methods use a fixed rated load threshold as the sole control benchmark for load monitoring, early warning triggering, and protection actions. This lacks the ability to adapt to dynamic changes in user-specific electricity consumption patterns, seasonal climates, and time-of-day scenarios, resulting in a static and rigid load control logic. Therefore, there is an urgent need to provide a smart metering load alert method and device based on machine learning algorithms to address the problems mentioned in the background. Summary of the Invention
[0004] To address the aforementioned technical problems, this invention provides a smart metering load indication method and device based on machine learning algorithms. By deeply mining electricity consumption patterns through machine learning algorithms and dynamically optimizing thresholds, the problem of poor adaptability of fixed thresholds is completely solved.
[0005] To achieve the above objectives, the technical solution of the present invention is as follows:
[0006] A machine learning algorithm-driven intelligent metering load alerting method includes:
[0007] The original electricity load time-series data of the user side is obtained by the acquisition terminal, the basic parameters required for the algorithm to run are initialized, and the initial rated load threshold is set.
[0008] The original electricity load time series data is processed sequentially by outlier removal, high-frequency noise filtering, and dimensionless normalization, and outputs denoised and clean load time series data for business calculations, as well as a standardized feature training sample set for model training.
[0009] Based on denoised pure load time-series data and standardized feature training sample set, we deeply mine and extract three core features: user electricity consumption habits, seasonal features, and time period features, and construct a multi-dimensional feature set for load threshold prediction.
[0010] Based on the completed multidimensional feature set, a machine learning model that integrates gradient boosting regression and backpropagation neural network is adopted to output the dynamic rated load threshold at the corresponding time in real time. The load level division ratio is adaptively adjusted synchronously with the dynamic threshold.
[0011] Based on real-time collected denoised and clean load time-series data and dynamic rated load thresholds, combined with load change trends, the load status is divided into four levels: normal, warning, predictive overload, and overload using a dual constraint rule of threshold ratio and growth trend.
[0012] Based on the determined load status level, trigger differentiated prompt actions in four dimensions: light, sound, digital display, and wireless push, corresponding to the level;
[0013] Based on the duration of the overload, graded disconnection control is executed according to the circuit priority preset by the user. After the load is restored to the safe range, a delayed power restoration strategy is executed.
[0014] During daily off-peak electricity hours, based on newly added load data and device execution feedback data, incremental training and parameter optimization are performed on the integrated machine learning model. The updated model parameters are used for dynamic threshold prediction in the next cycle, forming a closed loop of the entire process.
[0015] As a preferred embodiment of the present invention, the original power load time-series data collection items include real-time total active power, cumulative power consumption and corresponding sampling timestamps. The sampling frequency is fixed at once every 10 seconds, and the minute-level average power is calculated with a granularity of 1 minute as the basic time-series unit for algorithm analysis. The local storage period for the collected historical load data is not less than 3 months. When the device is powered on for the first time and there is no sufficient historical training data, the basic load monitoring and safety protection functions are performed using a preset initial rated load threshold. After the historical data has accumulated for 1 month, it automatically switches to the dynamic rated load threshold output by the fusion machine learning model.
[0016] As a preferred embodiment of the present invention, the outlier removal adopts the 3σ criterion to remove outliers caused by instantaneous voltage changes or acquisition failures in the original electricity load time series data. The time series gaps after removal are filled with the local historical load average of the same type of day in the same period. The high-frequency noise filtering adopts a 3-layer simplified db4 wavelet transform to retain only the low-frequency effective trend components of the load data. The dimensionless normalization adopts the Min-Max normalization method to map the data to the [0,1] interval, eliminating the interference of data dimension differences on model training.
[0017] As a preferred embodiment of the present invention, the electricity consumption habit characteristics are extracted using an incremental K-means clustering algorithm, which outputs the user's daily peak and off-peak load periods, average load during peak periods, and high-power load step threshold; the seasonal characteristics are extracted using a single-season STL time series decomposition algorithm, which calculates the load correction coefficient for the corresponding season; the time period characteristics are extracted using a concurrent comparison analysis algorithm, which distinguishes the load differences between weekdays and holidays, and the load benchmark values for day and night periods, and constructs a 24-hour × 7-day time period load weight matrix.
[0018] As a preferred embodiment of the present invention, the machine learning model that integrates gradient boosting regression and backpropagation neural network is trained using a composite loss function. The composite loss function includes a mean squared error fitting loss term, a threshold boundary constraint term, and a structured sparse regularization term. The threshold boundary constraint term limits the output range of the dynamic rated load threshold to 4kW to 8kW, and the structured sparse regularization term is used to force the generation of sparse weights during model training. After the model is trained, the average absolute percentage error of its dynamic rated load threshold prediction does not exceed 5%.
[0019] As a preferred embodiment of the present invention, the specific grading standard of the dual constraint rule of threshold ratio and growth trend is as follows: normal state is when the ratio of real-time load to dynamic rated load threshold does not exceed 70%; warning state is when the ratio of real-time load is greater than 70% and not more than 85%; predictive overload state is when the ratio of real-time load is greater than 85% and not more than 95%, and the load growth rate within the 5-minute sliding time window is not less than 0.5 kW / min; overload state is when the ratio of real-time load to dynamic rated load threshold is greater than 95%.
[0020] As a preferred embodiment of the present invention, the differentiated prompt actions of the four dimensions correspond one-to-one with the load status level, and the prompt intensity is positively correlated with the load risk level: in the normal state, a solid green light is triggered with no sound, and the real-time power and dynamic rated load threshold are digitally displayed; in the alert state, a solid yellow light is triggered, and a single warning reminder is pushed to the user terminal simultaneously; in the predictive overload state, an orange flashing light and intermittent buzzer sound are triggered, and overload warnings and handling suggestions are pushed at high frequency simultaneously; in the overload state, a red flashing light and continuous buzzer alarm are triggered, and emergency overload information is pushed through multiple channels simultaneously.
[0021] As a preferred embodiment of the present invention, the circuit priority is pre-divided into protection circuits that are prohibited from being disconnected, commonly used circuits that can only be disconnected in case of extreme overload, and secondary circuits that are preferentially disconnected in case of overload. When the overload condition lasts for 30 seconds, unnecessary circuits are disconnected step by step in the order from secondary circuits to commonly used circuits. After each level is disconnected, the load change is monitored in real time, and the disconnection action is stopped immediately after the load drops to a safe range. The delayed power restoration strategy is as follows: when the load returns to a normal state and the duration is not less than 1 minute, a preset delayed restoration timer is started, and power is restored step by step in the order from commonly used circuits to secondary circuits, with a restoration interval of not less than 10 seconds between each level of circuit.
[0022] As a preferred embodiment of the present invention, the incremental training and parameter optimization are performed only during the low electricity consumption period in the early morning of each day. A lightweight incremental learning method is adopted, which only fine-tunes the bias terms and quantization parameters of the model without updating the core weight matrix of the model. Every 3 months, a full-scale retraining and lightweight compression of the model is performed based on the full historical feature data, generating an updated model and sending an incremental update package to the collection terminal, thus completing the optimization closed loop of the entire life cycle of the model.
[0023] The present invention also provides an intelligent metering load indication device based on machine learning algorithm, including a load acquisition unit, an algorithm-driven intelligent analysis and decision-making unit, a multi-mode indication unit, a precise safety protection unit, and a power supply module that provides stable power supply to each unit;
[0024] The signal output terminal of the load acquisition unit is connected to the signal input terminal of the algorithm-driven intelligent analysis and decision unit, and is used to acquire the original power load time sequence data on the user side and transmit the acquired data to the algorithm-driven intelligent analysis and decision unit.
[0025] The algorithm-driven intelligent analysis and decision-making unit has a built-in customized machine learning algorithm module, which is used to complete load data cleaning, electricity behavior feature extraction, dynamic rated load threshold adaptive prediction, load status intelligent classification judgment, and output corresponding decision instructions.
[0026] The control input terminal of the multi-mode prompting unit is connected to the instruction output terminal of the algorithm-driven intelligent analysis and decision-making unit, and is used to execute differentiated prompting actions that match the load status level according to the received decision instructions.
[0027] The control input terminal of the precision safety protection unit is connected to the instruction output terminal of the algorithm-driven intelligent analysis and decision-making unit, and is used to execute safety protection actions of hierarchical circuit disconnection and delayed power restoration according to the received decision instructions.
[0028] The beneficial technical effects of this invention are:
[0029] By using a machine learning model that integrates gradient boosting regression and backpropagation neural networks, the system deeply mines and extracts three core features: user electricity consumption habits, seasonal changes, and time-of-day scenarios. Based on these multi-dimensional features, it outputs dynamic rated load thresholds that are adapted to the current scenario in real time, replacing the fixed static thresholds of traditional solutions. This approach can accurately adapt to electricity consumption characteristics across all scenarios, including peak electricity consumption, off-peak hours, seasonal climate fluctuations, and differences between weekdays and holidays, completely solving the problems of warning failure during peak hours and frequent false alarms during off-peak hours in traditional solutions.
[0030] By adopting a dual constraint rule of threshold ratio and growth trend, the load status is divided into four levels: normal, warning, predictive overload, and overload. The innovative predictive overload level can predict overload risk in advance through load change trends and trigger an early warning before the load is about to exceed the safety threshold. This allows users sufficient time to adjust their electricity consumption behavior, overcoming the lag defect of traditional solutions that can only trigger alarms after the load exceeds the threshold. This reduces the incidence of safety accidents such as line overload, equipment burnout, and even electrical fires from the source.
[0031] Based on the determined load status level, differentiated alerts are triggered across four dimensions: lights, sounds, digital displays, and wireless push notifications. The alert intensity is positively correlated with the risk level, ensuring users can quickly identify and address risks promptly. Tiered disconnection control is implemented based on user-preset circuit priorities, sequentially disconnecting unnecessary circuits during overload to ensure continuous power supply to core equipment. Combined with a delayed power restoration strategy after load recovery, this avoids power losses caused by the crude disconnection of traditional solutions and mitigates damage from frequent equipment start-ups and shutdowns due to load fluctuations, significantly improving user experience and extending equipment lifespan.
[0032] This invention completes the entire process—from electricity data collection, preprocessing, and model inference to early warning and protection actions—locally at the data acquisition terminal, without cloud dependency. This ensures stable operation of security protection functions during network outages and fluctuations, mitigating the failure risks associated with cloud-based systems. Furthermore, by storing raw data locally, it eliminates the risk of user privacy leaks at the source. During daily off-peak electricity hours, based on new load data and device execution feedback, the invention incrementally trains and optimizes the fusion model, continuously adapting to changes in user electricity consumption habits. By deeply mining user electricity data, it outputs personalized electricity management and energy-saving suggestions, coupled with load data and dynamic threshold visualization, helping users optimize their electricity consumption behavior, meeting the needs of refined electricity management, and aligning with the development direction of energy conservation and emission reduction.
[0033] The device of this invention can be directly installed next to the meter box or distribution box without modifying the existing wiring, making installation convenient; the machine learning model can adapt to different users' electricity consumption habits without complex on-site debugging, and is suitable for most user-side scenarios such as homes and small businesses, with strong versatility and engineering applicability. Attached Figure Description
[0034] Figure 1 This is a schematic diagram of the overall process of the present invention. Detailed Implementation
[0035] In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, the specific embodiments of the present invention will be further described in detail below with reference to the accompanying drawings and examples. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.
[0036] Combination Figure 1 The present invention provides the following embodiments:
[0037] Example 1:
[0038] A machine learning algorithm-driven intelligent metering load alerting method includes:
[0039] The original electricity load time-series data of the user side is obtained by the acquisition terminal, the basic parameters required for the algorithm to run are initialized, and the initial rated load threshold is set.
[0040] The original electricity load time series data is processed sequentially by outlier removal, high-frequency noise filtering, and dimensionless normalization, and outputs denoised and clean load time series data for business calculations, as well as a standardized feature training sample set for model training.
[0041] Based on denoised pure load time-series data and standardized feature training sample set, we deeply mine and extract three core features: user electricity consumption habits, seasonal features, and time period features, and construct a multi-dimensional feature set for load threshold prediction.
[0042] Based on the completed multidimensional feature set, a machine learning model that integrates gradient boosting regression and backpropagation neural network is adopted to output the dynamic rated load threshold at the corresponding time in real time. The load level division ratio is adaptively adjusted synchronously with the dynamic threshold.
[0043] Based on real-time collected denoised and clean load time-series data and dynamic rated load thresholds, combined with load change trends, the load status is divided into four levels: normal, warning, predictive overload, and overload using a dual constraint rule of threshold ratio and growth trend.
[0044] Based on the determined load status level, trigger differentiated prompt actions in four dimensions: light, sound, digital display, and wireless push, corresponding to the level;
[0045] Based on the duration of the overload, graded disconnection control is executed according to the circuit priority preset by the user. After the load is restored to the safe range, a delayed power restoration strategy is executed.
[0046] During daily off-peak electricity hours, based on newly added load data and device execution feedback data, incremental training and parameter optimization are performed on the integrated machine learning model. The updated model parameters are used for dynamic threshold prediction in the next cycle, forming a closed loop of the entire process.
[0047] Furthermore, the original power load time-series data collection items include real-time total active power, cumulative power consumption, and corresponding sampling timestamps. The sampling frequency is fixed at once every 10 seconds, and the minute-level average power is calculated with a granularity of 1 minute as the basic time-series unit for algorithm analysis. The collected historical load data is stored locally for no less than 3 months. When the device is powered on for the first time and there is no sufficient historical training data, the basic load monitoring and safety protection functions are performed using a preset initial rated load threshold. After the historical data has accumulated for 1 month, it automatically switches to the dynamic rated load threshold output by the fusion machine learning model.
[0048] A 10-second sampling period can fully capture the load step changes brought about by the startup of high-power residential equipment, avoiding the risk of missed overload detection. A 1-minute average power can smooth out sampling noise caused by instantaneous power grid fluctuations, avoiding invalid data from interfering with algorithm judgment, while significantly reducing the computational power consumption of time series analysis and adapting to the low-computing-power hardware characteristics of the data acquisition terminal. A 3-month timeframe can fully cover users' monthly electricity consumption patterns, weekday / holiday cycles, and early seasonal fluctuations, providing sufficient effective samples for model training and avoiding overfitting and insufficient prediction accuracy caused by insufficient samples. The initial power-on adopts a fixed threshold that complies with residential electricity safety regulations, ensuring that the device's basic safety protection functions are available throughout the process. A 1-month timeframe can cover 4 complete weekday / holiday electricity consumption cycles, accumulating sufficient basic samples to ensure that the initial inference accuracy after model switching meets business requirements, achieving a smooth transition of the device from basic functions to intelligent functions.
[0049] Furthermore, the outlier removal adopts the 3σ criterion to remove outliers caused by instantaneous voltage changes or acquisition failures in the original electricity load time series data. The missing time series values after removal are filled with the local historical load average of the same type of day in the same period. The high-frequency noise filtering adopts a 3-layer simplified db4 wavelet transform to retain only the low-frequency effective trend components of the load data. The dimensionless normalization adopts the Min-Max normalization method to map the data to the [0,1] interval, eliminating the interference of data dimension differences on model training.
[0050] The 3σ criterion for outlier removal accurately and efficiently eliminates outliers caused by instantaneous voltage surges and acquisition failures, preventing abnormal samples from contaminating the training dataset. High-frequency noise filtering retains effective low-frequency trend components, filtering out high-frequency acquisition noise while fully preserving the core trends in user electricity consumption behavior, avoiding misjudgments of load status due to high-frequency interference. Min-Max normalization eliminates the impact of load data dimensional differences on model training, preventing high-power load data from excessively dominating weight updates during model training, ensuring the convergence of gradient boosting regression and neural network model training, and significantly improving the prediction accuracy of dynamic thresholds.
[0051] Furthermore, the electricity consumption habit characteristics are extracted using an incremental K-means clustering algorithm, outputting the user's daily peak and off-peak load periods, average load during peak periods, and high-power load step threshold; the seasonal characteristics are extracted using a single-season STL time series decomposition algorithm, calculating the load correction coefficient for the corresponding season; the time period characteristics are extracted using a concurrent comparison analysis algorithm, distinguishing the load differences between weekdays and holidays, and the load benchmark values for day and night periods, constructing a 24-hour × 7-day time period load weight matrix.
[0052] The incremental K-means clustering algorithm eliminates the need for repeated training on all historical data, updating clustering results only on newly added daily load data. This reduces feature extraction computational cost by over 90%, perfectly adapting to the low-computing-power hardware constraints of edge terminals. Simultaneously, it accurately identifies users' personalized peak / off-peak electricity consumption patterns and the operating characteristics of high-power equipment, providing core user behavior data for personalized adjustments to dynamic thresholds and addressing the core deficiency of fixed thresholds in adapting to user electricity consumption habits. The single-seasonal STL time series decomposition algorithm decomposes daily load time series data into trend, seasonal, and residual terms, accurately separating load baseline shifts caused by seasonal climate changes. Through seasonal correction coefficients, it achieves seasonal adaptive adjustment of thresholds, resolving the issues of fixed thresholds failing to provide early warnings during winter and summer peak seasons and frequently triggering false alarms in spring and autumn. The 24-hour × 7-day load weight matrix constructed by the synchronous comparative analysis algorithm can finely distinguish the differences in electricity consumption baselines during different time periods, such as weekdays / holidays and day and night. It can achieve threshold weight adaptation for all time periods, allowing dynamic thresholds to match the electricity consumption characteristics of different scenarios such as unattended daytime, home at night, and home on holidays, further improving the accuracy of threshold adaptation and reducing the probability of false alarms and missed alarms.
[0053] Furthermore, the machine learning model that integrates gradient boosting regression and backpropagation neural network is trained using a composite loss function, which includes a mean squared error fitting loss term, a threshold boundary constraint term, and a structured sparse regularization term. The threshold boundary constraint term limits the output range of the dynamic rated load threshold to 4kW to 8kW, and the structured sparse regularization term is used to force the generation of sparse weights during model training. After the model is trained, the average absolute percentage error of its dynamic rated load threshold prediction does not exceed 5%.
[0054] The design of the composite loss function simultaneously addresses three core objectives: model prediction accuracy, electrical safety boundary constraints, and lightweight edge deployment. The mean squared error fitting loss term is the core fitting term, minimizing the deviation between the predicted dynamic threshold and the actual safe load threshold, ensuring the core accuracy of the threshold prediction. The threshold boundary constraint term sets a hard constraint of 4kW-8kW based on the safe carrying capacity limit of residential low-voltage lines, locking the safe range of the threshold output at the algorithm level. This avoids overfitting leading to excessively high thresholds and electrical safety risks, or excessively low thresholds causing frequent false alarms. The structured sparse regularization term forces the model to generate a large number of near-zero weight channels and branches during training, providing a foundation for subsequent structured pruning and lightweight compression, addressing the pain points of large fusion model size, high computational cost, and inability to be deployed on edge terminals. It also suppresses overfitting and improves the model's generalization ability to different power consumption scenarios. The accuracy requirement of an average absolute percentage error of no more than 5% is a core indicator for ensuring the usability of the dynamic threshold, ensuring that the deviation between the predicted threshold and the actual safe load threshold is within an acceptable range, avoiding warning failures and protection gaps caused by excessive prediction errors.
[0055] Furthermore, the specific grading standards for the dual constraint rules of threshold ratio and growth trend are as follows: in the normal state, the ratio of real-time load to dynamic rated load threshold does not exceed 70%; in the warning state, the ratio of real-time load is greater than 70% and does not exceed 85%; in the predictive overload state, the ratio of real-time load is greater than 85% and does not exceed 95%, while the load growth rate within the 5-minute sliding time window is not less than 0.5 kW / min; in the overload state, the ratio of real-time load to dynamic rated load threshold is greater than 95%.
[0056] The four-level gradient classification of threshold proportions, based on the fluctuation characteristics of residential electricity load, enables gradient control of the load status from safe to overload throughout the entire process. This replaces the traditional binary triggering logic with fixed thresholds, providing precise status basis for differentiated alerts and tiered protection, avoiding overly abrupt warnings and protection actions caused by a single threshold. The dual constraint rules of threshold proportion and growth trend overcome the lag defect of traditional solutions that rely solely on absolute threshold values: threshold proportions alone cannot predict the instantaneous overload risk caused by rapid load growth. The addition of a 5-minute sliding window load growth rate constraint accurately identifies the trend of rapid load increase, innovatively achieving early prediction of overload. It triggers warnings before the load is about to exceed the safe threshold, allowing users sufficient time to adjust their electricity consumption behavior, avoiding overload risks at the source, and upgrading from post-event remediation to pre-event prevention. The 0.5kW / minute growth rate threshold matches the step-starting power characteristics of commonly used high-power residential electrical equipment (air conditioners, electric water heaters, induction cookers).
[0057] Furthermore, the differentiated prompt actions in the four dimensions correspond one-to-one with the load status level, and the prompt intensity is positively correlated with the load risk level: In the normal state, a solid green light is triggered with no sound, and the real-time power and dynamic rated load threshold are digitally displayed; in the alert state, a solid yellow light is triggered, and a single warning reminder is simultaneously pushed to the user terminal; in the predictive overload state, an orange flashing light and intermittent buzzer sound are triggered, and overload warnings and handling suggestions are simultaneously pushed at high frequency; in the overload state, a red flashing light and continuous buzzer alarm are triggered, and emergency overload information is simultaneously pushed through multiple channels.
[0058] The design of multi-dimensional differentiated prompts that are positively correlated with the load risk level solves the pain points of traditional devices' single prompt method, which has low recognition and makes it difficult for users to quickly judge the risk level. Through the gradient design of light color, flashing frequency, sound mode, and push frequency, a three-in-one prompt system of visual, auditory, and remote wireless is built, which allows users to quickly and accurately identify the current load risk level and match the corresponding action.
[0059] The tiered alert strategy balances the effectiveness of warnings with user experience: no high-frequency audio-visual alerts are given during normal and alert states to avoid disrupting users' daily lives; strong audio-visual alerts are activated for predictive overload and overload states, along with multi-channel wireless push notifications, ensuring that users receive overload warning information promptly regardless of whether they are on-site, significantly improving the reach and effectiveness of warnings; real-time digital displays allow users to intuitively grasp current load and safety threshold information, assisting users in proactively adjusting their electricity consumption behavior and achieving refined electricity management.
[0060] Furthermore, the circuit priority is pre-divided into protection circuits that are prohibited from being disconnected, commonly used circuits that can only be disconnected in case of extreme overload, and secondary circuits that are prioritized for disconnection in case of overload. When the overload condition lasts for 30 seconds, unnecessary circuits are disconnected step by step in the order from secondary circuits to commonly used circuits. After each level is disconnected, the load change is monitored in real time, and the disconnection action is stopped immediately after the load drops to a safe range. The delayed power restoration strategy is as follows: when the load returns to a normal state and the duration is not less than 1 minute, a preset delayed restoration timer is started, and power is restored step by step in the order from commonly used circuits to secondary circuits, with a restoration interval of not less than 10 seconds between each level of circuit.
[0061] Based on the importance of the electrical equipment, non-disconnectable backup circuits are defined to ensure continuous power supply to core equipment such as refrigerators and medical devices. This achieves overload safety protection while minimizing the impact on users' normal power consumption. The 30-second overload duration threshold filters out the instantaneous load impact caused by equipment startup, avoiding accidental disconnection and ensuring the reliability of protection actions. The design of tiered disconnection combined with real-time load monitoring can achieve overload protection with the smallest power outage range, further reducing the impact on users.
[0062] The delayed recovery and step-by-step closing strategy can avoid damage to electrical equipment and relays caused by the inrush current when closing immediately after the load is restored. At the same time, the 10-second step-by-step recovery interval can avoid the sudden increase in load caused by multiple devices closing at the same time, and prevent the overload protection from being triggered again. The 1-minute load stabilization time requirement can ensure that the load has been restored to a stable and safe range, avoid frequent start-stop caused by load fluctuations, and significantly extend the service life of electrical equipment and actuator relays.
[0063] Furthermore, the incremental training and parameter optimization are only performed during the low electricity consumption period in the early morning of each day. A lightweight incremental learning approach is adopted, which only fine-tunes the bias terms and quantization parameters of the model without updating the core weight matrix of the model. Every 3 months, a full-scale retraining and lightweight compression of the model is performed based on the full set of historical feature data. The updated model is generated and the incremental update package is sent to the collection terminal to complete the optimization loop of the entire life cycle of the model.
[0064] Performing incremental learning during off-peak electricity hours in the early morning avoids peak electricity consumption times. At this time, terminal computing resources are sufficient, and the load monitoring and protection tasks are under less pressure. Incremental learning will not consume the computing resources of core business operations, avoiding problems such as model inference delays and protection action lags. Lightweight incremental learning only fine-tunes the bias terms and quantization parameters, with extremely low computing power consumption. It perfectly adapts to the low computing power hardware constraints of STM32 edge terminals, while continuously adapting to long-term changes in user electricity consumption habits, solving the industry pain point of continuous accuracy decay of static models over long-term operation.
[0065] The three-month cycle edge-cloud collaborative full-scale optimization mechanism can cover the entire seasonal change cycle. It completes the full-scale optimization of the model structure based on all historical data, further improving the model's prediction accuracy and generalization ability. It only uploads encrypted feature data and sends incremental update packages, which not only protects the privacy and security of users' original electricity consumption data from the source, but also minimizes network transmission volume. At the same time, the model update process does not affect the load monitoring and safety protection functions of the device, realizing a safe and stable optimization closed loop throughout the model's entire life cycle.
[0066] Example 2:
[0067] The present invention also provides an intelligent metering load indication device based on machine learning algorithm, including a load acquisition unit, an algorithm-driven intelligent analysis and decision-making unit, a multi-mode indication unit, a precise safety protection unit, and a power supply module that provides stable power supply to each unit;
[0068] The signal output terminal of the load acquisition unit is connected to the signal input terminal of the algorithm-driven intelligent analysis and decision unit, and is used to acquire the original power load time sequence data on the user side and transmit the acquired data to the algorithm-driven intelligent analysis and decision unit.
[0069] The algorithm-driven intelligent analysis and decision-making unit has a built-in customized machine learning algorithm module, which is used to complete load data cleaning, electricity behavior feature extraction, dynamic rated load threshold adaptive prediction, load status intelligent classification judgment, and output corresponding decision instructions.
[0070] The control input terminal of the multi-mode prompting unit is connected to the instruction output terminal of the algorithm-driven intelligent analysis and decision-making unit, and is used to execute differentiated prompting actions that match the load status level according to the received decision instructions.
[0071] The control input terminal of the precision safety protection unit is connected to the instruction output terminal of the algorithm-driven intelligent analysis and decision-making unit, and is used to execute safety protection actions of hierarchical circuit disconnection and delayed power restoration according to the received decision instructions.
[0072] Application example:
[0073] Step 1. Full-time load data acquisition and edge-end basic parameter initialization
[0074] This step serves as the data source entry point and foundation for edge deployment. The core objective is to acquire high-fidelity local load data, complete the dual-dimensional parameter initialization of algorithm operation and edge resource constraints, and ensure that all raw data is stored locally on the edge terminal without being uploaded to the cloud, thus protecting the privacy of user electricity data and strictly conforming to the load acquisition unit and initial threshold setting rules of the original solution.
[0075] 1.1 Real-time acquisition and local storage of edge load data:
[0076] Using the RS485 communication interface of the current transformer or electricity meter built into the edge terminal, at a fixed sampling frequency User-side power load data is collected every 10 seconds. The core data collection items include: the raw total active power collected at time t. Cumulative electricity consumption Sampling timestamp Simultaneously, the minute-level average power was calculated with a granularity of 1 minute. It serves as the fundamental temporal unit for algorithm analysis.
[0077] Historical load data collected is synchronously stored on the local SD card / Flash of the edge terminal for a period of no less than 3 months, providing a sample set for local feature extraction and lightweight incremental learning; real-time data is synchronously transmitted to the local algorithm processing module of the edge terminal without cloud dependency, ensuring normal operation of the device in network outage scenarios.
[0078] 1.2 Initialization of two-dimensional basic parameters:
[0079] The algorithm's core parameters and edge resource constraint parameters have been initialized in two dimensions, and the core parameters are fully compatible with the original solution.
[0080] Algorithm core parameter initialization: Initial rated load threshold kW; Load level classification benchmark ratio Load growth rate threshold kW / min, sliding time window Minutes; Overload continuous action threshold Seconds, default delayed recovery time Minutes, supports 1-10 minutes customizable.
[0081] Edge resource constraint parameter initialization: Set the storage limit of the edge terminal model. KB, maximum time spent on single-frame inference ms, maximum memory usage KB provides hard constraint boundaries for subsequent model compression.
[0082] When powered on for the first time, if the historical data accumulation period is less than one month, the edge terminal will use the initial rated threshold. Run locally; when historical data has accumulated for one month, the lightweight model local inference process will be automatically started, switching to the dynamic threshold output by the algorithm.
[0083] Step 2. Lightweight Data Cleaning and Standardization at the Edge
[0084] The core objective of this step is to perform noise reduction and purification of the raw data locally on the edge terminal, outputting a standardized dual-track dataset. All preprocessing algorithms are optimized for fixed-point computation mode to adapt to the computing power characteristics of the Cortex-M3 core. The input is the raw load time series output from step 1. Parameters are not reused and the data flow is clear.
[0085] 2.1 Outlier Removal and Missing Value Filling Based on the 3σ Criterion:
[0086] For raw load time series data At the edge terminal, the 3σ criterion is used to eliminate abnormal values caused by instantaneous voltage surges and acquisition faults. The discrimination formula is as follows: .
[0087] In the formula: Raw load time series data within the statistical period The mean, Raw load time series data within the statistical period Standard deviation;
[0088] If the sampled value or If a value is found to be outlier, it is removed. The missing time series value after removal is filled with the local historical average load of the same type of day (weekday / holiday) during the same period, and the clean load sequence after outlier removal is output. .
[0089] 2.2 High-frequency noise filtering based on simplified wavelet transform:
[0090] To address the computing power limitations of edge terminals, a 3-layer simplified db4 wavelet transform is used to process the clean load sequence. Denoising is performed, retaining only the effective low-frequency trend components and filtering out high-frequency acquisition noise. The decomposition and reconstruction formulas are as follows: .
[0091] In the formula: These are the low-frequency approximation coefficients for the third layer. For the first High-frequency detail coefficients of the layer For scaling function, It is the mother function of the db4 wavelet;
[0092] After applying a fixed soft threshold to denoise the high-frequency detail coefficients, the clean, denoised load time series is reconstructed using only low-frequency approximation coefficients. Compared to the original algorithm, the computational load is reduced by 60%, making it suitable for edge terminal computing power.
[0093] 2.3 Dimensionless Normalization Based on Min-Max:
[0094] For the denoised clean load sequence Perform Min-Max normalization to map the data to To eliminate the influence of dimensional differences on the model, the normalization formula is as follows: .
[0095] In the formula: This is the normalized load value. , Local historical sample sets The minimum and maximum values;
[0096] This step ultimately outputs two sets of local core data: ① a denoised, clean payload sequence with physical dimensions. ① Used for local feature extraction and real-time business computing; ② Dimensionless standardized feature training sample set It is used for model training and lightweight inference.
[0097] Step 3. Lightweight User Electricity Consumption Behavior Multidimensional Feature Extraction at the Edge
[0098] The core objective of this step is to extract key features locally on the edge terminal. All algorithms are optimized to an incremental operation mode to avoid the computational burden of traversing the entire dataset. The three core features identified in the original solution—electricity usage habits, season, and time of day—are extracted to construct a multi-dimensional feature set, with the output from step 2 as the input. and .
[0099] 3.1 Incremental K-means clustering for electricity consumption habit feature extraction:
[0100] The incremental K-means clustering algorithm is used, which only updates the clustering of newly added daily load data, without requiring retraining on the entire dataset, thus significantly reducing the computing power consumption at the edge. The clustering objective function is as follows: In the formula: the number of clusters is fixed at 2, including peak load clusters and off-peak load clusters. For the first A cluster, For the first The cluster centers of each cluster;
[0101] Output daily peak load periods for users through incremental clustering. Off-peak load period Average load during peak hours High-power load step threshold Complete the extraction of electricity consumption habits characteristics.
[0102] 3.2 Simplified Seasonal Feature Extraction from Time Series Decomposition:
[0103] The daily average load sequence of edge local storage is decomposed using a single-seasonal STL decomposition algorithm to extract seasonal features and calculate the seasonal load correction coefficient. The decomposition formula is as follows: .
[0104] In the formula: For the first The average daily load of the day, For trend items, For seasonal items, For residual terms;
[0105] Based on seasonal items The load correction factors for the four seasons are calculated using the following formula: In the formula: This is a correction factor for the corresponding season. This represents the average daily load for the season. The seasonal characteristics were extracted based on the annual daily average load.
[0106] 3.3 Time-segment feature extraction and weight matrix construction for concurrent comparison:
[0107] Using a concurrent comparative analysis algorithm, weekday / holiday load weights and day / night load baselines are calculated locally at the edge, constructing a 24-hour × 7-day time-period load weight matrix. The core calculation formula is as follows: ;
[0108] In the formula: , Load weights for weekdays and holidays, respectively. , These are the average loads during the same period on weekdays and holidays, respectively. This represents the average load for all types of loads during the same period of the day.
[0109] The final multidimensional feature set is stored locally on the edge terminal to provide input for subsequent model inference.
[0110] Step 4. Training the fusion prediction model with sparse regularization constraints on the cloud / host computer.
[0111] This step is a preliminary step for model compression. The core objective is to complete the initial training of the fusion model on a cloud / host computer with sufficient computing power, while adding structured sparse regularization constraints to prepare for subsequent edge-oriented compression. The input is the multi-dimensional feature set and standardized sample set output from step 3. The core architecture is fully compatible with the original solution.
[0112] 4.1 Fusion Model Architecture and Sparse Regularized Loss Function Design:
[0113] The fusion model retains the dual-branch architecture of Gradient Boosting Regression (GBR) and Backpropagation Neural Network (BPNN), while adding an L1 structured sparse regularization term to the loss function. This forces the model to generate sparse weights during training, providing a basis for subsequent pruning. The formula for the composite loss function is as follows: .
[0114] In the formula: the first term is the mean squared error fitting loss of the original scheme. For the model prediction threshold, This represents the actual safe load threshold corresponding to the sample. This is the training sample size;
[0115] The second term is the threshold boundary constraint term of the original scheme. , kW kW represents the upper and lower limits of the threshold. To constrain weights;
[0116] The third item is the newly added structured sparse regularization term. , For BPNN Layer weight matrix, GBR decision tree split weights, For network layers, The sparse regularization coefficient forces the model to generate a large number of weight channels close to 0 after training.
[0117] 4.2 Model Training and Basic Performance Validation:
[0118] The AdamW optimizer was used for iterative training with an initial learning rate of 1e-3 and an early stopping strategy of patience=5 to avoid overfitting. After training, the mean absolute percentage error (MAPE) of the threshold prediction model was verified to be ≤5%, which met the accuracy requirements of the original scheme and provided a high-precision basic model for subsequent compression.
[0119] Step 5. Structured compression and 8-bit quantization of the fusion model
[0120] This step is the core of edge intelligence deployment. The core objective is to perform two-stage compression on the trained high-precision basic model, namely channel-level structured pruning and symmetric 8-bit integer quantization, to compress the model size to within the resource constraints of the edge terminal while maintaining an accuracy loss of ≤1%, thereby generating a lightweight model adapted to the STM32 terminal.
[0121] 5.1 Channel-level structured pruning based on L1 norm:
[0122] For sparsely trained models, channel-level structured pruning is used to remove redundant channels / decision tree branches with weights close to 0. The pruned model has a regular structure and can run on edge devices without a special inference engine. The pruning process is as follows:
[0123] BPNN branch pruning: For each output channel of a fully connected layer, calculate the sum of the L1 norms of its weights, as shown in the following formula: In the formula: For the first Importance rating of each output channel This represents the weight value of the channel. Set the number of input channels; set the pruning threshold. Remove The redundant channels are pruned to a ratio of less than 70%, ensuring that the accuracy loss is ≤0.5%.
[0124] GBR Branch Pruning: Cost Complexity Pruning (CCP) is used to remove decision tree branches that contribute little to the prediction results. After pruning, the number of decision trees is reduced from 100 to less than 30, and the model size is significantly reduced.
[0125] Fine-tuning after pruning: Fine-tune the pruned model for 5 epochs with a small learning rate (1e-5) to restore model accuracy and ensure that MAPE ≤ 5.5% after pruning, which meets business requirements.
[0126] 5.2 Symmetric 8-bit Integer Quantization:
[0127] For the pruned model, symmetric 8-bit quantization (INT8) is used to convert the original 32-bit floating-point (FP32) model into an 8-bit integer model, which is compatible with the integer arithmetic unit of the STM32 core. This improves the operation speed by more than 4 times and reduces the model size by 75%. The quantization formula is as follows:
[0128] Quantization mapping formula: In the formula: It is the quantized 8-bit integer value. The original 32-bit floating-point value. This is the quantization scaling factor. Zero-point offset, in symmetric quantization This further simplifies the calculation.
[0129] Inverse quantization mapping formula: After quantization, all weights and activation values of the model are converted to INT8 format. Only when the final output threshold is reached is it dequantized into floating-point values with physical dimensions, ensuring that the entire edge inference process is mainly based on integer operations, with extremely low computing power consumption.
[0130] 5.3 Lightweight Model Edge Adaptation and Fixing:
[0131] The quantized lightweight model is encapsulated using a CMSIS-NN inference engine adapted to the ARM Cortex-M3 core, optimizing memory usage and inference speed. The resulting lightweight model meets the following requirements: model size ≤ 30KB, lower than the edge terminal Flash limit of 32KB; single-frame inference time ≤ 80ms, lower than the edge terminal maximum time limit of 100ms; running memory usage ≤ 8KB, lower than the edge terminal RAM limit of 10KB; threshold prediction accuracy loss ≤ 1%, fully meeting business requirements.
[0132] The packaged lightweight model is stored in the Flash memory of the STM32 edge terminal for local real-time inference.
[0133] Step 6. Real-time inference and intelligent load status classification of lightweight edge model
[0134] The core objective of this step is to complete real-time inference of the lightweight model locally on the edge terminal, output dynamic thresholds and perform load state classification, without cloud dependency, and operate normally in offline scenarios. The inputs are the real-time multidimensional features output from step 3 and the real-time clean load sequence output from step 2. The core logic is fully compatible with the original solution.
[0135] 6.1 Lightweight edge model for real-time inference:
[0136] The edge terminal STM32 microprocessor, with a 1-minute cycle, inputs real-time extracted multi-dimensional features into a fixed lightweight model, performs INT8 integer inference through the CMSIS-NN inference engine, and outputs... Dynamic rated load threshold at any time After inference, the value is converted into a kW value with physical dimensions through an inverse quantization formula, and the load level division ratio is adaptively adjusted synchronously with the dynamic threshold.
[0137] 6.2 Real-time calculation of sliding window load growth rate:
[0138] Using a 5-minute sliding time window, the load growth rate is calculated locally and in real time at the edge. This provides a core basis for predictive overload determination, and the calculation formula is as follows: In the formula: for Load growth rate at any given time The time window is a sliding window of minutes;
[0139] Simultaneously calculate the real-time load percentage. The formula is as follows: .
[0140] 6.3 Quantitative Determination of Load State Level under Dual Constraints:
[0141] Based on real-time load percentage With load growth rate Using a dual constraint of threshold proportion and growth trend, and strictly following the rules of the original scheme, load status classification is completed locally at the edge. The judgment rules are as follows:
[0142] 1. Normal state: The load is within the safe operating range;
[0143] 2. Alert Status: The load is approaching the threshold range and needs to be continuously monitored.
[0144] 3. Predictive overload conditions: and kW / minute, rapid load increase, triggering early warning;
[0145] 4. Overload condition: The load exceeds the safety limit, triggering the protection action.
[0146] The judgment result is synchronously output to the local edge prompting unit and protection unit, serving as the sole decision-making basis for action execution.
[0147] Step 7. Multi-mode differentiated intelligent prompt control executed locally at the edge
[0148] This step is the output stage of the algorithm decision and is executed entirely locally on the edge terminal. Based on the load status level output in step 6, it triggers differentiated multi-mode prompts. The inputs are the load status judgment result from step 6 and the real-time dynamic threshold. Real-time clean load The core rules are fully compatible with the original solution.
[0149] 7.1 Tiered prompt triggering logic control:
[0150] Differentiated alert triggering rules are set for different load status levels, with alert intensity positively correlated with risk level. The specific rules are as follows:
[0151] I. Normal State
[0152] Light indicator: Green indicator light is always on.
[0153] Sound notification: No sound notification
[0154] Core content of LCD digital display: Real-time noise reduction power Dynamic rated load threshold
[0155] Wireless push rules: No real-time push, only daily electricity consumption reports are generated locally for users to view.
[0156] II. Alert Status
[0157] Light indicator: Yellow indicator light is constantly on.
[0158] Sound notification: No sound notification
[0159] Core content of LCD digital display: Real-time noise reduction power Dynamic rated load threshold Load ratio
[0160] Wireless push rules: Send a single Bluetooth local alert to the user's mobile app.
[0161] III. Predictive Overload Conditions
[0162] Light indicator: The orange indicator light flashes at a set frequency.
[0163] Sound notification: An intermittent beep will be triggered every 3 seconds.
[0164] Core content of LCD digital display: Real-time noise reduction power Dynamic rated load threshold Load growth rate Overload countdown prediction information
[0165] Wireless push notification rules: Frequently push alert information to the user's mobile app, while simultaneously triggering local SMS notifications.
[0166] IV. Overload Condition
[0167] Light indicator: Red indicator light flashes rapidly.
[0168] Sound alert: Continuous beeping alarm
[0169] Core content of LCD digital display: Real-time noise reduction power Overload duration and warning information for impending circuit disconnection.
[0170] Wireless push rules: In case of emergency, push alarm information to the user's mobile APP and trigger SMS and voice call reminders at the same time.
[0171] 7.2 Multi-channel prompts are executed synchronously:
[0172] Local prompts are executed synchronously: The lights, sounds, and LCD display modules of the edge terminal are triggered synchronously based on the level instructions output by the local algorithm, with a synchronization delay of ≤100ms;
[0173] Wireless push execution: Through the Bluetooth / Wi-Fi module built into the edge terminal, locally generated warning information and personalized suggestions are pushed to the user's mobile APP without cloud relay, ensuring real-time push.
[0174] Step 8: Edge-local execution of precise overload protection and delayed recovery control
[0175] This step is the secure execution terminal for algorithmic decision-making. It is executed entirely at the local hardware level of the edge terminal, and can still trigger protection normally even in network outage scenarios, completely avoiding the security risks brought about by cloud reliance. The input is the load status judgment result from step 6 and the real-time clean load. The core logic is fully compatible with the original solution.
[0176] 8.1 Circuit priority preset and overload disconnection timing control:
[0177] Loop Priority Preset: Users connect to the edge terminal via Bluetooth through a mobile app, and three levels of loop priority are preset:
[0178] Protective circuits: Core circuits that cannot be disconnected, such as those for lighting, refrigerators, and medical equipment, must not be disconnected;
[0179] Commonly used circuits: circuits for everyday use such as kitchen appliances and office equipment, which are only disconnected in case of extreme overload;
[0180] Secondary circuits: Non-essential circuits such as entertainment equipment and ambient lighting should be disconnected first when overloaded;
[0181] Overload cutoff timing control algorithm: When the edge terminal determines that the load has entered an overload state, it starts the overload duration timer locally. The calculation formula is as follows: .
[0182] In the formula: The initial moment of entering the overload state. The sampling period is For indicator functions, when The value is 1 if the condition is met, and 0 otherwise.
[0183] when At each second, the local MCU of the edge terminal sends a control signal to the relay, cutting off the circuits one by one in the order of secondary circuits to primary circuits. After each level is cut off, the load change is monitored, and the cutting off stops when the load drops to a safe range, ensuring continuous power supply to the circuits.
[0184] 8.2 Load Adaptive Delay Recovery Control Algorithm:
[0185] When the edge terminal monitors the real-time load percentage If the duration is ≥1 minute, the load is determined to have recovered to a safe range. A local delayed recovery timer is then started to execute the delayed recovery strategy, preventing frequent start-stop cycles from damaging electrical appliances.
[0186] 1. Delayed recovery time The default setting is 4 minutes, but users can customize the time from 1 to 10 minutes.
[0187] 2. During the delay period, continuously monitor the load status. If an overload is triggered again, reset the timer and stop the recovery action.
[0188] 3. After the delay timer ends, power supply will be restored step by step in the order of common circuits and secondary circuits, with a 10-second interval between each circuit restoration to avoid the impact of closing the circuit breaker. After restoration is completed, the indicator light will turn green and remain on.
[0189] Step 9. Lightweight Incremental Learning at the Edge and Closed-Loop Optimization of the Edge-Cloud Collaborative Model
[0190] This step is a closed-loop optimization process that builds a collaborative optimization mechanism for lightweight incremental updates at the edge and full retraining and compression in the cloud. This not only solves the problem of insufficient computing power at the edge terminal to conduct full training, but also ensures that the model adapts to changes in users' electricity consumption habits over the long term. The optimized lightweight model parameters are then fed back to the edge inference module in step 6, forming a deep closed loop throughout the entire process.
[0191] 9.1 Lightweight Incremental Learning at the Edge:
[0192] Every day at 1:00 AM, the edge terminal performs lightweight incremental learning locally, only fine-tuning the model's bias terms and zero-point offsets, without updating the weight matrix. This consumes very little computing power, adapting to the computing power limitations of STM32. The optimization objective is to minimize the prediction error of incremental samples, as shown in the following formula:
[0193]
[0194] In the formula: This represents the number of valid samples added the previous day. For the model prediction threshold, This corresponds to the actual safe load value;
[0195] After incremental learning is completed, the bias terms and quantization parameters of the model are updated locally. The model can be updated seamlessly without restarting the terminal, ensuring that the model continues to adapt to changes in users' electricity consumption habits.
[0196] 9.2 Edge-Cloud Collaborative Full Retraining and Compressed Update:
[0197] Every three months, a full-scale optimization is performed in a collaborative manner between the edge and cloud: the edge terminal only uploads encrypted multi-dimensional feature data, not the original power consumption data, to protect user privacy; the cloud / host computer completes full retraining, structured pruning, and quantization compression of the model based on the full feature data, generating an updated lightweight model; the cloud only sends out incremental update packages for the model, which the edge terminal receives via Wi-Fi and completes the model update locally, without affecting the device's basic security protection functions; after the update is completed, the model accuracy and inference performance are automatically verified to ensure that the constraints of edge deployment are met, ultimately forming a closed-loop lifecycle of data collection-local inference-secure execution-incremental optimization-full update.
[0198] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A smart metering load indication method based on machine learning algorithm, characterized in that, include: The original electricity load time-series data of the user side is obtained by the acquisition terminal, the basic parameters required for the algorithm to run are initialized, and the initial rated load threshold is set. The original electricity load time series data is processed sequentially by outlier removal, high-frequency noise filtering, and dimensionless normalization, and outputs denoised and clean load time series data for business calculations, as well as a standardized feature training sample set for model training. Based on denoised pure load time-series data and standardized feature training sample set, we deeply mine and extract three core features: user electricity consumption habits, seasonal features, and time period features, and construct a multi-dimensional feature set for load threshold prediction. Based on the completed multidimensional feature set, a machine learning model that integrates gradient boosting regression and backpropagation neural network is adopted to output the dynamic rated load threshold at the corresponding time in real time. The load level division ratio is adaptively adjusted synchronously with the dynamic threshold. Based on real-time collected denoised and clean load time-series data and dynamic rated load thresholds, combined with load change trends, the load status is divided into four levels: normal, warning, predictive overload, and overload using a dual constraint rule of threshold ratio and growth trend. Based on the determined load status level, trigger differentiated prompt actions in four dimensions: light, sound, digital display, and wireless push, corresponding to the level; Based on the duration of the overload, graded disconnection control is executed according to the circuit priority preset by the user. After the load is restored to the safe range, a delayed power restoration strategy is executed. During daily off-peak electricity hours, based on newly added load data and device execution feedback data, incremental training and parameter optimization are performed on the integrated machine learning model. The updated model parameters are used for dynamic threshold prediction in the next cycle, forming a closed loop of the entire process.
2. The intelligent metering load indication method based on machine learning algorithm as described in claim 1, characterized in that, The original power load time-series data collection items include real-time total active power, cumulative power consumption and corresponding sampling timestamps. The sampling frequency is fixed at once every 10 seconds. At the same time, the minute-level average power is calculated with a granularity of 1 minute as the basic time-series unit for algorithm analysis. The collected historical load data is stored locally for no less than 3 months. When the device is powered on for the first time and there is no sufficient historical training data, the basic load monitoring and safety protection functions are performed using a preset initial rated load threshold. After the historical data has accumulated for 1 month, it automatically switches to the dynamic rated load threshold output by the fusion machine learning model.
3. The intelligent metering load indication method based on machine learning algorithm as described in claim 1, characterized in that, The outlier removal adopts the 3σ criterion to remove outliers caused by instantaneous voltage changes or acquisition failures in the original electricity load time series data. The missing time series values after removal are filled with the local historical load average of the same type of day in the same period. The high-frequency noise filtering adopts a 3-layer simplified db4 wavelet transform to retain only the low-frequency effective trend components of the load data. The dimensionless normalization adopts the Min-Max normalization method to map the data to the [0,1] interval, eliminating the interference of data dimension differences on model training.
4. The intelligent metering load indication method based on machine learning algorithm as described in claim 1, characterized in that, The electricity consumption habit features are extracted using an incremental K-means clustering algorithm, which outputs the user's daily peak and off-peak load periods, average load during peak periods, and high-power load step thresholds. The seasonal features are extracted using a single-season STL time series decomposition algorithm, which calculates the load correction coefficient for the corresponding season. The time period features are extracted using a concurrent comparison analysis algorithm, which distinguishes the load differences between weekdays and holidays, and the load benchmark values for day and night periods, and constructs a 24-hour × 7-day time period load weight matrix.
5. The intelligent metering load indication method based on machine learning algorithm as described in claim 1, characterized in that, The machine learning model that integrates gradient boosting regression and backpropagation neural network is trained using a composite loss function, which includes a mean squared error fitting loss term, a threshold boundary constraint term, and a structured sparse regularization term. The threshold boundary constraint term limits the output range of the dynamic rated load threshold to 4kW to 8kW, and the structured sparse regularization term is used to force the generation of sparse weights during model training. After the model is trained, the average absolute percentage error of its dynamic rated load threshold prediction does not exceed 5%.
6. The intelligent metering load indication method based on machine learning algorithm as described in claim 1, characterized in that, The specific grading standards for the dual constraint rule of threshold ratio and growth trend are as follows: Normal state is when the ratio of real-time load to dynamic rated load threshold does not exceed 70%; Alert state is when the ratio of real-time load is greater than 70% and not more than 85%; Predictive overload state is when the ratio of real-time load is greater than 85% and not more than 95%, and the load growth rate within the 5-minute sliding time window is not less than 0.5 kW / min; Overload state is when the ratio of real-time load to dynamic rated load threshold is greater than 95%.
7. The intelligent metering load indication method based on machine learning algorithm as described in claim 1, characterized in that, The four dimensions of differentiated prompt actions correspond one-to-one with the load status level, and the prompt intensity is positively correlated with the load risk level: a green solid light prompt is triggered in the normal state, there is no sound prompt, and the real-time power and dynamic rated load threshold are digitally displayed. When the alert status is triggered, a solid yellow light will illuminate as a warning, and a single warning reminder will be pushed to the user's terminal simultaneously. Predictive overload conditions trigger an orange flashing light and intermittent buzzer sound alert, while simultaneously sending high-frequency overload warnings and handling suggestions; An overload condition triggers a red flashing light and a continuous buzzer alarm, while simultaneously pushing emergency overload information through multiple channels.
8. The intelligent metering load indication method based on machine learning algorithm as described in claim 1, characterized in that, The circuit priority is pre-classified into a protection type circuit that is prohibited from being disconnected, a common type circuit that can only be disconnected in case of extreme overload, and a secondary type circuit that is preferentially disconnected in case of overload. When the overload condition lasts for 30 seconds, the unnecessary circuits are disconnected step by step in the order of secondary type circuits to common type circuits. After each level is disconnected, the load change is monitored in real time, and the disconnection action is stopped immediately when the load drops to a safe range. The delayed power restoration strategy is as follows: when the load returns to a normal state and the duration is not less than 1 minute, a preset delayed restoration timer is started, and power is restored step by step in the order of common type circuits to secondary type circuits, with a restoration interval of not less than 10 seconds between each level of circuit.
9. The intelligent metering load indication method based on machine learning algorithm as described in claim 1, characterized in that, The incremental training and parameter optimization are performed only during the low electricity consumption period in the early morning of each day. A lightweight incremental learning approach is adopted, which only fine-tunes the bias terms and quantization parameters of the model without updating the core weight matrix of the model. Every 3 months, a full-scale retraining and lightweight compression of the model is performed in collaboration between the end and the cloud based on the full set of historical feature data. The updated model is generated and the incremental update package is sent to the collection terminal to complete the optimization loop of the entire life cycle of the model.
10. A smart metering load indication device driven by machine learning algorithms, characterized in that, It includes a load acquisition unit, an algorithm-driven intelligent analysis and decision-making unit, a multi-mode prompting unit, a precise safety protection unit, and a power supply module that provides stable power to each unit; The signal output terminal of the load acquisition unit is connected to the signal input terminal of the algorithm-driven intelligent analysis and decision unit, and is used to acquire the original power load time sequence data on the user side and transmit the acquired data to the algorithm-driven intelligent analysis and decision unit. The algorithm-driven intelligent analysis and decision-making unit has a built-in customized machine learning algorithm module, which is used to complete load data cleaning, electricity behavior feature extraction, dynamic rated load threshold adaptive prediction, load status intelligent classification judgment, and output corresponding decision instructions. The control input terminal of the multi-mode prompting unit is connected to the instruction output terminal of the algorithm-driven intelligent analysis and decision-making unit, and is used to execute differentiated prompting actions that match the load status level according to the received decision instructions. The control input terminal of the precision safety protection unit is connected to the instruction output terminal of the algorithm-driven intelligent analysis and decision-making unit, and is used to execute safety protection actions of hierarchical circuit disconnection and delayed power restoration according to the received decision instructions.