Non-intrusive load detection method and system based on multi-state power consumption and machine learning

By extracting appliance-level power consumption patterns from aggregated household power consumption data using the NILM model and machine learning methods, and combining feature fusion with a dual-network architecture, the problem of incomplete information and high false alarm rate in traditional power theft detection is solved, achieving higher accuracy and robustness in power theft detection.

CN121434698AActive Publication Date: 2026-01-30CHONGQING UNIV

Patent Information

Application Number
CN202512008917.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-29
Publication Date
2026-01-30
Estimated Expiration
2045-12-29

AI Technical Summary

Technical Problem

Traditional methods for detecting electricity theft rely on single-source data, resulting in incomplete information, high false alarm rates, and poor generalization ability. Furthermore, multi-source data fusion is difficult to apply efficiently in AMI scenarios and cannot accurately reflect users' actual electricity consumption behavior.

Method used

The non-intrusive load monitoring model NILM extracts appliance-level power consumption patterns from aggregated household power consumption data. It combines a dual-network architecture with a machine learning model for feature extraction and fusion, and uses binary cross-entropy loss and gradient optimization to train the detection model, thereby achieving end-to-end load anomaly detection.

Benefits of technology

It improves the accuracy and robustness of electricity theft detection, reduces the false alarm rate, enhances the adaptability and generalization ability of the model, and enables more comprehensive modeling and analysis of users' electricity consumption behavior.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121434698A_ABST
    Figure CN121434698A_ABST
Patent Text Reader

Abstract

The invention relates to an intelligent power grid and artificial intelligence, in particular to a non-intrusive load detection method and system based on multi-state power consumption and machine learning, and the method comprises the steps: obtaining electric appliance level power consumption data; preprocessing the data; feature extraction and fusion; and classifying load anomalies. According to the scheme, the high generalization ability can be kept while the electricity stealing detection accuracy is improved, the integrated power consumption sequence and the electric appliance power consumption matrix are received at the same time to serve as input, the household overall electricity consumption information and the single equipment level characteristics are organically fused, and therefore more comprehensive modeling and analysis of the electricity consumption behavior of a user are achieved, and the user experience is improved. And the capability of identifying abnormal behaviors such as electricity stealing is enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of combining smart grids with large-scale artificial intelligence models, and in particular to a non-intrusive load detection method and system based on multi-state power consumption and machine learning. Background Technology

[0002] Advanced Metering Infrastructure (AMI) is a crucial component of the smart grid, providing key support for efficient energy management by enabling two-way communication between power companies and users. However, the digital nature of AMI also makes it a potential target for cyberattacks, with electricity theft being particularly prominent. Statistics show that between 2017 and 2021, global economic losses due to electricity theft increased from US$96 billion to US$101.2 billion. Effectively detecting and preventing electricity theft has become a critical issue in ensuring the safe and stable operation of the smart grid.

[0003] Traditional methods for detecting electricity theft mainly fall into two categories: one is based on fixed rules or thresholds, relying on expert experience and statistical patterns to judge abnormal electricity consumption behavior; the other is based on machine learning models, which identify potential electricity theft patterns by training aggregated electricity consumption data. However, both types of methods generally suffer from poor adaptability and high false alarm rates. To compensate for the shortcomings of single data sources, researchers have begun to explore multi-source data fusion, incorporating auxiliary information such as temperature, water, or gas consumption into the detection model to improve accuracy.

[0004] Although multi-source fusion provides a new approach to electricity theft detection, the correlation between these auxiliary data and electricity usage is weak, making it difficult to accurately reflect users' actual electricity consumption behavior. Summary of the Invention

[0005] To address the technical challenges of traditional non-intrusive load anomaly (such as electricity theft) detection, which relies on single-source data leading to incomplete information, high false alarm rates, and poor generalization ability, while directly acquiring appliance-level data is costly, and the inefficient application of NILM technology and multi-source data fusion in AMI scenarios to improve detection accuracy, this application provides a non-intrusive load detection method and system based on multi-state power consumption and machine learning. By extracting appliance-level power consumption patterns from aggregated metering data and fusing them with total household load data based on a dual-network architecture, misclassification bias is reduced, and user power consumption behavior characteristics are characterized with finer granularity.

[0006] Firstly, this application provides a non-intrusive load detection method based on multi-state power consumption and machine learning: S1. Obtain the household aggregated power consumption data of the target user. The household aggregated power consumption data represents the total power consumption of the household. The household aggregated power consumption data is decomposed by the non-intrusive load monitoring model NILM to identify the unique power consumption waveform characteristics of various types of electrical appliances contained in the aggregated power consumption data and infer the power consumption data of a single appliance corresponding to each type of appliance. S2. Preprocess the aggregated power consumption data of the household and the power consumption data of the single appliance respectively to obtain the preprocessed aggregated power consumption sequence and appliance power consumption matrix. S3. Load a preset machine learning detection model, which includes an aggregated power consumption feature extractor, an appliance power consumption feature extractor, and a feature classifier; S4. Input the preprocessed aggregated power consumption sequence into the aggregated power consumption feature extractor to extract the overall aggregated features; input the appliance power consumption matrix into the appliance power consumption feature extractor to extract the appliance local features; perform feature fusion on the overall aggregated features and the appliance local features to obtain the fused features; S5. Input the fused features into the feature classifier, and output the classification result of whether the target user's load is abnormal through the feature classifier; S6. The loss value between the classification result and the true label is calculated using the binary cross-entropy loss function. The parameters of the machine learning detection model are iteratively updated using the gradient optimization algorithm. The training is terminated according to the preset training termination condition to obtain the machine learning detection model that has been trained. S7. Using the trained machine learning detection model, perform steps S2-S5 on the target user's real-time aggregated household power consumption data and the corresponding power consumption data of a single appliance to achieve non-intrusive load detection.

[0007] By adopting the above technical solutions, the NILM model is used to non-intrusively acquire electrical appliance-level power consumption data, avoiding the high cost of installing sensors on each appliance. The dual feature extractor and feature fusion architecture are used to capture both global power consumption trends and device-level fine-grained features, solving the problem of one-sided information detection in traditional single-source data. The model training combined with binary cross-entropy loss and gradient optimization achieves end-to-end load anomaly detection, which not only improves the identification accuracy of abnormal behaviors such as electricity theft, but also ensures the robustness and generalization ability of the model through training optimization, effectively solving the problems of high false alarm rate and poor adaptability of traditional methods.

[0008] Optionally, in step S1, the various types of electrical appliances include constant-type electrical appliances, switching-type electrical appliances, and multi-state electrical appliances; The unique power consumption waveform characteristic of the constant-type electrical appliance is that the power consumption remains stable within a preset time and the fluctuation amplitude is less than a first threshold. The unique power consumption waveform characteristic of the switching electrical appliance is that the power consumption alternates between a fixed power consumption value in the on state and zero value in the off state. The unique power consumption waveform characteristic of the multi-state electrical appliance is that the power consumption operates in multiple discrete states and has a periodic variation pattern.

[0009] By adopting the above technical solutions, and by clarifying the unique power consumption waveform characteristics of constant-type, switching-type, and multi-state electrical appliances, the load detection device can specifically identify the normal power consumption patterns of different types of electrical appliances, avoiding misjudgments of anomalies caused by differences in the operating characteristics of electrical appliances. At the same time, based on the deviation of features, anomalies can be initially judged, suspicious power consumption data can be screened in advance, and the amount of invalid data in subsequent model calculations can be reduced. This not only improves the accuracy of the initial anomaly identification, but also lays the foundation for subsequent refined detection and enhances the adaptability to diverse electrical load anomalies.

[0010] Optionally, in step S2, the preprocessing of the aggregated household power consumption data and the power consumption data of the individual appliance includes: The household aggregated power consumption data is subjected to mean resampling processing within a fixed time window, and the resampled power consumption sequence is normalized to obtain the preprocessed aggregated power consumption sequence. The power consumption data of the single appliance is subjected to mean resampling processing within a fixed time window. The resampled power consumption sequence is then normalized. Finally, the power consumption sequences of various types of appliances after normalization are aligned and merged according to the time step to obtain the appliance power consumption matrix.

[0011] Optionally, in step S2, the normalization process includes: Calculate the normalized power consumption using the following formula: Where x is the power consumption data before normalization. σ represents the average power consumption data, and σ represents the standard deviation of the power consumption data. The dimension of the power consumption matrix of the electrical appliances is the number of time steps × the number of electrical appliances: in, Electrical appliances exist Power consumption at any given moment.

[0012] By adopting the above technical solutions, normalization processing eliminates the dimensional differences of different power consumption data through a fixed formula, avoiding model training bias towards high power consumption data due to significant differences in data magnitude, thus improving the stability and convergence speed of model training. The appliance power consumption matrix organizes the data in a structured manner according to time step × number of appliances, enabling subsequent feature extraction to accurately locate the power consumption information of "a certain time step - a certain appliance", avoiding data chaos. This not only improves data processing efficiency but also ensures the integrity of time and device dimension information during feature extraction, providing a data foundation for accurate feature extraction.

[0013] Optionally, in step S3, the aggregated power consumption feature extractor uses a convolutional long short-term memory network (ConvLSTM) or a convolutional autoencoder (CAE) to capture the global temporal features of the aggregated power consumption sequence and obtain the overall aggregated features. The electrical appliance power consumption feature extractor uses a convolutional neural network (CNN) to extract fine-grained features at the device level from the electrical appliance power consumption matrix, thereby obtaining the local features of the electrical appliance. The feature classifier uses a fully connected neural network (FC), support vector machine (SVM), or random forest (RF) to perform a binary classification task to determine whether the load is abnormal, and obtain the classification result.

[0014] Optionally, in step S4, the feature fusion of the overall aggregated features and the local features of the electrical appliance to obtain the fused features includes: The overall aggregated feature and the local feature of the electrical appliance are concatenated dimensionally to obtain the fused feature. The concatenation formula is as follows: in, This indicates the fusion feature. This represents the overall aggregation characteristic. To represent the local features of the electrical appliance.

[0015] Optionally, in step S6, the gradient optimization algorithm includes stochastic gradient descent (SGD) or adaptive momentum estimation algorithm Adam. The training termination condition includes at least one of the following: The performance metrics of the validation set do not improve for a consecutive preset number of rounds; the change in the training loss value within a consecutive preset number of rounds is less than the second threshold; and the number of model training iterations reaches the preset maximum number of rounds. When the performance metrics of the validation set fail to improve for a preset number of consecutive rounds, the load detection device triggers an early stop mechanism to roll back to the model parameters when the validation set performance is optimal.

[0016] By adopting the above technical solutions, the SGD / Adam gradient optimization algorithm can efficiently iteratively update model parameters, ensuring that the model converges to the optimal state quickly. The multi-dimensional training termination conditions (early stopping, loss stabilization, and maximum number of rounds) can specifically address training pain points: the early stopping mechanism avoids model overfitting, and loss stabilization and maximum number of rounds limit prevent training redundancy. This ensures the generalization ability of the model after training, balances training performance and computational efficiency, and reduces unnecessary computational power consumption. At the same time, the parameter rollback mechanism further ensures that the model's final performance is optimal, reducing the false positive and false negative rates of subsequent detections.

[0017] Optionally, after step S6, model testing is also included: inputting test set data that has no overlap with the training set into the trained machine learning detection model to obtain test classification results; The test classification results are evaluated using preset evaluation metrics, which include the area under the receiver operating characteristic curve (AUC), F1 score, recall, precision, and false positive rate (FPR).

[0018] By adopting the above technical solutions, the absence of cross-validation test sets ensures that the evaluation results can truly reflect the model's generalization ability and avoid performance misjudgments caused by data overlap. Multiple indicators such as AUC and F1 score comprehensively measure the model's performance from dimensions such as overall discriminative ability, precision and completeness balance, and false alarm rate, solving the problem of incomplete evaluation by a single indicator and accurately determining whether the model meets the needs of actual applications.

[0019] Secondly, this application provides a non-intrusive load detection system based on multi-state power consumption and machine learning; the system includes modules for performing the methods in the first aspect or any possible implementation of the first aspect: The system includes: The power consumption data acquisition module is used to acquire the aggregated power consumption data of the target user's household (from the AMI smart meter, without the need for additional sensors). The aggregated power consumption data represents the total power consumption of the household. The aggregated power consumption data is decomposed by the non-intrusive load monitoring model NILM to identify the unique power consumption waveform characteristics of various types of electrical appliances contained in the aggregated power consumption data and to infer the power consumption data of a single appliance corresponding to each type of appliance. The preprocessing module is used to preprocess the aggregated power consumption data of the household and the power consumption data of the single appliance respectively, to obtain the preprocessed aggregated power consumption sequence and appliance power consumption matrix; The loading module is used to load a preset machine learning detection model, which includes an aggregated power consumption feature extractor, an appliance power consumption feature extractor, and a feature classifier. The feature extraction module is used to input the preprocessed aggregated power consumption sequence into the aggregated power consumption feature extractor to extract overall aggregated features; and to input the appliance power consumption matrix into the appliance power consumption feature extractor to extract local appliance features. The feature fusion module is used to fuse the overall aggregated features with the local features of the electrical appliance to obtain fused features; The classification and recognition module is used to input the fused features into the feature classifier, and output the classification result of whether the target user's load is abnormal through the feature classifier; The model training module is used to calculate the loss value between the classification result and the true label using the binary cross-entropy loss function, iteratively update the parameters of the machine learning detection model through the gradient optimization algorithm, and determine whether to terminate the training according to the preset training termination condition to obtain the trained machine learning detection model. The load detection module uses a trained machine learning detection model to perform steps S2-S5 on the target user's real-time aggregated household power consumption data and the corresponding power consumption data of individual appliances, thereby achieving non-intrusive load detection.

[0020] Thirdly, this application provides a computer device including a processor, a memory, and a communication bus, wherein the communication bus is used to realize a communication connection between the processor and the memory, and the processor is used to execute a computer program stored in the memory to implement the method described in any of the preceding claims.

[0021] Fourthly, this application also provides a computer-readable storage medium storing a computer program; the computer program can be executed by a processor to implement the method as described in any of the preceding claims.

[0022] Fifthly, this application also provides a computer program product, including a computer program that can be executed by a processor to implement the method as described in any of the preceding claims.

[0023] This application includes at least the following beneficial technical effects: By simultaneously receiving aggregated power consumption sequences and appliance power consumption matrices as input, the system organically integrates overall household electricity consumption information with individual device-level features, thereby achieving a more comprehensive modeling and analysis of user electricity consumption behavior and significantly enhancing the ability to identify abnormal behaviors such as electricity theft. In terms of model structure, a dual-encoder architecture consisting of an aggregated power consumption feature extractor and an appliance power consumption feature extractor is adopted. This architecture not only characterizes user electricity consumption features at both global and local levels but also provides a semantically complementary representation space for subsequent feature fusion and anomaly detection. This hierarchical feature modeling approach effectively improves the model's detection accuracy and robustness in complex scenarios. Through further feature fusion and classification mechanisms, the system can comprehensively determine user electricity consumption behavior in a multi-level feature space, achieving joint analysis from macro-trends to micro-device levels, thus significantly improving the accuracy, stability, and generalization performance of electricity theft detection. Attached Figure Description

[0024] Figure 1 A schematic diagram of a non-intrusive load detection system architecture provided in this application embodiment; Figure 2 This is a schematic diagram of a non-intrusive load detection method provided in an embodiment of this application; Figure 3 This is a schematic diagram of a non-intrusive load detection system provided in an embodiment of this application; Figure 4 This is a schematic diagram of another non-intrusive load detection system structure provided in an embodiment of this application; Figure 5 This is a schematic diagram of a computer device structure provided in an embodiment of this application. Detailed Implementation

[0025] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0026] The terminology used in the following embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. As used in the specification and appended claims of this application, the singular expressions “a,” “an,” “the,” “the,” “the,” and “this” are intended to include the plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in this application refers to and includes any or all possible combinations of one or more of the listed items. The term “exemplary” means “serving as an example, embodiment, or illustration,” and any embodiment illustrated herein as “exemplary” is not necessarily to be construed as superior to or better than other embodiments. The terms “first” and “second” are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as “first” or “second” may explicitly or implicitly include one or more of that feature, and in the description of the embodiments of this application, unless otherwise stated, “a plurality” means two or more.

[0027] The non-intrusive load detection method and system based on multi-state power consumption and machine learning provided by this invention aims to integrate the characteristics of total household power consumption with appliance-level characteristics to more comprehensively model and analyze user electricity consumption behavior, thereby achieving more granular detection of electricity theft and improving the security of AMI in a more economical way.

[0028] Figure 1 The system architecture diagram of the method of this invention is shown in the figure. This invention trains a dedicated machine learning detection model for each user's electricity consumption characteristics. Each detection model includes two feature extractors and one feature classifier. One feature extractor takes the user's total household electricity consumption as input and generates overall aggregated features reflecting global electricity consumption patterns and temporal dependencies through time series modeling and feature extraction mechanisms. The other feature extractor extracts features from the fine-grained power consumption data of individual appliances to obtain local appliance features at the device level. The global and local features generated by the feature extractors are fused and then input into the feature classifier for load anomaly detection, i.e., determining whether the current user's behavior belongs to the "electricity theft" or "non-electricity theft" category. Through the above multi-level feature encoding and supervised optimization, the model can not only learn macroscopic user electricity consumption behavior patterns but also accurately identify device-level anomalies at the microscopic level, achieving high-precision detection of complex electricity theft behaviors.

[0029] refer to Figure 2 A non-intrusive load detection method based on multi-state power consumption and machine learning mainly includes the following steps: S1: Acquire the target user's aggregated household power consumption data (collected and recorded in real time by the household smart meter). This aggregated power consumption data represents the total household power consumption; that is, at any sampling moment, the aggregated power consumption value is equal to the sum of the power values ​​of each operating appliance. The aggregated power consumption data is decomposed using a non-intrusive load monitoring model (NILM) to identify the unique power consumption waveform characteristics of various types of appliances contained within the aggregated power consumption data, and to infer the power consumption data of each individual appliance for each type.

[0030] The system acquires aggregated household power consumption data from target users and decomposes this data using a Non-Intrusive Load Monitoring (NILM) model. This decomposes the data to identify the unique power consumption waveform characteristics of various types of appliances within the aggregated power consumption data, allowing direct inference of the power consumption data of individual appliances. This enables the decomposition and analysis of aggregated power consumption data without requiring individual sensors for each appliance, thereby obtaining appliance-level power consumption sequences. The core idea is to infer the operating status and power consumption of each appliance at different time periods by identifying the unique power consumption waveform characteristics of each appliance in the aggregated power consumption signal (e.g., startup current spikes, steady-state power consumption levels, duty cycle characteristics, etc.). Through this process, the system can obtain the original power consumption sequences for multiple appliances. (1) in Electrical appliances In this embodiment, the non-intrusive load monitoring model NILM is mainly used to decompose the power consumption data of individual appliances of various types from the aggregated power consumption data of the household, which can be used to provide input data (appliance power consumption matrix) for subsequent machine learning detection models, thereby achieving more accurate load detection.

[0031] In this embodiment, the first step is to build a power waveform feature library for various electrical appliances for the non-intrusive load monitoring model NILM. The operation of different types of electrical appliances will produce unique and distinguishable power waveform features (for example, there are significant differences in the starting current spikes, steady-state power levels, and duty cycles of different electrical appliances). The model first establishes the feature library through offline learning: The unique power consumption waveform characteristics of constant-power appliances are that the power consumption remains stable within a preset time and the fluctuation amplitude is less than a first threshold; the first threshold can be flexibly set according to the fluctuation range of the appliance's function. For example, the power waveform characteristics of refrigerators in standby mode and routers are a low-fluctuation steady-state segment (fluctuation amplitude <5%), accompanied by periodic start-stop processes. Taking a refrigerator as an example, there is a power spike when its compressor starts, with the peak power being approximately 100-150W, and the duration is usually short (hundreds of milliseconds to several seconds), after which it enters a steady-state operation stage, with a steady-state power of approximately 30-50W; Switching appliances (such as microwave ovens and rice cookers): Their power waveform characteristics are mainly manifested in the alternating changes in power consumption between the on and off states. The on state includes the transient startup process and the subsequent steady-state operation phase: the startup phase is usually accompanied by a power surge of very short duration (<10ms), followed by a steady-state phase with basically fixed power, for example, the steady-state power of a microwave oven during heating is 1000–1200W; in the off state, the power drops rapidly to 0W.

[0032] Multi-state appliances (such as washing machines and air conditioners): The power waveform characteristics are multiple steady-state segments and switching transition segments (such as an air conditioner with a steady-state cooling power of 1200W and a steady-state fan power of 200W, with a power transition zone of 0.5-1s during switching).

[0033] Then, feature matching and separation processing is performed based on the aggregated household power consumption data. This aggregated household power consumption data is collected in real-time by household smart meters and records the total power consumption of the household at each sampling time, directly representing the overall power consumption level of the household. A non-intrusive load monitoring model performs segmented analysis of the aggregated household power consumption data using a sliding time window, where the window length is set according to the maximum start-up duration of the appliances, for example, 200ms. For the power signal within each time window, corresponding time-domain features and frequency-domain features are extracted. The time-domain features include peak value, mean, and variance, and the frequency-domain features include fundamental frequency and harmonic amplitude. Subsequently, the extracted features are matched with a pre-built appliance power waveform feature library, thereby achieving the separation and identification of various appliance power consumption components in the aggregated household power consumption data.

[0034] During feature matching, corresponding discrimination rules and parameter ranges are pre-set for different types of electrical appliances. For example, when the aggregated power consumption data of a household within a certain time window meets the following conditions, it is determined that a microwave oven is operating within that time period: (1) The power signal shows a significant increase in a very short time, forming an instantaneous power spike, and the peak power amplitude is greater than a preset threshold (e.g., 1000W); (2) After the spike, the power signal enters a steady-state interval with a duration significantly longer than the start-up phase, and the steady-state power value falls within the preset power range of the microwave oven (e.g., 1000–1200W); (3) The duration of the steady-state interval matches the typical working time characteristics of the microwave oven. By simultaneously satisfying multiple constraints of power amplitude, duration, and steady-state interval characteristics, the microwave oven can be distinguished from other electrical appliances (such as pressure cookers) with different power levels or working modes.

[0035] After microwave oven identification is completed, the microwave oven power consumption component in the household aggregated power consumption data can be separated by power differential. Specifically, within the time interval determined to be microwave oven operation, the steady-state power value of the microwave oven is subtracted from the power value corresponding to the household aggregated power consumption data as a benchmark, thereby obtaining the remaining aggregated power consumption data after removing the microwave oven power consumption. The remaining aggregated power consumption data is used for subsequent appliance identification and decomposition.

[0036] Similarly, when the aggregated power consumption data of a household exhibits a periodic, low-fluctuation steady state, accompanied by small-amplitude start-stop power spikes, and the cycle length and steady-state power range match the refrigerator's preset operating cycle characteristics, it is determined that the refrigerator is operating within the corresponding time period. By aligning the detected start-stop cycles with time and calculating the difference between the aggregated power consumption change and the refrigerator's steady-state power in each cycle, the refrigerator's power consumption sequence can be separated cycle by cycle. Through the combination of cycle characteristics, power amplitude, and start-stop patterns, the refrigerator can be distinguished from appliances with consistently high power consumption and no obvious start-stop cycle (such as routers).

[0037] After separating the power consumption sequence of a specific appliance, the instantaneous power of the separated appliance at each time point is determined based on the power value of the power consumption sequence within the corresponding time window or sampling time. Then, using the power value corresponding to the aggregated power consumption data of the household at the same time window or sampling time as the aggregated power consumption, the difference between the aggregated power consumption and the instantaneous power of the separated appliances is calculated to obtain the residual signal. The feature matching and separation steps are repeated on the residual signal until the power value of the residual signal is less than a preset threshold (e.g., 5W, used to characterize the measurement noise level), finally obtaining the independent power consumption sequence corresponding to all operating appliances, thereby realizing the inversion from aggregated household power consumption data to power consumption data of individual appliances.

[0038] Optionally, the Non-Intrusive Load Monitoring Model (NILM) is used to decompose the aforementioned aggregated household power consumption data to achieve the inversion from aggregated household power consumption data to individual appliance power consumption data. The NILM model includes an input layer, a feature extraction layer, and a decomposition output layer. The input layer includes a time-series data adaptation unit, used to receive the aggregated household power consumption time-series data of the target user. This data represents the total household power consumption value obtained at continuous sampling times, with a sampling frequency of 1Hz and a time step of T=120s. The corresponding input dimension is [B,T,1], where B is the batch size. The input data is length-aligned using zero-padding to ensure that different samples can be input into the model in a uniform format. The feature extraction layer extracts power features related to the operating states of different types of appliances from the aggregated household power consumption time-series data, specifically including two one-dimensional convolutional layers, one ConvLSTM layer, and one channel attention layer. The system employs a 1D convolutional layer (3×1 kernel, stride 1) to extract local power variation features; a ConvLSTM layer (64 hidden layers) to model the periodicity and long-term dependence of power signals over time; and a channel attention layer using the SENet architecture to enhance salient features related to specific appliances and suppress irrelevant noise. The decomposition output layer maps the features output by the feature extraction layer to the power consumption sequence of each appliance within the corresponding time step. It consists of two fully connected layers and an activation function, with 128 neurons in the fully connected layers and N neurons in the activation function, where N is the total number of appliances in the target household. Constraining the output results through the activation function yields output data of dimension [B, T, N], representing the independent power consumption sequence of each appliance within the corresponding time step, thus achieving the decomposition of the aggregated power consumption data of the household.

[0039] Specifically, the publicly available real dataset REDD can be used, or a self-built supplementary dataset can be used to train the model. The loss function can be a joint loss function of mean squared error (MSE) and aggregation constraint loss, using the Adam optimizer. The initial learning rate is 0.001, and the learning rate decay strategy is "if the validation set loss does not decrease after 3 rounds, decay to 1 / 10". The batch size B is 32 (balancing memory usage and training stability), and the number of iterations is 100. After training, two families from the REDD dataset that did not participate in the training are used as the test set to verify the decomposition accuracy. The core metrics are as follows: Appliance power breakdown error (MAE): Refrigerator <5W, Microwave oven <10W, Washing machine <15W; Appliance identification accuracy: >92% for the identification of 3 core appliance categories (ensuring no confusion between appliance types after decomposition); Aggregate power matching degree: The error between the sum of the power of all electrical appliances after decomposition and the actual aggregate power is <3%.

[0040] Once trained, the non-intrusive load monitoring model NILM receives aggregated household power consumption data (from AMI smart meters, requiring no additional sensors) and can automatically output the independent power consumption sequence of N appliances.

[0041] Of course, in the optional embodiments of this application, the existing known non-intrusive load monitoring model NILM can also be used to decompose the aggregated power consumption data of the household to obtain the power consumption data of individual appliances corresponding to various types of appliances.

[0042] S2: Preprocess the aggregated power consumption data of the household and the power consumption data of a single appliance to obtain the preprocessed aggregated power consumption sequence and appliance power consumption matrix.

[0043] To ensure the applicability of the input data to the electricity theft detection task, the obtained dataset needs to be preprocessed, specifically including two steps: resampling and normalization.

[0044] First, the original dataset, which is recorded at a high frequency (every few seconds), is resampled. This is done by downsampling using the mean within a fixed time window, thereby reducing the time resolution while retaining the main electricity consumption trend characteristics.

[0045] Secondly, the resampled dataset is normalized to improve training efficiency and convergence. Specifically, each value... The normalization operation is shown in formula (2).

[0046] (2) in and These represent the mean and standard deviation, respectively.

[0047] Based on this, it is also necessary to The normalized power consumption sequences of the TSMC appliances are aligned and merged according to the time step to construct the appliance power consumption matrix. Its form is as follows: (3) Where, the row represents the time step. , column represents equipment, Electrical appliances Power consumption.

[0048] After generating the aggregated power consumption sequence and the appliance power consumption matrix, the processed data is loaded through a sliding window mechanism, and corresponding batches are defined to enable efficient training of the machine learning detection model.

[0049] The machine learning detection model receives aggregated power consumption data and appliance power consumption data in parallel as multi-source inputs, thereby capturing users' electricity consumption behavior characteristics at both global and fine-grained levels. Specifically, for each user... M represents the total number of users. The input consists of the following two parts: Aggregated power consumption sequence : Indicates a length of The total household electricity consumption within a time period reflects the overall electricity consumption trend and its potential anomalies. Electrical power consumption matrix Electrical Appliance Power Consumption Matrix Used to describe the power consumption of each appliance at multiple time steps, its overall form is a A two-dimensional matrix, where Indicates the number of time steps. Indicates the quantity of electrical appliances. At any given time step... Below, matrix The A row can be represented as a Dimensional power consumption vector ,in This indicates that at time t, the first... The power consumption of the Taiwanese electric appliance. , This reflects the characteristics of electricity consumption behavior at the device level.

[0050] S3: Load the preset machine learning detection model, which includes an aggregated power consumption feature extractor, an appliance power consumption feature extractor, and a feature classifier.

[0051] This method trains a unique electricity theft detection model (i.e., a machine learning detection model) for each user, and each model consists of three parts: An aggregated power consumption feature extractor is used to extract global feature representations from total household power consumption to capture overall power consumption patterns and time dependencies. An appliance power consumption feature extractor is used to extract more fine-grained, device-specific feature representations. The feature classifier performs the final classification decision. The features output from the two feature extractors are fused and then input into the feature classifier to achieve a binary classification prediction of "electricity theft / non-electricity theft".

[0052] In this embodiment, the feature extractor can be implemented using various deep learning model structures, such as convolutional neural networks, convolutional autoencoders, or convolutional long short-term memory networks, to automatically extract multi-level representation features from the input data.

[0053] Specifically, different feature extractor structures are set up to address the differences in time scale and semantic level of different input data.

[0054] The aggregated power consumption feature extractor takes household aggregated power consumption time-series data as input. This data reflects the overall electricity consumption behavior after the power consumption of multiple appliances is superimposed, exhibiting obvious long-term trends and periodic characteristics. Therefore, the aggregated power consumption feature extractor is implemented using a convolutional long short-term memory network (ConvLSTM) or a convolutional autoencoder (CAE). The convolutional layers are used to extract local power change features within short time windows, while long short-term memory units or encoder-decoder structures are used to model long-term dependencies across time steps, thereby obtaining a global feature representation reflecting the overall electricity consumption pattern of the household.

[0055] The appliance power consumption feature extractor takes the power consumption sequence of one or more appliances as input. This type of data has device-level granularity and exhibits obvious differences in power amplitude, startup spikes, and operating state switching characteristics. To address these characteristics, the appliance power consumption feature extractor employs a convolutional neural network (CNN) structure. It extracts power waveform morphology features within a local time window through multiple layers of one-dimensional convolution operations to characterize the distinguishability of different appliances in terms of power characteristics.

[0056] Feature classifiers can be flexibly implemented using a variety of machine learning models, including fully connected neural network layers (FC), support vector machines (SVM), or random forests (RF).

[0057] The supervised training of the machine learning detection model combines classification loss based on real labels with joint embedding loss based on feature alignment to improve the accuracy and robustness of detection in different electricity theft scenarios.

[0058] Specifically, in the supervised training of the machine learning detection model, the classification loss based on the real labels adopts the binary cross-entropy loss (BCE). Using the real labels of electricity theft / non-electricity theft (1 for electricity theft, 0 for normal operation) as the benchmark, it measures the difference between the electricity theft probability output by the model and the real labels, guiding the model to optimize parameters to ensure basic classification accuracy. The joint embedding loss of feature alignment targets the overall aggregate features and the local features of the appliances. It calculates and minimizes the feature embedding distance of similar samples (both belonging to normal electricity use or both belonging to electricity theft) and maximizes the feature embedding distance of dissimilar samples (normal electricity use and electricity theft), so that the two types of electricity use behaviors form a clear distinction boundary in the feature space. The two are combined with preset weights (usually the classification loss weight is 0.7 and the joint embedding loss weight is 0.3, which is fine-tuned according to the performance of the validation set). This ensures that the model prediction fits the real labels and enhances the adaptability of features to different electricity theft scenarios (such as single device bypassing the meter, multiple devices coordinating electricity theft), reducing false positives and false negatives caused by scenario differences, thereby improving detection accuracy and robustness.

[0059] S4: Input the preprocessed aggregated power consumption sequence into the aggregated power consumption feature extractor to extract the overall aggregated features; input the appliance power consumption matrix into the appliance power consumption feature extractor to extract the appliance local features; perform feature fusion on the overall aggregated features and appliance local features to obtain the fused features.

[0060] Specifically, the aggregated power consumption sequence For a one-dimensional time-series signal sampled at a fixed time step, the aggregated power consumption feature extractor processes the aggregated power consumption sequence using a sliding time window approach. It extracts local power variation features through convolutional layers and integrates the features from multiple time windows through a time-series modeling unit, outputting a global feature vector representing the overall household power consumption pattern. The power consumption matrix of the electrical appliances The data is arranged in a two-dimensional data structure according to time steps, where each column corresponds to the power consumption time series of one appliance. The appliance power consumption feature extractor processes the appliance power consumption matrix separately or in parallel along the appliance dimension. It extracts the local power waveform features of each appliance in the time dimension through one-dimensional convolution operations, and generates feature representations characterizing fine-grained behavioral patterns at the appliance level through feature aggregation operations. The overall aggregation feature Local features of electrical appliances All are represented in vector or tensor form, where the feature dimension is determined by the network structure of the feature extractor.

[0061] To fully model the differences and complementarities between aggregated power consumption data and appliance power consumption data in terms of time scale and semantic hierarchy, this invention designs two independent feature encoders: an aggregated power consumption feature extractor and an appliance power consumption feature extractor, which are used to process aggregated power consumption sequences, respectively. and power consumption matrix Its form is shown in formula (4): (4) in, This indicates a power consumption feature extractor. This indicates an appliance power consumption feature extractor. Represents the aggregated power consumption sequence The global features extracted from it, and This represents the fine-grained features at the appliance level extracted from the appliance power consumption matrix Y.

[0062] After feature extraction, the system fuses aggregated local features with appliance-specific local features. This fusion mechanism simultaneously preserves both global trends and local behavioral patterns, providing richer feature representations for subsequent classification tasks and leveraging the complementary information of the two types of features. The fusion method employs feature-level concatenation, as shown in Formula 5: (5) It should be understood that the essence of dimensional splicing is to directly combine them in dimensional order to form a complete high-dimensional feature vector containing global power consumption trend information and equipment-level fine-grained behavior information, thereby preserving the integrity of the original information of the two types of features and providing a more comprehensive basis for judgment for subsequent classifiers.

[0063] S5: Input the fused features into the feature classifier, and output the classification result of whether the target user's load is abnormal.

[0064] The fused features obtained from S4 are input into a feature classifier for identifying electricity theft. The specific classification process can be represented as follows: (6) in, The intermediate score output by the feature classifier. This represents the prediction result, which, after normalization using the Sigmoid function, yields the probability of belonging to the electricity theft category, i.e., the likelihood that the current user is stealing electricity. The final determination of whether electricity theft has occurred is shown in Formula 7: (7) in, =1 indicates that electricity theft is currently occurring. Then it does not exist; decision threshold It can be flexibly configured according to actual needs, for example .

[0065] S6: For the machine learning detection model, the binary cross-entropy loss function is used to calculate the loss value between its classification result and the true label. The parameters of the model are iteratively updated through the gradient optimization algorithm. The training is terminated according to the preset training termination condition to obtain the machine learning detection model that has been trained.

[0066] The training process uses the binary cross-entropy loss function to measure the difference between the model's predictions and the true labels. By minimizing this loss function, the model can continuously optimize its parameters, thereby improving classification performance and prediction accuracy. Its mathematical definition is shown in Equation 8: (8) in, Represents the total number of samples. The model predicts the first The probability that a sample belongs to the category of electricity theft. The corresponding true labels are 1 for electricity theft samples and 0 for normal samples. By minimizing this cross-entropy loss, the model is guided to increase the confidence of correctly classified samples and reduce the probability of incorrect predictions, thereby achieving a continuous improvement in overall classification performance.

[0067] Optionally, during training, the model parameters are updated iteratively by calculating gradients using the backpropagation algorithm and combining them with gradient optimization strategies (such as stochastic gradient descent (SGD) or the adaptive momentum estimation algorithm Adam). Backpropagation uses the chain rule to propagate the gradient of the loss to the model parameters layer by layer, enabling the network to adaptively adjust the weights to minimize the overall loss.

[0068] During model training, clear convergence and termination conditions were set to ensure that the network parameters could converge stably and to avoid overfitting.

[0069] If the performance metrics of the validation set do not improve for a preset number of consecutive training iterations, or if the change in the training loss value within a preset number of consecutive training iterations is lower than the second threshold (which can be flexibly set), or if the number of model training iterations reaches the preset maximum number of iterations, it indicates that the network parameters are stabilizing and training can be terminated early. It should be understood that the second threshold can be flexibly set according to the loss fluctuation range when it usually tends to stabilize, and the specific value is not limited in this embodiment.

[0070] If the validation set performance fails to improve over multiple iterations, an early stopping mechanism is triggered, automatically rolling back to the optimal model parameters to prevent overfitting. Furthermore, to control computational resource consumption, a maximum number of iterations is set during training; when this limit is reached, training is forcibly terminated, and the optimal model is output. These mechanisms ensure a balance between model performance and computational efficiency, resulting in a stable and controllable training process.

[0071] S7. Using the trained machine learning detection model, perform steps S2-S5 on the target user's real-time aggregated household power consumption data and the corresponding power consumption data of a single appliance to achieve non-intrusive load detection.

[0072] When it is necessary to monitor the electricity consumption of a user's household, the total household power consumption can be collected through a smart meter and input into the Intrusive Load Monitoring Model (NILM). This model decomposes the data to obtain the power consumption data of individual appliances for various types of appliances. After preprocessing the total household power consumption and individual appliance power consumption data, a preprocessed aggregated power consumption sequence and appliance power consumption matrix are obtained. A machine learning detection model is used to extract the overall aggregated features and the local features of the appliances, and these are then fused to obtain the fused features. Finally, the feature classifier of the machine learning detection model outputs whether the user's load is abnormal, thereby achieving automatic non-intrusive load detection.

[0073] In an optional embodiment of this application, the machine learning detection model is further tested to ensure its generalization ability. The trained model is loaded, test set data is input into the model to obtain its prediction results, and the output labels are compared with the true labels. The following five metrics are used in this embodiment to evaluate the model's performance: AUC (Area Under Curve) is the area under the receiver operating characteristic curve (ROC), used to measure the overall discriminative ability of a model at different thresholds. The F1 score is the harmonic mean of precision and recall, used to balance the model's precision and recall. FPR (False Positive Rate) represents the proportion of legitimate users who are mistakenly identified as electricity thieves. Recall, also known as True Positive Rate, reflects the model's ability to identify all electricity theft samples. Precision is the proportion of samples predicted as electricity theft by the model that are actually examples of electricity theft. It is used to evaluate the reliability of the prediction results.

[0074] This solution addresses the limitations of traditional electricity theft detection methods, such as limited generalization ability and low accuracy, and has broad application prospects, including but not limited to the following areas: (1) Power System Monitoring and Protection: This solution can be applied to smart grids and advanced metering infrastructures (AMIs). By monitoring users' electricity consumption patterns and power consumption characteristics in real time, it can identify abnormal behaviors such as electricity theft, meter tampering, and data forgery. The system can promptly detect potential power losses and safety hazards, thereby improving the operational reliability and economic efficiency of the power system.

[0075] (2) Equipment security and abnormal power consumption monitoring: By monitoring the load characteristics and power consumption curves of equipment, this solution can identify illegally accessed devices or tampered power terminals, thereby achieving security protection for home and enterprise electrical systems. At the same time, this method helps to detect situations where equipment is subjected to malicious attacks or unauthorized use, improving the overall security of the network and equipment.

[0076] (3) Industrial Production and Equipment Maintenance: In the industrial field, this solution can be used to monitor the operating characteristics of various high-power devices (such as motors, transmission systems, sensors, etc.) on the production line, identify abnormal power consumption patterns, and assist in fault prediction and preventive maintenance. Through accurate energy consumption analysis, production energy efficiency optimization and early warning of abnormal operating conditions can be achieved.

[0077] (4) Smart Home and Energy Management: In the smart home scenario, this solution can analyze the power consumption characteristics of various home appliances (such as washing machines, lighting, water heaters, etc.) to achieve device identification, energy consumption statistics and intelligent scheduling. At the same time, it can detect whether there are illegal electricity use behaviors or abnormal device access in the residence, ensuring the safety of household electricity use and achieving energy-saving optimization.

[0078] (5) Policy Regulation and Electricity Market Management: This solution can also serve as an auxiliary decision-making tool for electricity regulatory authorities and energy companies, used to identify high-risk areas and suspicious user behavior, and support electricity market settlement auditing and anti-fraud management. The introduction of intelligent analysis models helps to improve policy implementation and the comprehensive governance level of the power system.

[0079] Based on the above method embodiments, this embodiment also provides a non-intrusive load detection system that can be used to implement the steps of the above method.

[0080] refer to Figure 3 The non-invasive load detection system includes: The power consumption data acquisition module 31 is used to acquire the household aggregated power consumption data of the target user. The household aggregated power consumption data represents the total power consumption of the household. The household aggregated power consumption data is decomposed by the non-intrusive load monitoring model NILM to identify the unique power consumption waveform characteristics of various types of electrical appliances contained in the aggregated power consumption data and to infer the power consumption data of a single appliance corresponding to each type of appliance. Preprocessing module 32 is used to preprocess the aggregated power consumption data of the household and the power consumption data of the single appliance respectively to obtain the preprocessed aggregated power consumption sequence and appliance power consumption matrix; The loading module 33 is used to load a preset machine learning detection model, which includes an aggregated power consumption feature extractor, an appliance power consumption feature extractor, and a feature classifier. Feature extraction module 34 is used to input the preprocessed aggregated power consumption sequence into the aggregated power consumption feature extractor to extract overall aggregated features; and to input the appliance power consumption matrix into the appliance power consumption feature extractor to extract local appliance features. Feature fusion module 35 is used to fuse the overall aggregated features and the local features of the electrical appliance to obtain fused features; The classification and recognition module 36 is used to input the fused features into the feature classifier and output a classification result of whether the target user's load is abnormal through the feature classifier; The model training module 37 is used to calculate the loss value between the classification result and the true label using the binary cross-entropy loss function, iteratively update the parameters of the machine learning detection model through the gradient optimization algorithm, and determine whether to terminate the training according to the preset training termination condition to obtain the machine learning detection model that has been trained. The load detection module 38 is used to perform non-intrusive load detection on the target user's real-time aggregated household power consumption data and the corresponding power consumption data of individual appliances using a trained machine learning detection model.

[0081] In an optional embodiment of this application, reference is made to Figure 4 The non-invasive load detection system also includes: The model testing module 39 is used to input test set data that does not overlap with the training set into the trained machine learning detection model to obtain test classification results; and to evaluate the test classification results through preset evaluation indicators, including the area under the receiver operating feature curve (AUC), F1 score, recall, precision, and false positive rate (FPR).

[0082] Various variations and specific examples of the methods provided in the above embodiments are also applicable to the system of this embodiment. Through the foregoing detailed description of the methods, those skilled in the art can clearly understand the implementation method of the system in this embodiment. For the sake of brevity, they will not be described in detail here.

[0083] To better execute the above methods, embodiments of this application also provide a computer device, such as... Figure 5 As shown, the computer device includes a processor 51, a memory 52, and a communication bus 53 for enabling communication between the processor 51 and the memory 52.

[0084] Computer devices can take many forms, including mobile phones, tablets, handheld computers, laptops, and desktop computers.

[0085] The memory can be used to store instructions, programs, code, code sets, or instruction sets. The memory may include a program storage area and a data storage area. The program storage area may store instructions for implementing an operating system, instructions for at least one function, and instructions for implementing the methods provided in the above embodiments; the data storage area may store data involved in the methods provided in the above embodiments.

[0086] Optionally, the memory may be a read-only memory (ROM), random access memory (RAM), electrically erasable programmable read-only memory (EEPROM), optical disc (including compact disc read-only memory (CD-ROM), compressed optical disc, laser disc, digital versatile optical disc, Blu-ray disc, etc.), magnetic disk storage medium, or other magnetic storage device, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited to these. The memory exists independently and is connected to the processor via a communication bus, or the memory is integrated with the processor.

[0087] A processor may include one or more processing cores. The processor executes instructions, programs, code sets, or instruction sets stored in memory, and calls data stored in memory to perform various functions and process data as described in this application. The processor may be at least one of the following: Application Specific Integrated Circuit (ASIC), Digital Signal Processor (DSP), Digital Signal Processing Device (DSPD), Programmable Logic Device (PLD), Field Programmable Gate Array (FPGA), Central Processing Unit (CPU), controller, microcontroller, and microprocessor. It is understood that, for different devices, the electronic devices used to implement the above-described processor functions may also be other types, and the embodiments of this application do not specifically limit this.

[0088] The communication bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.

[0089] In an alternative embodiment, the computer device may also include a communication interface (not shown) for communication with other devices.

[0090] This application provides a computer-readable storage medium, including, for example, various media capable of storing program code such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk. This computer-readable storage medium stores a computer program that can be loaded by a processor and execute the methods of the above embodiments.

[0091] This application also provides a computer program product comprising a computer program tangibly embodied on a readable medium thereof, the computer program containing program code for performing any of the methods described in any of the embodiments of this application, the computer program being downloadable and installable over a network, and / or installed from a removable medium (such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc.).

[0092] The above description of the embodiments is only used to provide a detailed introduction to the technical solutions of this application. However, the description of the above embodiments is only for the purpose of helping to understand the methods and core ideas of this application, and should not be construed as a limitation of this application. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the protection scope of this application.

Claims

1. A method for non-intrusive load detection based on multi-state power consumption and machine learning, characterized in that, The method comprises: S1, obtaining the household aggregate power consumption data of the target user, the household aggregate power consumption data representing the total power consumption of the household, decomposing the household aggregate power consumption data by a non-intrusive load monitoring model (NILM), identifying the unique power consumption waveform features of various types of electrical appliances contained in the aggregate power consumption data, and inferring the single-appliance power consumption data corresponding to the various types of electrical appliances; S2, respectively pre-processing the household aggregate power consumption data and the single-appliance power consumption data to obtain the pre-processed aggregate power consumption sequence and the appliance power consumption matrix; S3, loading a pre-set machine learning detection model, the machine learning detection model comprising an aggregate power consumption feature extractor, an appliance power consumption feature extractor, and a feature classifier; S4, inputting the pre-processed aggregate power consumption sequence into the aggregate power consumption feature extractor to extract the overall aggregate features, inputting the appliance power consumption matrix into the appliance power consumption feature extractor to extract the appliance local features, and performing feature fusion on the overall aggregate features and the appliance local features to obtain the fusion features; S5, inputting the fusion features into the feature classifier, and outputting the classification result of whether the load of the target user is abnormal by the feature classifier; S6, calculating the loss value of the classification result and the true label by using a binary cross-entropy loss function, iteratively updating the parameters of the machine learning detection model by a gradient optimization algorithm, and determining whether to terminate the training according to a pre-set training termination condition to obtain the trained machine learning detection model; S7, using the trained machine learning detection model to perform steps S2-S5 on the real-time household aggregate power consumption data and the corresponding single-appliance power consumption data of the target user to realize non-intrusive load detection.

2. The method of claim 1, wherein, In step S1, the various types of electrical appliances include constant-type electrical appliances, switch-type electrical appliances, and multi-state-type electrical appliances; The unique power consumption waveform feature of the constant-type electrical appliances is that the power consumption remains stable within a pre-set time and the fluctuation amplitude is less than a first threshold value; The unique power consumption waveform feature of the switch-type electrical appliances is that the power consumption alternates between a fixed power consumption value in the on state and zero in the off state; The unique power consumption waveform feature of the multi-state-type electrical appliances is that the power consumption runs in multiple discrete states and has a periodic variation rule.

3. The method of claim 1, wherein, In step S2, the pre-processing of the household aggregate power consumption data and the single-appliance power consumption data respectively comprises: Performing mean resampling processing on the household aggregate power consumption data in a fixed time window, and performing normalization processing on the resampled power consumption sequence to obtain the pre-processed aggregate power consumption sequence; Performing mean resampling processing on the single-appliance power consumption data in a fixed time window, performing normalization processing on the resampled power consumption sequence, and aligning and merging the normalized power consumption sequences of various types of electrical appliances by time steps to obtain the appliance power consumption matrix.

4. The method of claim 3, wherein, In step S2, the normalization processing comprises: The normalized power consumption value is calculated according to the following formula: where x is the power consumption data before normalization, is the average value of the power consumption data, and σ is the standard deviation of the power consumption data. The dimension of the appliance power consumption matrix is the number of time steps x the number of electrical appliances: wherein representing an electrical appliance at the power consumption at the moment.

5. The method of claim 1, wherein, In step S3, the aggregated power consumption feature extractor adopts a convolutional long short-term memory network (ConvLSTM) or a convolutional autoencoder (CAE) to capture global time sequence features of the aggregated power consumption sequence, to obtain the overall aggregated features; The appliance power consumption feature extractor adopts a convolutional neural network (CNN) to extract fine-grained features of devices in the appliance power consumption matrix, to obtain the appliance local features; The feature classifier adopts a fully connected neural network layer (FC), a support vector machine (SVM), or a random forest (RF) to perform a binary classification task of whether the load is abnormal, to obtain a classification result.

6. The method of claim 1, wherein, In step S4, the overall aggregated features and the appliance local features are fused to obtain the fused features, including: The overall aggregated features and the appliance local features are spliced by dimensions to obtain the fused features, and the splicing formula is: wherein, represents the fusion feature, represents the overall aggregation feature, is a representation of the appliance local feature.

7. The method of claim 1, wherein, In step S6, the gradient optimization algorithm includes a stochastic gradient descent (SGD) or an adaptive momentum estimation algorithm (Adam); The training termination condition includes at least one of the following: When the performance index of the validation set does not improve for a continuous preset number of rounds, the change amplitude of the training loss value in a continuous preset number of rounds is lower than a second threshold, or the number of model training iterations reaches a preset maximum number of rounds, the load detection device triggers an early stop mechanism and rolls back to the model parameters when the performance of the validation set is optimal. After step S6, a model test is further included: inputting test set data that has no intersection with the training set into the trained machine learning detection model to obtain a test classification result; 8. The method of claim 1, wherein, The test classification result is evaluated by a preset evaluation index, and the preset evaluation index includes an area under the receiver operating characteristic curve (AUC), an F1 score, a recall rate (Recall), a precision rate (Precision), and a false positive rate (FPR). The power consumption data acquisition module is configured to acquire household aggregated power consumption data of a target user, the household aggregated power consumption data representing total household power consumption, and decompose the household aggregated power consumption data by a non-intrusive load monitoring (NILM) model to identify unique power consumption waveform features of various types of appliances included in the aggregated power consumption data and infer single-appliance power consumption data corresponding to the various types of appliances.

9. A non-intrusive load detection system based on multi-state power consumption and machine learning, characterized in that, The preprocessing module is configured to preprocess the household aggregated power consumption data and the single-appliance power consumption data respectively to obtain preprocessed aggregated power consumption sequences and appliance power consumption matrices. The loading module is configured to load a preset machine learning detection model, the machine learning detection model including an aggregated power consumption feature extractor, an appliance power consumption feature extractor, and a feature classifier. The feature extraction module is configured to input the preprocessed aggregated power consumption sequences into the aggregated power consumption feature extractor to extract overall aggregated features, and input the appliance power consumption matrices into the appliance power consumption feature extractor to extract appliance local features. The feature fusion module is configured to fuse the overall aggregated features and the appliance local features to obtain fused features. The feature fusion module is configured to fuse the overall aggregated features and the appliance local features to obtain fused features. ​ The classification identification module is configured to input the fusion feature into the feature classifier, and output a classification result of whether the load of the target user is abnormal through the feature classifier. The model training module is configured to calculate a loss value of the classification result and a real label by using a binary cross-entropy loss function, iteratively update parameters of the machine learning detection model by using a gradient optimization algorithm, and determine whether to terminate the training according to a preset training termination condition, so as to obtain a trained machine learning detection model. The load detection module is configured to implement non-intrusive load detection on real-time household aggregate power consumption data of the target user and corresponding single-appliance power consumption data by using the trained machine learning detection model.

10. A computer device, comprising: The device comprises a processor, a memory and a communication bus, wherein the communication bus is configured to realize communication connection between the processor and the memory, and the processor is configured to execute a computer program stored in the memory, so as to realize the method according to any one of claims 1-8.

Citation Information

Patent Citations

  • Non-invasive load identification algorithm based on hybrid neural network and ensemble learning

    CN107122790A

  • Non-invasive load identification method based on collaborative training and test system thereof

    CN109165604A

  • Non-intrusive load monitoring method based on multi-task learning

    CN116167654A

  • Non-intrusive load detection method and system based on deep learning

    CN118673798A

  • Electricity utilization event identification method based on heterogeneous neural network

    CN120632532A

Cited By

  • Industrial-manufacturing-oriented method for constructing deviation-correctable body execution large model

    CN122047522A