An intelligent home multi-device cooperative control method and system based on artificial intelligence
By constructing a knowledge graph of smart home devices, and based on spatial location and historical co-occurrence data, the adaptive collaborative link reconstruction of smart home devices under dynamic spatial reorganization is realized. This solves the problem of broken device collaborative control logic in existing technologies and ensures the consistency of collaborative control between devices with user habits.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHONGSHAN YANFENG LIGHTING TECH CO LTD
- Filing Date
- 2026-06-25
- Publication Date
- 2026-07-24
AI Technical Summary
Existing smart home multi-device collaborative control systems cannot adaptively reconstruct collaborative links when dynamically reorganizing spatial areas, resulting in the breakdown of collaborative control logic between devices and failing to reflect the implicit connections of user behavior habits.
By using artificial intelligence-based methods, a knowledge graph of device collaboration is constructed based on the spatial location and historical co-occurrence data of smart home devices. Semantic matching and real-time collaborative control link reconstruction are then performed, including device clustering, co-occurrence association strength calculation, functional label recognition, and trigger logic relationship analysis.
It enables adaptive reconstruction of the collaborative links of smart home devices under dynamic spatial reorganization, ensuring that the collaborative control logic between devices is consistent with user habits, avoiding the defects of static grouping, and realizing the rapid restoration of users' cross-device collaborative habits.
Smart Images

Figure CN122449984A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of multi-device collaborative control technology, and more specifically, to a smart home multi-device collaborative control method and system based on artificial intelligence. Background Technology
[0002] With the rapid development of IoT, 5G, and edge computing technologies, multi-device collaborative control has become a core capability in the fields of intelligent systems and automation. In smart home multi-device collaborative control, smart homes are moving from single-product intelligence to whole-house collaboration. Multi-device collaborative control aims to break down the barriers between home appliances and sensors of different brands and categories. Through a unified communication protocol and cloud / local hub, it enables the linkage perception and intelligent decision-making of devices such as lighting, temperature control, security, and audio-visual equipment. However, issues such as device heterogeneity, network latency fluctuations, and user privacy and security also place higher demands on distributed scheduling strategies, edge computing node deployment, and data encryption technologies.
[0003] In existing smart home multi-device collaborative control systems, the system collects environmental and user status data in real time through distributed sensors. This data is then fused and context-aware via a local gateway or cloud controller. Based on preset linkage rules, collaborative commands are generated for devices such as lights, air conditioners, curtains, and speakers. These commands are then distributed to each device via the home LAN for multi-device collaborative control. However, existing technologies typically group smart home devices by their physical installation location or by preset room divisions (e.g., living room, bedroom). This static spatial grouping ignores the behavior patterns of users frequently calling multiple devices across spaces and time periods in real-world scenarios (e.g., when walking from the bedroom to the bathroom at night, the bedroom light turns off, the hallway night light turns on, and the bathroom exhaust fan starts simultaneously). Since the collaborative needs between devices are essentially a projection of user behavior habits, static grouping cannot reflect this implicit association based on historical co-occurrence frequency. This results in a lack of adaptive reconstruction capability of the collaborative link when the spatial area is dynamically reorganized (e.g., devices originally belonging to different rooms are reconfigured to the same functional area), causing a break in the collaborative control logic of multiple smart home devices. Therefore, how to achieve adaptive reconstruction of the collaborative link of smart home devices under dynamic spatial reorganization has become a challenge for the industry. Summary of the Invention
[0004] This application provides a method and system for collaborative control of multiple smart home devices based on artificial intelligence, which can realize adaptive reconstruction of the collaborative links of smart home devices under dynamic reorganization of spatial areas.
[0005] In a first aspect, this application provides a method for collaborative control of multiple smart home devices based on artificial intelligence, comprising the following steps: Based on the spatial coordinates of each smart home device within the target home space, smart home devices belonging to the same spatial area are clustered into initial device spatial groups; For each initial device space group, the co-occurrence association strength between any smart home devices in the group is calculated based on the historical co-occurrence data of each smart home device in the initial device space group being collaboratively invoked. Then, the initial device space group is clustered twice using all the co-occurrence association strengths to obtain a device collaborative group with co-occurrence dependency relationship. Extract the device function tags of each smart home device in the device collaboration group, and identify the trigger logic relationship between the device function tags based on the historical time sequence data of each smart home device being collaboratively invoked. Then, construct a knowledge graph of device group collaboration based on the device function tags and the trigger logic relationship. When spatial areas are reorganized in the target home space, the smart home devices in the reorganized area are semantically matched with the device function tags in the knowledge graph, and the successfully matched smart home devices are driven to establish an instant collaborative control link across groups.
[0006] In some embodiments, clustering smart home devices belonging to the same spatial area into an initial device spatial group based on the spatial location coordinates of each smart home device within the target home space specifically includes: A spatial semantic grid is generated based on the floor plan of the target family space, and the installation coordinates of each smart home device in the spatial semantic grid are mapped into spatial coordinate vectors. Using the spatial coordinate vectors of each smart home device as input, a density-based spatial clustering algorithm is used to cluster devices within a set neighborhood radius according to their distribution density, outputting multiple initial spatial groupings of devices.
[0007] In some embodiments, for each initial device space group, calculating the co-occurrence association strength between any smart home devices within the group based on historical co-occurrence data of smart home devices being collaboratively invoked within the initial device space group specifically includes: Obtain historical operation logs of cross-smart home device collaborative calls within a preset statistical period, and extract the timestamps of any two smart home devices in the same initial device space group being called sequentially in the same collaborative scenario from the historical operation logs to construct a collaborative event time sequence for each smart home device; The time series of the collaborative events is truncated by a sliding time window. The co-occurrence frequency of collaborative calls between any two smart home devices within the sliding time window is calculated. The original co-occurrence association strength between the two smart home devices is calculated based on the co-occurrence frequency and the total frequency of independent calls to each of the two smart home devices. By introducing the spatial distance of each smart home device in the initial device spatial group within the spatial semantic grid as a decay factor, the original co-occurrence association strength is spatially constrained and corrected to obtain the co-occurrence association strength between any smart home devices.
[0008] In some embodiments, secondary clustering of the initial device spatial grouping based on all co-occurrence association strengths yields device co-occurrence dependency groups, specifically including: Using each smart home device in the initial device space group as a node and the co-occurrence association strength as the edge weight, a weighted undirected graph is constructed to describe the collaborative relationship of devices within the group; The weighted undirected graph is input into a community detection algorithm based on modularity for graph segmentation. The algorithm iteratively divides the node communities with the optimization objective of maximizing modularity gain, and outputs multiple candidate collaborative subgraphs. Calculate the average edge weight of each candidate collaborative subgraph, retain the candidate collaborative subgraphs whose average edge weight is greater than a preset collaborative threshold, and form a device collaborative group with co-occurrence dependency relationship using the smart home device nodes contained in the retained candidate collaborative subgraphs.
[0009] In some embodiments, extracting the device function tags of each smart home device within the device collaboration group specifically includes: Retrieve the device attribute description set of each smart home device registered on the Internet of Things platform within the device collaboration group, and parse the standardized functional identifiers representing the device capabilities from the device attribute description set; The standardized function identifiers are mapped in a preset home function semantic ontology library to obtain device function tags for each smart home device.
[0010] In some embodiments, identifying the trigger logic relationship between device function tags based on historical time-series data of the coordinated invocation of various smart home devices specifically includes: Obtain the timestamps of device status changes for each smart home device within the device collaboration group in historical collaboration call events, and align the timestamps of each device status change with their corresponding device function tags to form a collaborative event time sequence chain labeled with function tags; Perform time sequence pattern recognition on the collaborative event time sequence chain, extract the functional label sequence that meets the minimum support threshold, and determine the device functional label pairs that appear sequentially in the functional label sequence as candidate trigger pairs; The candidate trigger pairs are subjected to causal relationship verification in the coordinated event time sequence chain, and the candidate trigger pairs that pass the verification and have consistent causal directions are marked as trigger logical relationships.
[0011] In some embodiments, driving successfully matched smart home devices to establish an instant collaborative control link across groups specifically includes: Using the smart home devices that are successfully matched in the reorganized area as nodes, the trigger logic relationship paths between nodes are obtained from the knowledge graph of the device group collaboration, so as to construct a cross-group collaborative control directed topology; The coordinated control directed topology is compiled into linkage rule scripts that can be executed locally by each smart home device, and the linkage rule scripts are distributed to the corresponding smart home devices through the Internet of Things platform to establish a real-time coordinated control link across groups.
[0012] Secondly, this application provides an artificial intelligence-based smart home multi-device collaborative control system for executing an artificial intelligence-based smart home multi-device collaborative control method. The system includes: The initial clustering module is used to cluster smart home devices belonging to the same spatial area into initial device spatial groups based on the spatial location coordinates of each smart home device in the target home space. The secondary clustering module is used to calculate the co-occurrence association strength between any smart home devices in each initial device space group based on the historical co-occurrence data of each smart home device being collaboratively invoked within the initial device space group, and to perform secondary clustering on the initial device space group through all co-occurrence association strengths to obtain device collaborative groups with co-occurrence dependencies. The graph construction module is also used to extract the device function tags of each smart home device in the device collaboration group, and identify the trigger logic relationship between the device function tags based on the historical time series data of each smart home device being collaboratively called, and then construct a knowledge graph of device group collaboration based on the device function tags and the trigger logic relationship. The control link construction module is used to semantically match the smart home devices in the reorganized area with the device function tags in the knowledge graph when spatial area reorganization occurs in the target home space, and drive the successfully matched smart home devices to establish a cross-group instant collaborative control link.
[0013] Thirdly, this application provides a computer device, the computer device including a memory and a processor, the memory storing code, and the processor being configured to acquire the code and execute the above-described AI-based smart home multi-device collaborative control method.
[0014] Fourthly, this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the aforementioned AI-based smart home multi-device collaborative control method.
[0015] The technical solutions provided by the embodiments disclosed in this application have the following beneficial effects: The AI-based smart home multi-device collaborative control method and system provided in this application firstly clusters smart home devices belonging to the same spatial area into initial device spatial groups based on the spatial location coordinates of each smart home device within the target home space. Secondly, for each initial device spatial group, the co-occurrence association strength between any smart home devices within the group is calculated based on the historical co-occurrence data of each smart home device being collaboratively invoked. Then, the initial device spatial groups are further clustered using all co-occurrence association strengths to obtain device collaborative groups with co-occurrence dependencies. Next, device function tags for each smart home device within the collaborative group are extracted, and the triggering logic relationship between these tags is identified based on the historical time-series data of each smart home device being collaboratively invoked. A knowledge graph for device group collaboration is then constructed based on the device function tags and the triggering logic relationship. Finally, when spatial area reorganization occurs in the target home space, the smart home devices within the reorganized area are semantically matched with the device function tags in the knowledge graph, and the successfully matched smart home devices are driven to establish an instant collaborative control link across groups.
[0016] Therefore, this application can achieve adaptive reconstruction of the collaborative links of smart home devices under dynamic spatial reorganization. First, based on spatial location coordinates, devices are clustered into initial spatial groups. This is to aggregate scattered devices according to real physical regions for the first time, establishing a basic subordinate mapping between devices and spatial regions, defining meaningful computational boundaries for subsequent co-occurrence association analysis, and avoiding invalid statistics between devices across regions. Second, based on historical co-occurrence data, the co-occurrence association strength is calculated and secondary clustering is performed to obtain device collaborative groups. This allows for further exploration of high-frequency collaborative device combinations driven by user behavior based on spatial proximity, and the introduction of a spatial distance attenuation factor to eliminate spurious associations caused by physical barriers. This ensures that the final grouping has both statistical significance of temporal co-occurrence and spatial rationality of collaborative response, avoiding the implicit associations that static grouping cannot reflect historical co-occurrence frequency. Then, device function tags are extracted and trigger logic is identified based on historical time-series data. This system constructs a knowledge graph, which abstracts the diverse attributes of heterogeneous devices into unified functional semantic tags. It then precisely extracts directional triggering rules between devices from a temporal causal perspective. Furthermore, it systematizes scattered collaborative knowledge into a reasonable and reusable semantic network using a graph structure, overcoming the limitation of traditional rule engines that cannot represent causal directions. Finally, it performs semantic matching and establishes cross-group real-time collaborative control links during spatial area reorganization. When physical walls or room function changes cause the original group boundaries to fail, it can automatically align devices in the new area with functional entities in the knowledge graph and instantly compile local linkage rules using the accumulated causal paths. This allows for rapid recovery and continuation of users' cross-device collaborative habits after dynamic spatial changes without the need for re-collecting data or retraining models, thus achieving adaptive reconstruction capabilities for the collaborative links. In summary, the technical solution provided in this application can achieve adaptive reconstruction of smart home device collaborative links under dynamic spatial area reorganization. Attached Figure Description
[0017] Figure 1 This is an application scenario diagram of an AI-based smart home multi-device collaborative control method according to some embodiments of this application; Figure 2 This is an exemplary flowchart of an AI-based smart home multi-device collaborative control method according to some embodiments of this application; Figure 3 This is an exemplary flowchart illustrating the determination of device cooperative grouping according to some embodiments of this application; Figure 4 This is a schematic diagram of the structure of an AI-based smart home multi-device collaborative control system according to some embodiments of this application; Figure 5 This is a schematic diagram of the structure of a computer device that implements an AI-based smart home multi-device collaborative control method according to some embodiments of this application. Detailed Implementation
[0018] To better understand the technical solution of this application, the technical solution of this application will be described in detail below with reference to the accompanying drawings and specific embodiments.
[0019] refer to Figure 1 This diagram illustrates an application scenario of an AI-based smart home multi-device collaborative control method according to some embodiments of this application. The diagram shows three core functional modules arranged from left to right. The left side represents the smart home device group, within which are arranged three sub-units: living room devices, bedroom devices, and other devices. These other devices include, but are not limited to, kitchen and bathroom devices and audio-visual devices. The middle section represents the collaborative control center, serving as the system's central computing and scheduling core. It establishes bidirectional interactive links with the left and right sides via bidirectional arrows. This allows it to receive data such as operating status and historical operations uploaded by the smart home device group, and simultaneously issue collaborative control commands to the device group. It also enables bidirectional data exchange with the collaborative knowledge graph on the right, facilitating rule retrieval and logic updates. The collaborative knowledge graph on the right, as the system's rule and logic support layer, provides the collaborative control center with core data support such as device function tags, linkage trigger logic, and historical co-occurrence associations. This clearly presents the linkage relationship and operating logic between the terminal device cluster, the central control unit, and the rule knowledge base in this solution.
[0020] refer to Figure 2 The figure is an exemplary flowchart of a multi-device collaborative control method for smart homes based on artificial intelligence, according to some embodiments of this application. The figure mainly includes the following steps: In step S101, smart home devices belonging to the same spatial area are clustered into initial device spatial groups based on the spatial location coordinates of each smart home device within the target home space.
[0021] It should be noted that, in this application, smart home devices refer to networked terminal products deployed in the home environment that have sensing, communication, computing, and execution capabilities, such as smart light bulbs, smart air conditioners, smart curtain motors, smart humidifiers, and smart door locks. These devices collect environmental or user status data through built-in sensing modules, connect to the Internet of Things (IoT) platform via wired or wireless communication protocols, and adjust their own functional attributes according to preset logic or remote commands to achieve intelligent management and services for the living space through automatic response or coordinated linkage.
[0022] In some embodiments, clustering smart home devices belonging to the same spatial area into initial device spatial groups based on the spatial location coordinates of each smart home device within the target home space is achieved through the following steps: A spatial semantic grid is generated based on the floor plan of the target family space, and the installation coordinates of each smart home device in the spatial semantic grid are mapped into spatial coordinate vectors. Using the spatial coordinate vectors of each smart home device as input, a density-based spatial clustering algorithm is used to cluster devices within a set neighborhood radius according to their distribution density, outputting multiple initial spatial groupings of devices.
[0023] In specific implementation, firstly, the floor plan of the target family space is obtained. This floor plan is two-dimensional vector data describing the boundaries and connectivity of functional areas within the family space. The floor plan is discretized into multiple grid units using a spatial semantic grid partitioning method, forming a spatial semantic grid. This spatial semantic grid is a spatial index structure that divides continuous physical space into discrete units at a fixed granularity and labels each unit with its corresponding room type. The physical location points of each smart home device, determined during installation, are then coordinate-registered with the spatial semantic grid, mapping their installation coordinates into spatial coordinate vectors containing spatial coordinate values and semantic label information. These spatial coordinate vectors are multi-dimensional feature arrays composed of the device's horizontal and vertical coordinates within the spatial semantic grid and the room type field labeled by the grid. Then, based on the spatial coordinate vectors corresponding to each smart home device, a density-based spatial clustering algorithm, such as DBSCAN, is used. This spatial clustering algorithm uses the spatial coordinates of each smart home device... The Euclidean distance between vectors is used as a similarity measure to detect the density connectivity region of smart home device distribution within a set neighborhood radius. The neighborhood radius is the Euclidean distance threshold parameter used in the DBSCAN algorithm to determine whether two devices belong to the same density region. Specifically, starting from the spatial coordinate vector of each smart home device, the number of devices contained in a circular area with the vector as the center and the neighborhood radius as the range is counted, i.e., the density. Spatial coordinate vectors with a density exceeding a preset threshold are marked as core points. The core point is a spatial coordinate vector containing a number of devices within the neighborhood radius that is not less than the preset threshold, representing the center of the density region. Starting from the core point, the density-reachable spatial coordinate vectors within the neighborhood radius are iteratively grouped into the same cluster. Density reachability refers to the reachable path relationship of all spatial coordinate vectors that can be connected through other core points directly or indirectly connected within the neighborhood radius starting from a core point. Finally, the smart home devices corresponding to each cluster of successfully clustered spatial coordinate vectors are output as the initial device spatial grouping.
[0024] It should be noted that the initial device space grouping in this application refers to a set of smart home devices that are closely distributed within the same physical space area. By determining the initial device space grouping, the smart home devices scattered in the target home space can be aggregated for the first time according to the actual functional area to which their physical installation location belongs, thereby establishing the most basic subordinate mapping relationship between the devices and the space area.
[0025] In step S102, for each initial device space group, the co-occurrence association strength between any smart home devices in the group is calculated based on the historical co-occurrence data of each smart home device being collaboratively invoked within the initial device space group. Then, the initial device space group is clustered a second time using all the co-occurrence association strengths to obtain a device collaborative group with co-occurrence dependency relationship.
[0026] In some embodiments, for each initial device space group, the co-occurrence association strength between any smart home devices in the group is calculated based on the historical co-occurrence data of the coordinated invocation of each smart home device in the initial device space group using the following steps: Obtain historical operation logs of cross-smart home device collaborative calls within a preset statistical period, and extract the timestamps of any two smart home devices in the same initial device space group being called sequentially in the same collaborative scenario from the historical operation logs to construct a collaborative event time sequence for each smart home device; The time series of the collaborative events is truncated by a sliding time window. The co-occurrence frequency of collaborative calls between any two smart home devices within the sliding time window is calculated. The original co-occurrence association strength between the two smart home devices is calculated based on the co-occurrence frequency and the total frequency of independent calls to each of the two smart home devices. By introducing the spatial distance of each smart home device in the initial device spatial group within the spatial semantic grid as a decay factor, the original co-occurrence association strength is spatially constrained and corrected to obtain the co-occurrence association strength between any smart home devices.
[0027] In specific implementation, firstly, historical operation logs of cross-smart home device collaborative calls within a preset statistical period are obtained. These historical operation logs are time-series data entries recorded by the IoT platform for each device status change request, including the trigger source device identifier, the execution target device identifier, the operation timestamp, and the collaborative scenario identifier fields. From these historical operation logs, the timestamps of any two smart home devices within the same initial device space group being called sequentially in the same collaborative scenario are extracted. This is used to construct a collaborative event time sequence for each smart home device. The collaborative event time sequence considers each device as either the initiating device or the subsequent device participating in the collaborative call. The system first generates an ordered set of time points based on the events' occurrence times. Then, a sliding time window is used to extract the time sequence of the collaborative events. The sliding time window is an observation interval that moves along the time axis with a fixed step size and has a fixed time span. The specific time span can be set according to actual needs. For example, this application sets it to a time span of 5 minutes and a sliding step size of 1 minute. At each sliding window position, the co-occurrence frequency of any two smart home devices appearing together in the same collaborative call event within the sliding window interval is counted. The co-occurrence frequency refers to the cumulative number of times the two devices appear as a collaborative pair within the time period covered by the same sliding window. Simultaneously, based on the aforementioned co-occurrence frequency and the total frequency of each of the two smart home devices being independently invoked, a point mutual information model is used to calculate the original co-occurrence association strength between the two smart home devices. The point mutual information model is a statistical model that measures the degree of association by taking the logarithm of the ratio of the product of the actual joint occurrence probability and the individual independent occurrence probability of the two devices. The original co-occurrence association strength is the association quantification value output by this model, used to characterize the logical tightness of the collaborative invocation of the two devices driven by the user's daily behavior patterns. For example, if the co-occurrence frequency of smart bulb A and smart curtain motor B within the statistical period is significantly higher than when they are randomly triggered independently... The expected number of co-occurrences is used to assign a higher initial co-occurrence association strength value between A and B based on the mutual information model. Finally, the spatial distance between each smart home device in the initial device spatial group within the spatial semantic grid is introduced as a decay factor. The spatial distance is a spatial proximity metric obtained by calculating the Euclidean distance between the spatial coordinate vectors mapped by two devices. A spatial decay function is constructed using this spatial distance to weight and correct the original co-occurrence association strength, incorporating the physical proximity of the devices into the association calculation, to obtain the final co-occurrence association strength used to characterize the degree of device collaboration. The spatial decay function can adopt an exponential decay form, specifically: ,in, This represents the Euclidean distance between the spatial coordinate vectors of two smart home devices in the spatial semantic grid. The attenuation coefficient is used to adjust the influence of spatial distance on the correlation strength. This parameter is calibrated based on actual spatial scale and empirical data, and the above spatial attenuation function is used as the attenuation factor. Multiplying this by the original co-occurrence correlation strength yields the co-occurrence correlation strength after spatial constraint correction.
[0028] It should be noted that the co-occurrence strength in this application is used to characterize the degree of closeness of the collaborative dependency relationship between any two smart home devices within the same initial device spatial group under the dual factors of user behavior habits and physical proximity. This embodiment corrects the original statistical value by introducing a spatial distance decay factor, which effectively eliminates false high correlations caused only by temporal randomness. This provides accurate edge weight inputs that conform to actual physical constraints for the subsequent secondary clustering of the initial device spatial group by the community detection algorithm based on modularity. This ensures that the finally generated device collaborative group not only respects the multi-device linkage behavior patterns formed by users over a long period of time, but also ensures that the devices within the group have physical rationality for collaborative response in space.
[0029] In some embodiments, reference Figure 3 As shown in the figure, this is an exemplary flowchart of determining device co-grouping according to some embodiments of this application. In this embodiment, the initial device spatial grouping is clustered twice by all co-occurrence association strengths to obtain device co-grouping with co-occurrence dependencies. This can be achieved by the following steps: In step S1021, a weighted undirected graph describing the collaborative relationship between devices within the group is constructed, with each smart home device in the initial device space group as a node and the co-occurrence association strength as the edge weight. In step S1022, the weighted undirected graph is input into a community detection algorithm based on modularity for graph segmentation. The algorithm iteratively divides the node communities with the optimization objective of maximizing modularity gain, and outputs multiple candidate collaborative subgraphs. In step S1023, the average edge weight of each candidate collaborative subgraph is calculated, and the candidate collaborative subgraphs with the average edge weight greater than the preset collaborative threshold are retained. The smart home device nodes contained in the retained candidate collaborative subgraphs are used to form a device collaborative group with co-occurrence dependency relationship.
[0030] In specific implementation, firstly, using each smart home device within the initial device space group as a node and the co-occurrence association strength calculated between any two devices as edge weights, a weighted undirected graph is constructed to describe the collaborative relationships between devices within the group. This weighted undirected graph is a graph data structure with devices as vertices and collaborative association strength as edges, and the edges are undirected, used to characterize the topological relationships of collaborative dependencies among all devices within the same spatial region. Then, this weighted undirected graph is input into a modularity-based community detection algorithm for graph segmentation. This modularity-based community detection algorithm compares the edge density within a community in the graph with... A greedy clustering method that evaluates the quality of community partitioning based on the difference in random expected edge density uses the Louvain algorithm to perform iterative optimization on a weighted undirected graph. In the first phase, the Louvain algorithm traverses each node, calculating the modularity gain resulting from moving the node from its current community to the community of its neighboring nodes. The modularity gain is the change in the proportion of edge weights within a community relative to the expected random connections after the node is moved. The node is then assigned to the neighboring community that produces the maximum positive gain. This process is repeated until the community affiliation of all nodes no longer changes. In the second phase, each community partitioned in the first phase is compressed into a supernode. The edge weights between nodes and supernodes are the sum of the weights of all edges between the original communities, forming a new weighted undirected graph. This two-stage iteration is repeated until the modularity gain no longer increases. Finally, the converged communities are output as multiple candidate collaborative subgraphs. Each candidate collaborative subgraph corresponds to a subset of nodes in the original weighted undirected graph composed of closely cooperating devices and their internal edges. Finally, the average edge weight of each candidate collaborative subgraph is calculated. The average edge weight is the arithmetic mean of the co-occurrence association strengths corresponding to all edges within the candidate collaborative subgraph, reflecting the overall level of close collaboration between devices within the subgraph. Subgraphs with average edge weights greater than [a certain value] are selected. Candidate collaborative subgraphs with a preset collaborative threshold are retained. The preset collaborative threshold is the minimum average correlation threshold that distinguishes between devices with real collaborative dependencies and those with false collaborative relationships formed only by weak correlations or noise. The set of smart home device nodes contained in the retained subgraph constitutes a device collaborative group with co-occurrence dependencies. For example, smart light bulbs, smart curtain motors and smart TVs in the living room area have a high co-occurrence correlation strength. The Louvain algorithm will classify them into the same candidate collaborative subgraph, and the average edge weight of the subgraph exceeds the preset collaborative threshold. The three are then identified as the same device collaborative group.
[0031] It should be noted that the device collaboration grouping described in this application refers to a combination of devices that users habitually use in conjunction with each other in their daily living behavior and that have physical rationality in terms of spatial location for collaborative response. The initial device spatial grouping is only a rough division of areas based on the physical proximity of the device installation coordinates, which cannot reflect whether there is a real user collaboration need between devices in the same area. For example, a smart speaker and a smart TV in the same living room may frequently work together due to user habits, but a smart humidifier and a smart door lock in the same living room, although located in the same spatial area, have almost no collaboration scenarios. Therefore, it is necessary to use the co-occurrence association strength as a quantitative basis and perform secondary clustering within the initial grouping through a community discovery algorithm to remove weakly associated devices that are only assigned to the same group by spatial chance, thereby identifying the collaborative subset that is truly driven by user behavior. This provides node organization units with actual collaborative semantics for the subsequent construction of a knowledge graph, avoids the generation of erroneous collaborative links caused by spatial location matching alone, and ensures the accuracy and scenario rationality of cross-group real-time collaborative control.
[0032] In step S103, the device function tags of each smart home device in the device collaboration group are extracted, and the trigger logic relationship between the device function tags is identified based on the historical time sequence data of each smart home device being collaboratively invoked. Then, a knowledge graph of device group collaboration is constructed based on the device function tags and the trigger logic relationship.
[0033] In some embodiments, extracting the device function tags of each smart home device within the device collaboration group is achieved using the following steps: Retrieve the device attribute description set of each smart home device registered on the Internet of Things platform within the device collaboration group, and parse the standardized functional identifiers representing the device capabilities from the device attribute description set; The standardized function identifiers are mapped in a preset home function semantic ontology library to obtain device function tags for each smart home device.
[0034] In specific implementation, firstly, the device attribute description set reported by each smart home device during platform registration is retrieved through the device shadow provided by the IoT platform. This device attribute description set is a structured metadata record containing the device manufacturer, model, list of supported service capabilities, and attribute parameter definitions for each service capability. Standardized functional identifiers representing device capabilities are extracted from this device attribute description set using keyword matching and pattern parsing. These standardized functional identifiers uniformly adopt the device capability codes defined in the IoT platform's object model specification. For example, lighting devices correspond to the "LightSwitch" capability identifier, curtain motors correspond to the "CurtainControl" capability identifier, and temperature control devices correspond to the "TemperatureControl" capability identifier; further details are omitted here. Then, these standardized functional identifiers are conceptually mapped in a pre-defined home function semantic ontology library. The library is a pre-constructed network knowledge structure with home device function concepts as nodes and semantic relationships between functions as edges. It includes major functional categories such as "lighting adjustment", "shading control", "ambient temperature control", "security monitoring", and "audio-visual playback" and their sub-concept levels. The mapping process uses a string similarity matching algorithm based on edit distance to calculate the similarity between the device function tag and the tag name of each concept in the ontology library. The concept node with the highest similarity and exceeding the preset matching threshold is selected as the mapping target. The parent function category and synonymous function aliases of the concept node in the ontology library are also extracted. Finally, the device function tags of each smart home device are obtained. For example, the device function tag "LightSwitch" of a smart bulb is mapped to the concept "lighting adjustment" in the ontology library through similarity matching. The device function tag is "lighting adjustment". This tag also inherits the semantic associations between the device function concepts such as "curtain control" and "scene linkage" defined in the ontology library.
[0035] It should be noted that the device function label in this application refers to the labeling result of the function category with clear semantic positioning. This embodiment abstracts the functions of heterogeneous devices of different manufacturers, models and communication protocols through unified semantic labels, eliminating the heterogeneity of manufacturers and naming differences in the original attribute descriptions of devices. This can provide a standardized input object for subsequent identification of the trigger logic relationship between device function labels based on historical time series data, so that the mining of trigger logic can be carried out at the functional semantic level rather than the device instance level. At the same time, as an entity node in the knowledge graph, the label can perform functional semantic matching on newly added devices when spatial regions are reorganized, so that the collaborative control link can be constructed across groups based on the semantic equivalence of function labels rather than device identity identifiers, thereby ensuring that the system can still reuse the learned collaborative knowledge when devices are replaced or added.
[0036] In some embodiments, identifying the trigger logic relationship between device function tags based on historical time-series data of the coordinated invocation of various smart home devices is achieved through the following steps: Obtain the timestamps of device status changes for each smart home device within the device collaboration group in historical collaboration call events, and align the timestamps of each device status change with their corresponding device function tags to form a collaborative event time sequence chain labeled with function tags; Perform time sequence pattern recognition on the collaborative event time sequence chain, extract the functional label sequence that meets the minimum support threshold, and determine the device functional label pairs that appear sequentially in the functional label sequence as candidate trigger pairs; The candidate trigger pairs are subjected to causal relationship verification in the coordinated event time sequence chain, and the candidate trigger pairs that pass the verification and have consistent causal directions are marked as trigger logical relationships.
[0037] In specific implementation, firstly, the device state change timestamps of each smart home device within the device collaboration group in historical collaboration call events are obtained. These device state change timestamps are ordered time points recording the specific moments when each smart home device undergoes a state transition in each collaboration call event. Then, each device state change timestamp is time-aligned with its corresponding device function tag; that is, each device state change timestamp is appended with its corresponding device function tag according to the timeline, forming a collaboration event time sequence chain with function tag annotations. This collaboration event time sequence chain arranges the state changes of all smart home devices within the same device collaboration group according to global timestamps. The sequence is composed of symbolic time series consisting of functional labels corresponding to a triggering action at each time point. Then, a sequence pattern mining algorithm is used to identify the temporal pattern of this collaborative event time series chain. Specifically, the PrefixSpan algorithm is used. This algorithm recursively starts with a prefix of length 1, scans the sequence database to find all frequently occurring successor functional labels starting with the current prefix, and each expansion appends labels that meet the minimum support threshold to the prefix to form a longer functional label sequence. The minimum support threshold is the minimum percentage parameter required to determine whether the frequency of a functional label sequence in the entire collaborative event time series chain is sufficient to constitute a statistically significant pattern. All functional label sequences that meet the minimum support threshold are extracted from the mining results. From these sequences, pairs of device functional labels appearing sequentially are identified as candidate trigger pairs. Each candidate trigger pair is an ordered binary consisting of a preceding trigger functional label and a following response functional label, representing a potential trigger-response relationship that has not yet been causally verified. Finally, the causal relationship of the candidate trigger pairs is tested in the coordinated event time sequence chain using the Granger causality test. This test uses the time series of state changes of the device corresponding to the preceding functional label in the candidate trigger pair as the explanatory variable, and the time series of state changes of the device corresponding to the following functional label as the explanatory variable. Listing the variables as response variables, constructing a vector autoregressive model and calculating whether the contribution of the prediction error variance of the preceding sequence to the following sequence is statistically significant. Candidate trigger pairs that pass the Granger causality test and whose causal direction is consistent with the order of the candidate trigger pairs are marked as trigger logical relationships. For example, if the device function labels "lighting adjustment" and "curtain control" frequently appear in the coordinated event time sequence chain in the order of "lighting adjustment" followed by "curtain control", and the Granger causality test confirms that the state change of "lighting adjustment" has a significant predictive ability for the state change of "curtain control", then "lighting adjustment → curtain control" is marked as a trigger logical relationship.
[0038] It should be noted that the triggering logic relationship in this application refers to the directional association rule in which the state change of the function label of the front-end device has a statistically significant causal driving force on the state change of the function label of the back-end device. The statistical correlation between devices reflected by the co-occurrence association strength cannot distinguish who is the triggerer and who is the responder in the collaborative event. For example, the frequent co-occurrence of smart light bulbs and smart curtain motors may be the result of simultaneous manual control by the user, or it may be caused by one party triggering the other due to the system's automated linkage. It is necessary to separate the true causal orientation from the chronological order of the time series. Therefore, Granger causality test and other methods are used to conduct rigorous statistical inference on candidate trigger pairs to eliminate false associations and reverse causality, so as to provide directed edge input with causal direction for constructing a knowledge graph of device group collaboration, and ensure that the execution logic of collaborative actions conforms to the causal order of device linkage contained in the user's long-term behavior.
[0039] In some embodiments, the knowledge graph for device group collaboration based on device function tags and triggering logic relationships is constructed using the following steps: Using the device function tags as entity nodes and the triggering logic relationships as directed edges, an initial collaborative directed graph is constructed; The group identifier of the device collaboration group is introduced into the initial collaboration directed graph as a hierarchical node, and the device function label entity nodes belonging to the same device collaboration group are connected to the corresponding hierarchical node through the affiliation relationship edge to form a knowledge graph of device group collaboration with a group hierarchical structure.
[0040] In specific implementation, firstly, the device function tags are used as entity nodes, which are the basic building blocks representing independent home function concepts in the knowledge graph. The triggering logic relationships are used as directed edges, which are connecting lines representing the causal driving direction in the form of arrows pointing from the triggering function tag to the responding function tag. All triggering logic relationships within the same device collaboration group are connected to the corresponding entity nodes by directed edges to construct an initial collaborative directed graph. The initial collaborative directed graph is a semantic network structure with home function concepts as vertices and inter-function triggering causality as arcs, used to represent the collaborative reasoning link at the abstract function level. Then, the group identifier of the device collaboration group is introduced into the initial collaborative directed graph as a hierarchical node. The hierarchical node is an aggregated node in the knowledge graph used to represent the device collaboration group as an organizational unit and can attach lower-level entity nodes. The device function tag entity nodes belonging to the same device collaboration group are connected to the corresponding hierarchical nodes through affiliation relationship edges. The affiliation relationship edge is a unidirectional membership connection line connecting entity nodes and hierarchical nodes and representing the semantics of "function belongs to a certain collaboration group". This forms a knowledge graph of device group collaboration with a hierarchical group structure.
[0041] It should be noted that the knowledge graph for device group collaboration in this application refers to the cross-device collaborative linkage knowledge formed by users' long-term usage behavior among smart home devices in different physical space areas, which has a causal direction. This knowledge graph for device group collaboration contains a three-layer semantic network data structure, which includes functional layer entity nodes, causal layer directed edges, and group layer hierarchical nodes and their affiliation relationships. This graph not only preserves the trigger causal chain between functional tags, but also organizes and aggregates functional entities according to collaborative groups. By determining the knowledge graph for device group collaboration, the collaborative knowledge learned from historical data can be structured and precipitated into a queryable and reasonable graph structure knowledge base, making the management and reuse of trigger rules independent of specific device instances. On the other hand, when the spatial area is reorganized, by performing semantic matching of the functional tags of newly added devices and locating their group context in the knowledge graph, the trigger logic relationship path belonging to that group can be quickly extracted, directly driving the compilation and establishment of cross-group real-time collaborative control links. Thus, after the addition or removal of devices or changes in space, the accurate migration and dynamic adaptation of collaborative logic can be achieved without retraining the model.
[0042] In step S104, when spatial area reorganization occurs in the target home space, the smart home devices in the reorganized area are semantically matched with the device function tags in the knowledge graph, and the successfully matched smart home devices are driven to establish an instant collaborative control link across groups.
[0043] In some embodiments, when spatial areas are reorganized within the target home space, semantic matching of smart home devices within the reorganized area with device function tags in the knowledge graph is achieved using the following steps: When a regional reorganization event triggered by spatial structure adjustment is detected in the target home space, the device function tags of each smart home device contained in the reorganized area are obtained, and each device function tag is mapped to the reorganized device function tag in the home function semantic ontology library. Calculate the semantic similarity between the functional tags of the recombined device and each entity node in the knowledge graph; The device function tags corresponding to entity nodes with semantic similarity higher than a preset matching threshold are identified as successfully matched tags.
[0044] In specific implementation, firstly, when a regional reorganization event is detected in the target home space due to spatial structural adjustments such as changes in room functions, the regional reorganization event is a structural change notification triggered by the update of the spatial semantic grid, indicating that the boundaries of one or more original spatial regions have been redefined. The smart home devices within the reorganized spatial semantic grid are retrieved by accessing the list of smart home devices in the reorganized area, and their device function tags are obtained using the same object model parsing method as the aforementioned extraction steps. Each device function tag is then mapped to a reorganized device function tag in the home function semantic ontology. Next, the semantic similarity between the reconstructed device function tags of each smart home device in the reorganized area and the device function tags represented by each entity node in the knowledge graph of the device group collaboration is calculated. This semantic similarity is a quantitative matching index obtained using a text similarity calculation method based on word vectors. Specifically, a pre-trained word embedding model such as Word2Vec or BERT is used to compare the two functions... Each tag is encoded into a semantic vector, and then the cosine similarity (i.e., semantic similarity) between two semantic vectors is calculated. Cosine similarity is a normalized inner product that measures the degree of directional consistency between two vectors in the vector space. The closer the value is to 1, the more similar the semantics. Finally, the device function tags corresponding to entity nodes with semantic similarity higher than a preset matching threshold are determined as successfully matched tags. The preset matching threshold is the minimum similarity limit parameter for determining that two function tags can be considered functionally equivalent at the semantic level. For example, a new smart light bulb in the reorganized area is identified as having the device function tag "lighting control" through the object model. This tag is encoded into semantic vectors along with the existing entity node "lighting adjustment" in the knowledge graph through a pre-trained word embedding model. The cosine similarity between the two is calculated. If the similarity is higher than the preset matching threshold, the entity node "lighting adjustment" in the knowledge graph is determined as a successfully matched tag for "lighting control". This establishes a semantic mapping relationship between the reorganized device and the existing functional entities in the knowledge graph.
[0045] It should be noted that, in this application, the "successfully matched label" refers to the device function label entity node in the knowledge graph that is semantically equivalent to the function of the new smart home device. It is used to represent the semantic correspondence between the new device and the existing functional concepts in the knowledge graph. Its core role is to establish a mapping bridge between the physical device instances in the reorganized area and their corresponding functional abstract entities in the knowledge graph. This allows the system to use the "successfully matched label" as an entry point to locate the device collaboration group and its associated triggering logic path in the knowledge graph. As a result, the system can directly reuse the collaboration knowledge already accumulated in the knowledge graph without having to re-execute the complete collaboration pattern mining process for the new device. This provides the correct causal rule source and group context attribution for the compilation of subsequent cross-group real-time collaborative control links.
[0046] In some embodiments, the establishment of an instant collaborative control link across groups by driving successfully matched smart home devices is achieved through the following steps: Using the smart home devices that are successfully matched in the reorganized area as nodes, the trigger logic relationship paths between nodes are obtained from the knowledge graph of the device group collaboration, so as to construct a cross-group collaborative control directed topology; The coordinated control directed topology is compiled into linkage rule scripts that can be executed locally by each smart home device, and the linkage rule scripts are distributed to the corresponding smart home devices through the Internet of Things platform to establish a real-time coordinated control link across groups.
[0047] In specific implementation, firstly, all smart home devices within the recombined area that have been confirmed by semantically matched tags are taken as nodes. These nodes are control endpoints representing specific physical device instances in the collaborative control network. The reachable triggering logical relationship paths between nodes are obtained from the knowledge graph of the device group collaboration. These triggering logical relationship paths are sequences of nodes that can be reached from one entity node corresponding to a successfully matched tag in the directed graph of the knowledge graph, traversing along directed edges to another entity node with a successfully matched tag. Specifically, graph traversal algorithms such as depth-first search are used to enumerate paths in the directed graph. During the search process, the path is determined by the matching... Using the set of successfully matched tags as the starting and ending constraints, only paths where both the starting and ending nodes belong to the successfully matched tags and all intermediate nodes in the intermediate path have directed connectivity in the knowledge graph are retained. All valid paths are merged to construct a cross-group collaborative control directed topology. This collaborative control directed topology is a local control relationship graph with successfully matched devices in the reorganized region as vertices and triggering causal paths extracted from the knowledge graph as arcs, describing the linkage triggering order that should be established between devices in the reorganized region. Then, this collaborative control directed topology is compiled into a linkage rule script that can be executed locally by each smart home device. The script uses an automation rule description language supported by the IoT platform, such as a JSON-based rule expression-based set of device-local linkage instructions. The compilation process traverses each directed arc in the collaborative control directed topology, extracting the device identifier and trigger state conditions corresponding to the starting device of the arc, and the device identifier and target execution action corresponding to the ending device of the arc. Each directed arc is transformed into a conditional trigger rule entry: "If the starting device's state changes to the trigger value, then the ending device executes a response action." This is then aggregated by device dimension to form a list of events that each device needs to subscribe to and instructions that need to be executed. These instructions are then transmitted through the IoT platform's devices. The shadow distributes the linkage rule script to the gateway edge node of the corresponding smart home device to complete the deployment, so as to establish a real-time collaborative control link across groups. For example, the reorganized area contains smart bulbs that originally belonged to the living room group and smart curtain motors that originally belonged to the bedroom group. The directed trigger path of "lighting adjustment → curtain control" is extracted from the knowledge graph, compiled, and deployed on the smart bulbs with status listening rules and on the smart curtain motors with response execution rules. When the smart bulbs are turned on, the smart curtain motors are triggered to turn off, thereby establishing a low-latency collaborative control link between local devices without cloud intervention.
[0048] It should be noted that the cross-group real-time collaborative control link in this application is a closed-loop control path for devices from different original collaborative groups within the reorganized area to achieve localized autonomous linkage based on causal rules accumulated in the knowledge graph. The determination of the cross-group real-time collaborative control link is that when the original spatial group boundaries are broken due to the physical structure adjustment of the target home space and devices from different groups are reassigned to the same reorganized area, the causal triggering path of cross groups can be automatically extracted from the constructed knowledge graph and compiled into linkage rules that can be executed locally by the devices in real time. This allows devices that originally belonged to different collaborative groups to establish an autonomous collaborative control closed loop in the new reorganized spatial area in real time. Thus, without the need to recollect historical data or retrain the model, the device linkage behavior habits accumulated by users in the original groups can be seamlessly continued after the spatial change.
[0049] Furthermore, in another aspect of this application, in some embodiments, this application provides an artificial intelligence-based smart home multi-device collaborative control system, see reference. Figure 4 The figure is a schematic diagram of the structure of an AI-based smart home multi-device collaborative control system according to some embodiments of this application. The AI-based smart home multi-device collaborative control system includes: an initial clustering module 201, a secondary clustering module 202, a graph construction module 203, and a control link construction module 204, which are described below: The initial clustering module 201 in this application is mainly used to cluster smart home devices belonging to the same spatial area into initial device spatial groups based on the spatial location coordinates of each smart home device in the target home space. The secondary clustering module 202 in this application is mainly used to calculate the co-occurrence association strength between any smart home devices in each initial device space group based on the historical co-occurrence data of each smart home device being collaboratively called within the initial device space group, and to perform secondary clustering on the initial device space group through all the co-occurrence association strengths to obtain a device collaborative group with co-occurrence dependency relationship. The graph construction module 203 in this application is mainly used to extract the device function tags of each smart home device in the device collaboration group, and to identify the trigger logic relationship between the device function tags based on the historical time series data of each smart home device being collaboratively called, and then to construct a knowledge graph of device group collaboration based on the device function tags and the trigger logic relationship. The control link construction module 204 in this application is mainly used to perform semantic matching between the smart home devices in the reorganized area and the device function tags in the knowledge graph when spatial area reorganization occurs in the target home space, and drive the successfully matched smart home devices to establish a cross-group instant collaborative control link.
[0050] In addition, this application also provides a computer device, which includes a memory and a processor. The memory stores code, and the processor is configured to acquire the code and execute the above-described AI-based smart home multi-device collaborative control method.
[0051] In some embodiments, reference Figure 5 The figure is a schematic diagram of the structure of a computer device implementing an AI-based smart home multi-device collaborative control method according to some embodiments of this application. The AI-based smart home multi-device collaborative control method in the above embodiments can... Figure 5 The computer device shown is used to implement this, and the computer device includes at least one processor 301, a communication bus 302, a memory 303, and at least one communication interface 304.
[0052] The processor 301 can be a general-purpose central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more devices used to control the execution of the AI-based smart home multi-device collaborative control method described in this application.
[0053] The communication bus 302 can be used to transmit information between the aforementioned components.
[0054] The memory 303 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disks or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto. The memory 303 may exist independently and be connected to the processor 301 via the communication bus 302. The memory 303 may also be integrated with the processor 301.
[0055] The memory 303 stores program code for executing the solution of this application, and its execution is controlled by the processor 301. The processor 301 executes the program code stored in the memory 303. The program code may include one or more software modules. In the above embodiments, the determination of the AI-based smart home multi-device collaborative control method can be implemented by the processor 301 and one or more software modules in the program code in the memory 303.
[0056] Communication interface 304 uses any transceiver-like device for communicating with other devices or communication networks, such as Ethernet, radio access network (RAN), wireless local area networks (WLAN), etc.
[0057] In a specific implementation, as one example, a computer device may include multiple processors, each of which may be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor. Here, a processor may refer to one or more devices, circuits, and / or processing cores used to process data (e.g., computer program instructions).
[0058] The aforementioned computer device can be a general-purpose computer device or a special-purpose computer device. In specific implementations, the computer device can be a desktop computer, a portable computer, a network server, a handheld digital assistant (PDA), a mobile phone, a tablet computer, a wireless terminal device, a communication device, or an embedded device. This application does not limit the type of computer device.
[0059] In addition, this application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described AI-based smart home multi-device collaborative control method.
[0060] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.
[0061] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A method for collaborative control of multiple devices in a smart home based on artificial intelligence, characterized in that, Includes the following steps: Based on the spatial coordinates of each smart home device within the target home space, smart home devices belonging to the same spatial area are clustered into initial device spatial groups; For each initial device space group, the co-occurrence association strength between any smart home devices in the group is calculated based on the historical co-occurrence data of each smart home device in the initial device space group being collaboratively invoked. Then, the initial device space group is clustered twice using all the co-occurrence association strengths to obtain a device collaborative group with co-occurrence dependency relationship. Extract the device function tags of each smart home device in the device collaboration group, and identify the trigger logic relationship between the device function tags based on the historical time sequence data of each smart home device being collaboratively invoked. Then, construct a knowledge graph of device group collaboration based on the device function tags and the trigger logic relationship. When spatial areas are reorganized in the target home space, the smart home devices in the reorganized area are semantically matched with the device function tags in the knowledge graph, and the successfully matched smart home devices are driven to establish an instant collaborative control link across groups.
2. The method as described in claim 1, characterized in that, Based on the spatial coordinates of each smart home device within the target home space, smart home devices belonging to the same spatial area are clustered into initial device spatial groups, specifically including: A spatial semantic grid is generated based on the floor plan of the target family space, and the installation coordinates of each smart home device in the spatial semantic grid are mapped into spatial coordinate vectors. Using the spatial coordinate vectors of each smart home device as input, a density-based spatial clustering algorithm is used to cluster devices within a set neighborhood radius according to their distribution density, outputting multiple initial spatial groupings of devices.
3. The method as described in claim 1, characterized in that, For each initial device space group, the co-occurrence association strength between any smart home devices within the group is calculated based on the historical co-occurrence data of the collaborative invocation of each smart home device within the initial device space group. Specifically, this includes: Obtain historical operation logs of cross-smart home device collaborative calls within a preset statistical period, and extract the timestamps of any two smart home devices in the same initial device space group being called sequentially in the same collaborative scenario from the historical operation logs to construct a collaborative event time sequence for each smart home device; The time series of the collaborative events is truncated by a sliding time window. The co-occurrence frequency of collaborative calls between any two smart home devices within the sliding time window is calculated. The original co-occurrence association strength between the two smart home devices is calculated based on the co-occurrence frequency and the total frequency of independent calls to each of the two smart home devices. By introducing the spatial distance of each smart home device in the initial device spatial group within the spatial semantic grid as a decay factor, the original co-occurrence association strength is spatially constrained and corrected to obtain the co-occurrence association strength between any smart home devices.
4. The method as described in claim 1, characterized in that, Secondary clustering of the initial device spatial groupings is performed based on all co-occurrence association strengths to obtain co-occurrence dependency groups of devices, specifically including: Using each smart home device in the initial device space group as a node and the co-occurrence association strength as the edge weight, a weighted undirected graph is constructed to describe the collaborative relationship of devices within the group; The weighted undirected graph is input into a community detection algorithm based on modularity for graph segmentation. The algorithm iteratively divides the node communities with the optimization objective of maximizing modularity gain, and outputs multiple candidate collaborative subgraphs. Calculate the average edge weight of each candidate collaborative subgraph, retain the candidate collaborative subgraphs whose average edge weight is greater than a preset collaborative threshold, and form a device collaborative group with co-occurrence dependency relationship using the smart home device nodes contained in the retained candidate collaborative subgraphs.
5. The method as described in claim 1, characterized in that, Extracting the device function tags of each smart home device within the device collaboration group specifically includes: Retrieve the device attribute description set of each smart home device registered on the Internet of Things platform within the device collaboration group, and parse the standardized functional identifiers representing the device capabilities from the device attribute description set; The standardized function identifiers are mapped in a preset home function semantic ontology library to obtain device function tags for each smart home device.
6. The method as described in claim 1, characterized in that, Identifying the trigger logic relationships between device function tags based on historical time-series data of coordinated calls for various smart home devices specifically includes: Obtain the timestamps of device status changes for each smart home device within the device collaboration group in historical collaboration call events, and align the timestamps of each device status change with their corresponding device function tags to form a collaborative event time sequence chain labeled with function tags; Perform time sequence pattern recognition on the collaborative event time sequence chain, extract the functional label sequence that meets the minimum support threshold, and determine the device functional label pairs that appear sequentially in the functional label sequence as candidate trigger pairs; The candidate trigger pairs are subjected to causal relationship verification in the coordinated event time sequence chain, and the candidate trigger pairs that pass the verification and have consistent causal directions are marked as trigger logical relationships.
7. The method as described in claim 1, characterized in that, The specific steps for establishing real-time collaborative control links across groups for successfully matched smart home devices include: Using the smart home devices that are successfully matched in the reorganized area as nodes, the trigger logic relationship paths between nodes are obtained from the knowledge graph of the device group collaboration, so as to construct a cross-group collaborative control directed topology; The coordinated control directed topology is compiled into linkage rule scripts that can be executed locally by each smart home device, and the linkage rule scripts are distributed to the corresponding smart home devices through the Internet of Things platform to establish a real-time coordinated control link across groups.
8. An AI-based smart home multi-device collaborative control system, used to execute the AI-based smart home multi-device collaborative control method as described in any one of claims 1 to 7, characterized in that, The system includes: The initial clustering module is used to cluster smart home devices belonging to the same spatial area into initial device spatial groups based on the spatial location coordinates of each smart home device in the target home space. The secondary clustering module is used to calculate the co-occurrence association strength between any smart home devices in each initial device space group based on the historical co-occurrence data of each smart home device being collaboratively invoked within the initial device space group, and to perform secondary clustering on the initial device space group through all co-occurrence association strengths to obtain device collaborative groups with co-occurrence dependencies. The graph construction module is also used to extract the device function tags of each smart home device in the device collaboration group, and identify the trigger logic relationship between the device function tags based on the historical time series data of each smart home device being collaboratively called, and then construct a knowledge graph of device group collaboration based on the device function tags and the trigger logic relationship. The control link construction module is used to semantically match the smart home devices in the reorganized area with the device function tags in the knowledge graph when spatial area reorganization occurs in the target home space, and drive the successfully matched smart home devices to establish a cross-group instant collaborative control link.
9. A computer device, characterized in that, The computer device includes a memory and a processor, the memory storing code, and the processor being configured to retrieve the code and execute the AI-based smart home multi-device collaborative control method as described in 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 AI-based smart home multi-device collaborative control method as described in any one of claims 1 to 7.