Smart home energy consumption optimization control method and system
By collecting multi-source data from smart home systems, preprocessing and federated learning are performed to generate a global prediction model. Combined with reinforcement learning and model predictive control, the problems of privacy leakage and insufficient prediction accuracy in smart home energy consumption optimization are solved, and safe and adaptive energy consumption optimization control is achieved.
Patent Information
- Application Number
- CN202511854486.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-10
- Publication Date
- 2026-02-13
AI Technical Summary
Existing smart home energy consumption optimization and control methods have risks of data privacy leakage, insufficient model prediction accuracy, poor control strategy security and lack of adaptive capabilities, and cannot achieve energy consumption optimization and control that is privacy-protected, highly accurate in prediction and safe and adaptive.
By collecting local data from multiple sources, preprocessing it, training a local energy consumption prediction model, and generating a global prediction model through federated learning, the final control command is generated by combining reinforcement learning and model predictive control, thus ensuring data privacy protection while achieving high-precision energy consumption optimization.
It significantly improves the accuracy of energy consumption prediction and the generalization ability of the model, achieving a balance between maximizing energy efficiency and user comfort. Through a closed-loop adaptive mechanism, it continuously optimizes and builds a smart home energy consumption optimization system that is privacy-secure, accurate in prediction, and reliable in control.
Smart Images

Figure CN121523082A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of intelligent home energy consumption optimization and intelligent control, in particular to an intelligent home energy consumption optimization control method and system. BACKGROUND
[0002] With the rapid development of Internet of Things and artificial intelligence technology, the field of intelligent home energy consumption optimization control has made significant progress. Early methods mainly rely on rule engines and threshold trigger mechanisms, such as device control based on fixed schedules or simple environmental feedback. In recent years, machine learning techniques have been widely applied to energy consumption prediction and optimization, with time series models (such as LSTM and ARIMA) capable of analyzing historical data to predict future energy consumption trends, while reinforcement learning algorithms are introduced to enable dynamic policy adjustment. In addition, centralized cloud platforms integrate multi-source sensor data (such as temperature, humidity, and device operating status) for global optimization, improving energy efficiency and user comfort. The rise of edge computing promotes local data processing, reducing latency, but overall existing technologies still focus on centralized learning, emphasizing model accuracy and real-time performance, providing a basic framework for intelligent home energy management.
[0003] Although existing technologies have improved energy consumption optimization to some extent, there are still several key deficiencies. First, in terms of data privacy, centralized learning models require users to upload raw data to the cloud for training, which poses a risk of privacy leakage and does not comply with data protection regulations such as GDPR, making it impossible to achieve model collaborative optimization while protecting users' sensitive information. Second, in terms of model performance, local models for a single household have low prediction accuracy due to limited data samples, making it difficult to adapt to dynamic environmental changes (such as weather fluctuations or sudden changes in user behavior), while centralized methods, although capable of aggregating data, compromise privacy at the expense of insufficient model generalization ability. Third, in terms of control strategies, traditional methods such as rule control or single model predictive control (MPC) lack long-term learning ability and cannot improve themselves from historical interactions; pure reinforcement learning can optimize long-term returns but may produce unsafe actions (such as temperature exceeding the comfort range or device overload) during exploration, damaging user experience and system stability. In addition, existing systems often separate prediction and control modules, lack a closed-loop adaptive mechanism, and cannot adjust strategies in real time based on actual execution deviations (such as device power errors), resulting in short-lived energy efficiency optimization effects. Finally, the integration of multi-energy coupling (such as electricity and gas market data) and real-time constraints is insufficient, limiting comprehensive energy efficiency improvement in complex scenarios. These deficiencies collectively result in limitations in privacy protection, prediction accuracy, control safety, and system adaptability for existing methods, making it impossible to achieve efficient, reliable, and user-friendly intelligent home energy consumption optimization. SUMMARY
[0004] In view of the above problems, the present application is proposed.
[0005] Therefore, the technical problem solved by the present application is that the existing smart home energy consumption optimization control method has the risk of data privacy leakage, the model prediction accuracy is insufficient, the control strategy security is poor and lacks self-adaptive ability, and how to realize the problems of privacy protection, high-precision prediction and safe adaptive energy consumption optimization control.
[0006] To solve the above technical problems, the present application provides the following technical solutions: In a first aspect, the present application provides a smart home energy consumption optimization control method, comprising, Collecting energy consumption related data of a plurality of local data sources and preprocessing to obtain standardized historical data; Training a local energy consumption prediction model based on the standardized historical data to obtain local model parameters; Aggregating a plurality of local model parameters to generate a global prediction model through federated learning; Using the global prediction model to predict the energy consumption demand and external environmental parameters in the future period; Based on the prediction result, a preliminary energy consumption control strategy is generated through reinforcement learning, and a model predictive control algorithm is used to optimize the preliminary energy consumption control strategy under safety constraints to obtain the final control instruction; Executing the final control instruction to realize the energy consumption optimization control of the smart home device.
[0007] As a preferred scheme of the smart home energy consumption optimization control method of the present application, wherein: the energy consumption related data includes: The operation data of the smart home device, the operation data including the start-stop state, real-time power, cumulative energy consumption and operation mode of the device; Environmental state data, including indoor temperature, outdoor temperature, humidity, light intensity, and personnel in-place, off-site state and occupancy state; User behavior data, including device operation records, preset time table and user adjustment preference for device operation parameters; Energy market data, including real-time electricity price, peak period information and power grid load state obtained through the local gateway.
[0008] As a preferred scheme of the smart home energy consumption optimization control method of the present application, wherein: the preprocessing includes: Cleaning the collected energy consumption related data to process missing values and outliers; Time alignment and resampling of the cleaned data according to a unified timestamp; The aligned data is normalized or standardized to map data of different dimensions and orders of magnitude to a preset numerical interval. Within a preset time window, time series features related to energy consumption are extracted from the processed time series data, and the time series features are segmented in a sliding window manner to form standardized historical data for model training.
[0009] As a preferred scheme of the intelligent home energy consumption optimization control method, the obtained local model parameters include: An input sequence and a corresponding prediction label are constructed from the standardized historical data using a sliding time window. A prediction time domain is determined and a sequence prediction model is selected as a local energy consumption prediction model. The mean square error and the mean absolute error are used as loss functions, combined with a regularization term, and a gradient optimization algorithm based on small batches is used for iterative training until the convergence condition or the early stopping condition is met, to obtain the trained local model parameters. The local model parameters and their gradients are quantized, pruned, and differentially privacynoised to form local model parameter updates for federated aggregation.
[0010] As a preferred scheme of the intelligent home energy consumption optimization control method, the global prediction model generated by federated learning includes: Local model parameter updates from multiple data sources are received. The local model parameter updates are weighted aggregated using a federated averaging algorithm, where the weights are determined based on the amount of standardized historical data corresponding to each data source. The aggregated parameter updates are applied to the global prediction model of the previous iteration to generate an updated global prediction model. The updated global prediction model is evaluated for convergence, and when the model performance improvement is below a preset threshold or the maximum number of iterations is reached, the iteration is terminated and the final global prediction model is output. The final global prediction model is distributed to each data source to replace its local energy consumption prediction model to complete collaborative optimization.
[0011] As a preferred scheme of the intelligent home energy consumption optimization control method, the predicted future period energy consumption demand and external environmental parameters include: The prediction time domain and time step are set. Real-time environmental state data, standardized historical energy consumption data sequences, and energy market data are input into the global prediction model. A forward inference calculation of the global prediction model outputs a prediction result sequence covering the prediction time domain, which at least includes a total household energy consumption demand prediction, a key equipment load prediction, and an external environment parameter prediction; the external environment parameters include future temperature, humidity, and light intensity; The prediction result sequence is time-aligned and integrated.
[0012] As a preferred scheme of the intelligent home energy consumption optimization control method, the obtaining of the final control instruction comprises: A state space, an action space, and a reward function of reinforcement learning are constructed, wherein the state space at least includes the integrated prediction result sequence, a current environment state, and a current running state of the equipment; the action space includes start-stop instructions and power setting values of the intelligent home equipment; and the reward function aims to reduce the total energy consumption cost and maintain user comfort; A deep Q network algorithm is adopted to select an action with the maximum value based on the current state, and generate a preliminary energy consumption control strategy sequence covering the prediction time domain; The preliminary energy consumption control strategy sequence is input into a model predictive control algorithm as a reference trajectory; Safety constraints are imposed in the rolling optimization process of the model predictive control to correct the reference trajectory; An optimization problem with constraints is solved to output a final control instruction sequence that satisfies all safety constraints, and the final control instruction sequence is updated in a rolling time domain in each control period.
[0013] As a preferred scheme of the intelligent home energy consumption optimization control method, the executing of the final control instruction comprises: The final control instruction sequence is parsed and converted into operation instructions executable by the corresponding intelligent home equipment; the operation instructions at least include power adjustment instructions, start-stop control instructions, and running mode switching instructions; The operation instructions are executed according to the control period timing, and the actual power, running state, and environment variables of the equipment are monitored in real time during the execution; The actual running data collected are compared with the expected values corresponding to the final control instruction sequence, and when the deviation of any index exceeds a preset tolerance threshold, reinforcement learning and model predictive control processes are called again to generate and issue alternative control instructions in a rolling time domain; According to the changes in the equipment running state and user operation, the state space elements and reward function weight parameters of the reinforcement learning are updated; The actual energy consumption data and environment state changes after the execution of the instructions are recorded and fed back to the data preprocessing link to update the standardized historical data, which are used for subsequent local training and federated aggregation.
[0014] In a second aspect, the embodiments of the present application provide a smart home energy consumption optimization control system, comprising: a data collection and preprocessing module that collects energy consumption related data of a plurality of local data sources and pre-processes the data to obtain standardized historical data; a local prediction training module that trains a local energy consumption prediction model based on the standardized historical data to obtain local model parameters; a federated learning aggregation module that aggregates a plurality of the local model parameters to generate a global prediction model through federated learning; a prediction inference module that uses the global prediction model to predict energy consumption demand and external environmental parameters in a future period; a reinforcement learning and model predictive control module that generates a preliminary energy consumption control strategy through reinforcement learning based on the prediction results, and optimizes the preliminary energy consumption control strategy under safety constraints using a model predictive control algorithm to obtain a final control instruction; an execution and feedback module that executes the final control instruction to achieve energy consumption optimization control of smart home devices.
[0015] The present application has the following advantages: the present application aggregates multiple local models under the premise of protecting user data privacy through a federated learning framework, significantly improving the accuracy of energy consumption prediction and the generalization ability of the model; the collaborative optimization mechanism of reinforcement learning and model predictive control is used to generate a dynamic control strategy under the condition of ensuring safety constraints such as power and temperature, achieving a balance between energy efficiency maximization and user comfort; and through the execution feedback and data closed loop, the system is continuously self-evolving, ultimately building a smart home energy consumption optimization control system that is private and secure, accurate in prediction, reliable in control, and has long-term learning ability. BRIEF DESCRIPTION OF DRAWINGS
[0016] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed in the embodiment description. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained from these drawings without creative labor, wherein: Figure 1 A smart home energy consumption optimization control method provided by the first embodiment of the present application. DETAILED DESCRIPTION
[0017] In order to make the above objectives, features and advantages of the present application more obvious and easy to understand, the specific embodiments of the present application will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor should belong to the protection scope of the present application.
[0018] Embodiment 1, refer to Figure 1 For an embodiment of the present application, an intelligent home energy consumption optimization control method is provided, comprising: S1: Collecting energy consumption related data of a plurality of local data sources and preprocessing to obtain standardized historical data.
[0019] The energy consumption related data includes: operation data of the intelligent home device, the operation data including start-stop state, real-time power, cumulative energy consumption and operation mode of the device; environmental state data, the environmental state data including indoor temperature, outdoor temperature, humidity, light intensity, and personnel in-place, off-site state and occupancy state; user behavior data, the user behavior data including device operation record, preset schedule and user adjustment preference for device operation parameters; energy market data, the energy market data including real-time electricity price, peak period information and power grid load state obtained through the local gateway.
[0020] It should be noted that the selection of the multi-source raw data is based on multi-dimensional influence factor analysis for energy consumption optimization: the equipment operation data directly reflects the working state of the energy consumption subject, wherein the start-stop state and the time sequence change of the real-time power can represent the equipment energy consumption mode, the cumulative energy consumption is used for energy efficiency benchmark evaluation, and the operation mode defines the energy consumption characteristics of the equipment under different working conditions; the environmental state data reflects the building thermal characteristics through indoor and outdoor temperature and humidity gradient, and the light intensity affects the lighting and photovoltaic system efficiency; the personnel in-place state is determined by multi-source sensor fusion (including passive infrared, door magnetic, low-resolution thermal infrared, and Wi-Fi channel state information), which determines the actual use of space. All raw data related to personnel state perception are processed locally, and only abstract state labels (such as "in place", "off site", "occupied", etc.) that cannot backtrack the original sensor data are output, which provides the basis for partition control while maximizing the protection of user privacy; the operation records and parameter adjustment preferences in the user behavior data constitute personalized energy consumption portraits, and the preset schedule reflects regular energy use requirements; the energy market data establishes economic constraints through real-time electricity price signals, and the grid load state provides external incentives for demand side response. The systematic collection of such multi-source heterogeneous data provides a complete input feature space for subsequent establishment of accurate energy consumption prediction models and optimization control strategies, overcoming the problems of model overfitting or local optimal control strategy caused by single-dimensional data.
[0021] Data cleaning is performed on the collected energy consumption related data to handle missing values and outliers; The cleaned data is time-aligned and resampled according to a unified timestamp; The aligned data is normalized or standardized to map data of different dimensions and orders of magnitude to a pre-set numerical interval; In a pre-set time window, time series features related to energy consumption are extracted from the processed time series data, and the time series features are segmented in a sliding window manner to form standardized historical data for model training.
[0022] It should also be noted that the preprocessing process is specifically designed to address the temporal and heterogeneous characteristics of smart home data: In the data cleaning stage, a box plot-based statistical method is used to identify outliers, combined with sliding window linear interpolation to handle missing data, ensuring data integrity. Time alignment and resampling address the issue of sampling frequency differences among multiple sensors by using a unified time reference. Resampling employs forward padding to maintain data continuity, and for energy-related physical quantities such as power, the resampling process strictly adheres to the law of conservation of physical energy, calculating the approximate total energy within each time interval based on the original sampling data. When changing the sampling step size, the new and old sampling sequences are ensured to remain consistent. The primary principle is to ensure that the total energy within the corresponding time interval is equal. The average power value under the new sampling rate is calculated by back-calculating the energy, ensuring physical consistency before and after data processing. Normalization uses Min-Max scaling to map the data to the [0,1] interval, and standardization uses the Z-score method to eliminate the influence of dimensions. These two data processing methods are selected based on the characteristics of feature distribution, effectively improving the stability and convergence speed of model training. Temporal feature extraction focuses on capturing the periodic and trend components of energy consumption data. The sliding window segmentation mechanism maintains temporal continuity by setting overlapping sampling, and feature learning at different time granularities is achieved by adjusting the window size. This hierarchical preprocessing scheme not only solves the problems of noise and inconsistency in the original data, but more importantly, it constructs a regular input that meets the requirements of deep learning models through feature engineering, laying a high-quality data foundation for subsequent model training under the federated learning framework.
[0023] S2: Train a local energy consumption prediction model based on the standardized historical data to obtain local model parameters.
[0024] A sliding time window is used to construct the input sequence and corresponding predicted label from the standardized historical data; Determine the prediction time domain and select a sequence prediction model as the local energy consumption prediction model; Using mean squared error and mean absolute error as loss functions, combined with regularization terms, a gradient optimization algorithm based on mini-batch is used for iterative training until the convergence condition or early stopping condition is met, and the trained local model parameters are obtained. The local model parameters and their gradients are quantized, pruned, and subjected to differential privacy noise processing to generate local model parameter updates for federated aggregation.
[0025] It should be noted that the construction of the sliding time window takes into account the periodic characteristics of smart home energy consumption, and the window length is usually set to 24 hours to cover the complete daily cycle pattern, and the sliding step is set to 15 minutes to 1 hour according to the control accuracy requirement. The input sequence contains multi-dimensional time series features, and the prediction label corresponds to the energy consumption demand in the next 2-12 hours. This construction method can capture long-term dependencies and meet the time resolution requirements of real-time control.
[0026] In terms of model selection, appropriate sequence prediction models are selected according to the characteristics of smart home energy consumption data. The long short-term memory network can effectively learn the long-term periodic patterns in the energy consumption data through its carefully designed gating mechanism; the time convolutional network can expand the receptive field through dilated convolution, while maintaining the temporal causal relationship and improving the training efficiency; the gated recurrent unit achieves a good balance between model complexity and expressiveness. These models all use an encoder-decoder architecture, where the encoder is responsible for extracting the spatio-temporal features of the input sequence, and the decoder performs multi-step prediction based on the learned features.
[0027] The composite loss function used in the training process takes into account the punishment requirements of different error types: the mean square error imposes stronger punishment on large deviations, ensuring the model's prediction ability for peak loads; the mean absolute error provides balanced treatment for regular prediction errors. The introduction of the L2 regularization term effectively prevents model overfitting by constraining the weight norm. The optimization process uses the adaptive moment estimation algorithm, which calculates the first and second moments of the gradient to design independent adaptive learning rates for different parameters, and uses the small batch training strategy to ensure convergence stability while accelerating the training process.
[0028] After obtaining the preliminary trained local model parameters, a parameter processing procedure specifically for the federated learning scenario is executed: Parameter quantization uses an 8-bit integer quantization scheme to map 32-bit floating-point parameters to the integer interval [-128, 127], and the quantization process includes three steps: range calibration, quantization mapping, and dequantization reconstruction, which reduces the communication load by 75% while keeping the model accuracy loss less than 2%; Parameter pruning uses an amplitude-based unstructured pruning strategy to generate a binary mask that is the same shape as the original parameter tensor, and sets parameters less than a threshold (usually set to the 10th percentile of the weight distribution) to zero, achieving a sparsity of up to 60%-80% while maintaining model accuracy; Differential privacy protection uses the (ε, δ)-differential privacy framework, first performs L2 norm clipping on the parameter update vector (the clipping threshold is determined through validation set tuning to be in the range of 0.5-2.0), and then injects random noise following a Gaussian distribution, with the noise standard deviation determined by the privacy budget ε (usually set to 4-8) and the privacy relaxation δ (set to 10 -5The magnitude) and the expected aggregation round are accurately calculated by the privacy loss composition theorem.
[0029] The local model parameter update formed by the above processing achieves the best balance among communication efficiency, privacy protection and model utility, providing a safe and efficient input for subsequent federated aggregation. This processing scheme not only solves the communication bottleneck problem in federated learning, but also provides provable protection mechanism for user data privacy, ensuring the feasibility of the system in actual deployment.
[0030] S3: aggregating a plurality of the local model parameters to generate a global prediction model through federated learning.
[0031] Receiving local model parameter updates from a plurality of data sources; Weighted aggregation of the local model parameter updates is performed using a federated averaging algorithm, wherein the weights are determined based on the standardized historical data volume corresponding to each data source; Applying the aggregated parameter updates to the global prediction model of the previous iteration to generate an updated global prediction model; Convergence evaluation is performed on the updated global prediction model, and when the model performance improvement is below a preset threshold or the maximum iteration round is reached, the iteration is terminated and the final global prediction model is output; The final global prediction model is distributed to each data source to replace its local energy consumption prediction model to complete the collaborative optimization.
[0032] It should be noted that the federated learning aggregation process is established on a secure and reliable computing framework. When receiving local model parameter updates from each participating node, the system establishes an encrypted communication link through the transmission layer security protocol and verifies the node identity using a two-way authentication mechanism based on digital certificates, effectively preventing man-in-the-middle attacks and malicious node access. Each participating node uploads parameter updates that include quantized, pruned and differentially private model parameters and their corresponding pruning masks, ensuring that the original data is always retained locally.
[0033] In the aggregation phase, an enhanced federated averaging algorithm is used as the core aggregation mechanism. This algorithm first calculates the aggregation weights based on the effective data volume of each data source, with the weight value being the proportion of the node's standardized historical data volume to the total participating data volume in the current round. To improve system robustness, multi-level security screening is performed before weighted averaging: first, L2 norm analysis is performed on the parameter update vector, and norm truncation is performed on abnormal values that exceed the range [μ-3σ, μ+3σ] (where μ and σ are the mean and standard deviation of the norm of all update vectors, respectively); then, outlier detection based on median absolute deviation is used to identify and exclude potential malicious updates. When the proportion of abnormal nodes detected exceeds 5%, the algorithm automatically switches to the coordinate median aggregation algorithm with Byzantine fault tolerance capability.
[0034] The updated parameters after screening are applied to the global model by layer-by-layer replacement. The model architecture is kept unchanged during the updating process, and only the weight parameters of each neural network layer are replaced. For sparse parameters generated by pruning, the uploaded pruning mask is used to ensure that only active parameters are weighted and averaged during aggregation, maintaining the consistency of the sparse structure of the global model. This refined parameter replacement strategy ensures the effectiveness of knowledge transfer while maintaining the computational efficiency of the model.
[0035] The convergence evaluation adopts a multi-index comprehensive judgment system. The validation set is composed of publicly available energy consumption data that has undergone strict anonymization processing, including typical energy consumption scenarios under different seasons and climate conditions. During evaluation, the mean square error, mean absolute error, and coefficient of determination R² are monitored simultaneously. When the average improvement of these three indicators in the last three iterations is less than the respective threshold (set to 0.5%, 0.8%, and 0.3% respectively), or the total iteration rounds reach the preset upper limit (usually set to 50 rounds), the training process is terminated. This multi-index early stopping mechanism effectively avoids overfitting, ensuring that the final global model has optimal generalization ability.
[0036] The model distribution stage adopts a combination of incremental updating and hot switching strategy. The global model is distributed to each node through a secure channel, and the node receives it first in an isolated environment for integrity check and performance verification. After verification, version management is used to achieve smooth transition of the model: the new model instance is deployed in parallel and runs together with the old model for a verification period (usually 24 hours). During this period, the prediction task is gradually migrated to the new model, while the prediction accuracy and system stability are continuously monitored. When the new model performs stably and better than the old model within the verification period, the final switching is completed and the old model resources are recycled. This robust updating mechanism ensures service continuity and provides reliable guarantee for large-scale deployment.
[0037] Through the above complete federated learning process, the system realizes knowledge sharing and model co-evolution across multiple smart home environments while strictly protecting data privacy, significantly improving the accuracy and generalization ability of the energy consumption prediction model.
[0038] S4: Using the global prediction model, predict the energy demand and external environmental parameters in the future period.
[0039] Set the prediction time domain and time step; Input real-time environmental state data, standardized historical energy consumption data sequence, and energy market data into the global prediction model; Through forward inference calculation of the global prediction model, output a prediction result sequence covering the prediction time domain, which includes at least household total energy demand prediction, key equipment load prediction, and external environmental parameter prediction; the external environmental parameters include future temperature, humidity, and light intensity. The prediction result sequence is time-aligned and integrated.
[0040] It should be noted that the setting of the prediction time domain and the time step adopts a hierarchical configuration strategy. The basic prediction time domain is set to 24 hours to cover the complete daily energy consumption pattern, while multiple prediction scale options such as 6 hours and 12 hours are provided to adapt to the needs of different control strategies. The time step adopts an adaptive mechanism: 60-minute steps are used in periods of slow energy consumption changes (such as late at night) to reduce computational load, and 15-minute steps are automatically switched to in periods of intense energy consumption fluctuations (such as morning and evening peak hours) to improve prediction accuracy. This flexible configuration optimizes system resource utilization while ensuring prediction effectiveness.
[0041] The organization of input data adopts a feature engineering optimization scheme. Real-time environmental state data is processed through a sliding window, constructing a time series containing the last 24 hours of data; standardized historical energy consumption data sequences are weighted through an attention mechanism, highlighting the influence of similar date patterns; in addition to basic price information, energy market data also derives secondary features such as price volatility and peak-valley price difference. All input features must pass through feature correlation analysis before being fed into the global prediction model, eliminating feature dimensions with a correlation to the target variable below a threshold (absolute value of Pearson correlation coefficient <0.1) to improve model training efficiency and prediction accuracy.
[0042] The global prediction model adopts a multi-task learning architecture, synchronously generating various prediction results through a shared bottom feature extraction network combined with multiple dedicated output heads. Among them, the total household energy consumption demand prediction output head adopts a fully connected layer structure, the key device load prediction sets up independent output heads for air conditioners, water heaters, electric vehicle chargers, and other major energy-consuming devices, and the external environment parameter prediction adopts a spatio-temporal attention mechanism to capture the propagation law of environmental variables. During model inference, the Monte Carlo Dropout technique is used to provide prediction uncertainty quantification, outputting the confidence interval of each prediction value to provide decision-making basis for subsequent risk-aware control.
[0043] The time alignment and integration of prediction results use an accurate matching algorithm based on timestamps. First, a unified time coordinate system is established, taking the control cycle starting point as the reference to interpolate and align all prediction results. For conflicting prediction values (such as differences in environmental parameter predictions for the same period by different output heads), a confidence-weighted fusion strategy is adopted, giving priority to prediction results with lower uncertainty. The integrated structured data contains complete time-variable-value triplet information, along with quality evaluation indicators for each prediction value, forming a prediction knowledge base that can be directly used for optimization control.
[0044] The prediction results after the above fine processing not only provide point estimates of future energy consumption demand, but also contain prediction uncertainty information and the spatio-temporal correlation characteristics of each variable, providing rich and reliable input information for subsequent reinforcement learning and model predictive control optimization. This all-round prediction capability significantly improves the decision-making quality of the system in a complex home environment, laying a solid foundation for achieving precise energy consumption optimization control.
[0045] S5: Based on the prediction results, a preliminary energy consumption control strategy is generated through reinforcement learning, and a model predictive control algorithm is used to optimize the preliminary energy consumption control strategy under safety constraints to obtain the final control instructions.
[0046] The state space, action space and reward function of reinforcement learning are constructed, wherein the state space at least includes the integrated prediction result sequence, the current environment state and the current running state of the device; the action space includes the start-stop instructions and power set values of each smart home device; the reward function takes reducing total energy consumption cost and maintaining user comfort as the goal; A deep Q network algorithm is used to select the action with the maximum value based on the current state, generating a preliminary energy consumption control strategy sequence covering the prediction time domain; The preliminary energy consumption control strategy sequence is input into the model predictive control algorithm as a reference trajectory; Safety constraints are applied in the rolling optimization process of model predictive control to correct the reference trajectory; The constrained optimization problem is solved to output the final control instruction sequence that meets all safety constraints, and the rolling time domain is updated at each control period.
[0047] It should be noted that the construction of the reinforcement learning framework fully considers the particularity of the smart home environment. The state space adopts hierarchical coding design: the prediction result sequence is extracted by a time series convolution network, the current environment state is encoded by a fully connected layer, and the device running state is one-hot encoded, finally forming a unified state representation through a feature fusion layer. The action space is optimized for the characteristics of home devices. For power set values, a fixed step discretization strategy is adopted, for example, air conditioner power is quantized in [500W, 2000W] with 100W granularity, a total of 16 selectable gears; lighting device brightness is graded with 10% granularity. This discretization processing not only ensures the effectiveness of the DQN algorithm, but also provides sufficient control accuracy.
[0048] The reward function adopts a dynamic weight design, including three core components: the energy cost term is calculated based on the product of real-time electricity price and device power; the comfort term is characterized by the sum of the square of the deviation between indoor temperature and set temperature; the device lifetime term is reflected by the start-stop frequency penalty. The weights of each term are dynamically adjusted according to the time period, for example, the energy cost weight is increased by 30% during the peak electricity period, and the comfort weight is increased by 50% during the night rest period. This design ensures that the system can make a reasonable trade-off in different scenarios.
[0049] The deep Q network adopts a duel network architecture to estimate the state value and action advantage function respectively, improving the accuracy of policy evaluation. During training, the priority experience replay mechanism is used to weight the sampling of experience samples according to the size of the time difference error, improving the learning efficiency. After the network generates a decision for one control step, the state transition is deduced based on the device dynamic model, and a preliminary policy sequence covering the entire prediction time domain is generated in turn, which reflects the device scheduling scheme under the long-term cumulative reward maximization goal.
[0050] The model predictive control module establishes an accurate physical system model, fully considering the thermal dynamic characteristics of the building structure, the charging and discharging efficiency of the energy storage device, and the operation logic of various devices. The thermal dynamic model accurately describes the relationship between indoor temperature change and device power, external environment, the energy storage model accurately calculates the corresponding relationship between energy storage state and charging and discharging power, and the device operation model ensures compliance with the physical characteristics of the device through logical variables.
[0051] In the rolling optimization process, the policy sequence generated by reinforcement learning is used as the initial solution, greatly improving the solving efficiency. The optimization problem contains four types of safety constraints: the total power constraint ensures that the instantaneous power does not exceed the line capacity; the temperature constraint ensures that the indoor temperature is within the user's set comfort range; the device start-stop frequency constraint prevents the compressor and other devices from frequent start-stop; the operation logic constraint ensures that the device working mode conforms to the physical law. The solver is based on the primal-dual interior point method for efficient solving, and can complete optimization calculation within 1 minute in a typical home scenario.
[0052] The final output control instruction sequence inherits the long-term optimization characteristics of reinforcement learning and incorporates the accurate constraint handling of model predictive control. After the first instruction of each control period execution sequence is executed, the system reinitializes the optimization problem based on the actual state measurement value, advancing the rolling time domain. This design enables the system to respond to environmental disturbances and device state changes in a timely manner, maintaining the optimality of control performance.
[0053] Through the deep collaboration of reinforcement learning and model predictive control, the invention realizes the unification of exploration and safety. Reinforcement learning provides global optimization direction through historical experience learning, overcoming the conservative defects of traditional MPC strategy; model predictive control ensures that the system runs within the safety boundary through real-time optimization, making up for the shortcomings of reinforcement learning in safety. This hybrid architecture shows significant advantages in complex home environments, both learning optimal strategies from data autonomously and ensuring the real-time safe and stable operation of the system.
[0054] S6: Execute the final control instruction to realize energy consumption optimization control of the smart home device.
[0055] Parse the final control instruction sequence and convert it into operation instructions executable by the corresponding smart home device; the operation instructions at least include power adjustment instructions, start-stop control instructions and running mode switching instructions; Execute the operation instructions according to the control cycle timing, and monitor the actual power, running state and environmental variables of the device in real time during execution; Compare the collected actual running data with the expected values corresponding to the final control instruction sequence, and when the deviation of any index exceeds the preset tolerance threshold, call the reinforcement learning and model predictive control processes again to generate and issue alternative control instructions in a rolling time domain; According to the changes of device running state and user operation, update the state space elements and reward function weight parameters of reinforcement learning; Record the actual energy consumption data and environmental state changes after instruction execution, and feed them back to the data preprocessing link to update the standardized historical data for subsequent local training and federated aggregation.
[0056] It should be noted that the instruction parsing and conversion process is based on a unified device communication protocol framework. The system maintains a protocol library containing control specifications for various smart home devices, supporting mainstream communication protocols including Zigbee, Z-Wave and Wi-Fi, etc. The power adjustment instruction realizes accurate control through the application programming interface provided by the device manufacturer, and for devices that only support on-off state, a time slicing strategy is used to control the conduction duty cycle to achieve average power constraint. The start-stop control instruction contains a device-specific safety sequence to ensure compliance with the startup and shutdown procedures specified by the device manufacturer. The running mode switching instruction realizes smooth transition between different working states of the device, avoiding energy consumption peaks caused by mode mutation.
[0057] The execution monitoring system adopts a multi-rate sampling strategy, setting different monitoring frequencies according to device characteristics. High-power devices such as air conditioners and water heaters use high-frequency monitoring, with a sampling interval of no more than 1 minute; regular lighting and devices use regular frequency monitoring, with a sampling interval of 5-15 minutes. Monitoring data is collected through a distributed sensor network, including accurate power data provided by smart meters, operating parameters fed back by device status sensors, and environmental sensor-monitored variables such as temperature and humidity. All monitoring data is accompanied by accurate time stamps, establishing a strict time-scale correspondence with the control instruction sequence.
[0058] The dynamic re-planning mechanism adopts a multi-level triggering strategy, taking into account the size and duration of the deviation. The system defines three types of trigger conditions: immediate re-planning when key parameters (such as total power) deviate instantaneously beyond the safety threshold; optimization adjustment when comfort parameters (such as temperature) deviate from the expected range for more than two control cycles; and diagnosis and re-planning processes when device status abnormalities persist. The re-planning process inherits the current optimal solution as the initial value, ensuring the continuity and stability of the control strategy.
[0059] The online parameter updating mechanism is based on the incremental learning principle, achieving continuous optimization of system performance. The update of state space elements is achieved through feature importance analysis, using an information gain-based evaluation method to dynamically identify and add new features that significantly affect energy consumption, while removing redundant features with low contribution. The adjustment of reward function weight parameters uses a context-based multi-armed bandit algorithm to automatically balance energy efficiency, comfort maintenance, and device lifespan based on user feedback and actual results. The system also establishes a personalized preference model, learning from user's manual adjustment records to gradually adapt to the user's specific needs.
[0060] The closed-loop data flow system builds a complete learning and optimization ecosystem. The execution effect evaluation system includes short-term effect indicators and long-term trend analysis, with short-term indicators for immediate optimization and long-term trends for system performance evaluation. Feedback data undergoes quality verification and consistency checks before entering the preprocessing process, which includes data correction based on the law of conservation of energy to ensure physical reasonableness. Updated standardized historical data is not only used for incremental training of local models, but also contributes to the collaborative evolution of global models through a federated learning framework, forming a complete improvement path from individual optimization to swarm intelligence.
[0061] The core innovation of the execution stage is to build an intelligent control system with self-diagnosis, self-learning and self-optimization capabilities. Through fine instruction execution and monitoring, the accurate implementation of the control intention is ensured; through the intelligent re-planning mechanism, the system's ability to respond to unexpected situations is given; through online parameter updating, dynamic matching of control strategies and user needs is realized; through the closed-loop data flow, a virtuous cycle of continuous improvement is established. This all-round design makes the system not only able to execute the established optimization strategy, but also to evolve and improve in long-term operation, ultimately achieving sustainable optimal energy consumption optimization effect.
[0062] Embodiment 2 is the second embodiment of the present application, which is different from the previous embodiment: If the function is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the parts that contribute to the prior art or parts of the current technical solutions can be embodied in the form of a software product, and the current computer software product is stored in a storage medium, including a number of instructions to make a computer device (which can be a personal computer, server, or network device, etc.) execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk, and various program code storage media.
[0063] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered a list of executable instructions for implementing logic functions, and can be specifically embodied in any computer-readable medium for use by an instruction execution system, apparatus or device, such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, apparatus or device and execute them, or in conjunction with these instructions execution systems, apparatus or devices. For this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transport programs for instruction execution systems, apparatus or devices, or in conjunction with these instruction execution systems, apparatus or devices.
[0064] More specific examples (a non-exhaustive list) of the computer-readable medium include the following: an electrical connection (electronic) having one or more wires, a portable computer diskette (magnetic), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer readable medium can be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, for example via an optical scanner, then compiled, interpreted, or otherwise processed, as necessary, to generate an electronically readable version of the program, which can then be stored in the computer memory.
[0065] In one embodiment, the smart home energy consumption optimization control system comprises a data acquisition and preprocessing module, a local prediction training module, a federated learning aggregation module, a prediction inference module, a reinforcement learning and model predictive control module, and an execution and feedback module.
[0066] The data acquisition and preprocessing module acquires energy consumption related data of multiple local data sources and pre-processes the data to obtain standardized historical data. The local prediction training module trains a local energy consumption prediction model based on the standardized historical data to obtain local model parameters. The federated learning aggregation module aggregates multiple local model parameters to generate a global prediction model through federated learning. The prediction inference module uses the global prediction model to predict energy consumption demand and external environmental parameters in future time periods. The reinforcement learning and model predictive control module generates a preliminary energy consumption control strategy through reinforcement learning based on the prediction results, and optimizes the preliminary energy consumption control strategy under safety constraints using a model predictive control algorithm to obtain final control instructions. The execution and feedback module executes the final control instructions to achieve energy consumption optimization control of smart home devices.
[0067] In one embodiment, the smart home energy consumption optimization control method is provided. To verify the beneficial effects of the present application, economic benefit calculation and simulation / comparison experiments are used for scientific demonstration.
[0068] A set of ordinary three-bedroom residence with an area of about 95m2 is selected as the experimental object, and the experimental period is 30 consecutive days. The residence is equipped with a variable frequency air conditioner, an electric water heater, a washing machine with drying function, a refrigerator and a number of controllable lighting loads, and is connected to a unified home power monitoring and control platform. The local data sources connected to the platform include: start-stop state, real-time power and cumulative energy consumption reported by each device intelligent socket and built-in communication interface; temperature and humidity sensor data in different rooms; personnel in place, off-site and occupancy state inferred by door magnetic, infrared human body detector and router side Wi-Fi channel state information; real-time electricity price and peak-valley segmentation information from the power company; and manual operation records, preset time table and adjustment history of temperature set value on the user's mobile phone App. The above raw data is first aligned with the unified timestamp according to the 5-minute sampling period, and the missing data is filled in based on the nearest neighbor and local interpolation method, and the abnormal power spikes are removed by threshold and box plot method; then the different physical quantities are normalized and standardized, and the multi-dimensional time series samples are constructed in the 24-hour sliding time window to form the standardized historical data meeting the input requirements of the deep learning model.
[0069] In the local training stage, each household node trains a sequence prediction model based on the above standardized historical data, which is used to predict the total load curve and key device load in the next 24 hours. Among them, the input-output pairs are constructed using sliding time windows, the input covers multi-source data features in the past 48 hours, and the output is the predicted load at each time step in the future. The model structure selects the gated recurrent unit network, considers the mean square error and the mean absolute error in the loss function, and introduces a regularization term to prevent overfitting. After training, the local model parameters are quantized and pruned to compress the parameter size, and differential privacy noise is injected to form the local model parameter update. Multiple household nodes aggregate through the federated learning server using the parameter averaging strategy with data weight, and obtain the global prediction model after several iterations. Then, the global model is distributed to each household node to replace its original local prediction model. Each household node inputs the real-time environmental state, recent historical energy consumption data and electricity price information into the global prediction model to obtain the future 24-hour household total energy consumption demand prediction, key device load prediction such as air conditioner and water heater, and predicted environmental parameters such as temperature and illumination, and aligns and integrates the prediction results in time as the forward input of the control decision module.
[0070] In the control strategy generation stage, the state space, action space and reward function of the reinforcement learning environment are constructed. The state space includes the predicted future load and electricity price curve, the current indoor and outdoor temperature, the current working state of the equipment and the user-set comfortable temperature interval, etc. The action space includes the fine adjustment of the air conditioner set temperature, the selection of the water heater heating period, and the start time of the washing machine and drying task, etc. The reward function considers the daily total electricity cost, peak power, the duration of indoor temperature deviation from the comfort interval, etc. The deep Q network is used to learn the optimal long-term strategy under the given prediction information constraint. To avoid unsafe actions in the exploration stage of reinforcement learning, the preliminary energy consumption control strategy sequence generated by reinforcement learning is input into the model predictive control module as a reference trajectory.
[0071] In the model predictive control module, the maximum allowed power of the line, the upper limit of the equipment rated power, the air conditioner frequent start-stop limit, the indoor temperature upper and lower boundary, etc. are introduced as safety constraints. Based on the simplified dynamic model of building thermal inertia and energy storage state, the reference trajectory is re-optimized in the rolling time domain under the constraint conditions. The final control instructions obtained by optimization include the device start-stop and power setting instructions that can be executed in each control period, and the actual power of the device and the change of the indoor environment are continuously monitored during actual operation. When it is found that the actual running result deviates from the model prediction or the user manual intervention is more, the system will trigger the control strategy regeneration, and the newly collected data will be backflowed to the local data set for subsequent training and federal aggregation, so as to form a continuous adaptive closed-loop optimization control process.
[0072] The experimental reference data is shown in Table 1.
[0073] Table 1: Experimental data record
[0074] As can be seen from the table data, the federal RL+MPC control scheme proposed by the application is superior to the traditional method in many key indicators, and is close to the theoretical optimal benchmark. First, in terms of daily total electricity consumption, the daily total electricity consumption of the traditional timing control scheme is 34.8 kWh, the rule+MPC control is reduced to 30.7 kWh, the single-household prediction+MPC and single-household RL+MPC are 29.9 kWh and 28.6 kWh respectively, and the scheme of the application is further reduced to 27.3 kWh, which is about 21.6% lower than the traditional timing control, and is still about 4.5% lower than the single-household RL+MPC. This shows that, under the premise of having the same hardware conditions, by improving the prediction accuracy through federal learning, and using the RL strategy and MPC constraint to optimize cooperatively at the control layer, a significant advantage can be obtained in terms of energy consumption level, and the gap from the offline theoretical optimal 26.8 kWh is already very limited.
[0075] Secondly, in terms of peak power control, the peak power of the scheme is only 5.3kW, which is reduced by about 32.9% compared with the traditional timing control of 7.9kW, and also has certain improvement compared with the single-household RL+MPC of 5.8kW. This difference is highly related to the index of "average absolute error of load prediction" in the table: through federated learning to aggregate the local model parameters of multiple households, the prediction error of the scheme is reduced to 0.57kW, while the single-household prediction+MPC and the single-household RL+MPC are 0.84kW and 0.81kW respectively. The reduction of prediction error enables the model predictive control to more accurately move high-energy-consuming devices out of the high-price and high-load period of the power grid, avoiding the peak superposition phenomenon caused by prediction deviation in the traditional method, thereby reflecting the systematic advantage in peak shaving and valley filling. This chain effect of "federated learning to improve prediction accuracy→MPC to more effectively constrain peak value→overall power curve to be smoother" is an effect that the existing single-household independent training scheme cannot achieve.
[0076] In terms of user comfort and safety, the scheme also has obvious advantages. In terms of comfort boundary time, under the traditional timing control, the indoor temperature deviates from the user-set comfort interval for about 63 minutes / day, and the rule+MPC and the single-household prediction+MPC can be reduced to 38 and 32 minutes / day respectively, and the single-household RL+MPC is 29 minutes / day. After introducing the prediction information and the MPC safety constraint, the scheme further compresses the boundary time to 18 minutes / day, close to the theoretical optimum of 15 minutes. This shows that: on the one hand, reinforcement learning combined with future prediction results can plan device scheduling in advance to avoid temperature lag; on the other hand, MPC can prevent RL from causing large fluctuations in comfort indicators during local exploration. Corresponding to the subjective comfort score, the average score of the scheme is 8.6, higher than the single-household RL+MPC of 8.1 and the single-household prediction+MPC of 7.9, which shows that in the actual user experience dimension, the scheme does not sacrifice comfort for energy saving through simple "cooling / warming", but achieves a better balance between energy consumption and comfort.
[0077] In terms of device safety and operation stability, the "number of device constraint trigger times" is an important indicator reflecting whether the control strategy respects the device start-stop constraints and rated power boundaries. The traditional timing control triggers about 9 constraints per day due to the lack of suppression of line capacity and frequent start-stop. The rule+MPC and single-house prediction+MPC have reduced the number of out-of-limit behaviors to 4 and 3, respectively. The single-house RL+MPC reduces the number of times to 2 after introducing safety constraints, but a small amount of boundary triggers may still occur under extreme weather or sudden user intervention. The scheme of the present application superimposes an MPC safety layer on the RL and enhances the constraint foresight through more accurate prediction inputs, reducing the number of device constraint trigger times to 0, which is consistent with the theoretical optimal benchmark. This shows that the "RL provides strategy direction + MPC strictly implements safety constraints" architecture proposed by the present application effectively makes up for the shortcomings of pure RL in safety and reliability, and has higher acceptability in actual engineering applications.
[0078] In addition, in terms of reinforcement learning training efficiency, the scheme of the present application only needs about 130 thousand steps to achieve stable convergence under similar training settings, which is significantly reduced compared with the 210 thousand steps required by single-house RL+MPC. The main reason is that: on the one hand, the global prediction model provides more accurate foresight information, making the dynamics of the RL environment smoother and reducing invalid exploration; on the other hand, the MPC performs safety filtering on the initial strategy, avoiding the execution of a large number of extreme and unreasonable strategies, thereby accelerating the accumulation of experience and the convergence of the strategy. This result shows that through the introduction of federated learning and MPC constraints, not only the energy consumption and comfort indicators in the running phase are improved, but also the algorithm convergence cost in the training phase is significantly reduced, which is conducive to long-term deployment on resource-constrained home computing platforms.
[0079] From the above data analysis, it can be seen that the present application significantly reduces the total energy consumption and electricity cost while maintaining or improving user comfort, effectively suppresses peak power and device constraint triggers, and shortens the reinforcement learning training convergence time. Compared with existing single-house prediction or single-house RL+MPC schemes, the present application realizes the comprehensive technical effects of considering privacy protection, optimization performance and engineering implementability through the innovative design of "federated learning to improve prediction accuracy" and "reinforcement learning + model predictive control safety coordination".
[0080] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present application and not to limit it. Although the present application has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present application can be modified or replaced by equivalents without departing from the spirit and scope of the present application, which should be covered by the claims of the present application.
Claims
1. A smart home energy consumption optimization and control method, characterized in that, include: Energy consumption-related data from multiple local data sources are collected and preprocessed to obtain standardized historical data. A local energy consumption prediction model is trained based on the standardized historical data to obtain local model parameters; By aggregating the parameters of multiple local models, a global prediction model is generated through federated learning. Using the global prediction model, energy consumption demand and external environmental parameters for future periods are predicted; Based on the prediction results, a preliminary energy consumption control strategy is generated through reinforcement learning, and the preliminary energy consumption control strategy is optimized under safety constraints using a model predictive control algorithm to obtain the final control command. The final control command is executed to achieve optimized energy consumption control of smart home devices.
2. The smart home energy consumption optimization and control method as described in claim 1, characterized in that, The energy consumption-related data includes: The operating data of smart home devices includes the device's start / stop status, real-time power, cumulative energy consumption, and operating mode; Environmental status data, including indoor temperature, outdoor temperature, humidity, light intensity, and the presence, absence, and occupancy status of personnel; User behavior data, including device operation records, preset schedules, and user preferences for adjusting device operating parameters; Energy market data, including real-time electricity prices, peak period information, and grid load status obtained through a local gateway.
3. The smart home energy consumption optimization and control method as described in claim 2, characterized in that, The preprocessing includes: Data cleaning is performed on the collected energy consumption data to remove missing and outlier values; The cleaned data is time-aligned and resampled using a unified timestamp. The aligned data is normalized or standardized to map data of different dimensions and magnitudes to a preset numerical range; Within a preset time window, energy-related time-series features are extracted from the processed time-series data, and the time-series features are segmented in a sliding window manner to form standardized historical data for model training.
4. The smart home energy consumption optimization and control method as described in claim 3, characterized in that, The obtained local model parameters include: A sliding time window is used to construct the input sequence and corresponding predicted label from the standardized historical data; Determine the prediction time domain and select a sequence prediction model as the local energy consumption prediction model; Using mean squared error and mean absolute error as loss functions, combined with regularization terms, a gradient optimization algorithm based on mini-batch is used for iterative training until the convergence condition or early stopping condition is met, and the trained local model parameters are obtained. The local model parameters and their gradients are quantized, pruned, and subjected to differential privacy noise processing to generate local model parameter updates for federated aggregation.
5. The smart home energy consumption optimization and control method as described in claim 4, characterized in that, The generation of a global prediction model through federated learning includes: Receive local model parameter updates from multiple data sources; The local model parameter updates are weighted and aggregated using a federated average algorithm, where the weights are determined based on the standardized historical data volume corresponding to each data source. The parameters obtained from the aggregation are updated and applied to the global prediction model of the previous iteration to generate the updated global prediction model; The updated global prediction model is evaluated for convergence. When the improvement in model performance is lower than a preset threshold or the maximum number of iterations is reached, the iteration is terminated and the final global prediction model is output. The final global prediction model is distributed to each data source, replacing their local energy consumption prediction models to achieve collaborative optimization.
6. The smart home energy consumption optimization and control method as described in claim 5, characterized in that, The predicted energy consumption demand and external environmental parameters for future periods include: Define the prediction time domain and time step; Input real-time environmental status data, standardized historical energy consumption data sequences, and energy market data into the global prediction model; The forward inference calculation of the global prediction model outputs a sequence of prediction results covering the prediction time domain. The sequence of prediction results includes at least the prediction of total household energy consumption demand, the prediction of critical equipment load, and the prediction of external environmental parameters. The external environmental parameters include future temperature, humidity, and light intensity. The predicted result sequence is time-aligned and integrated.
7. The smart home energy consumption optimization and control method as described in claim 6, characterized in that, The final control command obtained includes: Construct a state space, action space, and reward function for reinforcement learning. The state space includes at least the integrated sequence of prediction results, the current environmental state, and the current operating state of the device. The action space includes the start / stop commands and power settings for each smart home device. The reward function aims to reduce total energy consumption costs and maintain user comfort. A deep Q-network algorithm is used to select the action with the highest value based on the current state, and generate a preliminary energy consumption control strategy sequence covering the prediction time domain. The preliminary energy consumption control strategy sequence is used as a reference trajectory input to the model predictive control algorithm; Safety constraints are applied during the rolling optimization process of model predictive control to correct the reference trajectory; Solve the constrained optimization problem, output the final control command sequence that satisfies all safety constraints, and update it in the rolling time domain during each control cycle.
8. The smart home energy consumption optimization and control method as described in claim 7, characterized in that, The execution of the final control command includes: The final control instruction sequence is parsed and converted into corresponding smart home device executable operation instructions; the operation instructions include at least power adjustment instructions, start / stop control instructions, and operating mode switching instructions. The operation instructions are executed according to the control cycle sequence, and the actual power, operating status and environmental variables of the equipment are monitored in real time during the execution process; The actual operating data collected is compared with the expected value corresponding to the final control command sequence. When the deviation of any indicator exceeds the preset tolerance threshold, the reinforcement learning and model prediction control process is called in the rolling time domain to regenerate and issue alternative control commands. Update the state space elements and reward function weight parameters of reinforcement learning based on changes in device operating status and user operations; Record the actual energy consumption data and environmental state changes after the command is executed, and feed them back to the data preprocessing stage to update the standardized historical data for subsequent local training and federated aggregation.
9. A smart home energy consumption optimization control system, used to implement the smart home energy consumption optimization control method as described in any one of claims 1 to 8, characterized in that, include: Data acquisition and preprocessing module: Collects energy consumption-related data from multiple local data sources and preprocesses it to obtain standardized historical data; Local prediction training module: Trains a local energy consumption prediction model based on the standardized historical data to obtain local model parameters; Federated learning aggregation module: Aggregates multiple local model parameters and generates a global prediction model through federated learning; Prediction and inference module: Using the global prediction model, predict energy consumption demand and external environmental parameters for future periods; Reinforcement learning and model predictive control module: Based on the prediction results, a preliminary energy consumption control strategy is generated through reinforcement learning, and the preliminary energy consumption control strategy is optimized under safety constraints using a model predictive control algorithm to obtain the final control command; Execution and Feedback Module: Executes the final control command to achieve energy consumption optimization control of smart home devices.
Citation Information
Patent Citations
Comprehensive energy system optimal scheduling method and system based on federal reinforcement learning
CN117151308A
Air conditioner energy-saving control method and system based on reinforcement learning and digital twinborn model
CN118031385A
Multi-energy system optimization scheduling method based on carbon flow theory and deep reinforcement learning
CN119398250A
User power utilization optimization method for output collaboration of new energy power supply cluster
CN119482743A
Central air conditioner energy-saving optimization system based on load prediction
CN119642336A
Cited By
Two-stage electrolytic copper foil electrodeposition energy consumption optimization method based on federal learning
CN121900195A