A method, device, equipment, medium and product for controlling equipment
By building a weighted undirected graph and dividing the community, the smart home system can dynamically update device relationships and perform coordinated control when triggering events, solving the problem of time-consuming and error-prone user configuration of linkage rules manually, and improving the practicality and user experience of the smart home system.
Patent Information
- Application Number
- CN202411794379.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-09
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2044-12-09
AI Technical Summary
With the increase in the number of smart home devices, it becomes time-consuming and error-prone to user manual configuration of linkage rules, limiting the practicality and user experience of smart home systems.
By obtaining relevant data from multiple smart home devices, a weighted undirected graph is built and the community is divided. When a trigger event is detected, coordinated control of the smart home devices corresponding to all nodes in the same community.
Dynamic updates of smart home device relationships have been realized. When a trigger event occurs, it can coordinate the smart home devices in the same community, improve the level of home intelligence, reduce the complexity of manual configuration, and enhance user experience.
Smart Images

Figure CN119270672B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of smart home technology, and in particular to a method, device, equipment, medium and product for controlling equipment. Background Art
[0002] With the rapid development of smart home technology, the number of smart home devices in modern homes is growing at an unprecedented rate. These smart home devices cover many aspects, including smart lights, smart curtains, smart air conditioners, etc., which greatly improve the convenience and comfort of users' lives.
[0003] In the prior art, the smart home system mainly relies on linkage rules preset by users to perform linkage control on multiple smart home devices in terms of smart home device control.
[0004] However, with this approach, as the number of smart home devices continues to increase, it becomes time-consuming and error-prone for users to manually configure linkage rules, which further limits the practicality and user experience of the smart home system. Summary of the invention
[0005] In view of the above problems, a method, apparatus, device, medium and product for controlling a device is proposed to overcome the above problems or at least partially solve the above problems, including:
[0006] A method for controlling a device, the method comprising:
[0007] Acquire relevant data of multiple smart home devices in the current environment; wherein the relevant data includes relevant data of multiple users for multiple smart home devices in the current environment;
[0008] For the multiple users, respectively, construct a weighted undirected graph for the multiple smart home devices according to the relevant data, wherein the weighted undirected graph includes multiple nodes, each smart home device corresponds to a node, and each node has a community to which it belongs;
[0009] Updating the communities to which the multiple nodes in the weighted undirected graph belong;
[0010] When a triggering event is detected, user identity information corresponding to the triggering event is determined, and according to a weighted undirected graph of a target user indicated by the user identity information, smart home devices corresponding to all nodes in the same community are collaboratively controlled;
[0011] Wherein, connecting edges are set between nodes corresponding to mutually related smart home devices, and the communities to which multiple nodes in the weighted undirected graph belong are updated, including: determining a target community from the communities to which adjacent nodes having connecting edges with the current node belong; and moving the current node into the target community;
[0012] The determining of the target community from the communities to which the nodes having a connection edge with the current node belong includes: determining an adjacent node having a connection edge with the current node, and calculating a gain obtained after the current node is moved into the community to which the adjacent node belongs; and when the gain is a positive value, determining the community to which the adjacent node belongs as the target community.
[0013] Optionally, the calculating a gain obtained after the current node is moved into the community to which the adjacent node belongs includes:
[0014] Determining a first equity value before moving the current node into the community to which the adjacent node belongs;
[0015] Determining a second equity value after the current node is moved into the community to which the adjacent node belongs;
[0016] A gain obtained after the current node is moved into the community to which the adjacent node belongs is calculated according to the first equity value and the second equity value.
[0017] Optionally, the connecting edges between nodes in the weighted undirected graph have edge weights, the edge weights are positively correlated with the number of times the mutually associated smart home devices are used in the same period, and the first equity value and the second equity value are associated with the edge weights.
[0018] Optionally, constructing a weighted undirected graph for the plurality of smart home devices according to the relevant data includes:
[0019] For each smart home device in the current environment, establish a node in a weighted undirected graph;
[0020] According to the relevant data, mutually related smart home devices are determined, and in the weighted undirected graph, connection edges are set between nodes corresponding to the mutually related smart home devices.
[0021] Optionally, it also includes:
[0022] Determine, based on the relevant data, the number of times that mutually related smart home devices are used in the same period of time;
[0023] According to the number of times that mutually related smart home devices are used in the same period, in the weighted undirected graph, the edge weights of the connecting edges are set.
[0024] Optionally, according to the number of times that the mutually related smart home devices are used in the same period, in the weighted undirected graph, setting the edge weight of the connecting edge includes:
[0025] Determine the co-occurrence frequency based on the number of times the interconnected smart home devices are used in the same period of time;
[0026] According to the co-occurrence frequency, in the weighted undirected graph, the edge weight of the connecting edge is set.
[0027] Optionally, the collaboratively controlling the smart home devices corresponding to all nodes in the same community according to the weighted undirected graph of the target user indicated by the user identity information includes:
[0028] Determine a target smart home device corresponding to the trigger event, and collaboratively control smart home devices corresponding to other nodes in the community to which the target smart home device belongs according to a weighted undirected graph of the target user indicated by the user identity information;
[0029] Alternatively, a current community corresponding to the triggering event is determined, and according to a weighted undirected graph of the target user indicated by the user identity information, smart home devices corresponding to all nodes in the current community are collaboratively controlled.
[0030] Optionally, the relevant data includes: historical device usage data and historical user behavior data.
[0031] A device for controlling equipment, the device comprising:
[0032] A related data acquisition module is used to acquire related data of multiple smart home devices in the current environment; wherein the related data includes related data of multiple users for multiple smart home devices in the current environment;
[0033] A weighted undirected graph construction module, configured to construct, for each of the plurality of users and according to the relevant data, a weighted undirected graph for each of the plurality of smart home devices, wherein the weighted undirected graph comprises a plurality of nodes, each smart home device corresponds to a node, and each node has a community to which it belongs;
[0034] A community updating module, used for updating the communities to which the multiple nodes in the weighted undirected graph belong;
[0035] A collaborative control module, for determining, when a triggering event is detected, user identity information corresponding to the triggering event, and collaboratively controlling smart home devices corresponding to all nodes in the same community according to a weighted undirected graph of a target user indicated by the user identity information;
[0036] Wherein, a connection edge is set between nodes corresponding to mutually related smart home devices, and the community update module includes: a target community determination submodule, used to determine the target community from the communities to which adjacent nodes having a connection edge with the current node belong; a node movement submodule, used to move the current node into the target community;
[0037] The target community determination submodule includes: a node calculation unit, which is used to determine adjacent nodes having a connection edge with the current node, and calculate the gain obtained after moving the current node into the community to which the adjacent nodes belong; and a community determination unit, which is used to determine that the community to which the adjacent nodes belong is the target community when the gain is a positive value.
[0038] An electronic device comprises a processor, a memory and a computer program stored in the memory and capable of running on the processor, wherein the computer program implements the method described above when executed by the processor.
[0039] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described above is implemented.
[0040] A computer program product comprises a computer program, wherein when the computer program is executed by a processor, the computer program implements the method as described above.
[0041] The embodiments of the present invention have the following advantages:
[0042] In an embodiment of the present invention, relevant data of multiple smart home devices in the current environment are obtained; based on the relevant data, a weighted undirected graph for the multiple smart home devices is constructed, the weighted undirected graph includes multiple nodes, each smart home device corresponds to a node, and each node has a community to which it belongs; the communities to which the multiple nodes in the weighted undirected graph belong are updated; when a triggering event is detected, the smart home devices corresponding to all nodes in the same community are collaboratively controlled, thereby achieving dynamic update of the relationship between smart home devices by acquiring data of multiple smart home devices, constructing a weighted undirected graph and dividing the communities. When a triggering event occurs, the smart home devices in the same community can be collaboratively controlled, thereby improving the level of home intelligence, reducing the complexity of manual configuration, and enhancing user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the technical solution of the present invention, the accompanying drawings required for use in the description of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0044] Figure 1 is a flowchart of the steps of a method for controlling a device provided by some embodiments of the present invention;
[0045] Figure 2 is a schematic diagram of a weighted undirected graph provided by some embodiments of the present invention;
[0046] Figure 3 is a flowchart of steps of another device control method provided by some embodiments of the present invention;
[0047] Figure 4 is a structural block diagram of a device control apparatus provided by some embodiments of the present invention;
[0048] Figure 5 is a structural block diagram of an electronic device provided by some embodiments of the present invention;
[0049] Figure 6 is a structural block diagram of a storage medium provided by some embodiments of the present invention;
[0050] Figure 7 It is a structural block diagram of a program product provided by some embodiments of the present invention. DETAILED DESCRIPTION
[0051] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0052] Reference Figure 1 , shows a flowchart of a method for controlling a device provided by some embodiments of the present invention, which is applied to a smart home system and may specifically include the following steps:
[0053] Step 101, obtaining relevant data of multiple smart home devices in the current environment; wherein the relevant data includes relevant data of multiple users for multiple smart home devices in the current environment.
[0054] The relevant data includes: device history usage data, user history behavior data. In some examples, the relevant data includes relevant data of multiple users for multiple devices in the current environment, and data can be collected for each user to obtain relevant data of each user.
[0055] As some examples, the current environment refers to the specific scene or space where the smart home system obtains relevant data of multiple devices, which can be a physical space (such as home, office, etc.) or a virtual space (such as application environment, etc.). Multiple smart home devices refer to multiple electronic devices that exist in the current environment and can be identified and exchange data with the smart home system. These devices may include but are not limited to smartphones, computers, smart home devices (such as smart lights, smart door locks, smart refrigerators, smart air conditioners, etc.). Relevant data refers to information directly related to these devices that can reflect the device status, usage or user behavior.
[0056] Among them, historical equipment usage data refers to the record of equipment usage in the past period of time, including but not limited to the equipment's power-on time, power-off time, operating hours, usage frequency, fault records, software installation and update records, etc.; these data can reflect the performance and health of the equipment and the user's usage habits. For example, the time when a light is turned on and off, the set temperature and operating mode of the air conditioner, these data are mainly used to monitor the performance and efficiency of the equipment.
[0057] Among them, user historical behavior data refers to the behavior records generated by users in the process of interacting with devices, including but not limited to the user's habits of operating devices (such as the frequency and time of using devices), and any behavior data that can reflect the user's personal characteristics or preferences; these data can reflect the user's needs and behavior patterns. For example, the user's habit of turning on or off lights at specific times, the frequency and preference of users choosing to adjust air conditioners, such data can help analyze user behavior patterns to optimize the system's response and control strategies.
[0058] In some examples, the device historical usage data may also include device attributes, which may include device ID (Identity document), device type (such as air conditioner, curtain, etc.); user historical behavior data may also include user attributes, such as user ID, etc.
[0059] In actual applications, users can install multiple smart devices (such as smart air conditioners, smart curtains, etc.) at home and connect them to the smart home system to control the smart devices through the smart home system, such as controlling the smart devices through voice control of the smart home system, logging into the smart home system through a mobile terminal to control the smart devices, etc.; the smart home system can obtain the device historical usage data and user historical behavior data of multiple devices in the current environment, and combine the two to more comprehensively understand and optimize the operation of the smart home system.
[0060] After obtaining relevant data from multiple devices in the current environment, the relevant data can also be cleaned to remove duplicate, erroneous or abnormal data records to ensure the accuracy and reliability of the data, so that subsequent algorithm analysis can obtain more practical results.
[0061] Duplicate data records refer to the occurrence of exactly the same device operation records multiple times at the same time point or in a very short period of time; for example, device D001 (light) is marked as "on" at "2023-10-01-18:00", but the same record appears again at the same time point or a few seconds later. This may be due to duplicate data caused by multiple triggers of the system or log recording failures.
[0062] Among them, erroneous data records refer to records that obviously do not conform to logic or technical specifications; for example, device D002 (curtains) is displayed as "closed" at "2023-10-01-18:01", but it is displayed as "open-closed" repeatedly in the next few seconds, and the operation interval is far lower than the normal use expectation. This may be an invalid operation record caused by hardware or software errors.
[0063] Among them, abnormal data records refer to records that are obviously inconsistent with the device or user usage habits and may affect the analysis results; for example, the setting of a thermostat is frequently adjusted hundreds of times a day, which is obviously inconsistent with normal user operation behavior and may be an abnormal record caused by hardware problems, data reading errors or misoperation; for example, equipment operations suddenly occur intensively at three o'clock in the morning, but there are no similar operation records at this time. This abrupt operation behavior may be caused by external interference or misoperation.
[0064] After obtaining relevant data from multiple devices in the current environment, the relevant data can also be fused to associate the device's historical usage data with the user's historical behavior data to form a complete operation record, so as to understand which devices are used at what time, by which user, and in what context, thereby providing a data basis for the generation and personalization of device collaborative control strategies.
[0065] As shown in Table 1, after data fusion, the device ID can be determined: uniquely identifies the device. Device type; such as lights, air conditioners, curtains, etc. Operation timestamp: the start and end time of the device. Operation type: turn on, turn off, adjust, etc. User ID: identifies the identity of the user, so that the system can distinguish the operation preferences of different users. Records of operating devices: operations performed by users on specific devices, such as switches, brightness adjustment, temperature settings, etc. For example, user A turns on the lights, closes the curtains, and adjusts the air conditioner to 24 degrees in the living room. Operation timestamp: records the specific time of each user operation to understand the user's operation time pattern; for example, the user turns on the lights at 6 pm or closes the curtains at 7 am. Environmental data (optional): such as the user's room location, time period (such as early morning or night), etc., which can be used to analyze the user's device usage habits in different scenarios.
[0066]
[0067] Table 1
[0068] After obtaining relevant data from multiple devices in the current environment and fusing the data, time slicing can also be performed to segment the relevant data according to a certain time window (such as one day or one week) to facilitate analysis of recent usage patterns.
[0069] As shown in Table 2, the device ID, device type, and operation type in the related data are sharded according to the timestamp.
[0070]
[0071] Table 2
[0072] After obtaining relevant data of multiple devices in the current environment and performing data fusion, a co-occurrence matrix between multiple devices can also be established, as shown in Table 3. The number of times the devices are used simultaneously is represented by a numerical value as the number of co-occurrences. For example, the number of co-occurrences between device IDs D001 and D002 is 5 times, and the number of co-occurrences between D001 and D003 is 8 times.
[0073]
[0074] Table 3
[0075] Step 102: for the multiple users, respectively, construct a weighted undirected graph for the multiple smart home devices according to the relevant data, wherein the weighted undirected graph includes multiple nodes, each smart home device corresponds to a node, and each node has a community to which it belongs.
[0076] In some examples, different users have different control habits for devices, so different weighted undirected graphs can be established for different users. For example, the weights of the edges of the weighted undirected graphs are different, and they are also different in subsequent community updates.
[0077] As some examples, correlation data is the basis for building weighted undirected graphs, which can be used to determine co-occurrences, locations, functional relevance, and other information between devices. A weighted undirected graph is a concept in graph theory, which belongs to the field of computer science; in a weighted undirected graph, each edge has a real weight associated with it, which can be understood as the "length" of the edge, but in mathematical definition, weights can be negative.
[0078] In the weighted undirected graph, each device is abstracted as a node. If the smart home system is connected to N devices, there will be N nodes in the graph, and each node is a unique representative of the device. In addition to being a representative of the device, each node is also assigned a specific community; this community is used to describe the belonging or clustering of the node (i.e., the device), which is an important basis for subsequent analysis and optimization. Among them, a community refers to a set of closely related nodes in a weighted undirected graph. These nodes (devices) may have some common characteristics, functions or goals, which make them form a relatively independent group. The division of communities can be based on a variety of algorithms and criteria, such as modularity maximization, edge number centrality, spectral clustering, etc. These algorithms analyze the weight relationship between nodes and identify the close connection pattern between nodes, thereby completing the division of communities.
[0079] As some examples, nodes (devices) in the community can also be divided according to device attributes, which may include but are not limited to device ID, device type, device location, etc. Among them, the device location refers to the specific installation location or area of the smart home device in a house or building. By determining the device attributes, the smart home system can understand the physical distribution of the device, so as to generate a more reasonable collaborative control strategy.
[0080] For example, the device location may include but is not limited to the room or area name, the specific room or area where the device is located, such as "living room", "bedroom", "kitchen", etc.; precise location description (optional): In some advanced scenarios, the device location may also include more precise coordinates or descriptions, such as "the light on the left wall of the living room" or "the curtains on the north window of the bedroom."
[0081] The location of the device is determined in the following ways:
[0082] 1. Initial installation configuration: When installing a smart device, the system records the device's installation location. This is usually set manually by the installer or the user in the smart home application.
[0083] 2. Integration of house layout diagram (if supported): Some smart home systems allow users to import the layout diagram of the house and mark the location of each device on the diagram.
[0084] 3. Automatic location inference (advanced feature): In an environment equipped with an indoor positioning system, the approximate location of the device can be automatically inferred through signal strength or sensor network.
[0085] In the present invention, determining the device location can facilitate the smart home system to more intuitively analyze the relationship between devices and generate contextual control strategies. For example, when a user enters the living room, the system can automatically trigger the devices in the living room area based on location recognition, rather than affecting devices in other rooms.
[0086] As some examples, the weighted undirected graph includes multiple nodes, and the nodes may further include user nodes, each user corresponds to a user node, and each user node has a community to which it belongs.
[0087] For example, when constructing a weighted undirected graph for multiple devices based on relevant data, user attributes can also be determined in combination with user historical behavior data in the relevant data to determine the user ID, create a user node based on the user ID, and divide a community belonging to a certain user ID.
[0088] In actual applications, although a family usually uses a single account to log in to the smart home system and manage devices, the usage behaviors of different family members can still be distinguished through user nodes. This design allows the system to identify the operating habits of multiple users under the same account. For example, each family member can have an independent user ID, and the system can track the usage preferences of different members, so as to more accurately personalize the device collaborative control strategy. This method is particularly suitable for family members who have different device usage habits or preferences. For example, adults and children may have different setting requirements for lighting, air conditioning and other equipment. The system can optimize the user experience of everyone in the family based on the distinction of user nodes.
[0089] In some embodiments of the present invention, constructing a weighted undirected graph for the multiple smart home devices based on the relevant data includes: establishing a node in the weighted undirected graph for each smart home device in the current environment; determining mutually related smart home devices based on the relevant data, and setting connecting edges between nodes corresponding to the mutually related smart home devices in the weighted undirected graph.
[0090] As some examples, the interrelated devices are devices that are used simultaneously in the same time period, such as when a user turns off the light and closes the curtain at 23:10, that is, the light and the curtain are interrelated devices;
[0091] After the related devices are determined based on the relevant data, the connection edges can be set between the nodes corresponding to these related devices in the weighted undirected graph. The "connection edge" represents a certain association or interaction relationship between devices (nodes), and its existence and weight depend on the specific nature and strength of the association.
[0092] In some embodiments of the present invention, the method further includes: determining the number of times the mutually related smart home devices are used in the same time period based on the relevant data; and setting the edge weight of the connecting edge in the weighted undirected graph based on the number of times the mutually related smart home devices are used in the same time period.
[0093] After obtaining relevant data of multiple devices in the current environment and performing data fusion, a co-occurrence matrix between multiple devices can also be established, as shown in Table 3 above. The number of times the related devices are used in the same period is represented by a numerical value, which is the number of co-occurrences of the related devices. For example, the co-occurrence number of the device IDs D001 and D002 is 5 times, and the co-occurrence number of D001 and D003 is 8 times, that is, the devices D001, D002 and D003 are related devices.
[0094] For example, if two related devices are used more often in the same period, the edge between them can be set with a higher weight; if two related devices are used less often in the same period, the edge between them can be set with a lower weight. For example, if the co-occurrence times of device IDs D001 and D002 are 5, the edge weight of the edge between D001 and D002 can be set to 5; if the co-occurrence times of D001 and D003 are 8, the edge weight of the edge between D001 and D003 can be set to 8.
[0095] like Figure 2 This is a diagram of a weighted undirected graph, where each box (node) represents a smart home device, and the device ID is marked inside the node, such as: D001 (light), D002 (curtain), D003 (air conditioner), etc. Each line (edge) connecting the device nodes represents the connection edge between the related devices. The number marked on the connection edge represents the edge weight (that is, the number of times the related devices are used in the same period). For example, the edge weight between D001 and D002 is 5, which means that the two devices are used together 5 times in user operations.
[0096] like Figure 2, the weight between D001 (light) and D002 (curtain) is 5, which means they co-occur 5 times. The weight between D001 (light) and D003 (air conditioner) is 8, which means they co-occur 8 times. The weight between D002 (curtain) and D003 (air conditioner) is 7, which means they co-occur 7 times.
[0097] After determining the number of times the related devices are used in the same period according to the relevant data, the total number of times the devices are used in a certain period of time (such as 1 week) can also be determined according to the relevant data, and the edge weights of the edges connecting the related devices can be calculated.
[0098] For example, the edge weight of the interconnected device connection edge can be calculated by the following formula:
[0099]
[0100] in, Represents the edge weights of the interconnected device connections.
[0101] The edge weight of an edge is equal to the total number of uses (e.g., the number of uses of device i in a week + the number of uses of device j in a week) divided by the number of times device i and device j are used in the same period of a week.
[0102] In some embodiments of the present invention, the edge weight of the connecting edge is set in the weighted undirected graph according to the number of times the mutually related smart home devices are used in the same time period, including: determining the co-occurrence frequency according to the number of times the mutually related smart home devices are used in the same time period; and setting the edge weight of the connecting edge in the weighted undirected graph according to the co-occurrence frequency.
[0103] For example, the co-occurrence frequency may be determined by the number of times that mutually related devices are used in the same period within a statistical period of time (eg, a week or a month).
[0104] After the co-occurrence frequencies of the mutually related devices are determined, the edge weights of the connecting edges between the nodes corresponding to the mutually related devices in the weighted undirected graph may be reset according to the co-occurrence frequencies.
[0105] As some examples, after determining mutually related devices based on relevant data and setting connecting edges between nodes corresponding to mutually related devices in a weighted undirected graph, connecting edges between device nodes and user nodes can also be set to represent the user's usage relationship of the device. The edge weight of the connecting edge between the device node and the user node can be set according to the frequency of use so that the user's usage frequency of a specific device can be represented by the edge weight.
[0106] For example, the edge weight of the connection between the device node and the user node can be set in the following ways:
[0107] 1. Direct frequency counting: Count the number of times a user operates a device within a period of time (such as a week or a month) and use this as the weight. For example, if user A operates device D001 (such as a light) 10 times within a week, the weight of the connection edge can be set to 10.
[0108] 2. Time-weighted frequency: Give the most recent operation a higher weight to reflect the user's recent usage preferences. For example, the number of operations last week is directly included in the weight, and the number of operations last month is included in the weight at 0.5 times. The calculation formula is: The edge weight of the connection between the device node and the user node is equal to the number of operations last week plus (0.5 times the number of operations last month).
[0109] 3. Weighted usage time (applicable to adjustable devices, such as air conditioners, TVs, etc.): The duration of each time a user uses the device is included in the calculation, and the weighted sum of the operation frequency and the usage time is used as the final weight. For example: the operation frequency weight is equal to the number of times the user operates device D002 in a week; the usage time weight is equal to the total usage time (hours) of the user in a week; the final weight is equal to the frequency weight multiplied by the coefficient plus the usage time weight multiplied by the coefficient; the coefficient can be a certain value determined according to the actual situation, such as 0.5.
[0110] 4. Situational usage weight (optional): If the system records the user's operation preferences in different situations (such as daytime, nighttime, weekends, etc.), weights can be assigned according to the frequency of different situations, such as "weekday weight plus weekend weight" or "night operation frequency".
[0111] The above-mentioned method for setting the edge weight of the connection edge between the device node and the user node can be used alone or in combination to more accurately reflect the usage relationship between the user and the device.
[0112] Among them, the weight of the edge connecting the device node and the user node is mainly used to optimize the device collaborative control strategy and personalized experience, and its functions may include:
[0113] Generation of personalized collaborative control strategies. By analyzing the usage frequency and preferences of different users, the system can generate more personalized device linkage control strategies. For example, for users who frequently use air conditioners, the system may prioritize setting air conditioners and other comfort devices (such as humidifiers and curtains) as linkage combinations, so that when the user operates the air conditioner, other related devices can be automatically adjusted to improve the user experience. Priority setting. The weight of the edge can help the system determine the strength of association between different devices. For example, for high-weighted edges, the system will prioritize the inclusion of the status of the device in the association operation to ensure that the device that the user frequently operates gets the linkage response first, while low-weighted edges may be used as secondary reference conditions. This makes the system more reasonable and efficient when collaborating between multiple devices. Scene mode recommendation. The weight can also be used to recommend scene modes suitable for users. For example, if the system detects that the user frequently adjusts the lights and TV volume at night, it can recommend a "night mode" that includes settings such as dimming the lights and lowering the volume, so that users can quickly apply it to common scenarios. 4. Optimize the community division between devices. When using the community discovery algorithm (Louvain algorithm, also known as Fast-Unfolding algorithm) for community detection, the connection edges between device nodes with high weights and user nodes can help the system identify the device combinations preferred by users. In this way, when dividing device communities, the system will be more inclined to associate and combine high-frequency or high-duration devices together, generating device communities that better meet the actual needs of users.
[0114] 5. Data analysis and behavior pattern mining: Through weighted data, the system can continuously analyze user behavior patterns and usage habits. This not only helps optimize device linkage strategies, but also serves as a reference for future device configuration and new functions, supporting the further optimization and development of smart home systems.
[0115] Therefore, by setting the edge weights of the edges connecting device nodes and user nodes, the response accuracy and personalization level of the smart home system can be improved in many aspects, making the collaborative control of devices more in line with the actual needs and habits of users.
[0116] Step 103: updating the communities to which the multiple nodes in the weighted undirected graph belong.
[0117] As some examples, a community discovery algorithm may be used to update communities to which multiple nodes in a weighted undirected graph belong, such as merging a node corresponding to a device in the weighted undirected graph with a node of another device.
[0118] In some embodiments of the present invention, connecting edges are set between nodes corresponding to mutually related smart home devices, and the communities to which multiple nodes in the weighted undirected graph belong are updated, including: determining a target community from the communities to which adjacent nodes having connecting edges with the current node belong; and moving the current node into the target community.
[0119] As some examples, in a weighted undirected graph, each device corresponds to a node, each node has a community to which it belongs, and the target community is the community to which the target node belongs, and the target node is the adjacent node with the maximum weight of the connection edge with the current node; wherein, any node with a connection edge in the weighted undirected graph can be used as the current node to be merged into the target community to which the target node belongs.
[0120] like Figure 2 , D001, D002, and D003 are all regarded as an independent community. When the current node is D001, the adjacent nodes with connecting edges to the current node are D002 and D003; the edge weight of the edge between D003 and D001 is relatively greater than the edge weight of the edge between D002 and D001, then D003 can be used as the target node, and the target community is determined to be the community to which D003 belongs, and the D001 node is moved to the community to which D003 belongs.
[0121] In some embodiments of the present invention, determining the target community from the communities to which nodes having a connection edge with the current node belong includes: determining adjacent nodes having a connection edge with the current node, and calculating a gain obtained after moving the current node into the community to which the adjacent nodes belong; and when the gain is a positive value, determining the community to which the adjacent nodes belong as the target community.
[0122] As some examples, a community discovery algorithm can be used to calculate the modularity gain obtained after the current node moves into the community to which the neighboring node belongs, and a target node is determined from the neighboring nodes having connecting edges with the current node to determine the community to which the neighboring node belongs as the target community.
[0123] like Figure 2 , when the current node is D001, the adjacent nodes with connecting edges to the current node are D002 and D003; the modularity gain obtained after D001 moves into D002 and into the community to which D003 belongs can be calculated according to the community discovery algorithm. If it is calculated that the modularity gain obtained after D001 moves into the community to which D002 belongs is 4, and the modularity gain obtained after D001 moves into the community to which D003 belongs is 7, when the modularity gain obtained after D001 moves into the community to which D003 belongs is 7 and is a positive value (i.e. greater than 0), the community to which the adjacent node D003 belongs is taken as the target community.
[0124] As some examples, for each node i in a weighted undirected graph, one may attempt to move it to the community where neighboring node j is located, calculate the modularity gain, and if the modularity gain is positive, move node i to the community where node j is located, and repeat the process until a positive modularity gain cannot be obtained.
[0125] As some examples, updating the communities to which multiple nodes belong in a weighted undirected graph can be done in the following steps:
[0126] 1. Node movement and community merging: When node i is moved to the community where the adjacent node j is located, node i will be regarded as joining the entire community C j (i.e. the communities of all nodes that contain node j). This means that the community C of node i i No longer exists independently, but is incorporated into community C j middle.
[0127] 2. Dynamic changes in the entire community structure: Each time a node is moved, the algorithm recalculates the modularity gain and selects the optimal community structure based on the gain; the community structure is gradually optimized as multiple nodes continue to move. Each merger may bring more and more nodes into the same community, thus forming a larger community.
[0128] 3. Stop condition: When the movement of all nodes no longer brings positive modularity gain, the algorithm stops and eventually forms several stable communities, in which the nodes within each community are strongly associated.
[0129] In some embodiments of the present invention, the calculation of the gain obtained after moving the current node into the community to which the adjacent node belongs includes: determining a first equity value before moving the current node into the community to which the adjacent node belongs; determining a second equity value after moving the current node into the community to which the adjacent node belongs; and calculating the gain obtained after moving the current node into the community to which the adjacent node belongs based on the first equity value and the second equity value.
[0130] In some embodiments of the present invention, the connecting edges between nodes in the weighted undirected graph have edge weights, the edge weights are positively correlated with the number of times the mutually associated smart home devices are used in the same period, and the first equity value and the second equity value are associated with the edge weights.
[0131] As some examples, the first equity value before the current node moves into the community to which the adjacent node belongs and the second equity value after the current node moves into the community to which the adjacent node belongs can be determined by formula 1. The modularity gain obtained after the current node moves into the community to which the adjacent node belongs can be calculated by subtracting the first equity value from the second equity value:
[0132] (Formula 1)
[0133] in, Represents the modularity gain obtained after the current node moves into the community to which the adjacent node belongs; represents the total weight of the edges within the community; m is half of the total weight of the connecting edges in the network; It is the sum of the edge weights between node i and the nodes in the community; is the sum of the degrees of all nodes in the community; is the degree of node i; is the second equity value after the current node is moved into the community to which the adjacent node belongs. It is the first equity value before moving the current node into the community to which the adjacent node belongs.
[0134] These parameters jointly consider the overall relationship between node i and the target community, rather than being limited to a single node j. The core of the modularity gain calculation is the strength of the connection between node i and the entire community, so there is no need to separately reflect the weight of node j. By calculating with formula 1, the overall impact of node i on modularity after moving to a new community can be more accurately measured.
[0135] In practical applications, when using community discovery algorithms, when considering moving node i to the community where node j is located, it is not possible to simply add the connection weight between nodes i and j directly, but to move node i to the structure of the entire community to which node j belongs. Therefore, when calculating modularity gain, the focus is on analyzing the impact of node i joining the community on the entire community structure, not just the impact of node j itself.
[0136] Step 104, when a triggering event is detected, the user identity information corresponding to the triggering event is determined, and the smart home devices corresponding to all nodes in the same community are collaboratively controlled according to a weighted undirected graph of the target user indicated by the user identity information.
[0137] Since different users have established different weighted undirected graphs, and in particular, different users have different control habits for devices, and make different updates to the communities in the weighted undirected graphs, when a trigger event is detected, the user identity information corresponding to the trigger event can be first identified (such as user identity identification through voiceprints in voice, or user identity identification through facial information collected by cameras), and then the target user indicated by the user identity information can be determined, and then the weighted undirected graph of the target user indicated by the user identity information can be used to collaboratively control the devices corresponding to all nodes in the same community.
[0138] As some examples, a trigger event refers to a specific condition or signal that can cause the smart home system to perform a collaborative control action; when a trigger event is detected, the smart home control system can collaboratively control the smart home devices corresponding to all nodes in the same community according to the collaborative control strategy. For example, the community includes smart home device nodes D001 (lights) and D002 (curtains). When it is detected that the D001 light is turned off, the D002 (curtains) in the community can be collaboratively controlled to turn off D002 (curtains).
[0139] For example, community A includes living room lights, TV, and stereo. Collaborative control strategy: When the user turns on the TV, the living room lights are automatically dimmed and the stereo is turned on. Another example is community B, which includes bedroom air conditioners, humidifiers, and curtains. Collaborative control strategy: When the air conditioner is turned on, the curtains are automatically closed and the humidifier is turned on to keep the room comfortable.
[0140] In some embodiments of the present invention, the collaborative control of smart home devices corresponding to all nodes in the same community based on the weighted undirected graph of the target user indicated by the user identity information includes: determining the target smart home device corresponding to the trigger event, and collaboratively controlling the smart home devices corresponding to other nodes in the community to which the target smart home device belongs based on the weighted undirected graph of the target user indicated by the user identity information; or determining the current community corresponding to the trigger event, and collaboratively controlling the smart home devices corresponding to all nodes in the current community based on the weighted undirected graph of the target user indicated by the user identity information.
[0141] As some examples, in a smart home system, by analyzing the usage patterns of a community of devices, collaborative control strategies for specific time periods or situations can be automatically generated to improve user experience and reduce the workload of manually configuring control strategies.
[0142] For example, smart home systems can:
[0143] 1. Analyze the usage patterns of device communities Data collection and statistics: The system collects data such as the frequency of use, time period of use (such as morning, evening, etc.), duration of use, etc. of devices in each device community to establish the usage pattern of the devices. For example, the usage pattern of the "living room device community" (such as lights, TV, and audio) may show that users often turn on the TV and audio between 7-10 pm. Co-occurrence analysis: Further analyze the co-occurrence frequency between devices in the community to determine which devices are often started together. For example, in a bedroom community, air conditioners, curtains, and humidifiers may be frequently used at the same time.
[0144] 2. Set scheduled tasks and automate based on usage time periods: The system automatically sets scheduled tasks based on the device's usage time period pattern. For example, if the system detects that the user usually turns on the bedroom light at 7 a.m. every day, it can be set to automatically turn on the light at 7 a.m. every day. Automation of frequent tasks: If a device is frequently used within a fixed time period, the system can set it as a scheduled task. For example, if the living room light turns on at 7 p.m., it can be set as a daily scheduled task.
[0145] 3. Generate scenario modes and scenario mode trigger conditions: Set scenario modes that are automatically activated under specific conditions based on the usage patterns of the device community. For example, "night mode" can be set to automatically turn off the living room lights, turn on the air conditioner and humidifier in the bedroom, and close the curtains after 10 pm. Configuration of scene actions: Set specific operation steps and execution order for each scenario mode. For example, "home mode" is set to automatically turn on the entrance lights, living room lights, and TV when the user opens the door.
[0146] 4. User preference and feedback optimization, user feedback tuning: The system can adjust scheduled tasks or scenario modes based on user feedback. For example, if the user feedbacks that the automatic lighting at 7 pm does not meet the needs, the time can be adjusted or the task can be canceled. Mode self-optimization: The system continuously monitors changes in device usage patterns and dynamically adjusts scheduled tasks and scenario modes based on new data to ensure that they meet the actual needs of users.
[0147] Through the above process, the system can dynamically set intelligent scheduled tasks and scenario modes according to the usage patterns of the device community, thereby realizing collaborative control and personalized experience of smart home devices.
[0148] As some examples, the generated collaborative control strategy can also be stored and managed, and the generated collaborative control strategy can be stored in a strategy database, and support subsequent query and modification. Among them, the strategy database can be deployed in the back-end server of the smart home system, the local storage of the smart home gateway, or the cloud database to support the storage, query and management of the collaborative control strategy.
[0149] For example, the policy database is deployed as follows:
[0150] 1. Local storage in smart home gateways: In smart home systems, gateways (such as home smart control centers) usually have certain storage capabilities. Collaborative control strategies can be directly saved in the local database of the gateway to facilitate rapid response and reduce external dependencies. Local storage is usually suitable for home scenarios with small data volumes and low policy update frequency.
[0151] 2. Cloud database: For smart home systems with cloud support, collaborative control strategies can be stored in cloud databases (such as relational databases or NoSQL databases on cloud platforms). Cloud storage supports remote management, backup, and large-scale data analysis, and is suitable for scenarios that require more frequent updates, cross-device linkage, or shared strategies among multiple home users. Users can access the cloud database through smart home applications or web interfaces to query and modify control strategies.
[0152] 3. Hybrid storage of local and cloud: Some advanced smart home systems support a hybrid architecture of local and cloud, where the core policies are stored in the gateway to ensure the real-time nature of local control, while the history, analysis results and backup of the policies are stored in the cloud database. In this mode, the smart home system can download the latest policies from the cloud or synchronize local policies to the cloud to keep the policies consistent across multiple devices.
[0153] In practical applications, through the deployment of the policy database, the system can not only conveniently store and manage collaborative control strategies, but also support users to query, modify or disable certain strategies at any time when needed, so as to achieve more flexible smart home control.
[0154] In practical applications, the execution of collaborative control strategies can be controlled by a smart home system or a smart home gateway. This system or gateway serves as the core control platform of the smart home, responsible for monitoring device status changes and executing corresponding controls.
[0155] For example, smart home systems can:
[0156] Monitoring device status: The smart home control system continuously monitors the status of each device in the community (such as whether the air conditioner is turned on or off). Once the state change of the air conditioner is detected, the subsequent control logic is triggered. 2. Rule matching and execution: The control system matches the trigger conditions according to the preset collaborative control strategy (in this case, "close the curtains and start the humidifier when the air conditioner is turned on") and determines the operation to be performed. The system will issue instructions to close the curtains and start the humidifier to maintain the comfort of the room.
[0157] 3. Transmission and execution of device control instructions: The control system transmits instructions to curtains and humidifiers through the home LAN or Internet of Things (IoT) protocol, instructing them to perform corresponding operations. Usually, these instructions are transmitted to the devices through wireless methods such as Wi-Fi, Zigbee (a low-speed short-distance transmission wireless protocol) or Z-Wave (a short-distance wireless communication technology).
[0158] 4. Feedback and status update (optional): After executing the control command, the system will update the status information of the device to ensure the smooth completion of the collaborative operation. The system can also record the success rate of the device response or user feedback to further optimize the collaborative control strategy.
[0159] Among them, the core function of the smart home system or gateway is to realize the linkage between various devices, so that the operation of a single device can trigger automatic response of other devices, realizing true automation and intelligent control.
[0160] As some examples, users can also log in to the platform provided by the smart home system through terminal devices. The platform can provide users with a visual interface, where the visual interface can display device communities and collaborative control strategies, allowing users to view and adjust them. Users can also enable or disable certain collaborative control strategies according to personal preferences.
[0161] As some examples, in a smart home system, relevant data of multiple devices in the current environment can be continuously collected, and the device community division can be updated by regularly running the community discovery algorithm to ensure that the collaborative control strategy is consistent with the current device usage pattern, and record the execution effect of the collaborative control strategy, such as user feedback, execution success rate, etc., to further optimize the collaborative control strategy.
[0162] In an embodiment of the present invention, relevant data of multiple smart home devices in the current environment are obtained; based on the relevant data, a weighted undirected graph for the multiple smart home devices is constructed, the weighted undirected graph includes multiple nodes, each smart home device corresponds to a node, and each node has a community to which it belongs; the communities to which the multiple nodes in the weighted undirected graph belong are updated; when a triggering event is detected, the smart home devices corresponding to all nodes in the same community are collaboratively controlled, thereby achieving dynamic update of the relationship between smart home devices by acquiring data of multiple smart home devices, constructing a weighted undirected graph and dividing the communities. When a triggering event occurs, the smart home devices in the same community can be collaboratively controlled, thereby improving the level of home intelligence, reducing the complexity of manual configuration, and enhancing user experience.
[0163] Reference Figure 3 , shows a flowchart of another device control method provided by some embodiments of the present invention, which is applied to a smart home system and may specifically include the following steps:
[0164] Step 301, obtaining relevant data of multiple smart home devices in the current environment; wherein the relevant data includes relevant data of multiple users for multiple smart home devices in the current environment.
[0165] Step 302: for the multiple users, respectively, according to the relevant data, for each smart home device in the current environment, a node is established in a weighted undirected graph, and a weighted undirected graph for the multiple smart home devices is constructed, wherein the weighted undirected graph includes multiple nodes, each smart home device corresponds to a node, and each node has a community to which it belongs.
[0166] Step 303: determine the mutually related smart home devices according to the relevant data, and set connection edges between the nodes corresponding to the mutually related smart home devices in the weighted undirected graph.
[0167] Step 304: updating the communities to which the multiple nodes in the weighted undirected graph belong.
[0168] Step 305, when a triggering event is detected, the user identity information corresponding to the triggering event is determined, and the smart home devices corresponding to all nodes in the same community are collaboratively controlled according to a weighted undirected graph of the target user indicated by the user identity information.
[0169] In an embodiment of the present invention, relevant data of multiple smart home devices in the current environment are obtained; according to the relevant data, for each smart home device in the current environment, a node is established in a weighted undirected graph, and a weighted undirected graph for multiple smart home devices is constructed, the weighted undirected graph includes multiple nodes, each smart home device corresponds to a node, and each node has a community to which it belongs; according to the relevant data, mutually related smart home devices are determined, and in the weighted undirected graph, connecting edges are set between the nodes corresponding to the mutually related smart home devices; the communities to which multiple nodes in the weighted undirected graph belong are updated; when a triggering event is detected, the smart home devices corresponding to all nodes in the same community are collaboratively controlled, so that the dynamic update of the relationship between smart home devices is achieved by acquiring data of multiple smart home devices, constructing a weighted undirected graph and dividing the community. When a triggering event occurs, the smart home devices in the same community can be collaboratively controlled, the level of home intelligence is improved, the complexity of manual configuration is reduced, and the user experience is enhanced.
[0170] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.
[0171] Reference Figure 4, shows a schematic diagram of the structure of a device control apparatus provided by some embodiments of the present invention, which may specifically include the following modules:
[0172] The relevant data acquisition module 401 is used to acquire relevant data of multiple smart home devices in the current environment; wherein the relevant data includes relevant data of multiple users for multiple smart home devices in the current environment;
[0173] A weighted undirected graph construction module 402 is used to construct a weighted undirected graph for the multiple smart home devices according to the relevant data for the multiple users, wherein the weighted undirected graph includes multiple nodes, each smart home device corresponds to a node, and each node has a community to which it belongs;
[0174] A community updating module 403, used for updating the communities to which the multiple nodes in the weighted undirected graph belong;
[0175] The collaborative control module 404 is used to determine the user identity information corresponding to the trigger event when a trigger event is detected, and to collaboratively control the smart home devices corresponding to all nodes in the same community according to the weighted undirected graph of the target user indicated by the user identity information.
[0176] In some embodiments of the present invention, connection edges are set between nodes corresponding to mutually related smart home devices, and the community updating module 403 includes:
[0177] A target community determination submodule is used to determine a target community from the communities to which adjacent nodes having a connection edge with the current node belong;
[0178] The node moving submodule is used to move the current node into the target community.
[0179] In some embodiments of the present invention, the target community determination submodule includes:
[0180] A node calculation unit, used to determine an adjacent node having a connection edge with the current node, and calculate a gain obtained after moving the current node into the community to which the adjacent node belongs;
[0181] The community determining unit is configured to determine, when the gain is a positive value, the community to which the neighboring node belongs as a target community.
[0182] In some embodiments of the present invention, the node computing unit includes:
[0183] A first equity value determination subunit, used to determine a first equity value before moving the current node into the community to which the adjacent node belongs;
[0184] A second equity value determination subunit, used to determine a second equity value after the current node is moved into the community to which the adjacent node belongs;
[0185] The gain calculation subunit is used to calculate the gain obtained after the current node is moved into the community to which the adjacent node belongs according to the first equity value and the second equity value.
[0186] In some embodiments of the present invention, the connecting edges between nodes in the weighted undirected graph have edge weights, the edge weights are positively correlated with the number of times the mutually associated smart home devices are used in the same period, and the first equity value and the second equity value are associated with the edge weights.
[0187] In some embodiments of the present invention, the weighted undirected graph construction module 402 includes:
[0188] A node establishment module, used for establishing a node in a weighted undirected graph for each smart home device in the current environment;
[0189] The smart home device determination module is used to determine the mutually related smart home devices according to the relevant data, and to set connection edges between the nodes corresponding to the mutually related smart home devices in the weighted undirected graph.
[0190] In some embodiments of the present invention, it also includes:
[0191] A smart home device usage frequency determination module, used to determine the number of times the mutually related smart home devices are used in the same period of time according to the relevant data;
[0192] The edge weight setting module is used to set the edge weight of the connecting edge in the weighted undirected graph according to the number of times the mutually related smart home devices are used in the same period.
[0193] In some embodiments of the present invention, the edge weight setting module includes:
[0194] A co-occurrence frequency determination submodule, used to determine the co-occurrence frequency according to the number of times the mutually related smart home devices are used in the same period of time;
[0195] The edge weight setting submodule is used to set the edge weight of the connecting edge in the weighted undirected graph according to the co-occurrence frequency.
[0196] In some embodiments of the present invention, the collaborative control module 404 includes:
[0197] The trigger event detection and response submodule is used to determine the target smart home device corresponding to the trigger event, and collaboratively control the smart home devices corresponding to other nodes in the community to which the target smart home device belongs based on the weighted undirected graph of the target user indicated by the user identity information; or determine the current community corresponding to the trigger event, and collaboratively control the smart home devices corresponding to all nodes in the current community based on the weighted undirected graph of the target user indicated by the user identity information.
[0198] In some embodiments of the present invention, the relevant data includes: historical device usage data and historical user behavior data.
[0199] Some embodiments of the present invention further provide an electronic device, comprising a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the above method is implemented when the computer program is executed by the processor.
[0200] Some embodiments of the present invention further provide a computer-readable storage medium, on which a computer program is stored, and the computer program implements the above method when executed by a processor.
[0201] Some embodiments of the present invention further provide a computer program product, including a computer program, which implements the above method when executed by a processor.
[0202] Reference Figure 5 , shows an electronic device provided by some embodiments of the present invention, including a processor 501, a memory 502, and a computer program stored in the memory 502 and capable of running on the processor 501, and the computer program implements the above method when executed by the processor.
[0203] Reference Figure 6 , shows a computer-readable storage medium 600 provided in some embodiments of the present invention, on which a computer program is stored, and when the computer program is executed by a processor, the above method is implemented.
[0204] Reference Figure 7 , shows a computer program product 700 provided by some embodiments of the present invention, including a computer program, and the computer program implements the above method when executed by a processor.
[0205] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0206] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0207] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0208] Those skilled in the art will appreciate that the embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0209] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0210] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0211] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0212] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.
[0213] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "including one..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the above elements.
[0214] The above is a detailed introduction to the provided method, device, equipment, medium and product for controlling a device. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for a person skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A method for controlling a device, characterized in that: The method comprises: Acquire relevant data of multiple smart home devices in the current environment; wherein the relevant data includes relevant data of multiple users for multiple smart home devices in the current environment; For the multiple users, respectively, construct a weighted undirected graph for the multiple smart home devices according to the relevant data, wherein the weighted undirected graph includes multiple nodes, each smart home device corresponds to a node, and each node has a community to which it belongs; Updating the communities to which the multiple nodes in the weighted undirected graph belong; Wherein, connecting edges are set between nodes corresponding to mutually related smart home devices, and the communities to which multiple nodes in the weighted undirected graph belong are updated, including: determining a target community from the communities to which adjacent nodes having connecting edges with the current node belong; and moving the current node into the target community; The determining of the target community from the communities to which the nodes having a connection edge with the current node belong includes: determining an adjacent node having a connection edge with the current node, and calculating a gain obtained after the current node is moved into the community to which the adjacent node belongs; and if the gain is a positive value, determining the community to which the adjacent node belongs as the target community; When a triggering event is detected, user identity information corresponding to the triggering event is determined, and according to a weighted undirected graph of a target user indicated by the user identity information, smart home devices corresponding to all nodes in the same community are collaboratively controlled; The method of collaboratively controlling the smart home devices corresponding to all nodes in the same community according to the weighted undirected graph of the target user indicated by the user identity information includes: Determine a target smart home device corresponding to the trigger event, and collaboratively control smart home devices corresponding to other nodes in the community to which the target smart home device belongs according to a weighted undirected graph of the target user indicated by the user identity information; Alternatively, a current community corresponding to the triggering event is determined, and according to a weighted undirected graph of the target user indicated by the user identity information, smart home devices corresponding to all nodes in the current community are collaboratively controlled.
2. The method according to claim 1, characterized in that: The calculating of a gain obtained after the current node is moved into the community to which the adjacent node belongs includes: Determining a first equity value before moving the current node into the community to which the adjacent node belongs; Determining a second equity value after the current node is moved into the community to which the adjacent node belongs; A gain obtained after the current node is moved into the community to which the adjacent node belongs is calculated according to the first equity value and the second equity value.
3. The method according to claim 2, characterized in that The connecting edges between the nodes in the weighted undirected graph have edge weights, the edge weights are positively correlated with the number of times the mutually related smart home devices are used in the same period, and the first equity value and the second equity value are associated with the edge weights.
4. The method according to any one of claims 1 to 3, characterized in that: The step of constructing a weighted undirected graph for the plurality of smart home devices according to the relevant data comprises: For each smart home device in the current environment, establish a node in a weighted undirected graph; According to the relevant data, mutually related smart home devices are determined, and in the weighted undirected graph, connection edges are set between nodes corresponding to the mutually related smart home devices.
5. The method according to claim 4, characterized in that Also includes: Determine, based on the relevant data, the number of times that mutually related smart home devices are used in the same period of time; According to the number of times that mutually related smart home devices are used in the same period, in the weighted undirected graph, the edge weights of the connecting edges are set.
6. The method according to claim 5, characterized in that According to the number of times that the mutually related smart home devices are used in the same period, in the weighted undirected graph, setting the edge weight of the connecting edge includes: Determine the co-occurrence frequency based on the number of times the interconnected smart home devices are used in the same period of time; According to the co-occurrence frequency, in the weighted undirected graph, the edge weight of the connecting edge is set.
7. The method according to claim 1, characterized in that The relevant data include: Historical device usage data and historical user behavior data.
8. A device for controlling equipment, characterized in that: The device comprises: A related data acquisition module is used to acquire related data of multiple smart home devices in the current environment; wherein the related data includes related data of multiple users for multiple smart home devices in the current environment; A weighted undirected graph construction module, configured to construct, for each of the plurality of users and according to the relevant data, a weighted undirected graph for each of the plurality of smart home devices, wherein the weighted undirected graph comprises a plurality of nodes, each smart home device corresponds to a node, and each node has a community to which it belongs; A community updating module, used for updating the communities to which the multiple nodes in the weighted undirected graph belong; Wherein, a connection edge is set between nodes corresponding to mutually related smart home devices, and the community update module includes: a target community determination submodule, used to determine the target community from the communities to which adjacent nodes having a connection edge with the current node belong; a node movement submodule, used to move the current node into the target community; The target community determination submodule includes: a node calculation unit, which is used to determine the adjacent nodes having a connection edge with the current node, and calculate the gain obtained after the current node is moved into the community to which the adjacent nodes belong; a community determination unit, which is used to determine that the community to which the adjacent nodes belong is the target community when the gain is a positive value; A collaborative control module, for determining, when a triggering event is detected, user identity information corresponding to the triggering event, and collaboratively controlling smart home devices corresponding to all nodes in the same community according to a weighted undirected graph of a target user indicated by the user identity information; The collaborative control module includes: The trigger event detection and response submodule is used to determine the target smart home device corresponding to the trigger event, and collaboratively control the smart home devices corresponding to other nodes in the community to which the target smart home device belongs based on the weighted undirected graph of the target user indicated by the user identity information; or determine the current community corresponding to the trigger event, and collaboratively control the smart home devices corresponding to all nodes in the current community based on the weighted undirected graph of the target user indicated by the user identity information.
9. An electronic device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program implements the method according to any one of claims 1 to 7 when executed by the processor.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
11. A computer program product, characterized in that The invention comprises a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Community discovery method, equipment and device
CN108648094A
Linkage control method and system for smart home
CN118605193A
Device linkage scheme recommendation method, and device and medium
WO2023000945A1