Training and application method, device and system for smart home scene generation model

By updating data dimensions, clustering, and labeling scenes in smart home training data, and combining Gaussian kernel function and gradient descent method, the fitting and recognition capabilities of smart home scene generation models are improved, solving the problem of inaccurate device linkage control in existing technologies and achieving more precise device linkage.

CN121543658APending Publication Date: 2026-02-17QINGDAO HAIER TECH +3
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511268245.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-05
Publication Date
2026-02-17

AI Technical Summary

Technical Problem

Existing smart home systems struggle to achieve precise联动 control of devices across multiple scenarios when faced with complex and nonlinear data, and their processing capabilities are limited.

Method used

By updating the data dimensions, clustering, and labeling the scene on the first training data, high-dimensional feature information is extracted using Gaussian kernel function and gradient descent method. The model is then trained using a dual-delay deep deterministic strategy to improve the model's ability to fit and recognize complex data.

Benefits of technology

It improves the ability of smart home scene generation models to fit complex data and recognize different scenarios, enhances the output accuracy of device operating parameters, and achieves more precise device linkage control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121543658A_ABST
    Figure CN121543658A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of smart home, and discloses a training and application method, device and system for a smart home scene generation model. The training method comprises the steps of obtaining first training data; the first training data comprises smart home equipment operation data, environment data and user state data; performing data dimension updating on the first training data to obtain second training data; clustering the second training data to obtain a plurality of initial data groups; each initial data set comprises smart home equipment operation features, environment features and user state features; and performing scene marking on the initial data set to obtain a target data set, and training a pre-constructed smart home scene generation model by using the target data set. According to the invention, the fitting capability of the smart home scene generation model to complex data and the recognition capability to different scenes are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of smart home technology, and for example to a method, device, or system for training and applying a smart home scene generation model. Background Technology

[0002] Smart home, also known as smart residence, integrates home-related facilities using comprehensive wiring technology, network communication technology, security technology, automatic control technology, and audio-visual technology to build an efficient management system for residential facilities and daily household affairs, thereby improving home security, convenience, and comfort.

[0003] To improve the usability of smart home control systems, a control method for smart home systems is disclosed, including: S1, multi-dimensional and refined definition of viewing behavior patterns; including body posture, facial expressions, eye movements, voice characteristics, and handheld device operations, setting specific recognition standards and thresholds for each type of feature to form a viewing behavior pattern library; S2, behavior pattern acquisition; by integrating multiple high-precision sensors such as high-definition cameras, infrared sensors, pressure sensors, and microphones, multi-dimensional behavior data of users during the viewing process is collected in real time, and preprocessed to improve data quality; S3, behavior pattern recognition; using deep learning technology... The behavior pattern recognition system, which combines deep learning and hybrid machine learning models, receives preprocessed data input and outputs a judgment result indicating whether the user is in viewing mode and their specific behavior pattern. S4: Smart Home Linkage Control; Based on the behavior pattern recognition results, it automatically adjusts the status of smart home devices, including curtains, lights, speakers, and air conditioners. S5: Long-Term Learning and Adaptive Optimization; Establishes a long-term learning and optimization mechanism based on reinforcement learning, continuously collecting user feedback, behavior data, and device status information to iteratively optimize the behavior pattern recognition model and control strategy; Uses a policy gradient algorithm to adjust model parameters to improve recognition accuracy and control effectiveness.

[0004] While related technologies have enabled convenient control of smart home systems in movie-watching scenarios, in actual use, smart home systems need to collect and analyze various variable and nonlinear data for different scenarios to achieve coordinated control of devices across different scenarios. The control methods in these technologies have limited processing capabilities for complex data (such as multi-variable and nonlinear data), making it difficult to achieve precise coordinated control of devices across multiple scenarios.

[0005] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this application, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention

[0006] To provide a basic understanding of some aspects of the disclosed embodiments, a brief summary is given below. This summary is not intended as a general commentary, nor is it intended to identify key / important components or describe the scope of protection of these embodiments, but rather as a prelude to the detailed description that follows.

[0007] This disclosure provides a method, apparatus, and system for training and applying a smart home scene generation model, which improves the model's ability to fit complex data and recognize different scenes.

[0008] In some embodiments, a training method for a smart home scene generation model is provided, comprising: obtaining first training data; the first training data including smart home device operation data, environmental data, and user status data; updating the data dimensions of the first training data to obtain second training data; clustering the second training data to obtain multiple initial data groups; each initial data group including smart home device operation features, environmental features, and user status features; scene labeling the initial data groups to obtain target data groups, and using the target data groups to train a pre-constructed smart home scene generation model.

[0009] Optionally, the data dimensions of the first training data are updated to obtain the second training data, including: calculating the kernel matrix corresponding to each first training data based on the Gaussian kernel function; solving for the parameter vector corresponding to each kernel matrix using the gradient descent method based on the kernel matrix; and calculating the parameter vector and kernel matrix to obtain the second training data corresponding to each first training data.

[0010] Optionally, the second training data can be clustered to obtain multiple initial data groups, including: extracting features from the second training data to obtain feature data; and clustering the feature data to obtain multiple initial data groups.

[0011] Optionally, clustering the feature data to obtain multiple initial data groups includes: determining the target feature data in the feature data, and using the target feature data as the core point, determining all density-reachable feature data within a preset neighborhood; density-connecting all density-reachable feature data within the preset neighborhood, and forming a cluster of density-connected feature data to obtain the initial data groups.

[0012] Optionally, the initial data set is scene-marked to obtain the target data set, including: calculating the center point of the initial data set; defining the scene based on the characteristics of the center point; and scene-marking the initial data set to obtain the target data set.

[0013] Optionally, the pre-built smart home scene generation model is trained using the target data set, including: determining the total reward function of the smart home scene generation model; wherein the total reward function is determined based on automatic sensing data rewards and user feedback rewards; and training the pre-built smart home scene generation model using the total reward function based on the target data set.

[0014] Optionally, the pre-built smart home scene generation model is trained using the target data set, including: learning the pre-built smart home scene generation model using a dual-delay deep deterministic strategy based on the target data set; wherein the dual-delay deep deterministic strategy includes policy network update and critic update.

[0015] In some embodiments, an application method for a smart home scene generation model is provided, comprising: acquiring current smart home device operation data, current environment data, and current user status data; inputting the current smart home device operation data, current environment data, and current user status data into a smart home scene generation model obtained by using the training method for a smart home scene generation model as described above, to obtain target smart home device operation parameters; and controlling the smart home devices in the smart home system to operate according to the target smart home device operation parameters.

[0016] In some embodiments, a control device for a smart home system is provided, including a processor and a memory storing program instructions, the processor being configured to, when executing the program instructions, perform: a training method for a smart home scene generation model as described above; and / or, an application method for a smart home scene generation model as described above.

[0017] In some embodiments, a smart home system is provided, including: a smart home device; and a control device for the smart home system as described above, which is communicatively connected to the smart home device.

[0018] The training and application methods, apparatus, and systems for smart home scene generation models provided in this disclosure can achieve the following technical effects:

[0019] In this embodiment, by sequentially updating data dimensions, clustering, and labeling the first training data, the processing capability for complex data is improved. This allows the smart home scene generation model to better learn the relationships between different training data, thereby enhancing its ability to fit complex data, identify different scenes, and improve the output accuracy of device operating parameters. When the smart home scene generation model in this embodiment is applied to the control of a smart home system, the linkage control of smart home devices is more precise in different scenarios.

[0020] The above general description and the description below are exemplary and illustrative only and are not intended to limit this application. Attached Figure Description

[0021] One or more embodiments are illustrated by way of example with reference to the accompanying drawings. These illustrations and drawings do not constitute a limitation on the embodiments. Elements having the same reference numerals in the drawings are shown as similar elements. The drawings are not to be scaled. And wherein:

[0022] Figure 1 This is a schematic diagram of a smart home system provided in one embodiment of the present disclosure;

[0023] Figure 2 This is a schematic diagram of a training method for a smart home scene generation model provided in one embodiment of this disclosure;

[0024] Figure 3 This is a schematic diagram of a training method for a smart home scene generation model provided in another embodiment of this disclosure;

[0025] Figure 4 This is a schematic diagram of a training method for a smart home scene generation model provided in another embodiment of this disclosure;

[0026] Figure 5 This is a schematic diagram of an application method for generating a smart home scene according to an embodiment of this disclosure;

[0027] Figure 6 This is a schematic diagram of a control device for a smart home system provided in one embodiment of the present disclosure. Detailed Implementation

[0028] To provide a more detailed understanding of the features and technical content of the embodiments of this disclosure, the implementation of the embodiments of this disclosure will be described in detail below with reference to the accompanying drawings. The accompanying drawings are for illustrative purposes only and are not intended to limit the embodiments of this disclosure. In the following technical description, for ease of explanation, several details are used to provide a full understanding of the disclosed embodiments. However, one or more embodiments may still be implemented without these details. In other cases, well-known structures and devices may be simplified in their depiction to simplify the drawings.

[0029] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate for the embodiments of this disclosure described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion.

[0030] Unless otherwise stated, the term "multiple" means two or more.

[0031] In this embodiment of the disclosure, the character " / " indicates that the objects before and after it are in an "or" relationship. For example, A / B means: A or B.

[0032] The term "and / or" describes an association between objects, indicating that there can be three relationships. For example, A and / or B means that there are three relationships: A, B, and A and B.

[0033] The term "correspondence" can refer to an association or binding relationship. The correspondence between A and B means that there is an association or binding relationship between A and B.

[0034] It should be noted that, unless otherwise specified, the embodiments and features described in the present disclosure can be combined with each other.

[0035] One aspect of this application provides an application method for generating a smart home scene model. This method can be applied to whole-house intelligent digital control application scenarios such as smart homes, smart home ecosystems, smart home device ecosystems, and intelligence house ecosystems. Optionally, in this embodiment, the method for generating a smart home scene model can be applied to scenarios such as... Figure 1 The smart home system 1 shown is a smart home device 102 and a control device 104 for the smart home system. The control device 104 is communicatively connected to the smart home device 102.

[0036] In this embodiment, smart home device 102 refers to a home appliance product formed by introducing microprocessor, sensor technology, and network communication technology into home appliances, possessing the characteristics of intelligent control, intelligent sensing, and intelligent application. Smart home device 102 is not limited to PCs, mobile phones, tablets, smart air conditioners, smart range hoods, smart refrigerators, smart ovens, smart stoves, smart washing machines, smart water heaters, smart washing equipment, smart dishwashers, smart projectors, smart TVs, smart clothes racks, smart curtains, smart audio-visual equipment, smart sockets, smart speakers, smart speakers, smart fresh air systems, smart kitchen and bathroom equipment, smart bathroom equipment, smart robot vacuum cleaners, smart window cleaning robots, smart mopping robots, smart air purifiers, smart steam ovens, smart microwave ovens, smart water heaters, smart air purifiers, smart water dispensers, smart door locks, etc.

[0037] In this embodiment, the control device 104 for the smart home system can directly communicate with the smart home device 102 via Bluetooth, Wi-Fi, or other means; alternatively, it can be installed on the device body of the smart home device 102 to communicate with it, thereby executing the training method for the smart home scene generation model described in the following embodiments, and / or the application method for the smart home scene generation model described in the following embodiments. The installation relationship described herein is not limited to placement within the device body of the smart home device 102, but also includes installation connections with other components of the smart home device 102, including but not limited to physical connections, electrical connections, or signal transmission connections. Those skilled in the art will understand that the control device 104 for the smart home system can be adapted to any feasible smart home device 102, thereby realizing other feasible embodiments.

[0038] Optionally, combined Figure 6 As shown, the control device 104 for a smart home system includes a processor 600. The processor 600 can acquire current smart home device operating data, current environmental data, and current user status data; it can input these data into a smart home scene generation model to obtain target smart home device operating parameters; and it can control the smart home devices in the smart home system to operate according to the target smart home device operating parameters. The smart home scene generation model is obtained using the training method for smart home scene generation models described in the following embodiments.

[0039] Combination Figure 2 As shown in the embodiments of this disclosure, a training method for a smart home scene generation model is provided, including:

[0040] S201, the processor obtains the first training data.

[0041] The first training data includes smart home device operation data, environmental data, and user status data.

[0042] In this embodiment, the smart home device operation data includes the usage status (e.g., not in use or in use) and operating mode (e.g., normal mode, high-efficiency mode, or energy-saving mode) of each smart home device at different times. These smart home devices include, but are not limited to, lighting devices (e.g., smart lights), air conditioning devices, audio-visual devices (e.g., smart TVs, speakers), and security devices (e.g., smart door locks, surveillance cameras). For example, the smart home device set D = {d1, d2, d3, ..., d...} i It contains n smart home devices, each smart home device has d... i Each has a unique identifier i. This applies to smart home devices d.i At time t j The usage status of (j = 1, 2, 3...m) is denoted as x. ij Save, x ij ∈{0,1}, when x ij When d = 0, it indicates that the smart home device d i At time t j Unused, when x ij When d = 1, it indicates that the smart home device d i At time t j In use. Connecting smart home devices. i At time t j The operating mode is denoted as x. ij ω Save, x ij ω ∈{0,1,2,3}, when x ij ω When d = 0, it indicates that the smart home device d i At time t j No mode was run (not used) when x ij ω When = 1, it indicates that the smart home device d i At time t j Running in normal mode, when x ij ω When d = 2, it indicates that the smart home device d i At time t j Running in high-efficiency mode, when x ij ω When = 3, it indicates that smart home device d i At time t j Run in energy-saving mode. Based on x ij and x ij ω This constitutes the operating data of smart home devices.

[0043] In this embodiment, environmental data includes, but is not limited to, indoor temperature, indoor humidity, indoor light intensity, outdoor temperature, outdoor humidity, outdoor light intensity, and noise intensity at different times. For example, environmental data includes time t. j Indoor temperature T (j = 1, 2, 3...m) in j Indoor humidity H in j Indoor light intensity (L) in j Outdoor temperature T out j Outdoor humidity H out j Outdoor light intensity (L)out j Noise intensity N j .

[0044] In this embodiment, user status data includes, but is not limited to, basic user information (such as age, gender, and occupation), user behavior habits (such as daily activity trajectories and device usage habits), user needs (such as needs for environmental comfort and special scenario needs), and user schedules (such as work hours, rest hours, and social activity time). For example, user status data includes user age A∈[0,120], user gender G∈{male,female}, user occupation O (such as teacher, doctor, or engineer), and daily activity trajectory T. ra (For example: time spent at home is distributed from 18:00-22:00 on weekdays and 10:00-23:00 on weekends; the most frequently visited rooms are the bedroom and the living room), device usage habits H du (For example: smart home devices include a TV and an air conditioner; the TV is used from 7:00 PM to 9:00 PM, and the air conditioner is used from 10:00 PM to 6:00 AM), the requirement for environmental comfort is C. req (For example: the ideal indoor temperature range is 20-25℃ and the ideal indoor humidity range is 40%-60%, etc.), special scenario requirements S req (For example: in movie mode, the light brightness is 10% and the volume is set to moderate; in sleep mode, the room temperature is 22℃ and the lights are off, etc.) Working time W t (e.g., 8:00-18:00 Monday to Friday), rest time R t (e.g., 22:00-7:00 daily), social activity time S t (For example: a gathering with friends every Friday from 7:00 PM to 10:00 PM, and participating in community activities every Saturday from 2:00 PM to 5:00 PM.)

[0045] S202, the processor updates the data dimensions of the first training data to obtain the second training data.

[0046] S203, the processor clusters the second training data to obtain multiple initial data groups.

[0047] Each initial data set includes smart home device operating characteristics, environmental characteristics, and user status characteristics.

[0048] S204, the processor performs scene labeling on the initial data set to obtain the target data set, and uses the target data set to train the pre-built smart home scene generation model.

[0049] The training method for a smart home scene generation model provided in this disclosure first obtains first training data including smart home device operation data, environmental data, and user status data. Then, the first training data is updated in terms of data dimensions to extract higher-dimensional feature information, enabling the second training data to contain richer and more complex feature information, thus enhancing the smart home scene generation model's ability to fit complex data. The second training data is then clustered to ensure that the training data in the obtained initial data groups have similar or identical features. Scene labeling is based on the clustering results, assigning a specific scene label to each initial data group according to its features. By first clustering the second training data and then labeling the scenes, the smart home scene generation model can better learn the relationships between the training data during training, further enhancing its ability to fit complex data, improving its ability to recognize different scenes, and increasing the output accuracy of the smart home scene generation model's device operation parameters.

[0050] Compared with related technologies, the embodiments of this disclosure improve the processing capability of complex data by sequentially updating data dimensions, clustering, and labeling the first training data. This enables the smart home scene generation model to better learn the relationships between various training data, thereby improving the model's ability to fit complex data, identify different scenes, and increase the output accuracy of device operating parameters. When the smart home scene generation model of this disclosure is applied to the control of a smart home system, the linkage control of smart home devices is more precise in different scenarios.

[0051] Optionally, updating the data dimensions of the first training data to obtain the second training data includes: updating the data dimensions of the first training data using kernel function ridge regression to obtain the second training data.

[0052] Kernel ridge regression is a machine learning algorithm that combines kernel tricks and ridge regression. In this embodiment, kernel ridge regression is used to perform a non-linear transformation on the data, enabling the extraction of higher-dimensional feature information. After the data dimensions are updated, second training data is obtained, which contains richer and more complex feature information to understand the linear or non-linear relationships between the training data.

[0053] Optionally, the data dimensions of the first training data are updated to obtain the second training data, including: calculating the kernel matrix corresponding to each first training data based on the Gaussian kernel function; solving for the parameter vector corresponding to each kernel matrix using the gradient descent method based on the kernel matrix; and calculating the parameter vector and kernel matrix to obtain the second training data corresponding to each first training data.

[0054] The Gaussian kernel function maps the original data to a high-dimensional space, allowing the similarity between data points in this space to be represented by a kernel matrix. In this embodiment, the Gaussian kernel function is used to calculate the similarity between each data point and other data points in the first training data, thereby constructing a kernel matrix. After obtaining the kernel matrix, gradient descent is used to iteratively update the parameter vector values ​​to solve for the parameter vector corresponding to each kernel matrix. After solving for the parameter vector, the parameter vector and the kernel matrix are used to calculate the second training data corresponding to each first training data point. The second training data consists of data points represented in a high-dimensional space, containing richer and more complex feature information.

[0055] In this embodiment, a Gaussian kernel function is used to map the first training data to a high-dimensional space. This allows for better capture and processing of the nonlinear relationships between data points in the high-dimensional space, enabling the smart home scene generation model to more accurately generate smart home scenes that meet the user's actual needs. Furthermore, solving for the parameter vector using gradient descent effectively prevents overfitting, allowing the smart home scene generation model to better generate new and unseen data. Although ridge regression has relatively high computational complexity, this embodiment combines it with gradient descent to solve for the parameter vector, reducing complexity and ensuring appropriate computational efficiency.

[0056] In one specific application, the first training data includes smart home device operation data X. dev Environmental data X env And user status data X usr and their respective target values ​​y dev y env and y usr For each type of initial training data, a kernel matrix K(X,X) is constructed using a Gaussian kernel function. σ represents the bandwidth parameter. The operating data X from smart home devices... dev For example, the kernel matrix K(X) is solved using the gradient descent method. dev ,X dev The parameter vector α corresponding to ) dev The optimization objective is:

[0057]

[0058] The gradient descent method was used to solve the above optimization objective, and the smart home device operation data X was obtained. dev Its kernel matrix K(X) dev ,X dev The parameter vector α corresponding to ) dev Similarly, for environmental data X... env And user status data Xusr α is obtained by solving for each. env and α usr Furthermore, the operational data X of smart home devices dev The corresponding second training data Z dev This can be achieved by solving Z. dev =K(X) dev ,X dev )α dev Similarly, the environmental data X is obtained by solving the problem. env And user status data X usr The corresponding second training data Z env and Z usr .

[0059] Optionally, after obtaining the second training data, the training method for the smart home scene generation model further includes: preprocessing the second training data; the preprocessing includes standardization and / or removal of outliers.

[0060] In this embodiment, the quality of the obtained second training data is further improved by preprocessing, thereby enhancing the training reliability of the smart home scene generation model. For example, for the obtained second training data Z... dev Z env and Z usr Data can be standardized to a distribution with a mean of 0 and a standard deviation of 1 by using the Z-score standardization method and / or by using the 3σ principle to remove outliers.

[0061] Combination Figure 3 As shown, this disclosure provides another training method for a smart home scene generation model, including:

[0062] S301, the processor obtains the first training data.

[0063] The first training data includes smart home device operation data, environmental data, and user status data.

[0064] S302, the processor calculates the kernel matrix corresponding to each first training data based on the Gaussian kernel function.

[0065] S303, the processor uses gradient descent to solve for the parameter vector corresponding to each kernel matrix based on the kernel matrix.

[0066] S304, the processor calculates the parameter vector and kernel matrix to obtain the second training data corresponding to each first training data.

[0067] S305, the processor extracts features from the second training data to obtain feature data.

[0068] S306, the processor clusters the feature data to obtain multiple initial data groups.

[0069] Each initial data set includes smart home device operating characteristics, environmental characteristics, and user status characteristics.

[0070] S307 The processor performs scene labeling on the initial data set to obtain the target data set, and uses the target data set to train the pre-built smart home scene generation model.

[0071] The training method for a smart home scene generation model provided in this disclosure can extract features from the second training data to obtain feature data, thereby reducing the dimensionality of the second training data while retaining as much useful information as possible for subsequent processing and analysis. After obtaining the feature data, clustering algorithms (such as K-means, hierarchical clustering, DBSCAN, etc.) can be used to perform cluster analysis on the feature data to group data points with similar features into the same cluster for subsequent scene labeling and model training.

[0072] In this embodiment, feature extraction first reduces the dimensionality of the data and removes redundant information, enabling the clustering algorithm to more accurately identify the similarity between data points, improving the accuracy and stability of clustering, and making the obtained initial data set more consistent with the needs of the actual scenario. Simultaneously, feature extraction reduces the dimensionality of the data, thereby addressing the increased computational complexity caused by kernel function ridge regression and reducing the computational complexity of subsequent clustering algorithms, accelerating clustering speed and improving computational efficiency. Feature extraction and cluster analysis transform the raw data into a more intuitive and easily understood form, allowing for a better understanding of the data structure and distribution, and enabling the initial data set obtained through cluster analysis to more accurately reflect the needs of the actual scenario.

[0073] In a specific application, using the second training data Z dev For example, regarding the second training data Z dev Feature extraction is performed, and the obtained feature data includes device usage frequency features and spatiotemporal distribution features of device usage (spatial distribution features and temporal distribution features).

[0074] For the device usage frequency characteristics f(d) i This reflects the activity level of the equipment within a certain period of time. The calculation formula is: Where, d i Let x represent the i-th smart home device. ij Indicates smart home devices d iThe usage state at time j (1 indicates usage, 0 indicates non-use), and m represents the total number of time points. For example, for the usage status of smart home device d1 over 10 time points, if its usage state sequence is x... 11 =1,x 12 =0,x 13 =1, ...,x 110 =1, then the usage frequency of smart home device d1 is

[0075] For spatial distribution characteristics S ij Smart home devices were considered. i The spatial usage at time j. l represents a set of spatial locations (including, for example, the living room, bedroom, and kitchen). When smart home devices d i When used at a specific location and time, S ij It is 1 if it is not 0 otherwise. For the time distribution characteristic D ij Smart home devices were considered. i How time is used. w represents the size of the time window, and D represents the time distribution characteristics. ij The smart home device d was calculated within w time points before and after time point j. i The number of times it is used at a specific location. For example, assuming a time window size w = 2, at time point t5, the number of times the smart home device d is used. i Used in the living room (i.e., x) i5 =1 and l is the living room), then S i5 =1, and D i5 =S i3 +S i4 +S i5 +S i6 +S i7 .

[0076] In a specific application, using the second training data Z usr For example, regarding the second training data Z usr Feature extraction is performed, and the obtained feature data includes the user's sensitivity to environmental parameters and the pattern of daily activity requirements for equipment.

[0077] User sensitivity to environmental parameters ;in, This represents the user's preference value for the k-th environmental parameter. This represents the actual environmental parameter values. This indicates the number of environmental parameters. For example, assuming a user's preferred temperature is 25°C and the actual indoor temperature is 28°C, and their preferred humidity is 50% and the actual humidity is 60%, then the user's sensitivity to these environmental parameters is... =6.5.

[0078] Daily activities' equipment requirements pattern U p :

[0079]

[0080] Among them, A ij Indicates smart home devices d i The actual operation at time j, A pref This represents the user's preferred operation, where I(·) is an indicator function that is 1 when the condition is met and 0 otherwise. For example, within 10 time points, if the smart home device d i If the operation is the same as the user's preferred operation in 6 uses, then the daily activity's demand pattern for the device is U. p =0.6.

[0081] In a specific application, using the second training data Z env For example, regarding the second training data Z env Feature extraction is performed, and the obtained feature data includes, but is not limited to, the second training data Z. env The rate of change over time, the comparison results with a set threshold, etc.

[0082] Optionally, clustering the feature data to obtain multiple initial data groups includes: determining the target feature data in the feature data, and using the target feature data as the core point, determining all density-reachable feature data within a preset neighborhood; density-connecting all density-reachable feature data within the preset neighborhood, and forming a cluster of density-connected feature data to obtain the initial data groups.

[0083] In this embodiment, one or more target feature data points are first selected or determined as starting points in the feature dataset. These target feature data points can be randomly selected or selected according to specific rules or conditions. For each target feature data point, a preset neighborhood range is defined (e.g., a neighborhood with a radius of ε). Within this neighborhood, all density-reachable feature data points are searched. Here, "density-reachable" means that if a feature data point is within the preset neighborhood of another feature data point, and the latter is a core object (i.e., the number of feature data points within its neighborhood reaches or exceeds a certain threshold MinPts), then the former is said to be density-reachable by the latter. For all density-reachable feature data points within the preset neighborhood, it is further determined whether they are density-connected. If two feature data points are density-reachable from a core object, then they are said to be density-connected. All density-connected feature data points are grouped into a cluster. The above steps are repeated until all feature data points in the feature dataset are grouped into a cluster or considered noise (i.e., feature data not belonging to any cluster). Finally, each cluster constitutes an initial data group to achieve clustering of feature data and obtain multiple initial data groups.

[0084] In this embodiment, the number of clusters does not need to be pre-defined. Instead, clusters are automatically formed based on the distribution and density of feature data, making it highly adaptable to feature datasets with unknown content. Compared to traditional clustering algorithms such as K-means, this embodiment can discover clusters of arbitrary shapes, not just spherical or convex clusters, which better reflects the actual situation of feature data in smart home scenarios. During the clustering process, this embodiment can treat feature data that does not belong to any cluster as noise and discard it, thereby reducing the impact of noise on the clustering results and improving the accuracy of clustering.

[0085] Combination Figure 4 As shown in the embodiments of this disclosure, a training method for a smart home scene generation model is provided, including:

[0086] S401, the processor obtains the first training data.

[0087] The first training data includes smart home device operation data, environmental data, and user status data.

[0088] S402, the processor updates the data dimensions of the first training data to obtain the second training data.

[0089] S403, the processor clusters the second training data to obtain multiple initial data groups.

[0090] Each initial data set includes smart home device operating characteristics, environmental characteristics, and user status characteristics.

[0091] S404, the processor calculates the center point of the initial data set.

[0092] S405, the processor defines the scene based on the characteristics of the center point, marks the initial data group with the scene, and obtains the target data group.

[0093] The S406 processor uses the target data set to train a pre-built smart home scene generation model.

[0094] The training method for a smart home scene generation model provided in this disclosure calculates the centroid of each initial data set. The centroid can be the mean of all feature data in the initial data set, summarizing the overall characteristics of the initial data set and facilitating subsequent scene definition and labeling. After obtaining the centroid of the initial data set, a scene is defined based on the features of the centroid. The scene definition can be based on the numerical features of the centroid (such as temperature, humidity, light intensity, etc.) and classification features (such as room type, device type, etc.). By combining different feature values, various smart home scenes can be defined, such as "Bedroom - Quiet Night" and "Living Room - Party Mode." Based on the defined scenes, each initial data set is labeled with a scene, classifying the initial data set into a specific scene. This allows subsequent scene generation and model training to be based on these labels, achieving the goal of obtaining target data sets with scene labels.

[0095] Optionally, the pre-built smart home scene generation model is trained using the target data set, including: determining the total reward function of the smart home scene generation model; wherein the total reward function is determined based on automatic sensing data rewards and user feedback rewards; and training the pre-built smart home scene generation model using the total reward function based on the target data set.

[0096] In this embodiment, the total reward function is determined based on automatic sensing data rewards and user feedback rewards. Automatic sensing data rewards reflect the accuracy of the execution results of each smart home device in the smart home system, while user feedback rewards reflect user satisfaction and usability with the generated scene. User feedback rewards can be user emotion judgments based on facial expression recognition, or user satisfaction with the generated scene expressed through electronic devices with communication capabilities. By comprehensively considering these two types of rewards, the total reward function guides the smart home scene generation model to generate smart home scenes that are accurate and meet user needs. After obtaining the target data set with scene labels, the pre-built smart home scene generation model is trained using the target data set. During training, the smart home scene generation model generates smart home scenes based on the input target data set and evaluates the quality of the generated scenes using the total reward function. Based on the evaluation results, the smart home scene generation model continuously adjusts its internal parameters and structure to improve the quality and accuracy of the generated scenes.

[0097] Optionally, the pre-built smart home scene generation model is trained using the target data set, including: learning the pre-built smart home scene generation model using a dual-delay deep deterministic strategy based on the target data set; wherein the dual-delay deep deterministic strategy includes policy network update and critic update.

[0098] In this embodiment, the Dual-Delay Deep Deterministic Policy Gradient (TD3) algorithm is used for policy learning during training. The TD3 algorithm comprises two parts: policy network update and critic update. The policy network is responsible for generating actions based on the current state. In the TD3 algorithm, the policy network update is delayed, meaning its update frequency is lower than that of the critic network, ensuring the policy network learns under the guidance of a more stable target value and reducing the propagation of function approximation errors. The critic network is responsible for estimating the value of state-action pairs. In the TD3 algorithm, two independent critic networks are used to estimate the value of the same state-action pair separately. The outputs of these two critic networks are used to calculate the minimum target value, thereby increasing the stability of learning. In this embodiment, the dual-delay deep deterministic policy achieves a smooth target policy and a stable learning process, which helps enhance the model's generalization ability, enabling the smart home scene generation model to better adapt to different home environments and user needs.

[0099] Optionally, the pre-built smart home scene generation model includes a pre-defined state space and action space based on a reinforcement learning algorithm. Reinforcement learning (RL) is a machine learning technique that learns how to take optimal actions to maximize a certain reward signal through interaction with the environment. The state space is the set of environmental states that the agent (i.e., the smart home scene generation model) can observe. The state space can include multiple dimensions such as the state of smart home devices, the state of the indoor environment, the state of the outdoor environment, and the state of user activities. The action space is the set of actions that the agent (i.e., the smart home scene generation model) can take. The action space can include specific control operations for each smart home device.

[0100] In this embodiment, the state space and action space are mapped based on a reward function. The reward function is the reward value obtained by the agent from the environment after taking a certain action. In this embodiment, the reward function includes two parts: automatic sensing data reward and user feedback reward. The automatic sensing data reward is calculated based on factors such as the deviation of the indoor environment from the ideal state and changes in real-time sensor data. For example, the weighted average of temperature deviation, humidity deviation, light deviation, noise level, etc., is calculated as the automatic sensing data reward. The corresponding weights reflect the degree of contribution to the reward. The user feedback reward can be calculated based on positive or negative user feedback. If the user is satisfied with the current environmental state or device control strategy (positive feedback), a reward is given; if dissatisfied (negative feedback), a penalty is given. The total reward function is a weighted sum of the automatic sensing data reward and the user feedback reward. By balancing the weights of the two, the reward function considers factors such as environmental comfort and energy efficiency, as well as user preferences and satisfaction.

[0101] In practical applications, intelligent agents (such as reinforcement learning algorithms) will learn to find the optimal control strategy, that is, what actions to take in different states to maximize long-term rewards, so as to help smart home scene generation models better adapt to environmental changes and user needs.

[0102] Combination Figure 5 As shown in the embodiments of this disclosure, an application method for generating smart home scene models is provided, including:

[0103] S501, the processor obtains current smart home device operating data, current environmental data, and current user status data.

[0104] S502, the processor inputs the current smart home device operation data, current environmental data and current user status data into the smart home scene generation model to obtain the target smart home device operation parameters.

[0105] The smart home scene generation model is trained using the training method for smart home scene generation models described in the above embodiments.

[0106] The S503 processor controls the smart home devices in the smart home system to operate according to the target smart home device's operating parameters.

[0107] The application method for generating smart home scene models provided in this disclosure can control the operation of smart home devices in a smart home system based on the smart home scene generation model trained by the training method for generating smart home scene models described in the above embodiments. Therefore, the technical effects of the training method for generating smart home scene models described above are all present in this disclosure, and will not be repeated here.

[0108] Combination Figure 6 As shown, this disclosure provides a control device 104 for a smart home system, including a processor 600 and a memory 601. Optionally, the control device 104 may further include a communication interface 602 and a bus 603. The processor 600, communication interface 602, and memory 601 can communicate with each other via the bus 603. The communication interface 602 can be used for information transmission. The processor 600 can call logical instructions in the memory 601 to execute the training method for a smart home scene generation model described in the above embodiments, and / or the application method for a smart home scene generation model described in the above embodiments.

[0109] Furthermore, the logic instructions in the aforementioned memory 601 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium.

[0110] The memory 601, as a computer-readable storage medium, can be used to store software programs and computer-executable programs, such as program instructions / modules corresponding to the methods in the embodiments of this disclosure. The processor 600 executes functional applications and data processing by running the program instructions / modules stored in the memory 601, thereby implementing the training method for the smart home scene generation model described in the above embodiments, and / or the application method for the smart home scene generation model described in the above embodiments.

[0111] The memory 601 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the terminal device. Furthermore, the memory 601 may include high-speed random access memory and may also include non-volatile memory.

[0112] This disclosure provides a computer-readable storage medium storing computer-executable instructions configured to execute the training method for a smart home scene generation model described in the above embodiments, and / or the application method for a smart home scene generation model described in the above embodiments.

[0113] The technical solutions of this disclosure can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes one or more instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in this disclosure. The aforementioned storage medium can be a non-transitory storage medium, such as a USB flash drive, external hard drive, read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk, etc., and other media capable of storing program code.

[0114] The foregoing description and accompanying drawings fully illustrate embodiments of this disclosure to enable those skilled in the art to practice them. Other embodiments may include structural, logical, electrical, procedural, and other changes. The embodiments represent only possible variations. Individual components and functions are optional unless explicitly required, and the order of operation may vary. Parts and features of some embodiments may be included in or replace parts and features of other embodiments. Moreover, the terminology used in this application is for describing embodiments only and is not intended to limit the claims. As used in the description of embodiments and claims, the singular forms “a,” “an,” and “the” are intended to equally include the plural forms unless the context clearly indicates otherwise. Similarly, the term “and / or” as used in this application means including one or more of the associated listed items and all possible combinations thereof. Additionally, when used in this application, the term "comprise" and its variations "comprises" and / or "comprising" refer to the presence of stated features, integrals, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or groups thereof. Without further limitations, an element defined by the phrase "comprises a..." does not exclude the presence of other identical elements in the process, method, or apparatus that includes said element. In this document, each embodiment may focus on the differences from other embodiments, and similar or identical parts between embodiments can be referred to mutually. For methods, products, etc., disclosed in the embodiments, if they correspond to the method section disclosed in the embodiments, the relevant parts can be referred to the description of the method section.

[0115] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the embodiments of this disclosure. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0116] The methods and products (including but not limited to devices and equipment) disclosed in the embodiments herein can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For instance, the division of units may be merely a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the shown or discussed units may be through some interfaces, and the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the units may be selected to implement this embodiment according to actual needs. Furthermore, the functional units in the embodiments of this disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0117] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than that shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. In the descriptions corresponding to the flowcharts and block diagrams in the accompanying drawings, the operations or steps corresponding to different blocks may also occur in a different order than disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. Each block in a block diagram and / or flowchart, and combinations of blocks in a block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

Claims

1. A method for training a smart home scene generation model, characterized in that, The method comprises the following steps: obtaining first training data; the first training data comprises smart home device operation data, environment data and user state data; updating the data dimension of the first training data to obtain second training data; clustering the second training data to obtain a plurality of initial data groups; each initial data group comprises smart home device operation features, environment features and user state features; scene labeling is performed on the initial data groups to obtain target data groups, and the target data groups are used to train a pre-constructed smart home scene generation model.

2. The training method of claim 1, wherein, updating the data dimension of the first training data to obtain second training data comprises: calculating the kernel matrix corresponding to each first training data based on the Gaussian kernel function; solving the parameter vector corresponding to each kernel matrix by using the gradient descent method according to the kernel matrix; calculating the parameter vector and the kernel matrix to obtain the second training data corresponding to each first training data.

3. The training method of claim 1, wherein, clustering the second training data to obtain a plurality of initial data groups comprises: performing feature extraction on the second training data to obtain feature data; clustering the feature data to obtain a plurality of initial data groups.

4. The training method of claim 3, wherein, clustering the feature data to obtain a plurality of initial data groups comprises: determining target feature data in the feature data, and determining all density-reachable feature data in a preset neighborhood with the target feature data as the core point; connecting the density-reachable feature data in the preset neighborhood by density, and constructing a clustering cluster by connecting the density-reachable feature data to obtain an initial data group.

5. The training method of claim 1, wherein, scene labeling is performed on the initial data groups to obtain target data groups, which comprises: calculating the center point of the initial data group; defining a scene according to the features of the center point, and performing scene labeling on the initial data group to obtain the target data group.

6. The training method according to any one of claims 1 to 5, characterized in that, training the pre-constructed smart home scene generation model using the target data group comprises: determining a total reward function of the smart home scene generation model; wherein the total reward function is determined according to automatic sensing data reward and user feedback reward; training the pre-constructed smart home scene generation model using the total reward function based on the target data group.

7. The training method according to any one of claims 1 to 5, characterized in that, training the pre-constructed smart home scene generation model using the target data group comprises: performing policy learning on the pre-constructed smart home scene generation model using a double-delay deep deterministic policy based on the target data group; wherein the double-delay deep deterministic policy comprises policy network updating and critic updating.

8. An application method for a smart home scene generation model, characterized by, The method comprises the following steps: obtaining current smart home device operation data, current environment data and current user state data; inputting the current smart home device operation data, the current environment data and the current user state data into the smart home scene generation model obtained by using the training method for a smart home scene generation model according to any one of claims 1 to 7 to obtain target smart home device operation parameters; controlling the smart home devices in the smart home system to operate according to the target smart home device operation parameters. 9.A control device for a smart home system, comprising a processor and a memory storing program instructions, characterized in that, The processor is configured to execute the following when running the program instructions: the training method for a smart home scene generation model according to any one of claims 1 to 7; and / or, The application method for the smart home scene generation model according to claim 8.

10. A smart home system, characterized by, Comprise: Smart home device; The control device for the smart home system according to claim 9, in communication connection with the smart home device.