Smart home control method and device, equipment and storage medium
By training a smart home control model through federated learning and making personalized fine-tuning based on local data, the problem of existing technologies being unable to simultaneously meet users' personalized and real-time needs is solved, achieving both data privacy protection and improved flexibility in smart home control.
Patent Information
- Application Number
- CN202411411091.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-10
- Publication Date
- 2025-01-07
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing smart home control technologies cannot simultaneously meet users' personalized and real-time needs, and also pose data privacy and security issues.
The smart home control model is trained using federated learning. An initial local model is trained using local data, and the model parameters are uploaded to the server for aggregation to generate a global model. The model is then fine-tuned using local data to ensure data privacy and to control the smart home based on the user's real-time behavior.
It achieves the goal of meeting users' personalized and real-time needs while protecting data privacy, thereby improving the flexibility of smart home control and user experience.
Smart Images

Figure CN119270661A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of smart home technology, and in particular to a smart home control method, device, equipment and storage medium. Background Art
[0002] With the development of smart home technology, more and more users choose to use smart homes. However, existing smart home control technologies usually use processed centralized data for model training. Models trained in this way, because the data used is centralized data, will bring problems such as the model cannot take into account the user's personalized needs and real-time needs. Summary of the invention
[0003] In view of the above problems, embodiments of the present invention are proposed to provide a smart home control method, a corresponding smart home control device, equipment and storage medium that overcome the above problems or at least partially solve the above problems.
[0004] In order to solve the above problems, an embodiment of the present invention discloses a smart home control method, the method comprising:
[0005] Obtain users' real-time behavior and smart home control models;
[0006] The smart home of the user is controlled according to the real-time behavior and the smart home control model; the smart home control model is obtained according to the local data and the global model of the user, the global model is obtained according to the model parameters of the local models of multiple users, the local model is trained based on the local data of the user, and the local data includes the user's historical behavior and device usage data.
[0007] Optionally, the smart home control model is trained by the following method:
[0008] Acquire the user's local data, which includes the user's historical behavior data and device usage data;
[0009] Training a local model based on the local data;
[0010] Uploading the trained model parameters of the local model to the server, so that the server obtains a global model according to the model parameters of the local models of multiple users;
[0011] Receiving the global model sent by the server;
[0012] The global model is adjusted according to the local data to obtain the smart home control model.
[0013] Optionally, controlling the user's smart home according to the real-time behavior and the smart home control model includes:
[0014] Determining the user's control intention for the smart home according to the user's real-time behavior;
[0015] Determining a control strategy for the smart home according to the user's control intention for the smart home and the smart home control model;
[0016] According to the control strategy, the smart home is controlled.
[0017] Optionally, determining a control strategy for the smart home according to the user's control intention for the smart home and the smart home control model includes:
[0018] The control strategy is determined according to the mapping relationship between the control intention and the control strategy preset in the smart home control model and the user's control intention for the smart home; the control strategy includes a responsive control strategy and a predictive control strategy.
[0019] Optionally, controlling the smart home according to the control strategy includes:
[0020] When the control strategy is a responsive control strategy, the smart home is immediately controlled according to the responsive control strategy, and the instant control includes turning on or off the smart home;
[0021] When the control strategy is a predictive control strategy, the smart home is predictively controlled according to the predictive control strategy, and the predictive control includes performing personalized predictive adjustment on the opening degree of the smart home according to the real-time behavior of the user.
[0022] Optionally, controlling the user's smart home according to the real-time behavior and the smart home control model further includes:
[0023] When it is determined according to the real-time behavior of the user that the user has no control intention for the smart home, determining the control strategy to be a normal control strategy;
[0024] Normal adjustment is performed on the smart home according to the normal control strategy, and the normal adjustment includes performing optimal energy consumption adjustment on the smart home according to the optimal energy consumption mode preset in the smart home control model.
[0025] Optionally, uploading the model parameters of the trained local model to a server includes:
[0026] The model parameters of the local model are encrypted based on a preset encryption method, and the encrypted model parameters of the local model are uploaded to the server. The preset encryption method is at least one of differential privacy, secure multi-party computing and homomorphic encryption.
[0027] Optionally, adjusting the global model according to the local data to obtain the smart home control model includes:
[0028] The global model is fine-tuned individually through local data to adapt the global model to the local environment and user habits; the global model that has completed the fine-tuning is used as the smart home control model.
[0029] On the other hand, the present invention also discloses a smart home control device, the device comprising:
[0030] Model acquisition module, used to obtain the user's real-time behavior and smart home control model;
[0031] A control module is used to control the user's smart home according to the real-time behavior and the smart home control model; the smart home control model is obtained according to the user's local data and a global model, the global model is obtained according to model parameters of local models of multiple users, and the local model is trained based on the user's local data, and the local data includes user historical behavior and device usage data.
[0032] Optionally, the smart home control model is obtained by training the following modules:
[0033] A data acquisition module, used to acquire the user's local data, the local data including the user's historical behavior data and device usage data;
[0034] A model training module, used for training a local model according to the local data;
[0035] A model uploading module, used for uploading the model parameters of the trained local model to the server, so that the server can obtain a global model according to the model parameters of the local models of multiple users;
[0036] A model receiving module, used for receiving the global model sent by the server;
[0037] A model fine-tuning module is used to adjust the global model according to the local data to obtain the smart home control model.
[0038] Optionally, the control module includes:
[0039] An intention determination submodule, used to determine the user's control intention for the smart home according to the user's real-time behavior;
[0040] A strategy acquisition submodule, configured to determine a control strategy for the smart home according to the user's control intention for the smart home and the smart home control model;
[0041] The home control submodule is used to control the smart home according to the control strategy.
[0042] Optionally, the policy control submodule includes:
[0043] A strategy determination unit is used to determine the control strategy according to the mapping relationship between the control intention and the control strategy preset in the smart home control model and the user's control intention for the smart home; the control strategy includes a responsive control strategy and a predictive control strategy.
[0044] Optionally, the home control submodule includes:
[0045] An instant control unit, used for performing instant control on the smart home according to the responsive control strategy when the control strategy is a responsive control strategy, wherein the instant control includes turning on or off the smart home;
[0046] A prediction control unit is used to perform predictive control on the smart home according to the predictive control strategy when the control strategy is a predictive control strategy, wherein the predictive control includes personalized predictive adjustment of the opening degree of the smart home according to the real-time behavior of the user.
[0047] Optionally, the control module further includes:
[0048] A normal control confirmation submodule, configured to determine that the control strategy is a normal control strategy when it is determined based on the real-time behavior of the user that the user has no control intention for the smart home;
[0049] The normal control submodule is used to perform normal adjustment on the smart home according to the normal control strategy, wherein the normal adjustment includes performing optimal energy consumption adjustment on the smart home according to the optimal energy consumption mode preset in the smart home control model.
[0050] Optionally, the model uploading module includes:
[0051] The data encryption upload submodule is used to encrypt the model parameters of the local model based on a preset encryption method, and upload the encrypted model parameters of the local model to the server. The preset encryption method is at least one of differential privacy, secure multi-party computing and homomorphic encryption.
[0052] Optionally, the model fine-tuning module includes:
[0053] The local fine-tuning submodule is used to perform personalized fine-tuning on the global model through local data so that the global model can adapt to the local environment and user habits; and the personalized fine-tuned global model is used as the smart home control model.
[0054] Correspondingly, an embodiment of the present invention discloses an electronic device, including: a processor, a memory, and a computer program stored in the memory and capable of running on the processor, and when the computer program is executed by the processor, the various steps of the above-mentioned smart home control method embodiment are implemented.
[0055] Accordingly, an embodiment of the present invention discloses a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the various steps of the above-mentioned smart home control method embodiment are implemented.
[0056] The embodiment of the present invention ensures data privacy by encrypting the model parameters when training and uploading the local model locally, and aggregating the initial local models of multiple users into a global model can make the global model more universal and practical. On this basis, the aggregated global model is combined with local data for personalized fine-tuning to obtain a smart home control model, so that the smart home control model can meet the personalized needs of users. At the same time, on the basis of using the smart home control model, the real-time behavior of the user is also used as one of the parameters for controlling the smart home, thereby taking into account the real-time needs and personalized needs of the user as well as data privacy issues. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 is a flowchart of steps of an embodiment of a smart home control method of the present invention;
[0058] Figure 2 is a flowchart of steps of an embodiment of a training method for a smart home control model of the present invention;
[0059] Figure 3 It is a data acquisition schematic diagram of the present invention;
[0060] Figure 4 It is a structural block diagram of an embodiment of a smart home control device of the present invention. DETAILED DESCRIPTION
[0061] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0062] Smart home refers to a home system that integrates various electronic devices, sensors and Internet technologies into the home to achieve intelligence, automation and remote control. There are many types of smart home products, the most common of which include: smart speakers, smart lamps, smart door locks, smart cameras, smart air conditioners, smart security systems, etc.
[0063] Federated Learning (FL) is a distributed machine learning method that aims to protect data privacy while using multi-party data for model training. In traditional centralized machine learning methods, data needs to be concentrated on a server for training, which may involve user privacy and data security issues. Federated learning avoids data centralization by distributing model training to each data source locally, thereby protecting data privacy. On the other hand, in federated learning, multiple clients perform model training locally, and the server is responsible for aggregating and integrating updates to these local models. The entire training process is distributed on multiple devices, and there is no need to transmit data to a central server.
[0064] One of the core concepts of the embodiments of the present invention is to use federated learning to integrate the initial local models of each user in the same area to obtain a global model. After obtaining the comprehensive model, the local user data is used to fine-tune the global model in a personalized way, thereby meeting the personalized needs of the user while ensuring data privacy. Through the collaboration of smart homes, the real-time behavior of the user is obtained, and the real-time behavior is used as one of the parameters of smart home control. The final control solution is obtained in combination with the smart home control model, thereby meeting the real-time needs of the user.
[0065] Reference Figure 1 , shows a flowchart of a smart home control method embodiment of the present invention, which may specifically include the following steps:
[0066] Step 101, obtaining the user's real-time behavior and smart home control model.
[0067] Real-time analysis is performed based on the usage status of the smart home, capturing user behavior and obtaining the smart home control model stored locally for subsequent home control.
[0068] In one example, the user's behavior can be captured by a smart camera in a smart home, and computer vision algorithms including face recognition technology, behavior recognition algorithms, anomaly detection algorithms, etc. can be used, but the present invention does not limit this.
[0069] In another example, the user's real-time behavior can be obtained by analyzing the user's historical data and combining it with the current device usage status. For example, if the user turns on the light in the study room at 7 o'clock every Wednesday and Friday night, the user's status can be determined by detecting the usage of home appliances such as air conditioners and lamps in the house, and the light in the study room can be turned on in time.
[0070] Step 102: Control the smart home of the user according to the real-time behavior and the smart home control model; the smart home control model is obtained according to the local data of the user and a global model, the global model is obtained according to model parameters of local models of multiple users, and the local model is trained based on the local data of the user, and the local data includes user historical behavior and device usage data.
[0071] Before obtaining the global model, the local client will perform initial local model training based on the user's local data. After the training is completed, the characteristic parameters of the local model will be uploaded to the server. The server will aggregate the characteristic parameters of the local models of multiple users and perform updates and aggregation operations to obtain the global model, and then transmit the global model back to the user's local client. After receiving the global model uniformly updated and aggregated by the server, the local client will perform user-personalized fine-tuning on the global model based on the locally stored user data. This smart home control model trained using federated learning can effectively protect the user's data privacy and meet the user's personalized needs through further personalized fine-tuning.
[0072] In one embodiment, step 102 may include the following sub-steps:
[0073] Sub-step S11, determining the user's control intention for the smart home according to the user's real-time behavior;
[0074] After obtaining the user's real-time behavior, the control intention corresponding to the user's real-time behavior is determined based on the built-in intelligent algorithm.
[0075] Sub-step S12, determining a control strategy for the smart home according to the user's control intention for the smart home and the smart home control model.
[0076] After obtaining the user's control intention, the user's control intention is used as a parameter input and combined with the smart home control model to obtain the corresponding smart home control strategy.
[0077] Sub-step S13, controlling the smart home according to the control strategy.
[0078] On the basis of traditional smart home control relying on smart scenes, smart home control combined with users' real-time behavioral intentions can further meet users' real-time needs.
[0079] In one embodiment, the sub-step S12 may further include:
[0080] Sub-step S121, determining the control strategy according to the mapping relationship between the control intention and the control strategy preset in the smart home control model and the user's control intention for the smart home; the control strategy includes a responsive control strategy and a predictive control strategy.
[0081] The division of responsive control strategies and predictive control strategies can further meet user needs and improve user experience in using smart homes.
[0082] In one example, when the model is trained locally, the control method corresponding to the user's control intention is trained as one of the model training parameters, and the resulting model can obtain the corresponding control strategy by inputting the user's real-time control intention.
[0083] In one embodiment, the sub-step S13 may further include:
[0084] Sub-step S131, when the control strategy is a responsive control strategy, real-time control is performed on the smart home according to the responsive control strategy, and the real-time control includes turning on or off the smart home;
[0085] Sub-step S132, when the control strategy is a predictive control strategy, predictive control is performed on the smart home according to the predictive control strategy, and the predictive control includes personalized predictive adjustment of the opening degree of the smart home according to the real-time behavior of the user.
[0086] For example, if the user's real-time behavior is analyzed to be taking a bath or preparing to take a bath, the smart home control model will predictively adjust the air conditioning, lighting, smart water heater and other smart home functions to meet the user's possible future needs.
[0087] In another example, by analyzing the user's real-time behavior, if the user has just returned home, the smart home control model will make immediate adjustments to the indoor smart home according to the outdoor temperature, the user's past behavior habits, and the user's real-time behavior, including adjusting the lighting, air conditioning temperature, etc.
[0088] For example, when it is necessary to turn on the air conditioner to lower the indoor temperature, the cooling method of the embodiment of the present invention is different from the prior art that only cools down based on the room temperature and the user's historical data. Instead, it obtains the user's key behaviors in real time and adjusts the opening of the air conditioner according to the user's key behaviors. For example, if the suitable temperature for a user is 24 degrees, when it is detected that the user has just returned home and has fanned himself or wiped his sweat, the air conditioner will be adjusted to a high wind mode of 16 degrees. Then, when it is detected that the user is not fanning himself or wiping his sweat, the air conditioner temperature will be adjusted to a medium wind mode of 24 degrees. The smart home control model can also control other home appliances in addition to the air conditioner, such as lamps, etc., which will not be described here.
[0089] By making real-time adjustments based on smart scenes and combining users' real-time behaviors, users' real-time needs can be met, making smart home control more flexible.
[0090] In one embodiment, step 102 may further include:
[0091] Sub-step S14, when it is determined based on the real-time behavior of the user that the user has no control intention for the smart home, determining the control strategy to be a normal control strategy;
[0092] Sub-step S15, performing normal adjustment on the smart home according to the normal control strategy, wherein the normal adjustment includes performing optimal energy consumption adjustment on the smart home according to the optimal energy consumption mode preset in the smart home control model.
[0093] In the process of obtaining the model characteristic parameters of multiple users for optimization and aggregation, the server will integrate the data of multiple users to obtain the common usage characteristics of these users, and then obtain the smart home energy consumption curve. In the case that the user has no obvious control intention, and on the premise of satisfying the user's comfort, the smart home will adjust the smart home to the user's personalized optimal energy consumption model based on the energy consumption curve provided by the model.
[0094] In one example, the server analyzes the characteristic parameters of multiple models in the same area to obtain the energy consumption curve of the air conditioner in the area, and uses it as the initial energy consumption curve of the global model. After the local client obtains the global model, it will personalize the energy consumption curve based on the initial energy consumption curve and the user's local data to obtain the best energy consumption curve that meets the user's usage habits. For example, in this area, under the premise of meeting the public's comfort, the optimal energy consumption temperature of the air conditioner is 26 degrees, the suitable room temperature for user A is 24-26 degrees, and the suitable room temperature for user B is 20-24 degrees. At this time, the local client of user A will adjust the room temperature to 26 degrees when the user has no control intention, which not only meets the user's comfort but also saves the air conditioner's power consumption, and adjusts the room temperature of user B to the temperature with the lowest energy consumption between 20-24 degrees to meet the comfort and energy consumption requirements of user B. This method can balance the balance between user comfort and energy consumption and improve the user experience.
[0095] The embodiment of the present invention ensures data privacy by encrypting the model parameters when training and uploading the local model locally, and aggregating the initial local models of multiple users into a global model can make the global model more universal and practical. On this basis, the aggregated global model is combined with local data for personalized fine-tuning to obtain a smart home control model, so that the smart home control model can meet the personalized needs of users. At the same time, on the basis of using the smart home control model, the real-time behavior of the user is also used as one of the parameters for controlling the smart home, thereby taking into account the real-time needs and personalized needs of the user as well as data privacy issues.
[0096] refer to Figure 2 , shows a flowchart of the steps of the training method of the smart home control model of the present invention, which may specifically include the following steps:
[0097] Step 201, obtaining local data of the user, wherein the local data includes historical behavior data and device usage data of the user;
[0098] The local client will collect device usage data and user behavior data in the home, such as light switch time, temperature adjustment records, etc.
[0099] In one example, after obtaining the local data, operations including data cleaning, feature extraction, and data normalization are also performed.
[0100] Reference Figure 3 , which shows a data acquisition schematic diagram of a local model training embodiment of the present invention:
[0101] Exemplarily, the training data of the local model can be divided into two parts: video data and text information. The video data can be composed of house surveillance video, bedroom surveillance video, and outdoor surveillance video. Video information can also be obtained by other means, which is not limited by the present invention; text information is compiled from data obtained by temperature sensors, humidity sensors, and air pressure sensors in smart homes. Video information can also be obtained by other means, which is not limited by the present invention.
[0102] Step 202, training a local model based on the local data;
[0103] Model training can be various machine learning algorithms, such as linear regression, decision tree, support vector machine, or deep learning models such as convolutional neural networks (CNN) and recurrent neural networks (RNN). The present invention does not limit this.
[0104] Step 203, uploading the trained model parameters of the local model to the server, so that the server obtains a global model according to the model parameters of the local models of multiple users;
[0105] In one embodiment, step 203 may include the following sub-steps:
[0106] Sub-step S21, encrypting the model parameters of the local model based on a preset encryption method, uploading the encrypted model parameters of the local model to the server, wherein the preset encryption method is at least one of differential privacy, secure multi-party computing and homomorphic encryption.
[0107] Exemplarily, differential privacy technology can be used for encryption. Differential privacy technology ensures that the data of a single user is difficult to reconstruct by adding noise in the model update. Homomorphic encryption allows calculations on encrypted data, further enhancing data security. The encryption method can also be other data encryption methods, which are not limited in the present invention. Encrypting the data when uploading the characteristic parameters of the model further protects data privacy.
[0108] Step 204, receiving the global model sent by the server;
[0109] Exemplarily, the server aggregates the model characteristic data uploaded by all local clients to generate a global model. The aggregation method may be weighted average, federated optimization algorithm, etc. The present invention is not limited to this. After the global model is updated, the server sends the updated global model back to each central control screen.
[0110] Step 205: adjust the global model according to the local data to obtain the smart home control model.
[0111] In one embodiment, step 205 may include the following sub-steps:
[0112] Sub-step S31, using local data, personalizing and fine-tuning the global model to adapt the global model to the local environment and user habits; and using the personalizing and fine-tuning global model as the smart home control model.
[0113] Personalized fine-tuning can be achieved by fine-tuning the global model, so that the smart home control model adapts to the local environment and user habits.
[0114] Using federated learning to train the model effectively protects the user's data privacy. After obtaining the global model, local personalized optimization of the model can further improve the model's adaptability and better meet the user's personalized needs.
[0115] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.
[0116] Reference Figure 4 , shows a structural block diagram of an embodiment of a smart home control device of the present invention, which may specifically include the following modules:
[0117] Model acquisition module 301, used to acquire the user's real-time behavior and smart home control model;
[0118] Real-time analysis is performed based on the usage status of the smart home, capturing user behavior and obtaining the smart home control model stored locally for subsequent home control.
[0119] In one example, the user's behavior can be captured by a smart camera in a smart home, and computer vision algorithms including face recognition technology, behavior recognition algorithms, anomaly detection algorithms, etc. can be used, but the present invention does not limit this.
[0120] In another example, the user's real-time behavior can be obtained by analyzing the user's historical data and combining it with the current device usage status. For example, if the user turns on the light in the study room at 7 o'clock every Wednesday and Friday night, the user's status can be determined by detecting the usage of home appliances such as air conditioners and lamps in the house, and the light in the study room can be turned on in time.
[0121] The control module 302 is used to control the smart home of the user according to the real-time behavior and the smart home control model; the smart home control model is obtained according to the local data and the global model of the user, the global model is obtained according to the model parameters of the local models of multiple users, and the local model is trained based on the local data of the user, and the local data includes the user's historical behavior and device usage data.
[0122] Before obtaining the global model, the local client will perform initial local model training based on the user's local data. After the training is completed, the characteristic parameters of the local model will be uploaded to the server. The server will aggregate the characteristic parameters of the local models of multiple users and perform updates and aggregation operations to obtain the global model, and then transmit the global model back to the user's local client. After receiving the global model uniformly updated and aggregated by the server, the local client will perform user-personalized fine-tuning on the global model based on the locally stored user data. This smart home control model trained using federated learning can effectively protect the user's data privacy and meet the user's personalized needs through further personalized fine-tuning.
[0123] In one embodiment, the control module includes:
[0124] An intention determination submodule, used to determine the user's control intention for the smart home according to the user's real-time behavior;
[0125] After obtaining the user's real-time behavior, the control intention corresponding to the user's real-time behavior is determined based on the built-in intelligent algorithm
[0126] A strategy acquisition submodule, configured to determine a control strategy for the smart home according to the user's control intention for the smart home and the smart home control model;
[0127] After obtaining the user's control intention, the user's control intention is used as a parameter input and combined with the smart home control model to obtain the corresponding smart home control strategy.
[0128] The home control submodule is used to control the smart home according to the control strategy.
[0129] On the basis of traditional smart home control relying on smart scenes, smart home control combined with users' real-time behavioral intentions can further meet users' real-time needs.
[0130] In one embodiment, the policy control submodule includes:
[0131] A strategy determination unit is used to determine the control strategy according to the mapping relationship between the control intention and the control strategy preset in the smart home control model and the user's control intention for the smart home; the control strategy includes a responsive control strategy and a predictive control strategy.
[0132] The division of responsive control strategies and predictive control strategies can further meet user needs and improve user experience in using smart homes.
[0133] In one example, when the model is trained locally, the control method corresponding to the user's control intention is trained as one of the model training parameters, and the resulting model can obtain the corresponding control strategy by inputting the user's real-time control intention.
[0134] In one embodiment, the home control submodule includes:
[0135] An instant control unit, used for performing instant control on the smart home according to the responsive control strategy when the control strategy is a responsive control strategy, wherein the instant control includes turning on or off the smart home;
[0136] A prediction control unit is used to perform predictive control on the smart home according to the predictive control strategy when the control strategy is a predictive control strategy, wherein the predictive control includes personalized predictive adjustment of the opening degree of the smart home according to the real-time behavior of the user.
[0137] For example, if the user's real-time behavior is analyzed to be taking a bath or preparing to take a bath, the smart home control model will predictively adjust the air conditioning, lighting, smart water heater and other smart home functions to meet the user's possible future needs.
[0138] In another example, by analyzing the user's real-time behavior, if the user has just returned home, the smart home control model will make immediate adjustments to the indoor smart home based on the outdoor temperature, the user's past behavior habits, and the user's real-time behavior, including adjusting the lighting, air conditioning temperature, etc.
[0139] For example, when it is necessary to turn on the air conditioner to lower the indoor temperature, the cooling method of the embodiment of the present invention is different from the prior art that only cools down based on the room temperature and the user's historical data. Instead, it obtains the user's key behaviors in real time and adjusts the opening of the air conditioner according to the user's key behaviors. For example, if the suitable temperature for a user is 24 degrees, when it is detected that the user has just returned home and has fanned himself or wiped his sweat, the air conditioner will be adjusted to a high wind mode of 16 degrees. Then, when it is detected that the user is not fanning himself or wiping his sweat, the air conditioner temperature will be adjusted to a medium wind mode of 24 degrees. The smart home control model can also control other home appliances in addition to the air conditioner, such as lamps, etc., which will not be described here.
[0140] In one embodiment, the control module further includes:
[0141] A normal control confirmation submodule, configured to determine that the control strategy is a normal control strategy when it is determined based on the real-time behavior of the user that the user has no control intention for the smart home;
[0142] The normal control submodule is used to perform normal adjustment on the smart home according to the normal control strategy, wherein the normal adjustment includes performing optimal energy consumption adjustment on the smart home according to the optimal energy consumption mode preset in the smart home control model.
[0143] In the process of obtaining the model characteristic parameters of multiple users for optimization and aggregation, the server will integrate the data of multiple users to obtain the common usage characteristics of these users, and then obtain the smart home energy consumption curve. In the case that the user has no obvious control intention, and on the premise of satisfying the user's comfort, the smart home will adjust the smart home to the user's personalized optimal energy consumption model based on the energy consumption curve provided by the model.
[0144] In one example, the server analyzes the characteristic parameters of multiple models in the same area to obtain the energy consumption curve of the air conditioner in the area, and uses it as the initial energy consumption curve of the global model. After the local client obtains the global model, it will personalize the energy consumption curve based on the initial energy consumption curve and the user's local data to obtain the best energy consumption curve that meets the user's usage habits. For example, in this area, under the premise of meeting the public's comfort, the optimal energy consumption temperature of the air conditioner is 26 degrees, the suitable room temperature for user A is 24-26 degrees, and the suitable room temperature for user B is 20-24 degrees. At this time, the local client of user A will adjust the room temperature to 26 degrees when the user has no control intention, which not only meets the user's comfort but also saves the air conditioner's power consumption, and adjusts the room temperature of user B to the temperature with the lowest energy consumption between 20-24 degrees to meet the comfort and energy consumption requirements of user B. This method can balance the balance between user comfort and energy consumption and improve the user experience.
[0145] In one embodiment, the smart home control model is trained by the following modules:
[0146] A data acquisition module, used to acquire the user's local data, the local data including the user's historical behavior data and device usage data;
[0147] The local client will collect device usage data and user behavior data in the home, such as light switch time, temperature adjustment records, etc.
[0148] In one example, after obtaining the local data, operations including data cleaning, feature extraction, and data normalization are also performed.
[0149] A model training module, used for training a local model according to the local data;
[0150] Model training can be various machine learning algorithms, such as linear regression, decision tree, support vector machine, or deep learning models such as convolutional neural networks (CNN) and recurrent neural networks (RNN). The present invention does not limit this.
[0151] A model uploading module, used for uploading the model parameters of the trained local model to the server, so that the server can obtain a global model according to the model parameters of the local models of multiple users;
[0152] A model receiving module, used for receiving the global model sent by the server;
[0153] Exemplarily, the server aggregates the model characteristic data uploaded by all local clients to generate a global model. The aggregation method can be weighted average, federated optimization algorithm, etc. The present invention is not limited to this. After the global model is updated, the server sends the updated global model back to each local client.
[0154] A model fine-tuning module is used to adjust the global model according to the local data to obtain the smart home control model.
[0155] Optionally, the model uploading module includes:
[0156] The data encryption upload submodule is used to encrypt the model parameters of the local model based on a preset encryption method, and upload the encrypted model parameters of the local model to the server. The preset encryption method is at least one of differential privacy, secure multi-party computing and homomorphic encryption.
[0157] Exemplarily, differential privacy technology can be used for encryption. Differential privacy technology ensures that the data of a single user is difficult to reconstruct by adding noise in the model update. Homomorphic encryption allows calculations on encrypted data, further enhancing data security. The encryption method can also be other data encryption methods, which are not limited in the present invention. Encrypting the data when uploading the characteristic parameters of the model further protects data privacy.
[0158] Optionally, the model fine-tuning module includes:
[0159] The local fine-tuning submodule is used to perform personalized fine-tuning on the global model through local data so that the global model can adapt to the local environment and user habits; and the personalized fine-tuned global model is used as the smart home control model.
[0160] Personalized fine-tuning can be achieved by fine-tuning the global model, so that the smart home control model adapts to the local environment and user habits.
[0161] The embodiment of the present invention ensures data privacy by encrypting the model parameters when training and uploading the local model locally, and aggregating the initial local models of multiple users into a global model can make the global model more universal and practical. On this basis, the aggregated global model is combined with local data for personalized fine-tuning to obtain a smart home control model, so that the smart home control model can meet the personalized needs of users. At the same time, on the basis of using the smart home control model, the real-time behavior of the user is also used as one of the parameters for controlling the smart home, thereby taking into account the real-time needs and personalized needs of the user as well as data privacy issues.
[0162] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0163] An embodiment of the present invention further provides an electronic device, including:
[0164] It includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor. When the computer program is executed by the processor, the various processes of the above-mentioned smart home control method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0165] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the various processes of the above-mentioned smart home control method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0166] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0167] It will be appreciated by those skilled in the art that the embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0168] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0169] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0170] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0171] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.
[0172] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0173] The above is a detailed introduction to a smart home control method, a smart home control device, equipment and storage medium provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A smart home control method, characterized in that: The method comprises: Obtain users' real-time behavior and smart home control models; The smart home of the user is controlled according to the real-time behavior and the smart home control model; the smart home control model is obtained according to the local data and the global model of the user, the global model is obtained according to the model parameters of the local models of multiple users, the local model is trained based on the local data of the user, and the local data includes the user's historical behavior and device usage data.
2. The method according to claim 1, characterized in that: The smart home control model is trained by the following method: Acquire the user's local data, which includes the user's historical behavior data and device usage data; Training a local model based on the local data; Uploading the trained model parameters of the local model to the server, so that the server obtains a global model according to the model parameters of the local models of multiple users; Receiving the global model sent by the server; The global model is adjusted according to the local data to obtain the smart home control model.
3. The method according to claim 1, characterized in that: The controlling the user's smart home according to the real-time behavior and the smart home control model includes: Determining the user's control intention for the smart home according to the user's real-time behavior; Determining a control strategy for the smart home according to the user's control intention for the smart home and the smart home control model; According to the control strategy, the smart home is controlled.
4. The method according to claim 3, characterized in that The determining a control strategy for the smart home according to the user's control intention for the smart home and the smart home control model includes: The control strategy is determined according to the mapping relationship between the control intention and the control strategy preset in the smart home control model and the user's control intention for the smart home; the control strategy includes a responsive control strategy and a predictive control strategy.
5. The method according to claim 4, characterized in that The step of controlling the smart home according to the control strategy includes: When the control strategy is a responsive control strategy, the smart home is immediately controlled according to the responsive control strategy, and the instant control includes turning on or off the smart home; When the control strategy is a predictive control strategy, the smart home is predictively controlled according to the predictive control strategy, and the predictive control includes performing personalized predictive adjustment on the opening degree of the smart home according to the real-time behavior of the user.
6. The method according to claim 3, characterized in that The controlling the user's smart home according to the real-time behavior and the smart home control model further includes: When it is determined according to the real-time behavior of the user that the user has no control intention for the smart home, determining the control strategy to be a normal control strategy; Normal adjustment is performed on the smart home according to the normal control strategy, and the normal adjustment includes performing optimal energy consumption adjustment on the smart home according to the optimal energy consumption mode preset in the smart home control model.
7. The method according to claim 2, characterized in that The step of uploading the trained model parameters of the local model to the server includes: The model parameters of the local model are encrypted based on a preset encryption method, and the encrypted model parameters of the local model are uploaded to the server. The preset encryption method is at least one of differential privacy, secure multi-party computing and homomorphic encryption.
8. The method according to claim 2, characterized in that: The step of adjusting the global model according to the local data to obtain the smart home control model includes: The global model is fine-tuned individually through local data to adapt the global model to the local environment and user habits; the global model that has completed the fine-tuning is used as the smart home control model.
9. A smart home control device, characterized in that: The device comprises: Model acquisition module, used to obtain the user's real-time behavior and smart home control model; A control module is used to control the user's smart home according to the real-time behavior and the smart home control model; the smart home control model is obtained according to the user's local data and a global model, the global model is obtained according to model parameters of local models of multiple users, and the local model is trained based on the user's local data, and the local data includes user historical behavior and device usage data.
10. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein when the computer program is executed by the processor, the steps of the smart home control method as described in any one of claims 1 to 8 are implemented.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the smart home control method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Intelligent home control method and system, and computer-readable storage medium
CN110806708A
Individual-based smart home scene control method and apparatus, and electronic device
CN116449718A
Personalized recommendation method and system based on optimization meta learning and storage medium
CN116996555A
Control method and device of smart home system and related equipment
CN117826628A
Cited By
Intelligent home management method and system based on artificial intelligence
CN120276272A
An intelligent home management method and system based on artificial intelligence
CN120276272B
Smart home control method, system and device, electronic equipment and medium
CN121348793A