Smart home control method, device, equipment and medium

By using self-attention mechanisms and dynamic relationship graph analysis, dynamic user intent features are generated, which solves the problems of static user behavior modeling and reliance on manual configuration for scene automation in smart home control. This enables adaptive dynamic control of the controlled devices, improving the accuracy of personalized services and the system's adaptability.

CN122018351APending Publication Date: 2026-05-12SHENZHEN SDMC TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN SDMC TECH CO LTD
Filing Date
2026-02-10
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Existing smart home control solutions struggle to capture dynamic changes in user behavior and multi-device interaction habits, resulting in insufficient accuracy of personalized services. Scene automation requires manual user setup and cannot adapt to changes in user habits, affecting the system's real-time recognition and adaptive capabilities.

Method used

By acquiring user behavior data and device status data, a self-attention mechanism is used to capture temporal dependency characteristics. Combined with dynamic relationship graph analysis of spatial correlation characteristics, dynamic user intent features are generated to achieve adaptive dynamic control of the controlled device.

Benefits of technology

It improves the control precision of smart home systems, accurately identifies the dynamic evolution of user behavior and the collaborative linkage mode of multiple devices, enhances service matching accuracy and system adaptability, and lowers the configuration threshold for users.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122018351A_ABST
    Figure CN122018351A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of smart home, and discloses a smart home control method and device, equipment and a medium. The method comprises the following steps: acquiring user behavior data and equipment state data; performing self-attention mechanism processing on the user behavior data to capture a time sequence dependence characteristic between user behaviors to obtain a first user characteristic; performing association processing on the user behavior data and the equipment state data to capture spatial association characteristics between the user behavior and the controlled equipment to obtain second user characteristics; generating a dynamic user intention feature based on the first user feature and the second user feature; and dynamically controlling the controlled equipment based on the dynamic user intention characteristics. According to the embodiment of the invention, the control precision of smart home control can be 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 in particular to a smart home control method, device, equipment and medium. Background Technology

[0002] With the rapid development of smart homes, the volume of personalized and automated services has also increased rapidly. The demand for home scene automation is growing, and with the development of artificial intelligence (AI) model capabilities, using AI models to implement and process these services can reduce user learning and operational costs and improve the smart home experience. However, current smart home control solutions suffer from static user behavior modeling, relying solely on fixed-time or single-device interaction data. This makes it difficult to capture dynamically changing user behavior and multi-device interaction habits, resulting in insufficient accuracy in personalized services. Summary of the Invention

[0003] The purpose of this application is to provide a smart home control method, device, equipment, and medium that uses dynamic user intent features as the basis for scene control, thereby improving the control accuracy of smart home control.

[0004] This application provides a smart home control method, including: Acquire user behavior data and device status data; The user behavior data is processed using a self-attention mechanism to capture the temporal dependency characteristics between user behaviors, thereby obtaining the first user feature; The user behavior data and the device status data are correlated to capture the spatial correlation characteristics between the user behavior and the controlled device, thereby obtaining a second user feature; Based on the first user characteristics and the second user characteristics, dynamic user intent characteristics are generated; Based on the dynamic user intent characteristics, the controlled device is dynamically controlled.

[0005] In some embodiments, the self-attention mechanism processing of the user behavior data includes: The user behavior data is subjected to time-series encoding to obtain user behavior encoding features; The user behavior encoding features are subjected to matrix transformation processing to obtain a self-attention query vector, a self-attention key vector, and a self-attention value vector; The first user feature is obtained by performing self-attention mechanism processing based on the self-attention query vector, the self-attention key vector, and the self-attention value vector.

[0006] In some embodiments, the association processing of the user behavior data and the device status data includes: Based on the user behavior data and the device status data, a dynamic relationship graph is constructed; Based on the dynamic relationship graph, the user behavior and the controlled device are analyzed to obtain spatial relationship features. Based on the spatial association features, the dynamic relationship graph is adjusted, and based on the adjusted dynamic relationship graph, the second user feature is generated.

[0007] In some embodiments, the correlation analysis processing of the user behavior and the controlled device based on the dynamic relationship graph includes: Based on the dynamic relationship graph, device node embedding vectors are generated; Feature extraction is performed on the device node embedding vector to capture the correlation characteristics between the user behavior and the controlled device, thereby obtaining device node state features; Based on the dynamic relationship graph and the device node state characteristics, the association strength between the user behavior and the controlled device is calculated to obtain the association strength value between the device nodes. The spatial association features are generated based on the association strength values ​​between the device nodes.

[0008] In some embodiments, generating dynamic user behavior features based on the first user feature and the second user feature includes: The first user feature and the second user feature are fused to obtain the fused feature; Based on the statistical significance index of the fusion features, the fusion features are matched with preset user intent template features to query the corresponding user intent reference features. Based on a preset user intent hierarchy, the dynamic user intent features are obtained by performing intent hierarchy abstract reasoning on the fused features and the user intent reference features.

[0009] In some embodiments, the fusion process of the first user feature and the second user feature includes: The first user feature is determined as the cross-attention query vector; The second user feature is transformed to obtain the cross-attention key vector and the cross-attention value vector; The fused feature is obtained by performing cross-attention processing based on the cross-attention query vector, the cross-attention key vector, and the cross-attention value vector.

[0010] In some embodiments, performing intent-level abstract reasoning on the fused features and the user intent reference features includes: Based on the fusion features, feature embedding processing is performed on the user intent reference features to obtain user intent embedded features; The user intent embedding features are subjected to feature mapping processing, so that the user intent embedding features are mapped layer by layer along the hierarchical path of the user intent hierarchy to obtain the dynamic user intent features.

[0011] This application embodiment also provides a smart home control device, including: The first module is used to acquire user behavior data and device status data; The second module is used to process the user behavior data using a self-attention mechanism to capture the temporal dependency characteristics between user behaviors and obtain the first user feature. The third module is used to perform correlation processing on the user behavior data and the device status data to capture the spatial correlation characteristics between the user behavior and the controlled device, and obtain the second user feature. The fourth module is used to generate dynamic user intent features based on the first user features and the second user features; The fifth module is used to dynamically control the controlled device based on the dynamic user intent characteristics.

[0012] This application also provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the above-described smart home control method.

[0013] This application also provides a computer-readable storage medium storing a computer program, characterized in that the computer program, when executed by a processor, implements the above-described smart home control method.

[0014] The beneficial effects of this application are as follows: By using a self-attention mechanism to capture the temporal dependence characteristics of user behavior and combining the spatial correlation characteristics between user behavior and device state to generate dynamic user intent features, adaptive dynamic control of the controlled device is realized. This effectively solves the problems of static user behavior modeling and the dependence of scene automation on manual configuration. It has significant advantages in accurately identifying the dynamic evolution pattern of user behavior and the multi-device collaborative linkage mode, improving service matching accuracy and system adaptability, and can improve the control accuracy of smart home control. Attached Figure Description

[0015] Figure 1 This is an application environment diagram of the smart home control method provided in the embodiments of this application.

[0016] Figure 2 This is a flowchart of the smart home control method provided in the embodiments of this application.

[0017] Figure 3 This is a flowchart of a method for processing user behavior data using a self-attention mechanism, as provided in an embodiment of this application.

[0018] Figure 4 This is a flowchart of a method for associating user behavior data and device status data, provided in an embodiment of this application.

[0019] Figure 5 This is a flowchart of the method for generating dynamic user behavior features provided in the embodiments of this application.

[0020] Figure 6 This is a schematic diagram of the structure of the smart home control device provided in the embodiments of this application.

[0021] Figure 7 This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0022] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0023] It should be noted that although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first," "second," etc., in the specification, claims, and drawings are used to distinguish similar objects and are not used to describe a specific order or sequence.

[0024] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0025] The smart home control method provided in this application can be executed by a computer device, which can be a terminal device or a server. The terminal device includes, but is not limited to, mobile phones, computers, smart home appliances, vehicle terminals, and aircraft. The server can be a standalone physical server, a server cluster consisting of multiple physical servers, a distributed system, or a cloud server. Furthermore, all information, data, and signals involved in this application's embodiments are authorized by the relevant parties or have been fully authorized by all parties involved, and the collection, use, and processing of related data comply with the relevant laws, regulations, and standards of the relevant countries and regions.

[0026] In smart home systems, user behavior modeling typically relies on fixed time thresholds or single device interaction data sources, making it difficult to effectively capture the dynamic evolution of user behavior and the implicit linkages between multiple devices, resulting in insufficient accuracy of personalized services. Simultaneously, the automated scene configuration process requires users to manually define trigger conditions and actions, and the generated scene rules cannot adaptively adjust to changes in user habits, limiting the intelligent experience. This issue directly affects the system's real-time recognition of user intent and the contextual adaptability of scene responses, causing a persistent deviation between automated services and actual user needs. For example, in a home living scenario, a user's pre-sleep behavior sequence evolves from an initial fixed-time light-off operation to a complex behavior pattern including pre-starting the air conditioner. Specifically, the user turns on the air conditioner at 21:30 and then turns off the lighting at 22:00. However, existing systems only trigger the light-off command based on historical timestamp data, failing to recognize the temporal correlation between the air conditioner-on and light-off actions, and ignoring the functional coupling between lighting and air conditioning devices in the physical space. This results in the air conditioner still being off when the system executes the light-off operation at 22:00, causing device linkage logic failure and scene execution interruption.

[0027] If the above problems are not addressed, the smart home control system will continuously output control commands that contradict the user's dynamic behavior patterns, increasing the frequency of manual user intervention and reducing the reliability of scene automation. Simultaneously, static modeling mechanisms cannot reflect real-time changes in the network topology of multiple devices, making it difficult for the system to build an intent inference model that conforms to real-life scenarios, ultimately weakening the smart home system's adaptability and user trust.

[0028] Based on this, embodiments of this application provide a smart home control method, device, equipment, and medium that uses dynamic user intent features as the basis for scene control, thereby achieving adaptive dynamic control of the controlled device. This effectively solves the problems of static user behavior modeling and reliance on manual configuration for scene automation, and improves the control accuracy of smart home control.

[0029] Figure 1 This diagram illustrates the application environment of the smart home control method provided in the embodiments of this application. (See attached diagram.) Figure 1This method is applied to a smart home control system. The system includes a terminal 110 and a server 120. The terminal 110 and server 120 are connected via a network. The terminal 110 can be a desktop terminal or a mobile terminal; the mobile terminal can be at least one of a mobile phone, tablet, or laptop. The server 120 can be a standalone server or a server cluster consisting of multiple servers. The terminal 110 sends user behavior data and device status data to the server 120. The server 120 acquires the user behavior data and device status data, processes the user behavior data using a self-attention mechanism to capture the temporal dependency characteristics between user behaviors, obtaining a first user feature. It then performs correlation processing on the user behavior data and device status data to capture the spatial correlation characteristics between user behavior and the controlled device, obtaining a second user feature. Based on the first and second user features, dynamic user intent features are generated. Based on the dynamic user intent features, the controlled device is dynamically controlled.

[0030] It should be understood that Figure 1 The application scenarios shown are merely examples. In practical applications, the smart home control method provided in this application embodiment can also be applied to other scenarios. For example, the above-described smart home control method can be directly applied to terminal 110. Terminal 110 is used to acquire user behavior data and device status data, process the user behavior data using a self-attention mechanism to capture the temporal dependency characteristics between user behaviors, and obtain a first user feature. It then performs correlation processing on the user behavior data and device status data to capture the spatial correlation characteristics between user behavior and the controlled device, and obtains a second user feature. Based on the first user feature and the second user feature, it generates dynamic user intent features, and based on the dynamic user intent features, it dynamically controls the controlled device.

[0031] See Figure 2 In one embodiment, a smart home control method is provided. The execution subject of the method can be either a terminal or a server, including but not limited to steps S201 to S205.

[0032] Step S201: Obtain user behavior data and device status data.

[0033] Step S202: Process the user behavior data using a self-attention mechanism to capture the temporal dependency characteristics between user behaviors and obtain the first user feature.

[0034] Step S203: Perform correlation processing on user behavior data and device status data to capture the spatial correlation characteristics between user behavior and the controlled device, and obtain the second user feature.

[0035] Step S204: Generate dynamic user intent features based on the first user features and the second user features.

[0036] Step S205: Dynamically control the controlled device based on dynamic user intent characteristics.

[0037] This embodiment relates to a smart home control method. User behavior data and device status data are acquired by the execution entity as basic input sources. The execution entity processes the user behavior data using a self-attention mechanism to capture the temporal dependency characteristics between user behaviors. In practical applications, this processing can be implemented using Transformer neural networks, recurrent neural networks, or long short-term memory networks. For example, it can identify patterns in behavior sequences by training a sequence model, primarily to capture the temporal dependency characteristics between user behaviors and obtain the first user feature. The execution entity performs correlation processing on the user behavior data and device status data to capture the spatial correlation characteristics between user behaviors and controlled devices. This correlation processing can be implemented using a rule-based correlation engine or graph database storage, such as defining behavior-controlled device mapping rules or constructing a device relationship network, primarily to capture the spatial correlation characteristics between user behaviors and controlled devices. After obtaining the first user feature and the second user feature, the execution entity generates dynamic user intent features based on the first user feature and the second user feature. This generation process can be implemented using feature weighted fusion or a simple neural network fusion layer, such as linearly combining feature vectors or processing through a fully connected layer, primarily to generate features reflecting the user's real-time intent. As a preferred implementation, dynamic control of the controlled device is performed based on dynamic user intent characteristics. This control can be implemented using predefined control strategies or reinforcement learning algorithms. For example, device adjustment commands are output based on dynamic user intent characteristics, primarily to achieve automatic device response. This application solves the problems of static user behavior modeling, difficulty in capturing dynamic changes in user behavior and multi-device linkage habits, and the need for manual user settings for scene automation that cannot automatically iterate according to user habits by dynamically integrating the temporal dependency characteristics between user behaviors and the spatial correlation characteristics between user behaviors and the controlled device. This enables device control to adjust in real time according to user intent characteristics.

[0038] This smart home control method dynamically integrates the temporal dependencies of user behavior with the spatial correlation characteristics of devices to achieve real-time modeling of user intentions and device control, thus overcoming the limitations of static behavior modeling and manual scene configuration. Specifically, user behavior data and device status data are acquired as basic inputs, providing multi-dimensional data sources for capturing dynamic behavior changes. User behavior data reflects the trajectory of habit evolution, while device status data reflects the real-time status of multiple devices, jointly supporting subsequent adaptive analysis of complex life scenarios. Furthermore, user behavior data is processed by a self-attention mechanism to capture the temporal dependencies between user behaviors, yielding the first user feature. This processing dynamically identifies the weight relationships between key behavioral nodes, avoiding the rigidity of traditional fixed-time-window analysis and ensuring that the feature accurately reflects the temporal evolution of behavioral habits. Simultaneously, user behavior data and device status data are correlated to capture the spatial correlation characteristics between user behavior and controlled devices, yielding the second user feature. This correlation processing combines a bidirectional mapping between behavior data and device status to uncover the implicit connections between behavior and devices, allowing the feature to reflect the dynamic topology of the device network. Based on the first and second user characteristics, dynamic user intent features are generated. This generation process integrates the dual characteristics of temporal dependence and spatial correlation, comprehensively judging the contextual changes of the user's potential intent and avoiding misjudgment of intent caused by a single feature. Finally, the controlled device is dynamically controlled based on the dynamic user intent features; this control is directly based on the real-time changes of intent features, without the need for preset fixed rules, enabling the device response to automatically adapt to the evolution of user behavior.

[0039] Specifically, in one implementation, when a user operates in a bedroom environment, user behavior data includes closing curtains at 8:00 PM, turning on a desk lamp at 8:05 PM, and adjusting the air conditioner to 25 degrees Celsius at 8:10 PM. Device status data shows that the curtains are closed, the desk lamp brightness is 50%, and the air conditioner temperature is 25 degrees Celsius. The user behavior data is processed using a self-attention mechanism to identify the temporal dependency between closing the curtains and turning on the desk lamp (e.g., usually closing the curtains first and then turning on the desk lamp), resulting in a first user feature. The user behavior data and device status data are correlated to discover the spatial association between turning on the desk lamp and the desk lamp device (e.g., the fixed position of the lighting device in a reading scenario), resulting in a second user feature. Based on the first and second user features, a dynamic user intent feature (e.g., the intent for "reading scenario") is generated. Based on this dynamic user intent feature, the desk lamp brightness is automatically adjusted to 70%, and the air conditioner temperature is fine-tuned to 24 degrees Celsius to suit the user's current activity needs.

[0040] Therefore, the smart home control method provided in this embodiment effectively solves the problem of static user behavior modeling, and can capture dynamically changing user behavior and multi-device linkage habits. Simultaneously, scene automation requires no manual user setup and can automatically iterate according to user habits, thereby improving the accuracy of personalized services and lowering the user configuration threshold. As a preferred implementation, the dynamic user intent feature generation process ensures contextual adaptability of intent judgment, making device control closely follow the evolution of actual user behavior, fundamentally achieving autonomous scene optimization.

[0041] In some embodiments described above, a self-attention mechanism was proposed to process user behavior data to capture the temporal dependencies between user behaviors. However, in its implementation, the capture of temporal dependencies is insufficient, failing to effectively adapt to dynamic changes in user behavior and multi-device interaction habits, thus affecting the accuracy of personalized services and the intelligent experience. Therefore, this application further proposes a method for processing user behavior data using a self-attention mechanism.

[0042] See Figure 3 In one embodiment, the method for processing user behavior data using a self-attention mechanism includes, but is not limited to, steps S301 to S303.

[0043] Step S301: Perform time-series coding on the user behavior data to obtain user behavior coding features.

[0044] Step S302: Perform matrix transformation processing on the user behavior encoding features to obtain the self-attention query vector, self-attention key vector, and self-attention value vector.

[0045] Step S303: Based on the self-attention query vector, self-attention key vector, and self-attention value vector, perform self-attention mechanism processing to obtain the first user feature.

[0046] Temporal coding refers to transforming user behavior data according to a time-series structure to preserve temporal information. This can be achieved using recurrent neural networks or Transformer encoders. The goal is to ensure that the continuity of the behavior sequence is not ignored, providing a feature base rich in time dimension for subsequent attention mechanisms.

[0047] Matrix transformation processing refers to linearly mapping user behavior encoding features to generate key vector components. It can be implemented using fully connected layers or learnable weight matrices. The purpose is to dynamically quantify the intrinsic correlation strength between different behavior segments and avoid the limitations of fixed weight allocation.

[0048] Self-attention mechanism refers to the computation of the dependency relationship of behavioral sequences based on the interaction between vectors. It can be implemented by dot product attention or scaled dot product attention mechanism. The purpose is to adaptively aggregate value vectors to highlight key behavioral features by matching the similarity between query vectors and key vectors.

[0049] The solution in this application first performs temporal encoding on user behavior data, converting discrete user behaviors into continuous temporal feature representations, thereby completely preserving the chronological order and interval information of behavior occurrences, and obtaining user behavior encoded features. Subsequently, through matrix transformation, the obtained user behavior encoded features are decomposed into self-attention query vectors, self-attention key vectors, and self-attention value vectors, enabling the executing entity to dynamically adjust the contribution weights at each time point according to the behavioral context. Finally, the executing entity calculates the attention distribution based on the interaction between the self-attention query vectors and self-attention key vectors, and performs weighted aggregation of the self-attention value vectors according to this distribution, generating a first user feature that can characterize the long-term and short-term dependencies between behaviors, thus forming a complete transformation chain from raw data to temporal features.

[0050] As a specific implementation method, the solution of this application is implemented as follows: User behavior data is input into a Transformer network for temporal encoding, and the output is a user behavior encoded feature containing time dimension information. This encoded feature is mapped to a self-attention query vector, a self-attention key vector, and a self-attention value vector through three independent fully connected layers, respectively. Subsequently, the self-attention query vector and the self-attention key vector are subjected to a dot product operation and normalized by a softmax function to obtain an attention weight matrix. This weight matrix is ​​used to perform a weighted summation of the self-attention value vectors to finally generate the first user feature.

[0051] Through the above-described scheme, the embodiments of this application can effectively capture the dynamic temporal dependency characteristics in the user behavior sequence, adaptively identify the implicit association patterns between behaviors, thereby improving the modeling accuracy of dynamic changes in user behavior and multi-device linkage habits, and providing a reliable foundation for the subsequent generation of accurate dynamic user intent features.

[0052] In some embodiments described above, a method for correlation processing of user behavior data and device status data is proposed to capture the spatial correlation characteristics between user behavior and the controlled device. However, in its implementation, the correlation processing relies on a static model, which cannot adjust the correlation relationship in real time according to dynamic changes in user behavior, resulting in inaccurate capture of spatial correlation characteristics and affecting the accuracy of personalized services and the scene automation adaptive capability. Therefore, embodiments of this application further propose a method for correlation processing of user behavior data and device status data.

[0053] See Figure 4In one embodiment, the method for associating user behavior data and device status data includes, but is not limited to, steps S401 to S403.

[0054] Step S401: Construct a dynamic relationship graph based on user behavior data and device status data.

[0055] Step S402: Based on the dynamic relationship graph, perform correlation analysis on user behavior and controlled devices to obtain spatial correlation features.

[0056] Step S403: Based on spatial association features, adjust the dynamic relationship graph, and based on the adjusted dynamic relationship graph, generate the second user features.

[0057] Dynamic relationship graphs refer to the graph structure representation of user behavior and device status that is dynamically constructed based on real-time data. They can be implemented using graph database storage or adjacency matrix representation. The purpose is to initialize a graph that can reflect the current scene association status and avoid the limitations of predefined static graphs that cannot adapt to new scenes.

[0058] Association analysis can be understood as capturing the implicit spatial dependencies between behaviors and devices through graph topology analysis. It can be implemented using graph convolutional networks or path traversal algorithms. The goal is to accurately identify key association patterns in dynamic scenes, rather than relying on simple statistical associations.

[0059] Adjusting the dynamic relationship graph involves optimizing the graph structure based on the analysis results. This can be achieved by dynamically updating node weights or adaptively correcting edge connections. The goal is to enable the graph to automatically iterate as user behavior changes, ensuring that the generated features closely match the needs of the actual scenario.

[0060] The solution in this application first initializes a dynamic relationship graph using real-time acquired user behavior data and device status data. This graph uses nodes to represent user behavior and controlled devices, and edges to represent potential association strength. Then, association analysis is performed based on the topological structure of this dynamic relationship graph, extracting spatial association features by calculating path dependencies and adjacency relationships between nodes. Next, the spatial association features are used as feedback signals to adjust the graph structure, for example, dynamically modifying edge weights or adding / deleting node connections based on association strength. Finally, a second user feature is generated based on the optimized dynamic relationship graph. This feature effectively integrates the dynamic spatial relationship between behavior and devices. The entire process forms a closed-loop iterative mechanism, enabling the graph structure to evolve in real-time with user behavior, thereby ensuring that the capture of spatial association characteristics remains highly consistent with the current scenario.

[0061] As a preferred embodiment, the solution of this application is implemented as follows: In a smart home scenario, when a user performs the action of "turning on the living room light," the executing entity acquires the user's behavior data and device status data (including the status of devices such as the living room light and air conditioner) in real time. First, a dynamic relationship graph is constructed, with the action of "turning on the living room light" as the behavior node and the living room light as the device node, and initial association edges are established. Second, association analysis processing is performed based on the dynamic relationship graph. The association strength between the behavior node and the device node is calculated through a graph attention mechanism, identifying that "turning on the living room light" often has an implicit association with the action of "adjusting the air conditioner temperature," thus obtaining spatial association features. Next, the dynamic relationship graph is adjusted according to these spatial association features to enhance the association weight between the living room light node and the air conditioner node. Finally, a second user feature is generated based on the adjusted dynamic relationship graph. In this embodiment, the dynamic relationship graph can be specifically implemented using an in-memory graph database, and the association analysis processing can be specifically performed using a graph neural network algorithm.

[0062] Through the above solution, the embodiments of this application can capture the dynamic spatial correlation characteristics between user behavior and controlled devices in real time, avoiding the problem of inaccurate correlation caused by static correlation processing, thereby improving the accuracy of personalized services and the adaptive capability of scene automation, and ensuring that the control strategy closely follows the evolution of user habits.

[0063] In some embodiments described above, a dynamic relationship graph-based association analysis process is proposed to capture the spatial association characteristics between user behavior and controlled devices. However, in its implementation, the association analysis process lacks a concrete implementation mechanism, making it difficult to accurately quantify the dynamic association strength between user behavior and device nodes. This results in coarse and static spatial association features that cannot adapt to real-time changes in users' multi-device linkage habits, thereby affecting the accuracy of subsequent user intent recognition and the intelligent experience of device control. Therefore, this application further proposes a method for association analysis processing of user behavior and controlled devices.

[0064] In one embodiment, a correlation analysis is performed on user behavior and controlled devices based on a dynamic relationship graph, including: generating device node embedding vectors based on the dynamic relationship graph; extracting features from the device node embedding vectors to capture the correlation characteristics between user behavior and controlled devices, and obtaining device node state features; calculating the correlation strength between user behavior and controlled devices based on the dynamic relationship graph and device node state features, and obtaining correlation strength values ​​between device nodes; and generating spatial correlation features based on the correlation strength values ​​between device nodes.

[0065] Device node embedding vectors refer to the process of converting device nodes in a smart home system into high-dimensional vector representations through mathematical mapping. This can be achieved using graph neural networks or random walk algorithms. The goal is to quantify the relationships between devices into a computable mathematical form, avoiding the limitations of traditional static modeling that relies solely on historical data from a single device.

[0066] Device node state features refer to the features extracted from the device node embedding vector that reflect the real-time coupling characteristics of user behavior and the interaction of the controlled device. These features can be extracted using convolutional neural networks or recurrent neural networks. The purpose is to capture subtle changes in user habits and ensure that the correlation characteristics reflect the dynamics of the real scene rather than fixed rule matching.

[0067] The correlation strength value is a numerical indicator that quantifies the degree of dynamic correlation between device nodes. It can be achieved by using cosine similarity or dot product operation combined with normalization processing. The purpose is to accurately capture the device linkage strength triggered by user behavior and effectively cope with the interference caused by the diversity of multiple device sources and the complexity of the scenario.

[0068] The solution in this application first generates device node embedding vectors based on a dynamic relationship graph. Specifically, it utilizes the real-time topology of the graph to transform device nodes into high-dimensional vector representations, providing dynamically adjustable foundational data for subsequent analysis. Then, feature extraction is performed on the device node embedding vectors, focusing on the real-time coupling characteristics of user behavior and controlled device interaction, obtaining device node state features that reflect subtle changes in user habits. Next, combining the global structural information of the dynamic relationship graph with the local dynamic information of the device node state features, the association strength values ​​between device nodes are calculated, achieving precise quantification of device linkage strength. Finally, the association strength values ​​are transformed into operable spatial association features, ensuring the dynamic adaptability and high fidelity of the features, thereby providing a reliable decision-making basis for smart home control.

[0069] As a preferred embodiment, the specific implementation of the solution in this application is as follows: In a smart home system, when a user performs a series of operations such as turning on the living room lights or adjusting the air conditioner temperature, the executing entity first generates an embedding vector representing each device node based on a dynamic relationship graph, and then extracts features from the embedding vectors through a graph convolutional network to obtain device node state features that reflect the user's current operating habits. Next, the association strength value between the lights and the air conditioner is calculated using the device node state features and the topology of the dynamic relationship graph. Finally, spatial association features are generated based on the association strength value, which are used to determine whether the user intends to create a "home mode" scenario.

[0070] Through the above-described scheme, the embodiments of this application can accurately quantify the dynamic correlation strength between user behavior and device nodes, so that the generation of spatial correlation features is no longer coarse and static, but can adapt to the real-time changes in users' multi-device linkage habits, thereby improving the accuracy of user intent recognition and the intelligent experience of device control, and effectively solving the problem of insufficient automation experience caused by insufficient correlation modeling.

[0071] In some embodiments of this application, dynamic user intent features are generated based on first and second user features to achieve dynamic control of smart homes. However, in the implementation process, due to the multi-level structure and dynamic evolution of user intents, the method of directly generating intent features fails to effectively handle the abstract level and statistical significance correlation of intents, resulting in insufficient intent recognition accuracy and an inability to accurately capture subtle changes in user behavior habits, making it difficult for the smart home system to adapt to user needs. Therefore, embodiments of this application further propose a method for generating dynamic user behavior features.

[0072] See Figure 5 In one embodiment, the method for generating dynamic user behavior features includes, but is not limited to, steps S501 to S503.

[0073] Step S501: The first user feature and the second user feature are fused to obtain the fused feature.

[0074] Step S502: Based on the statistical significance index of the fusion features, the fusion features are matched with the preset user intent template features to query the corresponding user intent reference features.

[0075] Step S503: Based on the preset user intent hierarchy system, perform intent hierarchy abstract reasoning on the fused features and user intent reference features to obtain dynamic user intent features.

[0076] Fusion processing refers to the process of combining the first user features and the second user features to generate comprehensive features. It can be achieved by feature concatenation, weighted averaging, or feature aggregation based on graph neural networks. Its purpose is to integrate the temporal dependence and spatial correlation characteristics of user behavior, avoid the one-sidedness of a single feature dimension, and provide a comprehensive and context-sensitive feature foundation for intent recognition.

[0077] Statistical significance index refers to the measure of the reliability of key information in quantitative fusion features. It can be calculated using statistical methods such as p-value, confidence interval, or information gain. Its purpose is to dynamically screen highly significant features, effectively filter noise interference and redundant data, and ensure that the matching process focuses on the most representative behavioral patterns.

[0078] The user intent hierarchy refers to the hierarchical structure that defines user intent from concrete to abstract. It can be implemented using a tree structure, graph structure, or ontology-based hierarchical model. Its purpose is to simulate the natural hierarchical structure of human intent, support the adaptive evolution of features along the hierarchical path, and thus accurately capture the gradual evolution of user habits.

[0079] The solution in this embodiment first integrates the first and second user features through fusion processing to generate fused features. These fused features simultaneously include the temporal dependency and spatial correlation characteristics of user behavior, laying a comprehensive feature foundation for subsequent processing. Then, based on the statistical significance index of the fused features, the reliability of the features is dynamically evaluated. Highly significant features are selected and matched with preset user intent template features to obtain user intent reference features closely related to the current behavior pattern. Finally, based on a preset user intent hierarchy, the fused features and user intent reference features are guided to abstract and reason layer by layer along the hierarchical path, realizing a dynamic mapping from specific device operation details to higher-level life scenario goals, thereby generating a feature representation that accurately reflects the dynamic evolution of user intent.

[0080] As a preferred embodiment, the solution of this application is implemented as follows: The fusion processing can adopt a feature concatenation method, connecting the first user feature and the second user feature along the feature vector dimension. The statistical significance index can be calculated as the variance value of the fused features, used to identify high-variance features as significant features. The preset user intent hierarchy can be a tree structure, where the bottom-level nodes represent device operation details and the top-level nodes represent life scenario goals. Intent hierarchy abstract reasoning can be achieved by aggregating features layer by layer from the bottom-level nodes to the top-level nodes.

[0081] Through the above-described solution, the embodiments of this application can effectively handle the multi-level structure and dynamic evolution characteristics of user intentions, improve the accuracy of intention recognition, accurately capture subtle changes in user behavior habits, and enable the smart home system to adapt to user needs and achieve more intelligent device control.

[0082] In some embodiments described above, a method for fusing first user features and second user features to generate dynamic user intent features is proposed. However, in its implementation, the fusion processing method lacks deep interactive modeling of temporal dependencies and spatial correlation characteristics, resulting in an oversimplified feature fusion process that fails to adaptively capture the complex coupling between the temporal dynamics of user behavior and the spatial relationship of the device. Consequently, the fused features lack expressive power, affecting the accuracy of subsequent user intent recognition. Therefore, embodiments of this application further propose a method for fusing first user features and second user features.

[0083] In one embodiment, the fusion processing of the first user feature and the second user feature includes: determining the first user feature as a cross-attention query vector; transforming the second user feature to obtain a cross-attention key vector and a cross-attention value vector; and performing cross-attention processing based on the cross-attention query vector, the cross-attention key vector, and the cross-attention value vector to obtain the fused feature.

[0084] Cross-attention query vectors are vector representations used to dynamically retrieve relevant information during feature fusion. They can be generated from the first user features using linear transformations or nonlinear mappings. The purpose is to focus on spatial information closely related to the dynamic changes of time series, guided by the temporal dependence of user behavior.

[0085] Cross-attention key vectors and cross-attention value vectors are vector representations used to store and provide structured information during feature fusion. They can be generated from second-user features using matrix transformations or deep neural network layers, with the aim of transforming device spatial relationships into a representation that can be dynamically retrieved by temporal features.

[0086] Cross-attention processing refers to the process of weighted aggregation of features by calculating the similarity between the query vector and the key vector. It can be implemented using dot product attention mechanism or scaled dot product attention mechanism. The purpose is to quantify the dependence of temporal features on spatial features and form an adaptive fusion mechanism.

[0087] The solution in this embodiment determines the first user feature as a cross-attention query vector, enabling the fusion process to dynamically retrieve highly relevant spatial association information based on the temporal dynamic changes of user behavior. By transforming the second user feature to generate key and value vectors, the spatial relationships between device nodes are represented as structured data that can be retrieved by temporal features. Cross-attention processing is performed based on the query, key, and value vectors, calculating attention weights to measure the dependence of temporal features on spatial features. The value vectors are then weighted and aggregated according to these weights to generate the fused feature. This mechanism achieves deep interactive modeling of temporal dependency and spatial association characteristics, allowing the fused feature to dynamically adjust according to the context. It accurately captures how the evolution of user behavior patterns in the time dimension affects the complex coupling of device spatial relationships, effectively avoiding the association distortion problem caused by static fusion.

[0088] As a preferred embodiment, the solution of this application is implemented as follows: In a smart home scenario, when user behavior data includes a sequence of switching operations on smart curtains, the first user feature captures the temporal dependency of the switching actions through a self-attention mechanism; device status data includes the status of the curtain motor and its spatial relationship with the lighting equipment; the second user feature captures the spatial association between user behavior and the curtains and lighting equipment through a dynamic relationship graph. In the fusion processing stage, the first user feature is directly used as a cross-attention query vector, and the second user feature is transformed through a fully connected layer to generate a key vector and a value vector; the cross-attention processing calculates the dot product similarity between the query vector and the key vector, generates attention weights through a softmax function, and weighted aggregates the value vectors to obtain the fused feature. This fused feature can reflect the user's potential control intention on the associated lighting equipment when frequently operating the curtains during a specific time period (such as evening), for example, identifying the behavior pattern of automatically dimming the lights after the user draws the curtains.

[0089] Through the above scheme, the embodiments of this application realize deep interactive modeling of the temporal dynamics of user behavior and the spatial relationship of devices, enabling the feature fusion process to adaptively capture complex coupling relationships, significantly improving the expressive power of fused features, thereby improving the accuracy of dynamic user intent recognition, and effectively solving the problem of intent recognition deviation caused by the simplification of feature fusion.

[0090] In some of the solutions described above in this application, intent-level abstract reasoning is proposed to generate dynamic user intent features by performing intent-level abstract reasoning on fused features and user intent reference features. However, in this process, the reasoning process lacks a specific mechanism for feature embedding and hierarchical path mapping, resulting in the inability to accurately capture the dynamic changes in the hierarchical structure of user intent. This makes it difficult for the generated intent features to accurately reflect the gradual evolution of user behavior from specific operations to abstract goals, thereby affecting the adaptive understanding of user intent and the accuracy of device control by the smart home system. Therefore, embodiments of this application further propose a method for intent-level abstract reasoning on fused features and user intent reference features.

[0091] In one embodiment, the intent-level abstract reasoning of the fused features and user intent reference features includes: performing feature embedding processing on the user intent reference features based on the fused features to obtain user intent embedded features; and performing feature mapping processing on the user intent embedded features to map the user intent embedded features layer by layer along the hierarchical path of the user intent hierarchy to obtain dynamic user intent features.

[0092] Feature embedding refers to the process of transforming static user intent reference features into dynamic vector representations. This can be achieved using fully connected neural networks or self-attention mechanisms. The goal is to utilize the temporal dependencies and spatial correlations carried by the fused features to ensure that the embedded features are closely related to the current user behavior state and to avoid the reference features from becoming disconnected from real-time behavior.

[0093] Feature mapping can be understood as a process of hierarchically abstracting embedded features based on a preset logical structure. It can be implemented using graph neural networks or recurrent neural networks. The purpose is to make the target features evolve layer by layer strictly along the path of the user intent hierarchy, so as to realize the gradual deduction from micro behavior to macro goal.

[0094] The solution in this embodiment first uses the fused features as dynamic context input to drive the feature embedding processing module to perform vector transformation on the user intent reference features, generating user intent embedded features tightly coupled with the real-time behavior state. This process dynamically adjusts the representation of the reference features through the statistical significance index of the fused features. Subsequently, the user intent embedded features are guided to the feature mapping processing module, where they are mapped layer by layer according to the preset hierarchical path of the user intent hierarchy. Each layer of mapping abstracts the features based on the logical rules of the hierarchy, gradually deducing specific device operation behaviors to higher-order user intent targets, thereby forming a complete intent hierarchy evolution chain, and finally outputting dynamic user intent features that accurately reflect the dynamic changes of user intent.

[0095] As a specific implementation method, the solution of this application embodiment is implemented as follows: In a smart home system, when a user performs the action of "adjusting the air conditioner temperature", the fused feature includes the temporal dependency characteristics of the action and the spatial association information of the air conditioner; the user intent reference feature adopts a preset "comfortable environment" template; the feature embedding process converts the "comfortable environment" reference feature into a user intent embedding feature through a fully connected neural network layer, and the embedding feature dynamically integrates the current action context information; subsequently, the feature mapping process, according to the user intent hierarchy (e.g., operation layer → comfort layer → health layer), uses a graph convolutional network to map the embedding feature layer by layer, deducing from the specific operation of "adjusting the temperature" to the abstract goal of "maintaining a healthy feeling", generating dynamic user intent features for precise control of the air conditioner.

[0096] Through the above-described solution, the embodiments of this application can accurately capture the dynamic changes in the hierarchical structure of user intent, enabling the generated dynamic user intent features to accurately reflect the gradual evolution of user behavior from specific operations to abstract goals, thereby improving the smart home system's adaptive understanding of user intent and the accuracy of device control.

[0097] See Figure 6This application also provides a smart home control device that can implement the above-described smart home control method. The device includes: The first module 601 is used to acquire user behavior data and device status data; The second module 602 is used to process user behavior data using a self-attention mechanism to capture the temporal dependency characteristics between user behaviors and obtain the first user feature. The third module 603 is used to perform correlation processing on user behavior data and device status data in order to capture the spatial correlation characteristics between user behavior and the controlled device and obtain the second user characteristics. The fourth module 604 is used to generate dynamic user intent features based on the first user features and the second user features; The fifth module 605 is used to dynamically control the controlled device based on dynamic user intent characteristics.

[0098] The specific implementation method of this smart home control device is basically the same as the specific implementation method of the smart home control method described above, and will not be repeated here.

[0099] Figure 7 This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application.

[0100] The following reference Figure 7 To describe an electronic device 700 according to such an embodiment of the present disclosure. Figure 7 The electronic device 700 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments disclosed herein.

[0101] like Figure 7 As shown, the electronic device 700 is presented in the form of a general-purpose computing device. The components of the electronic device 700 may include, but are not limited to: at least one processing unit 710, at least one storage unit 720, a bus 730 connecting different system components (including storage unit 720 and processing unit 710), a display unit 740, etc.

[0102] The storage unit stores program code, which can be executed by the processing unit 710, causing the processing unit 710 to perform the steps described in the above-described section on smart home control methods according to various exemplary embodiments of this disclosure.

[0103] Storage unit 720 may include a readable medium in the form of a volatile storage unit, such as random access memory (RAM) 7201 and / or cache memory 7202, and may further include a read-only memory (ROM) 7203.

[0104] The storage unit 720 may also include a program / utility 7204 having a set (at least one) program module 7205, such program module 7205 including but not limited to: an operating system, one or more application programs, other program modules and program data, each or some combination of these examples may include an implementation of a network environment.

[0105] Bus 730 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of the various bus structures.

[0106] Electronic device 700 can also communicate with one or more external devices 700' (e.g., keyboard, pointing device, Bluetooth device, etc.), and with one or more devices that enable a user to interact with electronic device 700, and / or with any device that enables electronic device 700 to communicate with one or more other computing devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 750. Furthermore, electronic device 700 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 760. Network adapter 760 can communicate with other modules of electronic device 700 via bus 730. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 700, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0107] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method.

[0108] The smart home control method, device, equipment, and medium provided in this application capture the temporal dependence characteristics of user behavior by employing a self-attention mechanism and generating dynamic user intent features by combining the spatial correlation characteristics of user behavior and device state. This enables adaptive dynamic control of the controlled device, effectively solving the problems of static user behavior modeling and scene automation relying on manual configuration. It has significant advantages in accurately identifying the dynamic evolution patterns of user behavior and multi-device collaborative linkage modes, improving service matching accuracy and system adaptability, and can improve the control accuracy of smart home control.

[0109] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, or network device, etc.) to execute the methods described above according to the embodiments of this disclosure.

[0110] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0111] Computer-readable storage media may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable storage medium may also be any readable medium other than a readable storage medium that can transmit, propagate, or transfer a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.

[0112] Those skilled in the art will understand that the above modules can be distributed in the device as described in the embodiments, or they can be modified accordingly and placed in one or more devices that are unique to this embodiment. The modules in the above embodiments can be combined into one module, or they can be further divided into multiple sub-modules.

[0113] Exemplary embodiments of this disclosure have been specifically shown and described above. It should be understood that this disclosure is not limited to the detailed structures, arrangements, or implementations described herein; rather, this disclosure is intended to cover various modifications and equivalent arrangements contained within the spirit and scope of the appended claims.

Claims

1. A smart home control method, characterized in that, include: Acquire user behavior data and device status data; The user behavior data is processed using a self-attention mechanism to capture the temporal dependency characteristics between user behaviors, thereby obtaining the first user feature; The user behavior data and the device status data are correlated to capture the spatial correlation characteristics between the user behavior and the controlled device, thereby obtaining a second user feature; Based on the first user characteristics and the second user characteristics, dynamic user intent characteristics are generated; Based on the dynamic user intent characteristics, the controlled device is dynamically controlled.

2. The smart home control method according to claim 1, characterized in that, The self-attention mechanism processing of the user behavior data includes: The user behavior data is subjected to time-series encoding to obtain user behavior encoding features; The user behavior encoding features are subjected to matrix transformation processing to obtain a self-attention query vector, a self-attention key vector, and a self-attention value vector; The first user feature is obtained by performing self-attention mechanism processing based on the self-attention query vector, the self-attention key vector, and the self-attention value vector.

3. The smart home control method according to claim 1, characterized in that, The association processing of the user behavior data and the device status data includes: Based on the user behavior data and the device status data, a dynamic relationship graph is constructed; Based on the dynamic relationship graph, the user behavior and the controlled device are analyzed to obtain spatial relationship features. Based on the spatial association features, the dynamic relationship graph is adjusted, and based on the adjusted dynamic relationship graph, the second user feature is generated.

4. The smart home control method according to claim 3, characterized in that, The process of performing correlation analysis on the user behavior and the controlled device based on the dynamic relationship graph includes: Based on the dynamic relationship graph, device node embedding vectors are generated; Feature extraction is performed on the device node embedding vector to capture the correlation characteristics between the user behavior and the controlled device, thereby obtaining device node state features; Based on the dynamic relationship graph and the device node state characteristics, the association strength between the user behavior and the controlled device is calculated to obtain the association strength value between the device nodes. The spatial association features are generated based on the association strength values ​​between the device nodes.

5. The smart home control method according to claim 1, characterized in that, The step of generating dynamic user behavior features based on the first user features and the second user features includes: The first user feature and the second user feature are fused to obtain the fused feature; Based on the statistical significance index of the fusion features, the fusion features are matched with preset user intent template features to query the corresponding user intent reference features. Based on a preset user intent hierarchy, the dynamic user intent features are obtained by performing intent hierarchy abstract reasoning on the fused features and the user intent reference features.

6. The smart home control method according to claim 5, characterized in that, The fusion processing of the first user feature and the second user feature includes: The first user feature is determined as the cross-attention query vector; The second user feature is transformed to obtain the cross-attention key vector and the cross-attention value vector; The fused feature is obtained by performing cross-attention processing based on the cross-attention query vector, the cross-attention key vector, and the cross-attention value vector.

7. The smart home control method according to claim 5, characterized in that, Performing intent-level abstract reasoning on the fused features and the user intent reference features includes: Based on the fusion features, feature embedding processing is performed on the user intent reference features to obtain user intent embedded features; The user intent embedding features are subjected to feature mapping processing, so that the user intent embedding features are mapped layer by layer along the hierarchical path of the user intent hierarchy to obtain the dynamic user intent features.

8. A smart home control device, characterized in that, include: The first module is used to acquire user behavior data and device status data; The second module is used to process the user behavior data using a self-attention mechanism to capture the temporal dependency characteristics between user behaviors and obtain the first user feature. The third module is used to perform correlation processing on the user behavior data and the device status data to capture the spatial correlation characteristics between the user behavior and the controlled device, and obtain the second user feature. The fourth module is used to generate dynamic user intent features based on the first user features and the second user features; The fifth module is used to dynamically control the controlled device based on the dynamic user intent characteristics.

9. An electronic device, characterized in that, The electronic device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the smart home control method according to any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the smart home control method according to any one of claims 1 to 7.