A cloud computing-based residential electricity consumption monitoring system and method
By using a cloud-based residential electricity consumption monitoring system, wavelet transform and adaptive dual-threshold filtering techniques are employed to remove noise. Combined with machine learning and graph neural networks, electricity consumption analysis is performed to generate optimal control strategies. This solves the real-time and accuracy problems of traditional electricity monitoring and achieves efficient electricity management while taking into account user preferences.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-01
- Publication Date
- 2026-04-03
AI Technical Summary
Traditional electricity consumption monitoring methods cannot provide real-time and accurate information on electricity consumption or personalized electricity usage recommendations, making it difficult to efficiently manage residential electricity consumption.
A cloud-based residential electricity consumption monitoring system is adopted, which collects data in real time through smart meters, combines wavelet transform and adaptive dual-threshold filtering technology to remove noise, uses SARIMA, LSTM and XGBoost models for multi-scale prediction, constructs an electricity knowledge graph and extracts global features through graph neural networks to generate the optimal control strategy, and achieves dynamic optimization by combining model predictive control.
It enables high-precision electricity consumption forecasting and personalized electricity consumption strategies, reduces overall electricity costs, improves grid stability and user experience, and ensures data availability and the security of privacy information.
Smart Images

Figure CN120810924B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of smart grid and energy management technology, specifically to a cloud computing-based residential electricity consumption monitoring system and method. Background Technology
[0002] With the continuous increase in global energy consumption, residential electricity consumption has become one of the major energy consumption areas. How to effectively monitor and manage residential electricity consumption has become an important problem that the power industry and the smart home field urgently need to solve. Traditional electricity consumption monitoring methods often rely on periodic meter reading or manual methods, which cannot reflect the electricity consumption situation in real time and accurately, nor can they provide personalized electricity consumption suggestions.
[0003] Chinese invention patent application CN119398810A discloses a method and system for integrated energy service electricity trading. The method includes the following steps: acquiring electricity usage data; constructing a consumer behavior pattern map from the electricity usage data to generate a consumer energy usage behavior pattern map; performing integrated energy demand forecasting on standard electricity usage data using the consumer energy usage behavior pattern map to generate integrated energy demand forecasting data; constructing a blockchain energy trading platform based on the integrated energy demand forecasting data to generate blockchain energy trading contracts; and improving the flexibility and efficiency of electricity trading through personalized energy demand forecasting, blockchain trading platform construction, electricity type analysis, fluctuation response strategies, automatic trading monitoring, and data visualization.
[0004] With the rapid development of information technology and the widespread application of emerging technologies such as cloud computing, the Internet of Things, big data, and artificial intelligence, new technical means have been provided for monitoring electricity consumption. Cloud computing-based residential electricity consumption monitoring methods, by leveraging smart meters, sensors, and data transmission and processing technologies, combine traditional electricity management methods with modern technological means to achieve real-time monitoring, electricity data analysis, and intelligent control. Against this backdrop, how to process and analyze electricity consumption data through efficient and intelligent technical means, uncover residential electricity consumption patterns, and accurately predict future electricity consumption has become a key research focus. Summary of the Invention
[0005] The purpose of this invention is to address the problems existing in the background technology by proposing a cloud computing-based residential electricity consumption monitoring system and method.
[0006] The technical solution of this invention: a method for monitoring residential electricity consumption based on cloud computing, comprising the following specific implementation steps:
[0007] S1. Real-time collection of power consumption data;
[0008] S2. A denoising method based on wavelet transform and adaptive dual-threshold filtering is used to decompose the power consumption data into multiple scales through discrete wavelet transform, dividing the signal into low-frequency approximate components and high-frequency detail components. Noise is removed through noise estimation and adaptive dual-threshold filtering. The denoised power consumption data is reconstructed through inverse wavelet transform, and then standardized and normalized to obtain standard power consumption data. Finally, access control characters are generated.
[0009] S3. Verify the availability and effectiveness of the data. Decompose the power data into low-frequency trends and high-frequency fluctuations. Use principal component analysis to reduce the dimensionality of the data, extract key features, and cluster user types. Integrate SARIMA, LSTM, and XGBoost models for multi-scale prediction. Combine reinforcement learning to dynamically adjust weights to optimize prediction accuracy. Construct a power knowledge graph and extract global features through graph neural networks to generate the optimal control strategy.
[0010] S4. Based on model predictive control, an optimization model is constructed. By defining a weighted objective function of load tracking error and control cost, combined with state transition equations and input constraints, the optimal control command is calculated in real time and dynamically issued. The weighting coefficients are adjusted based on historical data and user feedback.
[0011] S5. Display real-time electricity consumption data and energy-saving suggestions through charts and graphs, collect user feedback, and optimize control strategies.
[0012] The preferred denoising process based on wavelet transform and adaptive dual-threshold filtering is as follows:
[0013] S21. Perform discrete wavelet transform on the power consumption data d(t) to decompose the signal components at different scales, and represent the signal as approximate components and detail components:
[0014] The wavelet transform formula is:
[0015] In the formula, W ψ (a,b) represent wavelet transform coefficients; ψ(t) represents the mother wavelet function; a represents the scaling factor, which controls the accuracy of signal decomposition; b represents the translation factor; d(t) represents the raw power consumption data acquired at time t.
[0016] S22. Estimate the noise standard deviation of the high-frequency wavelet detail component D, and dynamically determine the low threshold T. L and high threshold T H :
[0017]
[0018] T L =αT;
[0019] T H=βT;
[0020] In the formula, T represents the adaptively calculated basic threshold; N represents the number of data samples; σ represents the estimated standard deviation of high-frequency noise; median() represents the median function; α and β represent empirical coefficients, α∈[0.5,0.7], β∈[1.2,1.5]; w i Represents the original wavelet coefficients of the high-frequency detail components obtained after wavelet transform;
[0021] S23. Perform adaptive dual-threshold filtering on the high-frequency detail component D to remove noise;
[0022] The formula for dual-threshold filtering is:
[0023] In the formula, T represents the wavelet coefficients after denoising; L Indicates a low threshold; T H Indicates a high threshold; sign() indicates the sign function;
[0024] S24. Reconstruct the signal and recover the data using inverse wavelet transform:
[0025]
[0026]
[0027] In the formula, d'(t) represents the reconstructed denoised power consumption data signal; ψ represents the wavelet coefficients retained after dual-threshold denoising; a,b (t) represents the basis function after translation and scaling.
[0028] Preferably, the process for generating access control descriptors is as follows:
[0029] S31. Convert the electricity consumption data d'(t) of any user i into the binary string data. i Based on this, the standard form code CS = H1(data) is calculated. i ID i );
[0030] Among them, ID i H1 is the identity identifier for any user i; H1 is a predefined hash function. p is the order of the predefined additive cyclic group G1 and multiplicative cyclic group G2; It is an integer ring modulo p;
[0031] S32. Select random numbers Calculate the first access control character S1 = r × g;
[0032] Where g is a generator of group G1;
[0033] S33. Calculate the second access control element S2: S2 = [1 + (CS + r)] × CU;
[0034] Where CU is a predefined meta-coding factor, CU = s × H2(ID) i H2 is a predefined hash function, where H2: {0,1}. * →G1; f is a predefined access factor; s is a predefined encapsulation factor. Based on this definition, the analytical factor FE = s × g;
[0035] S34. Generate access control character Sign = (S1, S2).
[0036] The preferred audit process for verifying the availability and validity of electricity consumption data is as follows:
[0037] S41. Convert the received standard power consumption data d'(t) of any user i into a binary string bdata. i ;
[0038] S42. Calculate the first auxiliary audit factor AF1 = H2(ID) i ,s,f), the second auxiliary audit factor AF2 = H1(bdata i ID i );
[0039] S43. Calculate the audit code CA = e(S2, AF2 × g + S1);
[0040] Where e is a predefined bilinear mapping, e: G1×G1→G2;
[0041] S44. Calculate the matching code CM = e(AF1,FE);
[0042] Where FE is a predefined analytical factor;
[0043] S45. If CA = CM, then the standard power consumption data d'(t) passes the audit, meaning the received standard power consumption data d'(t) is usable; otherwise, an alarm is issued immediately.
[0044] S46. Calculate the access control code CC = e(S2, AF2 × g + S1);
[0045] S47. If CC = CM, it indicates the validity of the standard power consumption data d'(t), that is, the standard power consumption data d'(t) is the power consumption data of the specified user; otherwise, an alarm should be issued immediately.
[0046] The preferred method for generating the optimal control strategy is as follows:
[0047] S51. Obtain standard power consumption data d'(t), treat the standard power consumption data d'(t) as a signal superimposed on multiple time scales, and decompose it using wavelet transform:
[0048]
[0049] In the formula, This indicates a long-term trend of low frequency. This indicates high-frequency, short-term fluctuations;
[0050] S52. Define the user feature matrix as F. t Principal component analysis was used to calculate the projection matrix W, and the dimensionality-reduced feature matrix F was obtained. t new :
[0051] F t new =W·F t ;
[0052] In the formula, W represents the PCA projection matrix; F t new This represents the feature matrix after dimensionality reduction;
[0053] S53. Using the reduced-dimensional feature matrix, wavelet clustering is employed to extract the power consumption pattern:
[0054] S5301, Constructing the feature vector F i :
[0055] Among them, T t Indicates time; H t Indicates current weather information; D t Indicates date type; P t Indicates real-time electricity price;
[0056] S5302. Use K-Means clustering to find user types:
[0057] In the formula, C i Represents the i-th cluster; μ i Indicates the cluster center; n represents the total number of users;
[0058] Based on this, users are categorized as: high-energy-consuming users, low-energy-consuming users, and time-sensitive users.
[0059] S54. Seasonal autoregressive integral moving average (SARIMA) + long short-term memory (LSTM) + extreme gradient boosting tree (XGBoost) are used for short-term and medium-term predictions. The weights are then optimized using deep reinforcement learning to generate electricity consumption forecasts.
[0060] S55. Construct a knowledge graph of electricity consumption for intelligent regulation and control, and generate the optimal strategy.
[0061] Preferably, the process for generating electricity consumption forecasts is as follows:
[0062] S61. Using the SARIMA model to predict short-term trends:
[0063] In the formula, X t φ represents the predicted electricity consumption at time t; p represents the autoregression order; i θ represents the autoregressive coefficient, i.e., the weight at time i; q represents the moving average order; θ represents the weight at time i. j ε represents the moving average coefficient, i.e., the weight of the j-th error term; t This represents the white noise error term;
[0064] S62. Capturing potential long-term trends and nonlinear relationships in electricity consumption data using LSTM:
[0065] h t =f(W h ·h t-1 +W x ·X t +b);
[0066] In the formula, h t X represents the hidden state at time t; t W represents the input features at the current time step. h W represents the hidden state weight matrix; x f() represents the input feature weight matrix; f() represents the activation function.
[0067] S63. Local anomaly prediction using the XGBoost model:
[0068] In the formula, X t,XGBoost Represents the electricity consumption predicted by XGBoost; M represents the total number of tree models; α m f represents the weight of the m-th tree; m () represents the prediction function generated by the m-th tree; F t This represents the feature vector at the current moment;
[0069] S64. Employ a dynamic weighted fusion strategy to merge the prediction results of each model into the final predicted value:
[0070]
[0071] In the formula, X represents the final electricity consumption forecast after integration; t,SARIMA X t,LSTM X t,XGBoost w1, w2, and w3 represent the predicted values of the SARIMA model, LSTM model, and XGBoost model, respectively; w1, w2, and w3 represent the weights of the predictions of the SARIMA model, LSTM model, and XGBoost model, respectively, and w1 + w2 + w3 = 1.
[0072] S65. The dynamic update formula for weights: w t+1 =w t +α▽R t ;
[0073] In the formula, w t This represents the vector of model weights at the current time step; α represents the learning rate; ▽R t This represents the gradient of the reward function R with respect to the weight w.
[0074] Preferably, the control process for intelligent regulation by constructing a knowledge graph of electricity consumption is as follows:
[0075] S71. Construct a knowledge graph of electricity consumption G = (V, E);
[0076] Where V represents the set of nodes; E represents the edge, i.e., the user-device relationship;
[0077] S72. Using graph neural networks for information propagation and feature extraction on knowledge graphs:
[0078]
[0079] In the formula, Let N(v) represent the feature vector of node v at layer l; N(v) represent the set of neighboring nodes of node v; |N(v)| represent the degree of node v; W (l) b represents the weight matrix of the l-th layer; (l) σ represents the bias term; σ() represents the activation function;
[0080] S73. Utilizing the global node features obtained from the graph neural network (GNN), construct an optimization objective function to generate the optimal power consumption control strategy. Define the optimization objective function as follows:
[0081]
[0082] In the formula, S represents the set of candidate electricity consumption strategies; Ps represents the set of all candidate strategies; L(S) represents the loss function of strategy S; C tP represents the predicted electricity consumption at time t; t Represents the electricity price information at time t; β, λ, and γ represent weighting coefficients; S opt This represents the generated optimal strategy.
[0083] Preferably, the process for generating the optimal control command is as follows:
[0084] S81. Construct a real-time control model based on model predictive control and define the optimization objective function:
[0085]
[0086] In the formula, J represents the total optimization cost; X t (u) represents the controlled load value at time t; u t This represents the control input at time t; C(u) t ) represents the control cost function; λ1 and λ2 represent the weighting coefficients; T' represents the prediction time domain; k represents the current time.
[0087] S82, Real-time calculation of control input u, the state transition model is described as: X t+1 (u)=AX t (u)+Bu t +ε t The constraint is: X t+1 (u)=AX t (u)+Bu t +ε t u min ≤u t ≤u max ;
[0088] In the formula, A represents the system state transition matrix; B represents the control input influence matrix on the load; ε t Represents white noise;
[0089] S83. Minimize the total optimization cost J within the set of control input constraints U:
[0090] S84. Using the standard QP solver, a series of control inputs u are obtained. t * It also sends data to terminal devices in real time to achieve load adjustment.
[0091] The technical solution of this invention: A cloud computing-based residential electricity consumption monitoring system, used to execute the aforementioned cloud computing-based residential electricity consumption monitoring method, comprising:
[0092] Smart meter terminals are used to collect electricity consumption data in real time;
[0093] The edge processing module is used to denoise and standardize power consumption data, remove abnormal data, and upload it to the cloud computing platform via IoT communication protocol.
[0094] A cloud computing platform is used to store electricity consumption data and achieve refined energy consumption management based on real-time cloud computing analysis and AI prediction.
[0095] Cloud computing platforms, including:
[0096] The cloud storage module is used to store electricity consumption data based on a distributed database.
[0097] The big data analytics module is used to perform load analysis and energy consumption trend prediction using machine learning algorithms to generate electricity consumption strategies.
[0098] The intelligent control module is used to optimize power grid dispatch through load balancing algorithms and set personalized power consumption strategies based on user preferences.
[0099] The user interface is used to support users in viewing electricity consumption data in real time, obtaining energy-saving suggestions, and remotely controlling home appliances.
[0100] Compared with the prior art, the above-mentioned technical solution of the present invention has the following beneficial technical effects:
[0101] This invention designs a cloud-based residential electricity consumption monitoring system and method. It collects multi-dimensional electricity parameters (current, voltage, power, and device-level electricity consumption data) in real time through smart meter terminals. Combining wavelet transform and adaptive dual-threshold filtering techniques in an edge processing module, it removes high-frequency noise (such as electromagnetic interference and sensor errors) while preserving signal abrupt changes (such as current surges). Standardization and normalization processes improve data quality, providing reliable input for subsequent analysis. A distributed database is used to store the data, and a multi-model dynamic weighting strategy integrating SARIMA (capturing seasonal trends), LSTM (modeling long-term dependencies), and XGBoost (predicting local anomalies) is integrated. Deep reinforcement learning is used to optimize weight allocation, significantly improving the accuracy of electricity consumption prediction. The system achieves high accuracy in energy consumption management. It constructs a user-device-electricity price network using a knowledge graph, extracts global electricity consumption features using a graph neural network, and generates optimization strategies that balance energy efficiency and user preferences (such as peak-hour load balancing control) to reduce overall electricity costs. Model predictive control (MPC) is employed to achieve closed-loop dynamic optimization, combined with a real-time feedback mechanism (scoring and strategy adjustment) at the user interface, enhancing system adaptability and user experience. Furthermore, an access control character generation and auditing mechanism based on bilinear mapping ensures controlled management of data availability and privacy information, preventing unauthorized tampering or leakage. The overall solution achieves a balance between high-precision energy consumption management, improved grid stability, and user economic needs through edge-cloud collaboration, multi-technology integration, and dynamic closed-loop optimization. Attached Figure Description
[0102] Figure 1 This is a system architecture diagram of a cloud computing-based residential electricity consumption monitoring system proposed in this invention;
[0103] Figure 2 This is a flowchart of a cloud computing-based residential electricity consumption monitoring method proposed in this invention. Detailed Implementation
[0104] Example 1, as Figure 1 As shown, the present invention proposes a cloud computing-based residential electricity consumption monitoring system, which includes: a smart meter terminal, an edge processing module, a cloud computing platform, an intelligent control module, and a user interaction terminal.
[0105] Smart meter terminals are installed in residential homes to collect real-time electricity consumption data;
[0106] The edge processing module performs noise reduction and standardization on power consumption data, removes abnormal data, and uploads it to the cloud computing platform via IoT communication protocols (including but not limited to LoRa, NB-IoT, and Wi-Fi).
[0107] The cloud computing platform stores electricity consumption data and enables refined energy consumption management based on real-time cloud computing analysis and AI prediction.
[0108] Cloud computing platforms, including:
[0109] The cloud storage module stores electricity consumption data based on a distributed database (including but not limited to HBase);
[0110] The big data analytics module uses machine learning algorithms to perform load analysis and energy consumption trend prediction, generating electricity consumption strategies.
[0111] The intelligent control module optimizes power grid dispatch through load balancing algorithms and sets personalized power consumption strategies (including but not limited to automatically reducing power during peak hours) based on user preferences.
[0112] The user interface allows users to view real-time electricity consumption data, obtain energy-saving suggestions, and remotely control home appliances.
[0113] Example 2, as Figure 2 As shown, the present invention proposes a cloud computing-based residential electricity consumption monitoring method, which is applied to a cloud computing-based residential electricity consumption monitoring system proposed in Embodiment 1. The specific implementation steps are as follows:
[0114] S1. The smart meter terminal is installed in residential homes and is responsible for collecting and transmitting real-time electricity consumption data.
[0115] Electricity consumption data includes, but is not limited to:
[0116] Basic electrical parameters include, but are not limited to, current, voltage, power, and power factor.
[0117] Electricity consumption pattern characteristics: peak electricity consumption periods and average load variations;
[0118] Device-level power consumption data: power consumption of different household appliances;
[0119] The acquired power consumption data is then transmitted to the edge processing module.
[0120] S2. In residential electricity consumption monitoring systems, the collected electricity consumption data is often subject to various noise interferences, including but not limited to electromagnetic interference noise, transmission channel noise, sensor measurement errors, and sudden load fluctuations. The presence of these noises will affect the accuracy of subsequent data analysis, including but not limited to anomaly detection, electricity load prediction, and user behavior modeling.
[0121] Based on this, a denoising method based on wavelet transform and adaptive dual-threshold filtering is constructed for the edge processing module. This method can effectively remove high-frequency noise while retaining important signal features. The edge processing module is as follows:
[0122] S21. Perform Discrete Wavelet Transform (DWT) on the power consumption data d(t) to decompose the signal components at different scales and represent the signal as approximate components (low frequency) and detail components (high frequency).
[0123] The low-frequency component (approximate component) contains the main trend information; the high-frequency component (detail component) mainly contains noise and abrupt change components.
[0124] The wavelet transform formula is:
[0125]
[0126] In the formula, W ψ (a,b) represents the wavelet transform coefficients; ψ(t) represents the mother wavelet function (including but not limited to the Daubechies wavelet); a represents the scaling factor, which controls the accuracy of signal decomposition; b represents the translation factor, which determines the analysis position; d(t) represents the raw power consumption data acquired at time t;
[0127] S22. Estimate the noise standard deviation of the high-frequency wavelet detail component D, and dynamically determine the low threshold T. L and high threshold T H :
[0128]
[0129] T L =αT;
[0130] T H =βT;
[0131] In the formula, T represents the adaptively calculated basic threshold; N represents the number of data samples; σ represents the estimated standard deviation of high-frequency noise; median() represents the median function; α and β represent empirical coefficients, α∈[0.5,0.7], β∈[1.2,1.5]; w i Represents the original wavelet coefficients of the high-frequency detail components obtained after wavelet transform;
[0132] S23. Perform adaptive dual-threshold filtering on the high-frequency detail component D to remove noise while retaining abrupt change information;
[0133] The formula for dual-threshold filtering is:
[0134]
[0135] In the formula, T represents the wavelet coefficients after denoising; L Indicates a low threshold, used to remove small-amplitude random noise; T H This indicates a high threshold, preserving significant signal characteristics, including but not limited to abrupt changes and current surges; sign() represents the sign function, ensuring that the adjusted coefficients maintain a consistent direction.
[0136] S24. After denoising, the signal is reconstructed to restore smooth power consumption data. Inverse Discrete Wavelet Transform (IDWT) is used for data recovery.
[0137]
[0138] In the formula, d'(t) represents the reconstructed denoised power consumption data signal; ψ represents the wavelet coefficients retained after dual-threshold denoising; a,b (t) represents the basis function after translation and scaling;
[0139] S25. Since different power parameters (including but not limited to power, current and voltage) have different units, directly inputting them into the machine learning model may lead to an unbalanced numerical range. The Z-score standardization method is used for standardization, and after standardization, min-max normalization is performed to improve the model training effect and obtain standard power consumption data d'(t).
[0140] S26. Generate an access control character for the standard power consumption data d'(t) of any user i. The process of generating the access control character is as follows:
[0141] S2601. Convert the standard power consumption data d'(t) of any user i into the binary string data. i Based on this, the standard form code CS = H1(data) is calculated. i ID i );
[0142] Among them, ID i H1 is the identity identifier for any user i; H1 is a predefined hash function. p is the order of the predefined additive cyclic group G1 and multiplicative cyclic group G2; It is an integer ring modulo p;
[0143] S2602, Select random numbers Calculate the first access control character S1 = r × g;
[0144] Where g is a generator of group G1;
[0145] S2603, Calculate the second access control element S2: S2 = [1 + (CS + r)] × CU;
[0146] Where CU is a predefined meta-coding factor, CU = s × H2(ID) i H2 is a predefined hash function, where H2: {0,1}. * →G1; f is a predefined access factor; s is a predefined encapsulation factor. Based on this definition, the analytical factor FE = s × g;
[0147] S2604. Generate access control character Sign = (S1, S2);
[0148] S27. Set {access control symbol Sign = (S1, S2), user i's unique identifier ID} i Standard power consumption data d'(t) is transmitted to the big data analysis module and cloud storage module.
[0149] S3, the big data analysis module, utilizes a combination of machine learning and time series analysis to identify patterns in residential electricity consumption and predict future electricity demand. Specifically:
[0150] S31. Receive {access control symbol Sign = (S1, S2), user i's unique identifier ID}. i Given standard electricity consumption data d'(t), extract the access control character Sign = (S1, S2) and the unique identifier ID of user i.i The availability of standard electricity consumption data d'(t) is audited. The audit process is as follows:
[0151] S3101. Convert the received standard power consumption data d'(t) of user i into a binary string bdata. i ;
[0152] S3102, Calculate the first auxiliary audit factor AF1 = H2(ID) i ,s,f), the second auxiliary audit factor AF2 = H1(bdata i ID i );
[0153] S3103, Calculate the audit code CA = e(S2, AF2 × g + S1);
[0154] Where e is a predefined bilinear mapping, e: G1×G1→G2;
[0155] S3104. Calculate the matching code CM = e(AF1,FE);
[0156] Where FE is a predefined analytical factor;
[0157] S3105. If CA = CM, then the standard power consumption data d'(t) passes the audit, meaning the received standard power consumption data d'(t) is usable; otherwise, an alarm is issued immediately.
[0158] S3106. Calculate the access control code CC = e(S2, AF2 × g + S1);
[0159] S3107. If CC = CM, it indicates the validity of the standard power consumption data d'(t), that is, the standard power consumption data d'(t) is the power consumption data of the specified user; otherwise, an alarm should be issued immediately.
[0160] S32. Obtain the standard power consumption data d'(t), treat the standard power consumption data d'(t) as a signal superimposed on multiple time scales, and decompose it using wavelet transform:
[0161]
[0162] In the formula, This indicates low-frequency long-term trends, primarily reflecting seasonal and daily cycle changes; Indicates high-frequency, short-term fluctuations, used for anomaly detection;
[0163] S33. Assume the user's feature matrix is F. tPrincipal component analysis (PCA) was used to calculate the projection matrix W, and low-contribution features (i.e., redundant features) were removed to obtain the dimensionality-reduced features F. t new :
[0164] F t new =W·F t ;
[0165] In the formula, W represents the PCA projection matrix, and in this embodiment, features with a cumulative contribution rate > 95% are selected; F t new This represents the feature matrix after dimensionality reduction, which contains the main information.
[0166] S34. Using the reduced-dimensional feature matrix, wavelet clustering is employed to extract electricity consumption patterns, providing a foundation for predictive modeling. Specifically:
[0167] S3401, Constructing the feature vector F i :
[0168] Among them, T t Indicates time (hourly level); H t Indicates current weather information (including but not limited to temperature and humidity); D t Indicates the date type (weekday, weekend, or public holiday); P t Indicates real-time electricity price;
[0169] S3402. Use K-Means clustering to identify different types of users:
[0170]
[0171] In the formula, C i Represents the i-th cluster; μ i Indicates the cluster center;
[0172] Based on this, users are classified as: high-energy-consuming users, low-energy-consuming users, and time-sensitive users.
[0173] S35. A seasonal autoregressive integral moving average (SARIMA) + long short-term memory network (LSTM) + XGBoost (Extreme Gradient Boosting) is used for short-term and medium-term predictions, and the weights are fine-tuned using deep reinforcement learning (DRL). Specifically:
[0174] S3501. Short-term electricity consumption data typically exhibits seasonal trends; the SARIMA model is used.
[0175]
[0176] In the formula, X t φ represents the predicted electricity consumption at time t; p represents the autoregression order (AR part), which uses the values of the previous p times to predict the current value; i θ represents the autoregressive coefficient, the weight at time i, which is obtained by fitting historical data; q represents the moving average order (MA part), which uses the first q error terms to predict the current value; j ε represents the moving average coefficient, i.e., the weight of the j-th error term; t This represents the white noise error term, which reflects random fluctuations and follows a normal distribution with a mean of 0.
[0177] It should be noted that the SARIMA model, by combining the AR and MA components, can fit short-term data with obvious seasonal or periodic fluctuations very well, providing a reliable short-term forecast benchmark for subsequent fusion.
[0178] S3502: Captures long-term dependencies through LSTM (Long Short-Term Memory) networks, identifying potential long-term trends and nonlinear relationships in electricity consumption data.
[0179] h t =f(W h ·h t-1 +W x ·X t +b);
[0180] In the formula, h t X represents the hidden layer state at time t, i.e., the model's memory information at the current time point; t This represents the input characteristics at the current moment (including but not limited to past electricity consumption data, temperature, and humidity); W h W represents the hidden state weight matrix, i.e., the influence of the previous hidden state on the current state; x represents the input feature weight matrix, i.e., the contribution of the current input to the hidden state; b represents the bias term, which ensures the flexibility of the model; f() represents the activation function, which is used to introduce nonlinear mapping;
[0181] It should be noted that LSTM controls the flow of information through gating mechanisms (input gate, forget gate, output gate), which can retain information that depends on long-term factors and provide important support for long-term trend prediction.
[0182] S3503. Using the XGBoost model for local anomaly prediction, capturing possible short-term abnormal fluctuations or nonlinear changes, the prediction formula is as follows:
[0183]
[0184] In the formula, X t,XGBoost Represents the electricity consumption predicted by XGBoost; M represents the total number of tree models; α m f represents the weight of the m-th tree; m () represents the prediction function generated by the m-th tree; F t The feature vector representing the current moment (including but not limited to short-term and local change information);
[0185] It should be noted that XGBoost can handle nonlinear and high-dimensional feature relationships, supplement short-term anomalies and local fluctuations, thereby providing fine-tuning support for overall prediction;
[0186] S3504. To fully utilize the advantages of the above three models, a dynamic weighted fusion strategy is adopted to fuse the prediction results of each model into the final predicted value:
[0187]
[0188] In the formula, X represents the final electricity consumption forecast after integration; t,SARIMA X t,LSTM X t,XGBoost w1, w2, and w3 represent the predicted values of the SARIMA model, LSTM model, and XGBoost model, respectively; w1, w2, and w3 represent the weights of the predictions of the SARIMA model, LSTM model, and XGBoost model, respectively, and w1 + w2 + w3 = 1.
[0189] S3505, The dynamic update formula for weights: w t+1 =w t +α▽R t ;
[0190] In the formula, w t This represents the vector of model weights at the current time step; α represents the learning rate, which controls the step size for weight adjustment; ▽R t This represents the gradient of the reward function R with respect to the weight w, that is, the direction and magnitude of the influence of changing the weight on the reward value (including but not limited to prediction accuracy or negative error) under the current weight configuration;
[0191] S36. To optimize users' electricity consumption strategies, a knowledge graph (KG) for electricity consumption is constructed for intelligent regulation, specifically as follows:
[0192] S3601. Construct an electricity consumption knowledge graph: Knowledge graph G = (V, E);
[0193] Where V represents the set of nodes, including but not limited to: users, devices, electricity prices, and electricity consumption behavior; E represents the edge, i.e., the user-device relationship;
[0194] S3602, Graph Neural Network (GNN) Information Fusion: Utilizing graph neural networks for information propagation and feature extraction on knowledge graphs, employing the following hierarchical propagation formula:
[0195]
[0196] In the formula, Let N(v) represent the feature vector of node v at layer l; N(v) represent the set of neighboring nodes of node v, reflecting other entities directly related to v; |N(v)| represents the degree of node v, used for normalization to ensure a balance of influence among different nodes; W (l) b represents the weight matrix of the l-th layer; (l) σ represents the bias term; σ() represents the activation function (including but not limited to ReLU), introducing a nonlinear transformation;
[0197] It should be noted that when the initial layer l=0, The original characteristics of the nodes, including but not limited to users' historical electricity consumption and device power, are derived from the preprocessing stage and historical statistical data; W (l) and b (l) Train the parameters for the model and optimize them on historical data through supervised learning to ensure that complex relationships can be captured when information is propagated on the graph.
[0198] S3603. Utilizing the global node features obtained from GNN, construct an optimization objective function to generate the optimal electricity control strategy. Assuming the objective is to optimize electricity cost and energy efficiency, the optimization objective function is defined as follows:
[0199]
[0200] In the formula, S represents the set of candidate electricity consumption strategies, and each strategy S includes a series of electricity consumption plans for different time periods; Ps represents the set of all candidate strategies; L(S) represents the loss function of strategy S; C t This represents the predicted electricity consumption at time t, i.e., the final electricity consumption forecast after integration. P t This represents the electricity price information at time t; β, λ, and γ represent weighting coefficients, determined by historical data statistics and user feedback, reflecting the contribution of each factor to the total cost; S opt This represents the generated optimal strategy;
[0201] S37. The generated optimal strategy S opt Transmitted to the intelligent control module.
[0202] S4, the intelligent control module utilizes big data analysis to derive power consumption strategies. optThrough closed-loop control and adaptive optimization, real-time load regulation and energy consumption reduction are achieved, organically combining power forecasting, dynamic control, optimization decision-making, and feedback updates. Specifically:
[0203] S41. To enable the control commands output by the system to adjust the actual load, a real-time control model based on model predictive control (MPC) is constructed. The goal is to make the controlled system output X... t (u)(controlled load) tracks reference trajectory S opt To achieve energy consumption optimization, the objective function within the prediction time domain T is defined as:
[0204]
[0205] In the formula, J represents the total optimization cost (objective function value); X t (u) represents the controlled load value at time t, generated after adjustment by the control input u; u t This represents the control input at time t, including but not limited to adjusting the power of home appliances, controlling the temperature of air conditioners, or starting / stopping some devices; C(u t ) represents the control cost function, reflecting the inconvenience to users or the energy consumption of equipment startup caused by control measures; λ1 and λ2 represent weighting coefficients, which measure the relative importance of load tracking error and control cost, respectively; T' represents the prediction time domain; k represents the current time.
[0206] It should be noted that λ1 and λ2 are determined by historical data statistics and user feedback to ensure that user experience is not significantly affected while reducing energy consumption;
[0207] S42. To achieve closed-loop control, a model predictive control (MPC) framework is adopted, which calculates the control input u in real time based on the current state and future prediction information. t The state transition model is described as follows:
[0208] X t+1 (u)=AX t (u)+Bu t +ε t ;
[0209] In the formula, A represents the system state transition matrix, describing the natural evolution of the load (including but not limited to data obtained from historical load data); B represents the control input influence matrix on the load, reflecting u t The regulating effect on the load; ε t This represents model error or external disturbance term; in this embodiment, it is assumed to be white noise.
[0210] In the time domain T, the MPC problem is to minimize the total optimization cost J within the set of control input constraints U.
[0211] The constraint is: Xt+1 (u)=AX t (u)+Bu t +ε t ;u min ≤u t ≤u max ;
[0212] S43. Using a standard QP solver, a series of control inputs are obtained. It also sends data to terminal devices in real time to achieve load adjustment.
[0213] S5. The user interface displays electricity consumption information and adjusts energy-saving strategies via mobile applications and web pages, specifically:
[0214] (1) Visualized electricity consumption information: Real-time electricity consumption and historical trends are displayed in the form of charts, and the expected saving effect of energy-saving suggestions is displayed intuitively;
[0215] (2) User feedback mechanism: Users can rate or adjust the energy-saving strategies suggested by the system, and the feedback data will be used to optimize the next round of intelligent control.
[0216] The embodiments of the present invention have been described in detail above with reference to the accompanying drawings. However, the present invention is not limited thereto. Various changes can be made within the scope of knowledge possessed by those skilled in the art without departing from the spirit of the present invention.
Claims
1. A method for monitoring residential electricity consumption based on cloud computing, characterized in that, The specific implementation steps include the following: S1. Real-time collection of power consumption data; S2. A denoising method based on wavelet transform and adaptive dual-threshold filtering is used to decompose the power consumption data into multiple scales through discrete wavelet transform, dividing the signal into low-frequency approximate components and high-frequency detail components. Noise is removed through noise estimation and adaptive dual-threshold filtering. The denoised power consumption data is reconstructed through inverse wavelet transform, and then standardized and normalized to obtain standard power consumption data. Finally, access control characters are generated. S3. Verify the availability and effectiveness of standard power consumption data. Decompose the power data into low-frequency trends and high-frequency fluctuations. Use principal component analysis to reduce dimensionality, extract key features, and cluster user types. Integrate SARIMA, LSTM, and XGBoost models for multi-scale prediction. Combine reinforcement learning to dynamically adjust weights to optimize prediction accuracy. Construct a power knowledge graph and extract global features through graph neural networks to generate the optimal control strategy. S4. Based on model predictive control, an optimization model is constructed. By defining a weighted objective function of load tracking error and control cost, combined with state transition equations and input constraints, the optimal control command is calculated in real time and dynamically issued. The weighting coefficients are adjusted based on historical data and user feedback. S5. Display real-time electricity consumption data and energy-saving suggestions through charts and graphs, collect user feedback, and optimize control strategies.
2. The method for monitoring residential electricity consumption based on cloud computing according to claim 1, characterized in that, The denoising process of the denoising method based on wavelet transform and adaptive dual-threshold filtering is as follows: S21. Perform discrete wavelet transform on the power consumption data d(t) to decompose the signal components at different scales, and represent the signal as approximate components and detail components: The wavelet transform formula is: ; In the formula, Represents the wavelet transform coefficients; denoted by ; a represents the scaling factor, which controls the accuracy of signal decomposition; b represents the translation factor; d(t) represents the raw power consumption data acquired at time t. S22. Estimate the noise standard deviation of the high-frequency wavelet detail component D, and dynamically determine the low threshold T. L and high threshold T H : ; ; T L =αT; T H =βT; In the formula, T represents the adaptively calculated basic threshold; N represents the number of data samples; σ represents the estimated standard deviation of high-frequency noise; median() represents the median function; α and β represent empirical coefficients, α∈[0.5,0.7], β∈[1.2,1.5]; w i Represents the original wavelet coefficients of the high-frequency detail components obtained after wavelet transform; S23. Perform adaptive dual-threshold filtering on the high-frequency detail component D to remove noise; The formula for dual-threshold filtering is: ; In the formula, T represents the wavelet coefficients after denoising; L Indicates a low threshold; T H Indicates a high threshold; sign() indicates the sign function; S24. Reconstruct the signal and recover the data using inverse wavelet transform: ; ; In the formula, d'(t) represents the reconstructed denoised power consumption data signal; This represents the wavelet coefficients retained after dual-threshold denoising. This represents the basis functions after translation and scaling.
3. The method for monitoring residential electricity consumption based on cloud computing according to claim 1, characterized in that, The process of generating access control modifiers is as follows: S31. Convert the electricity consumption data d'(t) of any user i into the binary string data. i Based on this, the standard form code CS=H1(data) is calculated. i ID i ); Among them, ID i H1 is the identity identifier for any user i; H1 is a predefined hash function, where H1: {0,1} * → p represents the order of the predefined additive cyclic group G1 and multiplicative cyclic group G2. It is an integer ring modulo p; S32. Select a random number r∈ Calculate the first access control character S1 = r × g; Where g is a generator of group G1; r is a generator from the ring of integers. The random number selected from the list; S33. Calculate the second access control symbol S2: S2 = [1 + (CS + r)] × CU; Where CU is a predefined meta-coding factor, CU=s×H2(ID) i H2 is a predefined hash function, where H2: {0,1}. * →G1; f is a predefined access factor; s is a predefined encapsulation factor, s∈ Based on this, the analytical factor FE is defined as s × g. S34. Generate access control character Sign=(S1, S2).
4. The method for monitoring residential electricity consumption based on cloud computing according to claim 3, characterized in that, The verification process for the availability and validity of the verification data is as follows: S41. Convert the received standard power consumption data d'(t) of any user i into a binary string bdata. i ; S42. Calculate the first auxiliary audit factor AF1=H2(ID) i ,s, f), the second auxiliary audit factor AF2 = H1(bdata i ID i ); S43. Calculate the audit code CA = e(S2, AF2×g+S1); Where e is a predefined bilinear mapping, e: G1 × G1 → G2; S44. Calculate the matching code CM = e(AF1, FE); Where FE is a predefined analytical factor; S45. If CA=CM, then the standard power consumption data d'(t) passes the audit, meaning the received standard power consumption data d'(t) is usable; otherwise, an alarm is issued immediately. S46. Calculate the access control code CC = e(S2, AF2×g + S1); S47. If CC=CM, it indicates the validity of the standard power consumption data d'(t), that is, the standard power consumption data d'(t) is the power consumption data of the specified user; otherwise, an alarm will be issued immediately.
5. The residential electricity consumption monitoring method based on cloud computing according to claim 1, characterized in that, The process of generating the optimal control strategy is as follows: S51. Obtain standard power consumption data d'(t), treat the standard power consumption data d'(t) as a signal superimposed on multiple time scales, and decompose it using wavelet transform: ; In the formula, This indicates a long-term trend of low frequency. This indicates high-frequency, short-term fluctuations; S52. Define the user feature matrix as F. t Principal component analysis was used to calculate the projection matrix W, and the dimensionality-reduced features were obtained. : ; In the formula, W represents the PCA projection matrix; This represents the feature matrix after dimensionality reduction; S53. Using the reduced-dimensional feature matrix, wavelet clustering is employed to extract the power consumption pattern: S5301, Constructing the feature vector F i : ; Among them, T t Indicates time; H t Indicates current weather information; D t Indicates date type; P t Indicates real-time electricity price; S5302. Use K-Means clustering to find user types: ; In the formula, C i Represents the i-th cluster; μ i Indicates the cluster center; n represents the total number of users; Based on this, users are classified as: high-energy-consuming users, low-energy-consuming users, and time-sensitive users. S54. Seasonal autoregressive integral moving average (SARIMA) + long short-term memory (LSTM) + extreme gradient boosting tree (XGBoost) are used for short-term and medium-term predictions. The weights are then optimized using deep reinforcement learning to generate electricity consumption forecasts. S55. Construct a knowledge graph of electricity consumption for intelligent regulation and control, and generate the optimal strategy.
6. The method for monitoring residential electricity consumption based on cloud computing according to claim 5, characterized in that, The process of generating electricity consumption forecasts is as follows: S61. Using the SARIMA model to predict short-term trends: ; In the formula, X t denoted by t, representing the predicted electricity consumption at time t; p represents the autoregression order. represents the autoregressive coefficient, i.e., the weight at time i; q represents the moving average order. This represents the moving average coefficient, i.e., the weight of the j-th error term; This represents the white noise error term; S62. Capturing potential long-term trends and nonlinear relationships in electricity consumption data using LSTM: ; In the formula, h t X represents the hidden state at time t; t This represents the input features at the current moment; W h W represents the hidden state weight matrix; x This represents the input feature weight matrix; f() represents the activation function; b represents the bias term; S63. Local anomaly prediction using the XGBoost model: ; In the formula, Represents the electricity consumption predicted by XGBoost; M represents the total number of tree models; α m f represents the weight of the m-th tree; m () represents the prediction function generated by the m-th tree; F t This represents the feature vector at the current moment; S64. Employ a dynamic weighted fusion strategy to merge the prediction results of each model into the final predicted value: ; In the formula, X represents the final electricity consumption forecast after integration; t,SARIMA X t,LSTM X t,XGBoost w1, w2, and w3 represent the predicted values of the SARIMA model, LSTM model, and XGBoost model, respectively; w1, w2, and w3 represent the weights of the predictions of the SARIMA model, LSTM model, and XGBoost model, respectively, and w1+w2+w3=1. S65. Dynamic update formula for weights: ; In the formula, w t This represents a vector of model weights at the current time step; α represents the learning rate. This represents the gradient of the reward function R with respect to the weight w.
7. The method for monitoring residential electricity consumption based on cloud computing according to claim 6, characterized in that, The process of constructing a knowledge graph of electricity consumption for intelligent regulation is as follows: S71. Construct a knowledge graph of electricity consumption G=(V,E); Where V represents the set of nodes; E represents the edge, i.e., the user-device relationship; S72. Using graph neural networks for information propagation and feature extraction on knowledge graphs: ; In the formula, Let N(v) represent the feature vector of node v at layer l; N(v) represent the set of neighboring nodes of node v; |N(v)| represent the degree of node v; W (l) b represents the weight matrix of the l-th layer; (l) σ represents the bias term; σ() represents the activation function; S73. Utilizing the global node features obtained from the graph neural network (GNN), construct an optimization objective function to generate the optimal power consumption control strategy. Define the optimization objective function as follows: ; ; In the formula, S represents the set of candidate electricity consumption strategies; Ps represents the set of all candidate strategies; L(S) represents the loss function of strategy S; C t P represents the predicted electricity consumption at time t; t Represents the electricity price information at time t; β, λ, and γ represent weighting coefficients; S opt This represents the generated optimal strategy.
8. A method for monitoring residential electricity consumption based on cloud computing according to claim 7, characterized in that, The process of generating the optimal control command is as follows: S81. Construct a real-time control model based on model predictive control and define the optimization objective function: ; In the formula, J represents the total optimization cost; X t (u) represents the controlled load value at time t; u t This represents the control input at time t; C(u) t ) represents the control cost function; λ1 and λ2 represent the weighting coefficients; T' represents the prediction time domain; k represents the current time. S82, Real-time calculation of control input u, the state transition model is described as follows: The constraints are: u min ≤u t ≤u max ; In the formula, A represents the system state transition matrix; B represents the control input influence matrix on the load; ε t Represents white noise; S83. Minimize the total optimization cost J within the set of control input constraints U: S84. Using the standard QP solver, a series of control inputs are obtained. It also sends data to terminal devices in real time to achieve load adjustment.
9. A cloud computing-based residential electricity consumption monitoring system, used to execute the cloud computing-based residential electricity consumption monitoring method according to any one of claims 1 to 8, characterized in that, include: Smart meter terminals are used to collect electricity consumption data in real time; The edge processing module is used to denoise and standardize power consumption data, remove abnormal data, and upload it to the cloud computing platform via IoT communication protocol. A cloud computing platform is used to store electricity consumption data and achieve refined energy consumption management based on real-time cloud computing analysis and AI prediction. Cloud computing platforms, including: The cloud storage module is used to store electricity consumption data based on a distributed database. The big data analytics module is used to perform load analysis and energy consumption trend prediction using machine learning algorithms to generate electricity consumption strategies. The intelligent control module is used to optimize power grid dispatch through load balancing algorithms and set personalized power consumption strategies based on user preferences. The user interface is used to support users in viewing electricity consumption data in real time, obtaining energy-saving suggestions, and remotely controlling home appliances.
Citation Information
Patent Citations
Comprehensive energy service power transaction method and system
CN119398810A
Double threshold cooperative sensing method in cognitive wireless network
CN101944961A
Resource dynamic monitoring and control method and system based on quota tracking
CN120123701A