An energy management method, device, apparatus and storage medium

By acquiring environmental and user data from smart home systems and using multi-device task-independent element learning to generate execution control strategies, the flexibility and personalization issues of traditional energy management systems are solved, achieving dual optimization of energy saving and comfort.

CN119644741BActive Publication Date: 2026-04-14GREE ELECTRIC APPLIANCE INC OF ZHUHAI +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-06
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Traditional energy management systems, which rely on preset rules or single machine learning models, lack flexibility and personalization in their energy management strategies, failing to meet users' dual needs for energy conservation and comfort.

Method used

By periodically acquiring environmental context data, user feature data, and device status data for device tasks, and inputting them into a pre-trained energy management model, dynamic execution control strategies are generated through multi-device task-independent meta-learning training to adjust device operating status in order to balance energy saving and comfort.

Benefits of technology

It enables dynamic adjustment of equipment operating status while meeting user needs, reducing total energy consumption costs, and optimizing equipment collaborative operation according to user preferences, thereby improving energy utilization efficiency and user comfort.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119644741B_ABST
    Figure CN119644741B_ABST
Patent Text Reader

Abstract

Embodiments of the present application relate to the field of energy management, and disclose an energy management method, device, equipment and storage medium, the method comprising: periodically acquiring task data for a current scene task; the scene task is synchronously executed by at least two device tasks, each device task corresponds to the running process of a device; the task data comprises environment context data, user feature data and device state data corresponding to each device task; sequentially inputting the periodically acquired task data into a pre-trained energy management model to periodically obtain an execution control strategy for each device task output by the energy management model; based on the periodically obtained execution control strategy of each device task, the running state of the device in each device task is dynamically adjusted. The present application can meet the dual needs of energy saving and comfort of users.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of energy management, and particularly to an energy management method, apparatus, device and storage medium. Background Technology

[0002] With the rapid development of Internet of Things (IoT) and Artificial Intelligence (AI) technologies, smart home systems have become an important way to improve quality of life and energy efficiency. Traditional energy management systems often use preset rules or single machine learning models, resulting in a lack of flexibility and personalization in energy management strategies, failing to meet users' dual needs for energy saving and comfort. Summary of the Invention

[0003] The purpose of this invention is to provide at least one energy management method, apparatus, device, and storage medium, which can at least solve the problem that traditional energy management systems often use preset rules or a single machine learning model, resulting in a lack of flexibility and personalization in energy management strategies, and failing to meet users' dual needs for energy saving and comfort.

[0004] To address the aforementioned technical problems, at least one embodiment of this application provides an energy management method, comprising:

[0005] The system periodically acquires task data for the current scenario task; the scenario task consists of at least two device tasks executed simultaneously, with each device task corresponding to the operation process of one device; the task data includes environmental context data, user feature data, and device status data corresponding to each device task.

[0006] The periodically acquired task data is sequentially input into a pre-trained energy management model to periodically obtain the execution control strategy for each device task output by the energy management model.

[0007] Based on the execution control strategy of each of the periodically obtained device tasks, the operating status of the devices in each of the device tasks is dynamically adjusted.

[0008] In some optional embodiments, training the energy management model includes:

[0009] Create an original model, which has multiple task-specific parameters to be trained and a shared parameter, each of the task-specific parameters corresponding to a device task of a device;

[0010] Construct scenario task samples for multiple scenario tasks. Each scenario task sample includes device task samples corresponding to at least two types of devices. Each device task sample includes user feature sample data, environmental context sample data, device status sample data, and historical control strategy samples.

[0011] The energy management model is obtained by performing multi-device task-independent meta-learning training on the original model based on scene task samples from multiple scenarios.

[0012] In some optional embodiments, the energy management model is obtained by performing multi-device task-independent meta-learning training on the original model based on scene task samples from multiple scene tasks, including:

[0013] Initialization steps: Initialize the inner loop learning rate, outer loop learning rate, multiple task-specific parameters to be trained, and a shared parameter in the original model;

[0014] Inner loop step: For each scene task sample, the inner loop training is performed sequentially on each of the device task samples contained therein. The inner loop training process is as follows: the original model is trained based on the device task sample, the loss value of the device task is calculated, and the task-specific parameters corresponding to the device task are updated using gradient descent based on the loss value of the device task.

[0015] Outer loop step: After completing the inner loop training for each of the device task samples included in the scene task samples, calculate the comprehensive loss value of all the device tasks, and update the shared parameters of the original model based on the comprehensive loss value of all the device tasks using the gradient descent method.

[0016] The learning rate update step updates the inner loop learning rate and outer loop learning rate of the original model based on the current outer loop iteration.

[0017] Repeat the inner loop steps, outer loop steps, and learning rate update steps until the preset training termination condition is met, then stop training and use the original model obtained after stopping training as the energy management model.

[0018] In some optional embodiments, the loss function used to calculate the loss value of the device task is expressed as follows:

[0019]

[0020] Among them, E i D represents the total energy consumption cost of the device corresponding to the i-th device task. i S represents the user comfort deviation corresponding to the i-th device task. iLet λ1, λ2, and λ3 be the hyperparameters of the total energy consumption cost of the device corresponding to the device task, the hyperparameter of the user comfort deviation of the device task, and the hyperparameter of the device collaboration loss between the device corresponding to the device task and the device included in the scenario corresponding to the scenario task, respectively.

[0021] In some optional embodiments, the total energy consumption cost E of the device corresponding to the i-th device task is... i The formula for calculation is:

[0022]

[0023] Among them, P i c(t) represents the total energy consumption of the device corresponding to the i-th device task at time t, c(t) represents the electricity price at time t, and Δt represents the time interval.

[0024] In some optional embodiments, the user comfort deviation D corresponding to the i-th device task i The formula for calculation is:

[0025]

[0026] Among them, S i (t) represents the environmental impact parameter of the device corresponding to the i-th device task at time t, S user (t) represents the user's comfort setting value for the device corresponding to the i-th device task at time t, δ is the preset tolerance threshold, and f(·) is the deviation measurement function.

[0027] In some optional embodiments, the device coordination loss S between the device corresponding to the i-th device task and the devices included in the scene corresponding to the scene task is... i The formula for calculation is:

[0028]

[0029] Among them, P i (t) represents the energy consumption of the device corresponding to the i-th device task at time t, P threshold This is the safety threshold for electrical load.

[0030] At least one embodiment of this application also provides an energy management device, comprising:

[0031] The acquisition module is used to periodically acquire task data for the current scenario task; the scenario task is at least two device tasks executed simultaneously, and each device task corresponds to the operation process of one device; the task data includes environmental context data, user feature data and device status data corresponding to each device task;

[0032] The generation module is used to sequentially input the periodically acquired task data into a pre-trained energy management model to periodically obtain the execution control strategy for each device task output by the energy management model.

[0033] The control module is used to dynamically adjust the operating state of the devices in each of the periodically obtained device tasks based on the execution control strategy of each device task.

[0034] At least one embodiment of this application also provides an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the energy management method described above.

[0035] At least one embodiment of this application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the energy management method described above.

[0036] This application provides an energy management method, apparatus, device, and storage medium. It periodically acquires task data for a current scenario task; the scenario task consists of at least two device tasks executed simultaneously, each device task corresponding to the operation of one device; the task data includes environmental context data, user feature data, and device status data corresponding to each device task; then, the periodically acquired task data is sequentially input into a pre-trained energy management model to periodically obtain execution control strategies for each device task output by the energy management model; based on the periodically obtained execution control strategies for each device task, the operating status of the devices in each device task is dynamically adjusted. This application can meet users' dual needs for energy saving and comfort. Attached Figure Description

[0037] One or more embodiments are illustrated by way of example with reference to the accompanying drawings, and these illustrative descriptions do not constitute a limitation on the embodiments.

[0038] Figure 1 This is a flowchart illustrating an energy management method provided in one embodiment of this application;

[0039] Figure 2 This is a flowchart illustrating the training process of an energy management model provided in one embodiment of this application;

[0040] Figure 3 This is a schematic diagram of the structure of an energy management device provided in one embodiment of this application. Detailed Implementation

[0041] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the various embodiments of this application will be described in detail below with reference to the accompanying drawings. However, those skilled in the art will understand that many technical details have been provided in the various embodiments of this application to help readers better understand this application. However, the technical solutions claimed in this application can be implemented even without these technical details and various changes and modifications based on the following embodiments. The division of the various embodiments below is for the convenience of description and should not constitute any limitation on the specific implementation of this application. The various embodiments can be combined with and referenced by each other without contradiction.

[0042] To facilitate understanding of the embodiments of this application, relevant content on energy management will be introduced first.

[0043] With the rapid development of Internet of Things (IoT) and Artificial Intelligence (AI) technologies, smart home systems have become an important way to improve quality of life and energy efficiency. Traditional energy management systems often use preset rules or single machine learning models, resulting in a lack of flexibility and personalization in energy management strategies, failing to meet users' dual needs for energy saving and comfort.

[0044] This application identifies the following characteristics of smart home environments:

[0045] Rich contextual information: including time, weather, electricity price, user schedule, etc.;

[0046] Diverse user behavior patterns: Different users have different lifestyles and preferences;

[0047] Inter-device collaboration: Multiple devices in the home may be running simultaneously, creating opportunities for collaborative optimization.

[0048] To address the technical problem that traditional energy management systems often employ preset rules or single machine learning models, resulting in a lack of flexibility and personalization in energy management strategies and an inability to meet users' dual needs for energy conservation and comfort, this invention proposes an energy management method. The implementation details of the energy management method in this embodiment are described below. The following content is only for ease of understanding and is not essential for implementing this solution.

[0049] Example 1:

[0050] The energy-saving method of this embodiment can be applied to electronic devices with communication, computing, and data storage capabilities, and its specific process can be as follows: Figure 1 As shown, it includes:

[0051] Step S11: Periodically acquire task data for the current scenario task. The scenario task involves at least two device tasks executing simultaneously, with each device task corresponding to the operation process of one device. The task data includes environmental context data, user feature data, and device status data corresponding to each device task.

[0052] Specifically, the environmental context data is contextual data extracted from smart home environmental information using a context-aware mechanism, such as time, weather forecast, real-time electricity price, holiday information, and environmental data. The environmental data includes indoor and outdoor temperature, indoor and outdoor humidity, light intensity, and air quality. This environmental context data changes with environmental changes, helping the subsequent energy management model to perceive these changes and dynamically adjust the output operation control strategy.

[0053] The user characteristic data refers to parameters reflecting user preferences and behavioral patterns, such as user temperature preferences, lifestyle habits, tolerance for delays, daily schedules, and historical behavior records. This data can be obtained by creating user profiles. The user characteristic data helps subsequent energy management models output operational control strategies that meet user needs.

[0054] The device status data includes parameters related to the device's operating status and energy consumption information, such as operating status, energy consumption information, and control parameters. For example, for an air conditioner, the device status data includes the currently set temperature, operating mode, and power consumption; for a washing machine, the device status data includes task duration and the current working mode (washing, rinsing, spin-drying).

[0055] Step S12: The periodically acquired task data is sequentially input into the pre-trained energy management model to periodically obtain the execution control strategy for each device task output by the energy management model.

[0056] In some embodiments, such as Figure 2 As shown, training the energy management model includes:

[0057] Step S21: Create the original model.

[0058] Specifically, the original model is configured with multiple task-specific parameters to be trained, as well as a shared parameter, each of which corresponds to a device task of a device.

[0059] Step S22: Construct scene task samples for multiple scene tasks.

[0060] Specifically, each scenario task sample includes at least two types of device task samples, and each device task sample includes user feature sample data, environmental context sample data, device status sample data, and historical control strategy sample data.

[0061] Step S23: Based on scene task samples of multiple scene tasks, perform multi-device task-independent meta-learning training on the original model to obtain the energy management model.

[0062] In some embodiments, step S23 includes:

[0063] Initialization steps: Initialize the inner loop learning rate α, outer loop learning rate β, and multiple task-specific parameters φ to be trained in the original model. i , and a shared parameter θ.

[0064] Inner loop step: For each scene task sample in the scene task, perform inner loop training on each of the device task samples contained therein.

[0065] Specifically, for each device task, the goal of training the original model on device samples of the device task is to adjust the task feature parameters of the original model so that it can better adapt to the corresponding device task.

[0066] For each device task The inner loop training process is as follows:

[0067] (1) The original model is trained based on the device task samples.

[0068] The i-th device task The device samples output to the original model for model training are:

[0069]

[0070] in, This represents the device status data of the device corresponding to the i-th device task; x user C represents user characteristic data; C represents environmental context data.

[0071] (2) Calculate the loss value of the device task, and update the task-specific parameters corresponding to the device task using gradient descent based on the loss value of the device task.

[0072] In some examples, the loss function used to calculate the loss value of the device task is expressed as follows:

[0073]

[0074] Among them, E i The total energy consumption of the device corresponding to the i-th device task;

[0075] D i The deviation of user comfort corresponding to the i-th device task;

[0076] S i The device collaboration loss is the loss between the device corresponding to the i-th device task and the devices included in the scenario corresponding to the scene task.

[0077] λ1, λ2, and λ3 are respectively the hyperparameters of the total energy consumption of the device corresponding to the device task, the hyperparameters of the user comfort deviation of the device task, and the hyperparameters of the device collaboration loss between the device corresponding to the device task and the devices included in the scenario corresponding to the scenario task.

[0078] By adjusting the values ​​of λ1, λ2, and λ3, the relationship between energy saving and user comfort, as well as the impact of control equipment synergy, can be balanced. For each equipment task... The loss function described above integrates the relationship between energy consumption costs and user comfort, as well as the impact of control device coordination.

[0079] The total energy consumption E of the device corresponding to the i-th device task i This refers to the total energy consumption of the device corresponding to the i-th device task within a specific time period, which can be calculated using device power and operating time, as shown in the formula:

[0080]

[0081] Among them, P i (t) represents the energy consumption of the device corresponding to the i-th device task at time t, where Δt is the time interval.

[0082] Considering the energy cost of electricity, to reflect the true energy consumption, calculations can be performed using the real-time electricity price c(t):

[0083]

[0084] Where c(t) is the electricity price at time t.

[0085] The operational control strategy output by the well-trained energy management model can reduce equipment power consumption during periods of high electricity prices, thereby lowering energy consumption costs.

[0086] The user comfort deviation D iThe user comfort deviation D measures the difference between actual environmental parameters and user expectations. i The smaller the value, the higher the user's comfort level.

[0087] The user comfort deviation D corresponding to the i-th device task i The formula for calculation is:

[0088]

[0089] Among them, S i (t) represents the environmental impact parameter of the device corresponding to the i-th device task at time t;

[0090] S user (t) represents the user's comfort setting value for the device corresponding to the i-th device task at time t;

[0091] f(·) is a function that measures the degree of deviation, and is usually chosen as a linear or quadratic function.

[0092] For a specific example, let's take temperature as an example:

[0093]

[0094] Among them, T room (t) represents the indoor temperature at time t, T user This indicates the user's desired room temperature.

[0095] In order to focus only on the user comfort deviation D that exceeds the user's acceptable range. i A tolerance threshold δ was introduced:

[0096]

[0097] When the user comfort deviation D i Within the tolerance threshold δ, the user comfort deviation D i The loss was zero.

[0098] The equipment collaborative loss S i The interaction between multiple devices is taken into account, such as load peaks or mutual interference caused by simultaneous operation. For example, the simultaneous operation of multiple high-power devices may lead to excessive household power load.

[0099] The device collaboration loss S between the device corresponding to the i-th device task and the devices included in the scenario corresponding to the scenario task i The formula for calculation is:

[0100]

[0101]

[0102] Among them, P i (t) represents the energy consumption of the device corresponding to the i-th device task at time t, P threshold This is the safety threshold for electrical load.

[0103] Update the device task using gradient descent. The corresponding task-specific parameter φ i The calculation formula used is as follows:

[0104]

[0105] Where α is the inner loop learning rate;

[0106] It is the i-th device task. The loss function;

[0107] φ′ i These are new task-specific parameters obtained after one or more steps of gradient descent.

[0108] It is a loss function Regarding the task-specific parameter φ i The gradient.

[0109] Let's take the simultaneous operation of the washing machine and water heater as an example:

[0110] Total energy cost of washing machine task E WM :

[0111]

[0112] Among them, P WM c(t) is the total energy consumption of the washing machine at time t, c(t) is the electricity price at time t, and Δt is the time interval.

[0113] Total energy consumption cost of water heater task:

[0114]

[0115] Among them, P HW (t) represents the total energy consumption of the water heater at time t.

[0116] Total energy cost E for washing machine and water heater tasks total For: E total =E WM +E HW .

[0117] User comfort deviation of washing machine task:

[0118] D WM =max(0,T) WM,complete -T WM,deadline )

[0119] Among them, D WM This refers to the user comfort deviation of the washing machine task (also known as the task delay penalty). It indicates the degree of delay between the actual completion time of the washing machine task and the preset completion deadline. If the task is completed within the specified time, the delay penalty is 0; if it is completed after the deadline, there will be a penalty value, indicating a deviation in user comfort.

[0120] T WM,complete This is the actual completion time of the washing machine task. WM,complete The value represents the completion time of the washing machine task, used to calculate the delay relative to the user-preset deadline.

[0121] T WM,deadline This is the scheduled completion deadline for the washing machine task. The user expects the washing machine task to complete before this deadline.

[0122] User comfort deviation of water heater task:

[0123] D HW =max(0,T) HW,ready -T HW,deadline )

[0124] Among them, D HW This refers to the user comfort deviation of the water heater task (or task delay penalty). Similar to the user comfort deviation of the washing machine task, it indicates the degree of delay in the actual preparation time of the water heater task relative to the predetermined preparation deadline.

[0125] T HW,ready It is the actual preparation time for the water heater task, that is, the time it takes for the water heater to reach the set temperature, and is used to calculate the delay relative to the user-set preparation time.

[0126] T HW,deadline This is the scheduled preparation deadline for the water heater. The user expects the water heater to be ready before the scheduled preparation deadline.

[0127] Equipment coordination loss S for washing machine task WM Equipment coordination loss S for washing machine task HM They are respectively:

[0128]

[0129] P total (t)=P WM (t)+PHW (t)

[0130] Among them, P threshold The safety threshold for electrical load, This indicates the proportion of the washing machine's contribution to the total load. This indicates the proportion of the water heater's contribution to the total load. (P) total (t) represents the total energy consumption of the washing machine and water heater at time t.

[0131] Outer loop step: After completing the inner loop training for each of the device task samples included in the scene task samples, calculate the comprehensive loss value of all the device tasks, and update the shared parameters of the original model based on the comprehensive loss value of all the device tasks using the gradient descent method.

[0132] Specifically, the goal of the outer loop is to update the shared parameters θ of the original model so that the model can generalize better to new device tasks. This step is performed after the inner loop steps have been completed on multiple device tasks, using the loss function of all device tasks to update the shared parameters θ.

[0133] The formula for updating the shared parameter θ of the original model using gradient descent is as follows:

[0134]

[0135] Where β is the outer loop learning rate, representing the step size for shared parameter updates in the outer loop.

[0136] denoted as the total loss value for all the aforementioned device tasks, and k represents the total number of device tasks.

[0137] The learning rate update step updates the inner loop learning rate and outer loop learning rate of the original model based on the current outer loop iteration.

[0138] Repeat the inner loop steps, outer loop steps, and learning rate update steps until the preset training termination condition is met, then stop training and use the original model obtained after stopping training as the energy management model.

[0139] Step S13: Based on the execution control strategy of each of the periodically obtained device tasks, dynamically adjust the operating status of the devices in each of the device tasks.

[0140] The method provided in this embodiment periodically acquires task data for the current scenario task; the scenario task consists of at least two device tasks executed simultaneously, each device task corresponding to the operation process of one device; the task data includes environmental context data, user feature data, and device status data corresponding to each device task; the periodically acquired task data is sequentially input into a pre-trained energy management model to periodically obtain the execution control strategy for each device task output by the energy management model; based on the periodically obtained execution control strategy for each device task, the operating status of the devices in each device task is dynamically adjusted, which can achieve the goal of avoiding the synchronous operation time of high-power devices while meeting the completion deadline set by the user task, prioritizing the operation of devices during periods with lower electricity prices, reducing the total energy consumption cost, and flexibly adjusting the device startup time according to the user's tolerance for device task delays.

[0141] Example 2:

[0142] Another embodiment of this application relates to an energy management device. The implementation details of the energy management device in this embodiment are described below. The following implementation details are provided for ease of understanding and are not essential for implementing this solution. A schematic diagram of the energy management device in this embodiment can be shown as follows: Figure 3 As shown, it includes an acquisition module 301, a generation module 302, and a control module 303.

[0143] The acquisition module 301 periodically acquires task data for the current scenario task. The scenario task involves at least two device tasks executing simultaneously, with each device task corresponding to the operation of one device. The task data includes environmental context data, user characteristic data, and device status data corresponding to each device task.

[0144] Specifically, the environmental context data is contextual data extracted from smart home environmental information using a context-aware mechanism, such as time, weather forecast, real-time electricity price, holiday information, and environmental data. The environmental data includes indoor and outdoor temperature, indoor and outdoor humidity, light intensity, and air quality. This environmental context data changes with environmental changes, helping the subsequent energy management model to perceive these changes and dynamically adjust the output operation control strategy.

[0145] The user characteristic data refers to parameters reflecting user preferences and behavioral patterns, such as user temperature preferences, lifestyle habits, tolerance for delays, daily schedules, and historical behavior records. This data can be obtained by creating user profiles. The user characteristic data helps subsequent energy management models output operational control strategies that meet user needs.

[0146] The device status data includes parameters related to the device's operating status and energy consumption information, such as operating status, energy consumption information, and control parameters. For example, for an air conditioner, the device status data includes the currently set temperature, operating mode, and power consumption; for a washing machine, the device status data includes task duration and the current working mode (washing, rinsing, spin-drying).

[0147] The generation module 302 is used to sequentially input the periodically acquired task data into a pre-trained energy management model to periodically obtain the execution control strategy for each device task output by the energy management model.

[0148] In some embodiments, such as Figure 2 As shown, training the energy management model includes:

[0149] Step S21: Create the original model.

[0150] Specifically, the original model is configured with multiple task-specific parameters to be trained, as well as a shared parameter, each of which corresponds to a device task of a device.

[0151] Step S22: Construct scene task samples for multiple scene tasks.

[0152] Specifically, each scenario task sample includes at least two types of device task samples, and each device task sample includes user feature sample data, environmental context sample data, device status sample data, and historical control strategy sample data.

[0153] Step S23: Based on scene task samples of multiple scene tasks, perform multi-device task-independent meta-learning training on the original model to obtain the energy management model.

[0154] In some embodiments, step S23 includes:

[0155] Initialization steps: Initialize the inner loop learning rate α, outer loop learning rate β, and multiple task-specific parameters φ to be trained in the original model. i , and a shared parameter θ.

[0156] Inner loop step: For each scene task sample in the scene task, perform inner loop training on each of the device task samples contained therein.

[0157] Specifically, for each device task, the goal of training the original model on device samples of the device task is to adjust the task feature parameters of the original model so that it can better adapt to the corresponding device task.

[0158] For each device task The inner loop training process is as follows:

[0159] (1) The original model is trained based on the device task samples.

[0160] The i-th device task The device samples output to the original model for model training are:

[0161]

[0162] This represents the device status data of the device corresponding to the i-th device task; x user C represents user characteristic data, and C represents environmental context data.

[0163] (2) Calculate the loss value of the device task, and update the task-specific parameters corresponding to the device task using gradient descent based on the loss value of the device task.

[0164] In some examples, the loss function used to calculate the loss value of the device task is expressed as follows:

[0165]

[0166] Among them, E i The total energy consumption of the device corresponding to the i-th device task;

[0167] D i The deviation of user comfort corresponding to the i-th device task;

[0168] S i The device collaboration loss is the loss between the device corresponding to the i-th device task and the devices included in the scenario corresponding to the scene task.

[0169] λ1, λ2, and λ3 are respectively the hyperparameters of the total energy consumption of the device corresponding to the device task, the hyperparameters of the user comfort deviation of the device task, and the hyperparameters of the device collaboration loss between the device corresponding to the device task and the devices included in the scenario corresponding to the scenario task.

[0170] By adjusting the values ​​of λ1, λ2, and λ3, the relationship between energy saving and user comfort, as well as the impact of control equipment synergy, can be balanced. For each equipment task... The loss function described above integrates the relationship between energy consumption costs and user comfort, as well as the impact of control device coordination.

[0171] The total energy consumption E of the device corresponding to the i-th device taski This refers to the total energy consumption of the device corresponding to the i-th device task within a specific time period, which can be calculated using device power and operating time, as shown in the formula:

[0172]

[0173] Among them, P i (t) represents the energy consumption of the device corresponding to the i-th device task at time t, where Δt is the time interval.

[0174] Considering the energy cost of electricity, to reflect the true energy consumption, calculations can be performed using the real-time electricity price c(t):

[0175]

[0176] Where c(t) is the electricity price at time t.

[0177] The operational control strategy output by the well-trained energy management model can reduce equipment power consumption during periods of high electricity prices, thereby lowering energy consumption costs.

[0178] The user comfort deviation D i The user comfort deviation D measures the difference between actual environmental parameters and user expectations. i The smaller the value, the higher the user's comfort level.

[0179] The user comfort deviation D corresponding to the i-th device task i The formula for calculation is:

[0180]

[0181] Among them, S i (t) represents the environmental impact parameter of the device corresponding to the i-th device task at time t;

[0182] S user (t) represents the user's comfort setting value for the device corresponding to the i-th device task at time t;

[0183] f(·) is a function that measures the degree of deviation, and is usually chosen as a linear or quadratic function.

[0184] For a specific example, let's take temperature as an example:

[0185]

[0186] Among them, T room (t) represents the indoor temperature at time t, T user This indicates the user's desired room temperature.

[0187] In order to focus only on the user comfort deviation D that exceeds the user's acceptable range. i A tolerance threshold δ was introduced:

[0188]

[0189] When the user comfort deviation D i Within the tolerance threshold δ, the user comfort deviation D i The loss was zero.

[0190] The equipment collaborative loss S i The interaction between multiple devices is taken into account, such as load peaks or mutual interference caused by simultaneous operation. For example, the simultaneous operation of multiple high-power devices may lead to excessive household power load.

[0191] The device collaboration loss S between the device corresponding to the i-th device task and the devices included in the scenario corresponding to the scenario task i The formula for calculation is:

[0192]

[0193] Among them, P i (t) represents the energy consumption of the device corresponding to the i-th device task at time t, P threshold This is the safety threshold for electrical load.

[0194] Update the device task using gradient descent. The corresponding task-specific parameter φ i The calculation formula used is as follows:

[0195]

[0196] Where α is the inner loop learning rate;

[0197] It is the i-th device task. The loss function;

[0198] φ′ i These are new task-specific parameters obtained after one or more steps of gradient descent.

[0199] It is a loss function Regarding the task-specific parameter φ i The gradient.

[0200] The control module 303 is used to dynamically adjust the operating status of the devices in each of the device tasks based on the execution control strategy obtained periodically.

[0201] The device provided in this embodiment periodically acquires task data for the current scenario task through the acquisition module 301. The scenario task consists of at least two device tasks executed simultaneously, with each device task corresponding to the operation process of one device. The task data includes environmental context data, user feature data, and device status data corresponding to each device task. The generation module 302 sequentially inputs the periodically acquired task data into a pre-trained energy management model to periodically obtain the execution control strategy for each device task output by the energy management model. Then, the control module 303 dynamically adjusts the operating status of the devices in each device task based on the periodically obtained execution control strategy for each device task. This allows for the staggering of the synchronous operation time of high-power devices while meeting the completion deadline set by the user task, prioritizing the operation of devices during periods with lower electricity prices, thereby reducing total energy consumption costs. Furthermore, it allows for flexible adjustment of device startup time based on the user's tolerance for device task delays.

[0202] It is worth mentioning that all modules involved in this embodiment are logical modules. In practical applications, a logical unit can be a physical unit, a part of a physical unit, or a combination of multiple physical units. Furthermore, to highlight the innovative aspects of this application, this embodiment does not introduce units that are not closely related to solving the technical problems proposed in this application; however, this does not mean that other units are absent in this embodiment.

[0203] Example 3:

[0204] Another embodiment of this application relates to an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the energy management methods in the above embodiments.

[0205] The memory and processor are connected via a bus, which can include any number of interconnecting buses and bridges, connecting various circuits of one or more processors and memories. The bus can also connect various other circuits, such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and will not be described further herein. The bus interface provides an interface between the bus and the transceiver. The transceiver can be a single element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices over a transmission medium. Data processed by the processor is transmitted over the wireless medium via an antenna, which further receives data and transmits it to the processor.

[0206] The processor manages the bus and general processing, and also provides various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. Memory is used to store data used by the processor during operation.

[0207] Example 4:

[0208] Another embodiment of this application relates to a computer-readable storage medium storing a computer program. When executed by a processor, the computer program implements the method embodiments described above.

[0209] That is, those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program instructing related hardware. This program is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0210] Those skilled in the art will understand that the above embodiments are specific embodiments for implementing this application, and in practical applications, various changes can be made to them in form and detail without departing from the spirit and scope of this application.

Claims

1. An energy management method, characterized in that, include: Periodically acquire task data specific to the current scenario and task; The scenario task involves the simultaneous execution of at least two device tasks, with each device task corresponding to the operation process of one device; the task data includes environmental context data, user feature data, and device status data corresponding to each device task. The periodically acquired task data is sequentially input into a pre-trained energy management model to periodically obtain the execution control strategy for each device task output by the energy management model. Based on the execution control strategy of each of the periodically obtained device tasks, the operating state of the device in each of the device tasks is dynamically adjusted. Training the energy management model includes: Create an original model, which has multiple task-specific parameters to be trained and a shared parameter, each of the task-specific parameters corresponding to a device task of a device; Construct scene task samples for multiple scene tasks. Each scene task sample includes device task samples corresponding to at least two types of devices. Each device task sample includes user feature sample data, environmental context sample data, device status sample data, and historical control policy samples. The devices are smart home devices. The original model is trained using multi-device task-independent meta-learning based on scene task samples from multiple scenarios to obtain the energy management model. The energy management model is obtained by training the original model using multi-device task-independent meta-learning based on scene task samples from multiple scene tasks, including: Initialization steps: Initialize the inner loop learning rate, outer loop learning rate, multiple task-specific parameters to be trained, and a shared parameter in the original model; Inner Loop Step: For each scenario task sample, perform inner loop training sequentially on each of the device task samples contained therein. The inner loop training process is as follows: train the original model based on the device task samples, calculate the loss value of the device task, and update the task-specific parameters corresponding to the device task using gradient descent based on the loss value of the device task; wherein, the formula for calculating the loss value of the device task is: in, For the first The total energy consumption cost of the equipment corresponding to each of the aforementioned equipment tasks. For the first User comfort deviation corresponding to each of the aforementioned device tasks. For the first Device coordination loss between the device corresponding to the device task and the devices included in the scenario corresponding to the scenario task; , and These are, respectively, the hyperparameters of the total energy consumption cost of the device corresponding to the device task, the hyperparameters of the user comfort deviation corresponding to the device task, and the hyperparameters of the device coordination loss between the device corresponding to the device task and the devices included in the scenario corresponding to the scenario task. for No. The device corresponding to each device task is in Energy consumption over time The safety threshold for electrical load, For the first The devices corresponding to the aforementioned device tasks are in Environmental influence parameters over time For users to the first The device corresponding to each of the aforementioned device tasks is in Comfort setting for time, The preset tolerance threshold, This is a function that measures the degree of deviation. Outer loop step: After completing the inner loop training for each of the device task samples included in the scene task samples, calculate the comprehensive loss value of all the device tasks, and update the shared parameters of the original model based on the comprehensive loss value of all the device tasks using the gradient descent method. The learning rate update step updates the inner loop learning rate and outer loop learning rate of the original model based on the current outer loop iteration. Repeat the inner loop steps, outer loop steps, and learning rate update steps until the preset training termination condition is met, then stop training and use the original model obtained after stopping training as the energy management model.

2. The energy management method according to claim 1, characterized in that, The first The total energy consumption cost of the equipment corresponding to each of the aforementioned equipment tasks The formula for calculation is: in, For the first The device corresponding to each device task is in Total energy consumption over time for Electricity price at that time For time intervals.

3. An energy management device, characterized in that, include: The acquisition module is used to periodically acquire task data for the current scenario task; The scenario task involves the simultaneous execution of at least two device tasks, with each device task corresponding to the operation process of one device; the task data includes environmental context data, user feature data, and device status data corresponding to each device task. The generation module is used to sequentially input the periodically acquired task data into a pre-trained energy management model to periodically obtain the execution control strategy for each device task output by the energy management model. The control module is used to dynamically adjust the operating state of the device in each of the device tasks based on the execution control strategy obtained periodically. Training the energy management model includes: Create an original model, which has multiple task-specific parameters to be trained and a shared parameter, each of the task-specific parameters corresponding to a device task of a device; Construct scene task samples for multiple scene tasks. Each scene task sample includes device task samples corresponding to at least two types of devices. Each device task sample includes user feature sample data, environmental context sample data, device status sample data, and historical control policy samples. The devices are smart home devices. The original model is trained using multi-device task-independent meta-learning based on scene task samples from multiple scenarios to obtain the energy management model. The energy management model is obtained by training the original model using multi-device task-independent meta-learning based on scene task samples from multiple scene tasks, including: Initialization steps: Initialize the inner loop learning rate, outer loop learning rate, multiple task-specific parameters to be trained, and a shared parameter in the original model; Inner Loop Step: For each scenario task sample, perform inner loop training sequentially on each of the device task samples contained therein. The inner loop training process is as follows: train the original model based on the device task samples, calculate the loss value of the device task, and update the task-specific parameters corresponding to the device task using gradient descent based on the loss value of the device task; wherein, the formula for calculating the loss value of the device task is: in, For the first The total energy consumption cost of the equipment corresponding to each of the aforementioned equipment tasks. For the first User comfort deviation corresponding to each of the aforementioned device tasks. For the first Device coordination loss between the device corresponding to the device task and the devices included in the scenario corresponding to the scenario task; , and These are, respectively, the hyperparameters of the total energy consumption cost of the device corresponding to the device task, the hyperparameters of the user comfort deviation corresponding to the device task, and the hyperparameters of the device coordination loss between the device corresponding to the device task and the devices included in the scenario corresponding to the scenario task. for No. The device corresponding to each device task is in Energy consumption over time The safety threshold for electrical load, For the first The device corresponding to each of the aforementioned device tasks is in Environmental influence parameters over time For users to the first The device corresponding to each of the aforementioned device tasks is in Comfort setting for time, The preset tolerance threshold, This is a function that measures the degree of deviation. Outer loop step: After completing the inner loop training for each of the device task samples included in the scene task samples, calculate the comprehensive loss value of all the device tasks, and update the shared parameters of the original model based on the comprehensive loss value of all the device tasks using the gradient descent method. The learning rate update step updates the inner loop learning rate and outer loop learning rate of the original model based on the current outer loop iteration. Repeat the inner loop steps, outer loop steps, and learning rate update steps until the preset training termination condition is met, then stop training and use the original model obtained after stopping training as the energy management model.

4. An electronic device, characterized in that, include: At least one processor; as well as, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the energy management method as described in any one of claims 1 to 2.

5. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the energy management method according to any one of claims 1 to 2.

Citation Information

Patent Citations

  • Model determination method and device and computer readable storage medium

    CN117313893A

  • Building air conditioner optimization control method and system considering personalized comfort of regional users

    CN118794109A