Intelligent home control system and method based on graph attention network
Through the smart home control system based on the graph attention network, the device control strategy is dynamically adjusted, and the limitations of traditional systems in multi-user, multi-device, and multi-demand scenarios are solved, multi-user preference coordination and device function coordination are achieved, and user comfort and energy efficiency are improved.
Patent Information
- Application Number
- CN202510129357.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-05
- Publication Date
- 2025-05-27
AI Technical Summary
Traditional smart home systems are difficult to achieve flexible coordination in multiple users, multiple devices and multiple demand scenarios, resulting in waste of energy, reduced user comfort and conflicts in equipment functions.
The smart home control system based on graph attention network is adopted, through multi-source data acquisition, graph structure model construction and attention mechanism calculation, the equipment control strategy is dynamically adjusted to achieve multi-user preference coordination and device function coordination.
It realizes multi-user preference coordination and device function coordination in smart home scenarios, dynamically adjusts equipment control strategies, and solves problems such as energy waste, user comfort and multi-device function conflicts.
Smart Images

Figure CN120044807A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of smart home, and more specifically, the present invention relates to a smart home control system and method based on a graph attention network. Background Art
[0002] With the popularization of smart home technology, more and more families have installed various types of smart home appliances, such as smart lights, smart air conditioners, smart curtains, smart dehumidifiers, smart humidifiers, etc. These devices not only improve the convenience and comfort of home life, but also help with energy conservation and emission reduction, and promote intelligent management. However, traditional smart home systems mainly rely on rules set by a single user for passive execution. The system triggers corresponding device operations according to the user's settings and instructions at fixed times or under certain conditions. This method can meet the basic needs of users to a certain extent, but when there are multiple members in the family, various conflicts in control and user preferences are likely to occur. Therefore, designing a smart home system that can flexibly coordinate among multiple users, multiple devices, and multiple requirements has become a major challenge in technological development.
[0003] In real life, each member of the family may have different user preferences for environmental parameters such as temperature, humidity, and light. For example, the elderly may prefer a warmer environment, while the young may prefer a cooler temperature; children may need brighter lights to complete their study tasks, while adults prefer softer lights when resting. In addition, the needs of family members may also change continuously at different times and in different scenarios. For example, the curtains need to open automatically in the morning to welcome the sunlight, and the lights need to be dimmed automatically when resting at night. These diverse needs not only require the system to adapt to the dynamically changing environment, but also require the smart home system to balance and coordinate among the user preferences of different members.
[0004] With the rapid development of artificial intelligence and deep learning technologies, graph neural networks (GNNs) provide a brand-new approach to solving the above problems. A graph neural network is a neural network model capable of processing graph-structured model data, which can capture the complex relationships and connection patterns between nodes. The graph attention network (GAT) is an extended model of the graph neural network. By introducing an attention mechanism, it dynamically calculates the importance of each node and the weights between nodes. Different from traditional graph neural networks, the graph attention network (GAT) can flexibly adjust the association weights between nodes according to the context. Traditional smart home systems often show certain limitations when facing complex scenarios with multiple users and multiple requirements. Methods relying on preset rules or simple weighted averages are difficult to handle the complex relationships of user preferences and cannot quickly adapt to dynamic environmental changes. Summary of the Invention
[0005] To overcome the deficiencies of the prior art, a smart home control system and method based on a graph attention network are provided. This method realizes the coordination of multi-user preferences and the collaboration of device functions in smart home scenarios. The system can dynamically adjust the control strategy of devices through self-supervised learning and real-time response functions, solving problems such as energy waste, user comfort, and multi-device function conflicts.
[0006] The technical solution adopted by the present invention to solve its technical problems is as follows: A smart home control method based on a graph attention network, which is improved in that the method includes the following steps:
[0007] S10: Collect multi-source data from the smart home system. The multi-source data includes users, user preferences, device states, and environmental parameters, and collect real-time data of users, user preferences, device states, and environmental parameters through multiple sensors and user interaction interfaces;
[0008] S20: Build a graph structure model based on the multi-source data, represent users, user preferences, devices, and environmental parameters as nodes in the graph, and describe the relationships between the nodes of users, user preferences, devices, and environmental parameters through an adjacency matrix;
[0009] S30: Input the graph structure model into the graph attention network, use the attention mechanism to calculate the correlation weights between nodes, and generate an optimized device control strategy;
[0010] S40: Generate specific smart home device control instructions according to the output result of the graph attention network to automatically adjust the operating state of smart home devices.
[0011] Further, the method further includes the following steps:
[0012] S50: Based on the user operation feedback, continuously adjust and optimize the graph attention network model through a self-supervised learning mechanism to improve the accuracy and adaptability of the device control strategy;
[0013] S60: Continuously monitor the environmental parameters and device status, and update the device control strategy in real time, so that the system can dynamically adapt to changes in the environment or changes in user needs.
[0014] Further, in step S10, the data collection includes collecting environmental parameters, user habits, and user preferences through multi-modal sensors. The multi-modal sensors include temperature sensors, humidity sensors, light sensors, and other sensors that interact with the smart home system; in step S20, the multi-source data processing includes expressing multi-dimensional data of users, devices, and the environment through graph modeling to generate a feature matrix and an adjacency matrix. The user nodes and user preference nodes are modeled based on the user's behavior history data, the device nodes are modeled based on the device status and the interaction relationship between devices, and the environmental parameter nodes are modeled based on real-time sensor data.
[0015] Further, the specific steps of step S30 are as follows:
[0016] S301: Assign attention weights between user nodes, user preference nodes, device nodes, and environmental parameter nodes to calculate the influence of nodes;
[0017] S302: Normalize the attention weights to ensure the dynamic balance of the relationships between multiple nodes;
[0018] S303: Use the multi-head attention mechanism to enhance the model's ability to capture complex relationships, balance the user preference conflicts of multiple users dynamically, and generate the optimal device control strategy that adapts to the needs of multiple users.
[0019] Further, the specific steps of step S40 are as follows:
[0020] S401: Generate specific device control instructions based on the node features output by the graph attention network, including the on / off state of smart devices, temperature setting, and brightness adjustment;
[0021] S402: Map the output of the graph model to control signals suitable for different device types through a decoder.
[0022] Further, the specific steps of step S50 are as follows:
[0023] S501: Collect the user's satisfaction with the current device settings and operation behaviors;
[0024] S502; Adjust the weight parameters of the graph attention network model using a self-supervised learning mechanism to improve the adaptability of the device control strategy to user preferences.
[0025] Further, the specific steps of step S60 are as follows:
[0026] S601: Continuously monitor the changes in environmental parameters and device status;
[0027] S602; Based on the real-time changing data, dynamically adjust the control strategy of the device to ensure a quick response to changes in the environment and user needs in different environments.
[0028] The present invention also discloses a smart home control system based on a graph attention network, which is characterized by including
[0029] A data acquisition module for performing step S10, responsible for collecting multi-source heterogeneous data from different data sources, including multi-source heterogeneous data such as user preferences, device status, and environmental parameters;
[0030] A multi-source data processing module for preprocessing the collected data into a graph structure model, and at the same time modeling these data into a graph structure model to generate a feature matrix and an adjacency matrix to describe each node and its relationship;
[0031] A graph attention network module for performing step S30, calculating the association weights between each node through a graph attention mechanism, and generating an optimized strategy for controlling the device;
[0032] A control instruction generation module for performing step S40, generating specific smart home device control instructions according to the optimized strategy output by the graph attention network module;
[0033] A feedback optimization module for adjusting and optimizing the graph attention network model by collecting user feedback data and device operation data, and using a self-supervised learning mechanism to improve the adaptive ability of the system;
[0034] A dynamic monitoring response module for continuously monitoring the device status and environmental parameters in the smart home to ensure that the system can dynamically adjust the control strategy according to changes in the environment to achieve real-time adaptability;
[0035] The data acquisition module transmits the collected raw data to the data processing module for data preprocessing and the construction of a graph structure model; the multi-source data processing module preprocesses the collected data and simultaneously performs data modeling into a graph structure model, and then takes the processed graph structure model data as input and transmits it to the graph attention network module. The graph structure model data includes a feature matrix and an adjacency matrix; after receiving the feature matrix and the adjacency matrix, the graph attention network module performs calculations based on the graph structure model, and the generated control strategy is transmitted to the control instruction generation module for generating specific device control instructions; according to the output result of the graph attention network, the control instruction generation module generates control instructions and outputs them to the smart home device to perform corresponding operations, and then the control instruction generation module transmits the execution result to the feedback optimization module; the feedback optimization module receives the data transmitted from the data acquisition module and the control instruction generation module, transmits it to the graph attention network module, and adjusts the weights and parameters of the graph attention network according to the feedback to optimize the subsequent device control strategy; the dynamic monitoring response module feeds back the monitored real-time data to the system through the data acquisition module. According to the latest environmental data, the graph attention network module will regenerate the control strategy, and the control instruction generation module adjusts the operating state of the smart device accordingly.
[0036] In the above structure, the graph attention network module uses a multi-head attention mechanism to improve the model's perception ability of complex user behaviors and environmental changes, and realizes the coordinated control of multiple devices through the optimized control strategy.
[0037] In the above structure, the data acquisition module is integrated with sensor devices and can collect data from smart home devices, environmental sensors, and user interaction devices simultaneously.
[0038] The beneficial effects of the present invention are as follows: It realizes the coordination of multi-user preferences and the collaboration of device functions in the smart home scenario. The system can dynamically adjust the device control strategy through self-supervised learning and real-time response functions, and solves problems such as energy waste, user comfort, and multi-device function conflicts. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 It is a flowchart of a smart home control system and method based on a graph attention network of the present invention;
[0040] Figure 2 It is a schematic structural diagram of a smart home control system based on a graph attention network of the present invention;
[0041] Figure 3 It is a schematic diagram of a home data model of a smart home control system based on a graph attention network of the present invention;
[0042] Figure 4Family graph matrix representation diagram of a smart home control system based on a graph attention network according to the present invention;
[0043] Figure 5 Graph attention model diagram of a smart home control system based on a graph attention network according to the present invention;
[0044] Figure 6 Schematic diagram of node update of a smart home control system based on a graph attention network according to the present invention. Detailed implementation manners
[0045] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0046] The concept, specific structure and technical effects of the present invention will be clearly and completely described below in conjunction with the embodiments and the accompanying drawings to fully understand the purpose, features and effects of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts shall fall within the scope of protection of the present invention. In addition, all connection / connection relationships involved in the patent do not refer only to the direct connection of components, but refer to the formation of a more optimal connection structure by adding or reducing connection accessories according to specific implementation situations. Each technical feature in the present invention can be combined interactively without conflicting with each other.
[0047] Refer to Figure 1 , the present invention provides a smart home control system and method based on a graph attention network, and the method includes the following steps:
[0048] S10: Collect multi-source data from the smart home system, where the multi-source data includes users, user preferences, device status, and environmental parameters, and collect real-time data of users, user preferences, device status, and environmental parameters through multiple sensors and user interaction interfaces;
[0049] S20: Build a graph structure model based on the multi-source data, represent users, user preferences, devices, and environmental parameters as nodes in the graph, and describe the relationships between the nodes of users, user preferences, devices, and environmental parameters through an adjacency matrix;
[0050] S30: Input the graph structure model into the graph attention network, use the attention mechanism to calculate the correlation weights between nodes, and generate an optimized device control strategy;
[0051] S40: Generate specific smart home device control instructions according to the output result of the graph attention network to automatically adjust the operating state of the smart home device;
[0052] S50: Based on the user operation feedback, continuously adjust and optimize the graph attention network model through the self-supervised learning mechanism to improve the accuracy and adaptability of the device control strategy;
[0053] S60: Continuously monitor the environmental parameters and device status, and update the device control strategy in real time to enable the system to dynamically adapt under the circumstances of environmental changes or user demand changes.
[0054] Further, in the step S10, the data collection includes collecting environmental parameters, user habits and user preferences through multi-modal sensors. The multi-modal sensors include temperature sensors, humidity sensors, light sensors and other sensors interacting with the smart home system. The multi-modal sensors can comprehensively sense multiple dimensions of the environment, such as key factors like temperature, humidity, and light. In this embodiment, the multi-modal sensors include infrared sensors, microwave radars, cameras, and mobile phone wifi signals to detect whether family members are at home, changes in the home environment, and combined with the status of home appliances, to detect whether family members are at home, the online and offline status of devices, and changes in environmental temperature. Then, use the detected information to automatically update the nodes and edges in the home graph, and use the GAT network to automatically update the parameters of the nodes in the graph. These sensors provide richer environmental information, which can help the system more accurately understand the current home state, so as to make more precise device control decisions.
[0055] In the step S20, the multi-source data processing includes expressing multi-dimensional data of users, devices, and the environment through graph modeling to generate a feature matrix and an adjacency matrix. The user nodes and user preference nodes are modeled based on the user's behavior history data, the device nodes are modeled based on the device status and the interaction relationships between devices, and the environmental parameter nodes are modeled based on real-time sensor data. The feature matrix contains the feature information of each node. For example, the features of user nodes can include personalized user preferences and historical behavior data; the features of device nodes can include the type, current status, and energy consumption of the device, etc.; the environmental parameter nodes can include the current temperature, humidity, light intensity, etc. The feature matrix establishes a specific description for each node, facilitating the system to extract and use this information during data processing. The adjacency matrix represents the connection relationships between different nodes in the graph, that is, the association strength between users, devices, and the environment. Through the adjacency matrix, the system can understand the mutual influence between nodes. For example, the control frequency of a certain user for a specific device, the linkage mechanism between multiple devices, and the impact of environmental changes on device operation can all be described by the adjacency matrix. The user nodes and user preference nodes are modeled through the user's historical behavior data. According to the user's operation habits and user preferences (such as temperature, humidity, light, etc.), the system can capture the user's behavior patterns in different scenarios. In this way, the system can predict future user preferences based on past behaviors and adjust the device control strategy in advance to enhance the user experience.
[0056] Further, the specific steps of the step S30 are as follows:
[0057] S301: Assign attention weights between user nodes, user preference nodes, device nodes, and environmental parameter nodes for calculating the influence of nodes;
[0058] S302: Normalize the attention weights to ensure the dynamic balance of the relationships between multiple nodes;
[0059] S303: Use the multi-head attention mechanism to enhance the model's ability to capture complex relationships, balance the user preference conflicts of multiple users dynamically, and generate the optimal device control strategy that adapts to the needs of multiple users.
[0060] By normalizing the attention weights, it is ensured that when the system processes multiple users and devices, the balance between each node can be maintained, preventing a single node from having too much influence. Using the multi-head attention mechanism, different dimensions of relationships can be simultaneously focused on, improving the system's understanding of complex multi-node relationships. Through the above steps, the system can automatically generate the optimal device control strategy that adapts to the needs of multiple users, realizing the efficient operation of devices in the smart home and maximizing the user experience.
[0061] Further, the specific steps of the step S40 are as follows:
[0062] S401: Generate specific device control instructions based on the node features output by the graph attention network, including the on / off state, temperature setting, and brightness adjustment of intelligent devices.
[0063] S402; Map the output of the graph model to control signals suitable for different device types through a decoder.
[0064] The specific steps of the said step S50 are as follows:
[0065] S501: Collect the satisfaction degree and operation behavior of the user's settings for the current device.
[0066] S502; Use a self-supervised learning mechanism to adjust the weight parameters of the graph attention network model to improve the adaptability of the device control strategy to user preferences.
[0067] Furthermore, the training process of the self-supervised learning mechanism of the said graph attention network (Graph Attention Network, GAT) is as follows: The first step: Select appropriate numbers of GAT layers, the number of attention heads in each layer, and the hidden layer dimension, and set the initial parameters including the linear transformation matrix and the attention mechanism. The second step: Input the matrix composed of node feature moment vectors into the graph attention network. The fully connected layer of the graph attention network performs a vector space transformation on the input vectors and transforms the vectors to a higher dimension. The third step: In each layer, calculate the attention coefficients between nodes, distinguish adjacent nodes through the adjacency matrix, and aggregate the information of neighbor nodes by weighted summation with the attention coefficients. The fourth step: Use the cross-entropy function as the loss function, calculate the deviation between the output result of the GAT network and the labeled data, and adjust the GAT network parameters by minimizing the loss function. The fifth step: Use Adaptive Moment Estimation (Adam) or stochastic gradient descent (SGD) to update the network parameters. The sixth step: Repeat the steps from the third step to the fifth step until the predetermined number of iterations is reached or the performance on the validation set no longer improves, thus completing the entire model training process.
[0068] Based on the node features output by the graph attention network, the system can generate specific device control instructions, which ensures that the system can precisely regulate the devices based on multi-user preferences and real-time environmental information, optimizing the home experience. The decoder can directly obtain the output results that the device can execute. By only adjusting the decoder to achieve different results, so as to adapt to different devices, the output of the graph model can be mapped to control signals of different device types. In this way, whether it is lights, air conditioners or other smart devices, the system can flexibly control them, achieving cross-device compatibility and ensuring that the instructions can be executed efficiently. Using the self-supervised learning mechanism, the system automatically adjusts the weight parameters of the graph attention network model according to user feedback. This continuous optimization process makes the device control strategy of the system more personalized and adaptable, gradually improving the user's satisfaction and trust in the system.
[0069] The specific steps of step S60 are as follows:
[0070] S601: Continuously monitor the changes in environmental parameters and device status;
[0071] S602: Based on the real-time changing data, dynamically adjust the control strategy of the device to ensure a rapid response to changes in the environment and user needs in different environments.
[0072] Based on the real-time collected data, the system will dynamically adjust the control strategy of the device. If the environmental temperature suddenly rises, the system can automatically adjust the temperature setting of the air conditioner, or adjust the brightness of the smart light when the lighting conditions change. The system quickly adjusts the control instructions according to these changes to ensure the comfortable experience of users in different environments. The system can quickly respond to environmental changes and user needs changes, ensuring the flexibility and real-time nature of the device control strategy, and improving the response speed and user experience of the overall smart home system.
[0073] As Figure 2 described, the present invention also provides a smart home control system based on a graph attention network, which is characterized by including
[0074] A data acquisition module, used to execute step S10, responsible for collecting multi-source heterogeneous data from different data sources, collecting multi-source heterogeneous data including user preferences, device status, and environmental parameters;
[0075] A multi-source data processing module, used to preprocess the collected data into a graph structure model, and at the same time model these data into a graph structure model, generating a feature matrix and an adjacency matrix to describe each node and its relationship;
[0076] A graph attention network module, used to execute step S30, through the graph attention mechanism, calculate the association weights between each node, and generate an optimized strategy for controlling the device;
[0077] A control instruction generation module, used to execute step S40, and generate specific smart home device control instructions according to the optimization strategy output by the graph attention network module;
[0078] A feedback optimization module is used to execute step S60, collect user feedback data and device operation data, and use a self-supervised learning mechanism to adjust and optimize the graph attention network model to improve the system's adaptive ability;
[0079] Dynamic monitoring response module, which is used to continuously monitor the device status and environmental parameters in the smart home to ensure that the system can dynamically adjust the control strategy according to environmental changes to achieve real-time adaptability;
[0080] The data acquisition module transmits the collected raw data to the data processing module for data preprocessing and graph structure model construction; the multi-source data processing module preprocesses the collected data and models the data into a graph structure model, and then uses the processed graph structure model data as input and passes it to the graph attention network module, wherein the graph structure model data includes a feature matrix and an adjacency matrix; after receiving the feature matrix and the adjacency matrix, the graph attention network module performs calculations based on the graph structure model, and the generated control strategy is passed to the control instruction generation module for generating specific device control instructions; the control instruction generation module generates control instructions according to the output results of the graph attention network and outputs them to the smart home device to perform corresponding operations, and the control instruction generation module then passes the execution results to the feedback optimization module; the feedback optimization module receives the data transmitted by the data acquisition module and the control instruction generation module, and passes it to the graph attention network module, adjusts the weights and parameters of the graph attention network according to the feedback, and optimizes the subsequent device control strategy; the dynamic monitoring response module feeds back the monitored real-time data to the system through the data acquisition module, and the graph attention network module regenerates the control strategy according to the latest environmental data, and the control instruction generation module adjusts the operating status of the smart device accordingly.
[0081] Furthermore, the graph attention network module uses a multi-head attention mechanism to improve the model's perception of complex user behaviors and environmental changes, and realizes coordinated control of multiple devices through optimized control strategies. The multi-head attention mechanism can dynamically track user needs and environmental changes, and the system can perceive changes in time and make reasonable adjustments. This is especially important for scenarios with high environmental complexity or changeable user behaviors. Multiple attention heads can process different features at the same time, allowing the model to understand user preferences and environmental changes in a more fine-grained manner, especially in multiple devices and multiple scenarios, and can capture more subtle collaborative relationships between devices. The data acquisition module is integrated with the sensor device and can collect data from smart home devices, environmental sensors, and user interaction devices at the same time.
[0082] Example 1
[0083] Refer to Figures 3 - 6 As shown, based on family members (father, mother, child); family environment state preferences (temperature preference, light preference, humidity preference); smart home appliances (air conditioner, lamp, humidifier); family environment parameters (temperature, light, humidity), nodes are constructed, and then edges between the nodes are constructed according to the mutual relationships between these nodes. These nodes and edges together form a data model with a directed graph structure.
[0084] Among them, the nodes include: User Nodes, Device Nodes, Preference Nodes, and Environment Nodes.
[0085] The edges between the nodes include: the edge between the user and the preference (indicating the degree of preference of the user for a certain preference), the edge between the preference and the device (indicating which devices are affected by a certain preference), the edge between the device and the environment parameter (indicating the relationship between the device and the environment parameter), and the edge between users (indicating the relationship between users).
[0086] Each type of node has its specific attributes, and these attributes need to be converted into numerical feature vectors before they can be used as the input of the GAT.
[0087] (1) User node features
[0088] Basic information: age, gender, role (father, mother, child, etc.).
[0089] User preference information: user preference values for temperature, light, humidity, etc.
[0090] Behavior information: historical usage records, active time, etc.
[0091] Example:
[0092] For user node User1 (father):
[0093] Age: 40 years old
[0094] Gender: male (coded as 1)
[0095] Role: father (coded as 1)
[0096] Temperature user preference: 24 °C
[0097] Light user preference: bright (coded as 2)
[0098] Humidity user preference: 60%
[0099] Feature vector representation:
[0100] (2) Device node features
[0101] Device type: air conditioner, lamp, curtain, etc. (using one-hot encoding or integer encoding).
[0102] Current status: on, off, standby, etc. (encoded).
[0103] Device parameters: adjustable range (such as temperature range, brightness range).
[0104] Example:
[0105] For device node Device1 (air conditioner):
[0106] Device type: air conditioner (encoded as 1)
[0107] Current status: standby (encoded as 0)
[0108] Temperature range: 16°C - 30°C
[0109] Feature vector representation:
[0110] (3) User preference node features
[0111] User preference type: temperature, light, humidity, etc. (encoded).
[0112] User preference value: specific user preference value or level.
[0113] Weight: importance degree of user preference.
[0114] Example:
[0115] For user preference node Preference1 (temperature user preference):
[0116] User preference type: temperature (encoded as 1)
[0117] Weight: high (encoded as 2)
[0118] User preference value: user's temperature user preference set (father's temperature user preference: 24°C, mother's temperature user preference: 22°C, child's temperature user preference: 23°C)
[0119] Feature vector representation:
[0120] (4) Environmental parameter node features
[0121] Parameter type: temperature, light intensity, time, etc. (encoded).
[0122] Current value: The value measured by the sensor.
[0123] Example:
[0124] For the environmental parameter node Environment1 (current temperature):
[0125] Parameter type: Temperature (encoded as 1)
[0126] Current value: 25°C
[0127] Feature vector representation:
[0128] 2. Definition of edges:
[0129] The edge between a user and a user preference: Represents the degree of user preference of a user for a certain user preference.
[0130] The edge between a user preference and a device: Represents which devices are affected by a certain user preference.
[0131] The edge between a device and an environmental parameter: Represents the relationship that a device is affected by an environmental parameter.
[0132] The edge between users: Represents the relationship between users.
[0133] 3. Numericalization and vectorization of features
[0134] Categorical features: Use one-hot encoding or embedding vectors.
[0135] Numerical features: Can be normalized or standardized.
[0136] Arrange the feature vectors of all nodes in the order of the nodes to form the feature matrix X.
[0137] For example:
[0138]
[0139] Explanation of edges in the example:
[0140] <user1,pre1>: Represents that user1 (father) has an impact on pre1 (temperature preference);
[0141] <user2,pre1>: Represents that user2 (mother) has an impact on pre1 (temperature preference);
[0142] <pre1,dev1>: Represents that pre1 (temperature preference) has an impact on dev1 (air conditioner);
[0143] <dev1,env1> indicates that dev1 (air conditioner) has an impact on env1 (ambient temperature);
[0144] <env1,dev1> indicates that env1 (ambient temperature) has an impact on ev1 (air conditioner);
[0145] <user1,user1>, <user2,user2>, <pre1,pre1>, <dev1,dev1>, <env1,env1> indicate the impact of a node on itself. According to the above descriptions of points and edges, the adjacency matrix is constructed.
[0146] Taking time point 1 in the scenario application of the described graph as an example: The father requests "Set the temperature in the living room to 24°C" through a voice conversation. The system calculates based on the current environment and the user preferences of other family members (such as mom) at home, and finally sets the air conditioner temperature to 23°C.
[0147] The described smart home control system first extracts the temperature information of 24°C through the information collection module, updates the temperature user preference parameter in the father node with this information, then performs a "three - 2" transformation on the family member nodes at the current time point: "father node" and "mother node", and then processes the transformed information through the multi - head attention GAT network to obtain the temperature value of 23°C. Finally, it updates the temperature in the device node with this temperature value, thereby setting the air conditioner temperature to 23°C. Time point 2: After a period of time, the smart home control system detects that the child has returned home. The child's temperature user preference is 23°C. The smart home control system needs to recalculate the settings of the air conditioner device and evaluate whether it is necessary to readjust the indoor temperature.
[0148] Furthermore, the calculation process of the Graph Attention Network (GAT) is as follows:
[0149] 1. Input the feature matrix X into the graph attention network. After passing through the fully - connected layer to transform each vector in the matrix, the transformed feature matrix H is obtained.
[0150] (1) Input
[0151] Feature matrix X: Contains the feature vectors of all nodes, with a dimension of N×F, where N is the number of nodes and F is the feature dimension.
[0152] Adjacency matrix A: Represents the connection relationship of the graph, with a dimension of N×N.
[0153] (2) Linear transformation
[0154] Perform a linear transformation on the features of each node:
[0155]
[0156] Where: x i is the feature vector of node i, and W is a learnable weight matrix.
[0157] 2. The intermediate result is obtained through the multi-head attention layer in the GAT network.
[0158] (1) Calculate the attention coefficient
[0159] For node i and each neighbor node j, calculate the unnormalized attention coefficient:
[0160]
[0161] Where: a represents a learnable attention weight vector; [h i ||h j represents the concatenation operation of two vectors.
[0162] (2) Normalize the attention coefficient
[0163] Use the softmax function to normalize the attention coefficients of the neighbors of node i:
[0164]
[0165] Where: N i is the set of node i and all neighbor nodes pointing to i, and this set is the set of nodes with non-zero element values in the column vector corresponding to the adjacency matrix A..
[0166] (3) Aggregate neighbor information
[0167] Update the representation of node i
[0168]
[0169] Where: σ is a non-linear activation function, such as RELU.
[0170] (4) Multi-head attention mechanism
[0171] To improve the expressive power of the model, GAT uses the multi-head attention mechanism:
[0172]
[0173] Where K is the number of attention heads, and || represents the concatenation operation.
[0174] (5) Obtain a new feature matrix H' through the transformation of the fully connected layer.
[0175]
[0176] (6)Next, after classification by a classifier (such as softmax), the feature matrix X' is obtained.
[0177]
[0178] (7)Finally, the nodes in the graph are updated using the feature matrix X'.
[0179]
[0180] Different users in the family have different environmental preferences. To solve the preference conflicts among different users in the family, the GAT network can comprehensively evaluate the preferences of all users in the family to update the status of household appliances, so as to realize the adjustment of household environment parameters. For example, in this case, when calculating the air conditioner device node through the GAT network, the attention mechanism can comprehensively consider the temperature preferences of family members "father" and "mother" and the status of the original air conditioner device node, calculate the representation of the new air conditioner device node according to the attention between the air conditioner node and the adjacent input nodes, then update the air conditioner device node, and finally adjust the status of the real "air conditioner" device in real time according to the status in the updated air conditioner device node, so that the adjusted "environmental temperature" takes into account the preferences of both "father" and "mother" at the same time. Other environmental parameters such as "environmental humidity" and "light intensity" can also be adjusted in a similar way.
[0181] The present invention analyzes the functions, existing states and relationships among various devices in the family, and intelligently determines when and how each device works to ensure that their functions do not conflict with each other, and at the same time improve the efficiency of energy use. This method can automatically solve problems such as the air conditioner cooling while the electric heater is heating, and ensure that when the device is turned on, it can automatically select the most suitable working mode according to the previous working state and the current environmental conditions.
[0182] When it is detected that a user returns home, the user node and the corresponding edge are added. On the contrary, when it is detected that a user leaves home, the user node and the associated edge are deleted. When a user purchases a new device and completes the network configuration, the device node and the corresponding edge are added. On the contrary, after the user deletes the device, the device node and the associated edge are deleted. When there are changes in nodes, edges or node parameters in the family graph, the representation of the family graph is automatically updated through the GAT network calculation, and the parameters of the household appliance device nodes are synchronized to the household appliances in the form of control instructions, so as to realize the adaptive adjustment of the user's household appliances and achieve the function of automatically adjusting the household environment.
[0183] When the present invention is applied, the father and the mother return home from work at the same time. The system calculates based on the current environment and the preferences of the father and the mother, and finally sets the air conditioner temperature to 23°C. After a period of time, it is detected through the fingerprint recognition of the door lock and the wireless signal of the mobile phone or watch that the child has returned home. The child's temperature preference is 23°C, and the system needs to recalculate the settings of the air conditioner device and evaluate whether it is necessary to readjust the indoor temperature.
[0184] The present invention realizes the coordination of multi-user preferences and the collaboration of device functions in the smart home scenario. The system can dynamically adjust the control strategy of the device through self-supervised learning and real-time response functions, and solves problems such as energy waste, user comfort, and multi-device function conflicts.
[0185] Based on the Graph Attention Network (GAT) model, the present invention maps multi-source heterogeneous data into a unified graph structure model, so as to achieve efficient data fusion and facilitate the accumulation and utilization of data. By introducing the attention mechanism, the model can automatically learn and weigh the importance of the user preferences of different family members, realize intelligent user preference coordination, and make the home environment more in line with the needs of all members. The system combines the user preferences of multiple users in the family to generate a unified device control strategy, ensuring that all smart devices work together, effectively reducing energy waste while improving the overall comfort of the system. In addition, the system can process input data in real time and dynamically adjust the control strategy of the device, thereby further enhancing the user experience. The system structure is flexible, suitable for families of different scales and various types of smart devices, and can provide a more efficient and intelligent solution for home intelligent management.
[0186] The preferred embodiments of the present invention have been specifically described, but the present invention is not limited to the described embodiments. Those skilled in the art can also make various equivalent deformations or substitutions without departing from the spirit of the present invention, and these equivalent deformations or substitutions are all included in the scope defined by the claims of this application.
Claims
1. A smart home control method based on graph attention network, characterized in that: The method comprises the following steps: S10: Collect multi-source data from the smart home system, where the multi-source data includes users, user preferences, device status, and environmental parameters, and collect real-time data of users, user preferences, device status, and environmental parameters through multiple sensors and user interaction interfaces; S20: Build a graph structure model based on multi-source data, represent users, user preferences, devices and environmental parameters as nodes in the graph, and describe the relationship between users, user preferences, devices and environmental parameter nodes through an adjacency matrix; S30: Input the graph structure model into the graph attention network, use the attention mechanism to calculate the correlation weights between nodes, and generate an optimized device control strategy; S40: Generate specific smart home device control instructions based on the output results of the graph attention network to automatically adjust the operating status of the smart home device.
2. According to claim 1, a smart home control system and method based on graph attention network is characterized in that: This method also The steps include: S50: Based on user operation feedback, the graph attention network model is continuously adjusted and optimized through a self-supervised learning mechanism to improve the accuracy and adaptability of the device control strategy; S60: Continuously monitor environmental parameters and device status, and update device control strategies in real time, so that the system can dynamically adapt when the environment changes or user needs change.
3. According to claim 1, a smart home control system and method based on graph attention network is characterized in that: In the step S10, the data collection includes collecting environmental parameters, user habits and user preferences through multimodal sensors, and the multimodal sensors include temperature sensors, humidity sensors, light sensors and other sensors that interact with the smart home system; in the step S20, the multi-source data processing includes expressing the multi-dimensional data of users, devices and environments through graph modeling to generate feature matrices and adjacency matrices, the user nodes and user preference nodes are modeled according to the user's behavior history data, the device nodes are modeled according to the device status and the interaction relationship between devices, and the environmental parameter nodes are modeled according to real-time sensor data.
4. According to claim 1, a smart home control system and method based on graph attention network is characterized in that: The specific steps of step S30 are: S301: Allocating attention weights between user nodes, user preference nodes, device nodes, and environmental parameter nodes to calculate the influence of the nodes; S302: normalizing the attention weights to ensure a dynamic balance between the relationships among multiple nodes; S303: Use a multi-head attention mechanism to enhance the model's ability to capture complex relationships, dynamically balance the conflicts in user preferences of multiple users, and generate optimal device control strategies that adapt to the needs of multiple users.
5. According to claim 1, a smart home control system and method based on graph attention network is characterized in that: The specific steps of step S40 are: S401: Generate specific device control instructions based on the node features output by the graph attention network, including the switch status, temperature setting, and brightness adjustment of the smart device; S402: Mapping the output of the graph model into control signals suitable for different device types through a decoder.
6. According to claim 2, a smart home control system and method based on graph attention network is characterized in that: The specific steps of step S50 are: S501: Collecting user satisfaction with current device settings and operation behaviors; S502: Use a self-supervised learning mechanism to adjust the weight parameters of the graph attention network model to improve the adaptability of the device control strategy to user preferences.
7. According to claim 2, a smart home control system and method based on graph attention network is characterized in that: The specific steps of step S60 are: S601: Continuously monitor changes in environmental parameters and equipment status; S602: Based on real-time changing data, dynamically adjust the control strategy of the equipment to ensure rapid response to changes in the environment and user needs in different environments.
8. A smart home control system based on graph attention network, characterized in that: include A data collection module, used to execute step S10 in claim 1, responsible for collecting multi-source heterogeneous data from different data sources, including user preferences, device status, and environmental parameters; The multi-source data processing module is used to pre-process the collected data into a graph structure model, and at the same time model the data into a graph structure model to generate a feature matrix and an adjacency matrix to describe each node and its relationship; A graph attention network module, used to execute step S30 in claim 1, calculate the association weights between the nodes through the graph attention mechanism, and generate an optimization strategy for controlling the device; A control instruction generation module, used to execute step S40 in claim 1, and generate specific smart home device control instructions according to the optimization strategy output by the graph attention network module; Feedback optimization module, which is used to collect user feedback data and device operation data, and use self-supervised learning mechanism to adjust and optimize the graph attention network model to improve the system's adaptive ability; Dynamic monitoring response module, which is used to continuously monitor the device status and environmental parameters in the smart home to ensure that the system can dynamically adjust the control strategy according to environmental changes to achieve real-time adaptability; The data acquisition module transmits the collected raw data to the data processing module for data preprocessing and graph structure model construction; the multi-source data processing module preprocesses the collected data and models the data into a graph structure model, and then uses the processed graph structure model data as input to pass it to the graph attention network module, where the graph structure model data includes a feature matrix and an adjacency matrix; after receiving the feature matrix and the adjacency matrix, the graph attention network module performs calculations based on the graph structure model, and the generated control strategy is passed to the control instruction generation module for generating specific device control instructions; the control instruction generation module generates control instructions based on the output results of the graph attention network and outputs them to the smart home device to perform corresponding operations, and the control instruction generation module then passes the execution results to the feedback optimization module; The feedback optimization module receives data from the data acquisition module and the control instruction generation module, passes it to the graph attention network module, adjusts the weights and parameters of the graph attention network according to the feedback, and optimizes the subsequent device control strategy; the dynamic monitoring response module feeds back the monitored real-time data to the system through the data acquisition module. According to the latest environmental data, the graph attention network module will regenerate the control strategy, and the control instruction generation module will adjust the operating status of the intelligent device accordingly.
9. A smart home control system and method based on graph attention network according to claim 8, characterized in that: The graph attention network module uses a multi-head attention mechanism to improve the model's perception of complex user behaviors and environmental changes, and realizes coordinated control of multiple devices through optimized control strategies.
10. The smart home control system and method based on graph attention network according to claim 8, characterized in that: The data acquisition module is integrated with the sensor device and can simultaneously acquire data from smart home devices, environmental sensors and user interaction devices.
Citation Information
Cited By
Smart home decision-making system based on cognitive perception and intention prediction
CN120469262A
Household equipment control method based on artificial intelligence and related equipment
CN120802653A
Distributed intelligent management system of household Internet of Things equipment
CN120891763A
Intelligent household electrical appliance interaction control method and system
CN121028587A
Household appliance control method based on artificial intelligence
CN121050336A