Method, system, device, and apparatus for discovering scene execution conflicts
By generating device attribute change structures and merging logical control lists in the IoT smart home system, the problem of scene execution conflict detection is solved, concurrent interaction between multiple scene execution modules is realized, and conflicts are discovered and handled in a timely manner to ensure The system operates stably.
Patent Information
- Application Number
- CN202010737989.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-07-28
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2040-07-28
AI Technical Summary
In the IoT smart home system, scene execution conflicts often cause the scene to fail to execute normally. It is difficult to detect and resolve these conflicts in a timely manner with existing technology.
By generating the device attribute change structure when the device attributes change, merging the logic control list of the scene execution module, detecting whether there are scene execution conflicts, realizing concurrent interaction between the scene coordination module and multiple scene execution modules, and timely discovering and handling conflicts .
Effectively detect and handle scene execution conflicts between multiple scene execution modules to ensure the stable operation of the smart home system and improve user experience.
Smart Images

Figure CN111880426B
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet of Things technology, for example, to a method and system, device, and equipment for discovering scene execution conflicts. Background Art
[0002] With the rapid development of the Internet of Things, more and more smart home appliances and household devices have entered thousands of households, bringing users an unprecedented intelligent life experience. Home appliances are no longer cold machines, but intelligent entities that can actively understand user needs and preferences and automatically provide services to users. As long as the user proposes the experience effect they want to achieve, that is, the usage scenario, there is no need to issue specific control commands. The various devices in the smart home network will work together to achieve the effect expected by the user. However, no matter how smart the scene system effect is, it needs to be "translated" into machine language, that is, according to the scene description, coordinate the existing equipment, and achieve the target effect of the scene through a certain control logic.
[0003] In the process of implementing the embodiments of the present disclosure, it is found that there are at least the following problems in the related art:
[0004] In actual operations, there are often some scene execution conflicts that cause the scene to fail to execute normally. Summary of the invention
[0005] In order to provide a basic understanding of some aspects of the disclosed embodiments, a brief summary is given below. The summary is not an extensive review, nor is it intended to identify key / critical components or delineate the scope of protection of these embodiments, but rather serves as a prelude to the detailed description that follows.
[0006] The embodiments of the present disclosure provide a method, system, apparatus and device for discovering scenario execution conflicts, so as to timely discover scenario execution conflicts.
[0007] In some embodiments, the method for discovering scene execution conflicts is used in a scene coordination module, and includes:
[0008] Detect changes in device attributes;
[0009] generating a device attribute change structure when an attribute of the device changes, the device attribute change structure including a first logic control list storing logic control information;
[0010] triggering a scene execution module of the monitoring device to perform scene execution conflict detection and feeding back a third logic control list storing logic control information if the detection result shows that there is no scene execution conflict;
[0011] receiving the third logic control list, and merging the third logic control list with the first logic control list in the corresponding device attribute change structure to obtain a fourth logic control list;
[0012] It is determined whether the logic control information in the fourth logic control list has a scene execution conflict.
[0013] In some embodiments, the device attribute change structure further includes attribute change information corresponding to the first logic control list; generating the device attribute change structure when the attribute of the device changes includes:
[0014] When the attribute of the device changes, cache the attribute change information of the device;
[0015] An empty first logic control list is established, and the attribute change information and the first logic control list are combined into a device attribute change structure.
[0016] In some embodiments, the device attribute change structure further includes attribute change information and attribute change number corresponding to the first logic control list; generating the device attribute change structure when the attribute of the device changes includes:
[0017] When the attribute of the device is changed, cache the attribute change information of the device and establish a unique identifier as the attribute change number of the attribute change information;
[0018] An empty first logic control list is established, and the attribute change number, the attribute change information and the first logic control list are combined into a device attribute change structure.
[0019] The device attribute change structure is stored in a preset attribute change dictionary.
[0020] The attribute change number is determined as a key in the dictionary.
[0021] In some embodiments, triggering a scene execution module that monitors the device to perform scene execution conflict detection includes:
[0022] The attribute change information and the detection instruction are sent to the scene execution module monitoring the device, triggering the scene execution module to detect whether there is a scene execution conflict in the corresponding second logic control list.
[0023] In some embodiments, determining whether the logic control information in the fourth logic control list has a scene execution conflict includes:
[0024] It is determined whether there is any mutual exclusion conflict in the logic control information in the fourth logic control list.
[0025] In some embodiments, the logic control information includes a scene condition and a corresponding operation, and determining whether the logic control information in the fourth logic control list has a mutual exclusion conflict includes:
[0026] Determine whether there is a scenario condition in the fourth logic control list that triggers two or more mutually exclusive operations;
[0027] In the case that there is a scenario condition in the fourth logic control list that triggers two or more mutually exclusive operations, there is a mutual exclusion conflict in the logic control information in the fourth logic control list.
[0028] In some embodiments, the method for discovering scene execution conflicts, used in a scene execution module, includes:
[0029] Receive attribute change information and detection instructions issued by the scene coordination module;
[0030] Detecting whether the logic control information in the second logic control list has a scene execution conflict according to the attribute change information and the detection instruction;
[0031] In the case where the logic control information in the second logic control list has a scene execution conflict, the third logic control list is fed back to the scene coordination module to trigger the scene coordination module to obtain the fourth logic control list storing the logic control information and determine whether the logic control information in the fourth logic control list has a scene execution conflict.
[0032] In some embodiments, detecting whether the logic control information in the second logic control list has a scene execution conflict according to the attribute change information and the detection instruction includes:
[0033] When the detection instruction is received, it is detected whether the logic control information in the second logic control list corresponding to the attribute change information has a scene execution conflict.
[0034] In some embodiments, detecting whether the logic control information in the second logic control list has a scene execution conflict according to the attribute change information and the detection instruction includes:
[0035] According to the attribute change information and the detection instruction, it is detected whether the logic control information in the second logic control list has a mutual exclusion conflict.
[0036] In some embodiments, the logic control information includes a scene condition and a corresponding operation, and detecting whether the logic control information in the second logic control list has a mutual exclusion conflict according to the attribute change information and the detection instruction includes:
[0037] Detecting, according to the attribute change information and the detection instruction, whether there is a scene condition in the second logic control list that triggers two or more mutually exclusive operations;
[0038] When there is a scenario condition in the second logic control list that triggers two or more mutually exclusive operations, it is determined that there is a mutually exclusive conflict in the logic control information in the second logic control list.
[0039] In some embodiments, the system for discovering scenario execution conflicts includes a scenario coordination module and a scenario execution module;
[0040] The scenario coordination module is used to detect changes in device attributes; generate a device attribute change structure when the device attributes are changed, wherein the device attribute change structure includes a first logic control list storing logic control information; trigger the scenario execution module monitoring the device to perform scenario execution conflict detection and feedback a third logic control list storing logic control information when the detection result is that there is no scenario execution conflict; receive the third logic control list, merge the third logic control list with the first logic control list in the corresponding device attribute change structure to obtain a fourth logic control list; determine whether the logic control information in the fourth logic control list has a scenario execution conflict;
[0041] The scene execution module is used to receive the attribute change information and detection instructions issued by the scene coordination module; detect whether there is a scene execution conflict in the second logic control list according to the attribute change information and the detection instruction; when there is a scene execution conflict in the second logic control list, feed back the third logic control list to the scene coordination module to trigger the scene coordination module to obtain the fourth logic control list storing the logic control information and determine whether there is a scene execution conflict in the logic control information in the fourth logic control list.
[0042] In some embodiments, the apparatus for discovering scenario execution conflicts comprises a processor and a memory storing program instructions, and the processor is configured to execute the above-mentioned method for discovering scenario execution conflicts when executing the program instructions.
[0043] In some embodiments, the device includes the above-mentioned apparatus for discovering scene execution conflicts.
[0044] The method, apparatus, and device for discovering scene execution conflicts provided by the embodiments of the present disclosure can achieve the following technical effects: by generating a device attribute change structure when the attributes of the device change, merging the logic control list with the logic control list in the corresponding device attribute change structure according to the logic control list obtained by the scene execution module, and determining whether there is a scene execution conflict in the merged logic control list. This enables the scene coordination module to interact concurrently with multiple scene execution modules, and can detect scene execution conflicts between multiple scene execution modules, making it easy for users to discover scene execution conflicts in a timely manner.
[0045] The above general description and the following description are exemplary and explanatory only and are not intended to limit the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] One or more embodiments are exemplarily described by corresponding drawings, which do not limit the embodiments. Elements with the same reference numerals in the drawings are shown as similar elements, and the drawings do not constitute a scale limitation, and wherein:
[0047] Figure 1 is a schematic diagram of a method for discovering scene execution conflicts provided by an embodiment of the present disclosure;
[0048] Figure 2 is a schematic diagram of another method for discovering scene execution conflicts provided by an embodiment of the present disclosure;
[0049] Figure 3 is a schematic diagram of another method for discovering scene execution conflicts provided by an embodiment of the present disclosure;
[0050] Figure 4 is a schematic diagram of a method for a scene execution module to discover scene execution conflicts provided by an embodiment of the present disclosure;
[0051] Figure 5 is a schematic diagram of a system for scene instantiation provided by an embodiment of the present disclosure;
[0052] Figure 6 It is a schematic diagram of a device for discovering scene execution conflicts provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0053] In order to be able to understand the features and technical contents of the embodiments of the present disclosure in more detail, the implementation of the embodiments of the present disclosure is described in detail below in conjunction with the accompanying drawings. The attached drawings are for reference only and are not used to limit the embodiments of the present disclosure. In the following technical description, for the convenience of explanation, a full understanding of the disclosed embodiments is provided through multiple details. However, one or more embodiments can still be implemented without these details. In other cases, to simplify the drawings, well-known structures and devices can be simplified for display.
[0054] The terms "first", "second", etc. in the specification and claims of the embodiments of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchanged where appropriate, so that the embodiments of the embodiments of the present disclosure described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions.
[0055] Unless otherwise stated, the term "plurality" means two or more.
[0056] In the embodiment of the present disclosure, the character " / " indicates that the preceding and following objects are in an "or" relationship. For example, A / B indicates: A or B.
[0057] The term "and / or" is a description of the association relationship between objects, indicating that three relationships can exist. For example, A and / or B means: A or B, or, A and B.
[0058] Combination Figure 1 As shown, the embodiment of the present disclosure provides a method for discovering scene execution conflicts, which is used in a scene coordination module, including:
[0059] Step S101, detecting changes in device attributes;
[0060] Step S102, generating a device attribute change structure when the attribute of the device is changed, the device attribute change structure including a first logic control list storing logic control information;
[0061] Step S103, triggering the scene execution module of the monitoring device to perform scene execution conflict detection and feeding back a third logic control list storing logic control information if the detection result shows that there is no scene execution conflict;
[0062] Step S104, receiving the third logic control list, and merging the third logic control list with the first logic control list in the corresponding device attribute change structure to obtain a fourth logic control list;
[0063] Step S105: determine whether the logic control information in the fourth logic control list has any scene execution conflict.
[0064] A method for discovering scene execution conflicts provided by an embodiment of the present disclosure is adopted. By generating a device attribute change structure when the attributes of a device change, the logic control list obtained by the scene execution module is merged with the logic control list in the corresponding device attribute change structure, and it is determined whether there is a scene execution conflict in the merged logic control list. This enables the scene coordination module to interact concurrently with multiple scene execution modules, and can realize the detection of scene execution conflicts between multiple scene execution modules, so that users can discover scene execution conflicts in a timely manner.
[0065] Optionally, the device attribute change structure also includes attribute change information corresponding to the first logical control list; generating a device attribute change structure when the attributes of the device change, including: caching the attribute change information of the device when the attributes of the device change; establishing an empty first logical control list, and combining the attribute change information and the first logical control list into a device attribute change structure.
[0066] Optionally, the device attribute change structure also includes attribute change information and attribute change number corresponding to the first logical control list; when the attributes of the device change, the device attribute change structure is generated, including: when the attributes of the device change, caching the attribute change information of the device and establishing an attribute change number that uniquely identifies the attribute change information; establishing an empty first logical control list, and forming a device attribute change structure with the attribute change number, attribute change information and the first logical control list; storing the device attribute change structure in a preset attribute change dictionary; and determining the attribute change number as the key in the attribute change dictionary.
[0067] The above solution uses a structure to store device attribute change information and a logic control list, and can be retrieved in the form of dictionary storage, thereby enabling concurrent interaction of multi-scenario execution modules.
[0068] Optionally, triggering the scene execution module of the listening device to perform scene execution conflict detection includes: sending attribute change information and detection instructions to the scene execution module of the listening device, triggering the scene execution module to detect whether there is a scene execution conflict in the logic control information in its corresponding second logic control list.
[0069] In the case where there are multiple scene execution modules, the above scheme determines whether there is a scene execution conflict in the corresponding scene execution module by triggering the scene execution module to detect whether there is conflicting logic control information in its corresponding second logic control list, thereby realizing scene execution conflict detection for each of the multiple scene execution modules. Optionally, the scene execution conflict refers to some logical conflicts within a single scene or between scenes. Optionally, the scene execution conflict is a mutually exclusive conflict.
[0070] Optionally, determining whether the logic control information in the fourth logic control list has a scene execution conflict includes: determining whether the logic control information in the fourth logic control list has a mutual exclusion conflict.
[0071] Optionally, a mutual exclusion conflict occurs when a condition triggers multiple mutually exclusive operations.
[0072] Optionally, the logical control information includes scene conditions and corresponding operations, and determining whether there is a mutual exclusion conflict in the logical control information in the fourth logical control list includes: determining whether there is a scene condition in the fourth logical control list that triggers two or more mutually exclusive operations; in the case that there is a scene condition in the fourth logical control list that triggers two or more mutually exclusive operations, there is a mutual exclusion conflict in the logical control information in the fourth logical control list.
[0073] Combination Figure 2 As shown, the embodiment of the present disclosure provides a method for discovering scene execution conflicts, which is used in a scene execution module and includes:
[0074] Step S201, receiving attribute change information and detection instructions issued by the scene coordination module;
[0075] Step S202, detecting whether the logic control information in the second logic control list has a scene execution conflict according to the attribute change information and the detection instruction;
[0076] Step S203, when there is a scene execution conflict in the logic control information in the second logic control list, the third logic control list is fed back to the scene coordination module to trigger the scene coordination module to obtain the fourth logic control list storing the logic control information and determine whether there is a scene execution conflict in the logic control information in the fourth logic control list.
[0077] A method for discovering scene execution conflicts provided by an embodiment of the present disclosure is adopted. By generating a device attribute change structure when the attributes of a device change, the logic control list obtained by the scene execution module is merged with the logic control list in the corresponding device attribute change structure, and it is determined whether there is a scene execution conflict in the merged logic control list. This enables the scene coordination module to interact concurrently with multiple scene execution modules, and can realize the detection of scene execution conflicts between multiple scene execution modules, so that users can discover scene execution conflicts in a timely manner.
[0078] Optionally, detecting whether there is a scene execution conflict in the logic control information in the second logic control list according to the attribute change information and the detection instruction includes: when the detection instruction is received, detecting whether there is a scene execution conflict in the logic control information in the second logic control list corresponding to the attribute change information.
[0079] Optionally, the scene execution conflict refers to a logical conflict within a single scene or between scenes. The above scheme determines whether the corresponding scene execution module has a scene execution conflict by detecting whether there is conflicting logical control information in its corresponding second logical control list, so as to realize scene execution conflict detection of multiple scene execution modules in the case of multiple scene execution modules.
[0080] Optionally, detecting whether the logic control information in the second logic control list has a scene execution conflict according to the attribute change information and the detection instruction includes: detecting whether the logic control information in the second logic control list has a mutual exclusion conflict according to the attribute change information and the detection instruction.
[0081] Optionally, the logical control information includes scene conditions and corresponding operations, and the logical control information in the second logical control list is detected based on the attribute change information and the detection instruction whether there is a mutually exclusive conflict, including: detecting based on the attribute change information and the detection instruction whether there is a scene condition in the second logical control list that triggers two or more mutually exclusive operations; when there is a scene condition in the second logical control list that triggers two or more mutually exclusive operations, determining that the logical control information in the second logical control list has a mutually exclusive conflict.
[0082] Optionally, the first logic control list, the second logic control list, the third logic control list, and the fourth logic control list respectively include logic control information corresponding to the respective attribute change information. The logic control information is operation information performed on the device.
[0083] In actual applications, for systems with multiple scene execution modules, the scene coordination module is required to monitor changes in device attributes and detect whether there are execution conflicts between different scene execution modules. When the scene execution module starts a scene task, it informs the scene coordination module of the device attributes it needs to monitor; at the same time, the scene coordination module needs to record which scene execution modules monitor this device attribute. Optionally, the process of discovering scene execution conflicts includes:
[0084] In the first stage, attribute change detection is initiated:
[0085] The scene coordination module discovers that the attributes of the monitored device have changed; caches this attribute change information and establishes a unique identifier as the number of this attribute change; establishes an empty logic control list, the so-called logic control is what operation to perform on the device; the attribute change number, attribute change information, and logic control list are combined into a structure; this structure is put into a previously initialized attribute change dictionary storage, and the change number is used as the retrieval key in the dictionary; traverses all scene execution modules that monitor the attribute changes of this device, sends attribute change information, and informs the scene execution module for detection purposes, and then waits for feedback from each scene execution module.
[0086] In the second stage, the scene execution module makes conflict judgments:
[0087] The scene execution module receives the device attribute change and detects it according to the "scene execution module discovery method"; the scene execution module finds no conflict and sends all logical control information to the scene coordination module; the scene execution module finds a conflict; the scene execution module returns the conflict information to the scene coordination module; after receiving the scene coordination module, it will take the corresponding structure out of the dictionary; if the structure exists, it will remove the structure from the dictionary and determine whether there is a conflict; if the structure does not exist, it means that this attribute change has been determined to be a conflict before.
[0088] In the third stage, the scenario coordination module determines the conflict:
[0089] The scene coordination module receives the device logic control list fed back by a scene execution module; the scene coordination module takes out the corresponding structure from the dictionary; if the structure does not exist, it means that the conflict has been determined before this attribute change; the received logic control list is merged into the logic control list of the structure; the logic controls are grouped according to the controlled devices; all groups are traversed to determine whether there are mutually exclusive operations; if there are mutual exclusions, the structure is removed from the dictionary and it is determined that there is a conflict; if there is no mutual exclusion, it is further determined whether all scene execution modules have fed back, and if so, it is determined that there is no conflict.
[0090] Optionally, since the scene execution module may have a fault and cannot promptly feed back data to the scene coordination module, the scene coordination module sets a timeout threshold for each device attribute change. If no scene execution conflict is determined within the specified time, it is considered that there is no scene execution conflict.
[0091] Combination Figure 3 As shown, in some embodiments, the method for discovering scene execution conflicts has the following specific steps:
[0092] Step S301, the scene coordination module detects changes in device attributes;
[0093] Step S302, the scene coordination module establishes a unique identifier as an attribute change number of the attribute change information;
[0094] Step S303, the scene coordination module establishes an empty first logic control list;
[0095] Step S304, the scene coordination module combines the attribute change number, the attribute change information and the first logic control list into a device attribute change structure;
[0096] Step S305, the scene coordination module stores the device attribute change structure in a preset attribute change dictionary; the attribute change number is used as a key in the attribute change dictionary;
[0097] Step S306, the scene coordination module traverses all scene execution modules that monitor the properties of this device, and sends property change information and detection instructions to the scene execution modules;
[0098] Step S307, the scene execution module receives the attribute change information and the detection instruction;
[0099] Step S308, the scenario execution module traverses all scenario tasks and summarizes the logic controls triggered by all scenario tasks;
[0100] Step S309, the scene execution module groups the logic control by device;
[0101] Step S310, the scene execution module traverses all groups to determine whether there is a scene execution conflict in the second logic control list corresponding to the scene execution module, and executes step S311 if there is a scene execution conflict; and executes step S321 if there is no scene execution conflict;
[0102] Step S311, the scene execution module returns the third logic control list to the scene coordination module;
[0103] Step S312, the scene coordination module retrieves the device attribute change structure from the attribute change dictionary;
[0104] Step S313: if there is a structure corresponding to the third logic control list in the retrieved device attribute change structure, the scene coordination module merges the received third logic control list into the retrieved first logic control list, thereby obtaining a fourth logic control list;
[0105] Step S314, the scene coordination module groups the logic controls in the fourth logic control list by device;
[0106] Step S315: The scene coordination module traverses all groups to determine whether there is a scene execution conflict in the fourth logic control list; if there is a conflict, step S316 is executed; if there is no conflict, step S318 is executed;
[0107] Step S316, the scene coordination module removes the device attribute change structure with scene execution conflict from the attribute change dictionary;
[0108] Step S317, the scene coordination module determines that there is a conflict, and executes the scene execution conflict handling process and then ends;
[0109] Step S318, the scene coordination module determines whether all scene execution modules related to the device attribute change have fed back detection results; if all relevant scene execution modules have fed back detection results, it is determined that there is no scene execution conflict;
[0110] Step S319, the scene coordination module traverses all scene execution modules that monitor the properties of this device, and sends property change information and execution instructions to the scene execution modules;
[0111] Step S320, the scene execution module executes the scene task trigger, and then ends;
[0112] Step S321, the scene execution module feeds back conflict information to the scene coordination module, that is, the detection result is that there is a scene execution conflict;
[0113] Step S322, the scene coordination module retrieves the device attribute change structure from the attribute change dictionary. If there is a structure corresponding to the conflict information in the retrieved device attribute change structure, the scene coordination module executes step S316.
[0114] The above method can detect the scene execution conflicts between single-scene execution modules and multi-scene execution modules, and can detect the scene execution conflicts between single-scene tasks and multi-scene tasks. By implementing the multi-scene execution module to summarize the triggered logic execution information to the scene coordination module, the scene coordination module determines whether there is a scene execution conflict by device grouping. The scene coordination module caches device attribute changes and implements retrieval through dictionary storage, thereby realizing concurrent interaction of multiple scene execution modules.
[0115] Optionally, in actual applications, the scene execution module finds out whether there is a scene execution conflict by finding all triggered device controls, grouping the device control operations according to the controlled devices, and then determining whether there is a conflict in each group of controls. If so, it is determined that there is a scene execution conflict. Figure 4 As shown, in some embodiments, the method for the scene execution module to discover scene execution conflicts has the following specific steps:
[0116] Step S401, the monitoring device attributes are changed;
[0117] Step S402, traverse all tasks and summarize all triggered logic controls;
[0118] Step S403, grouping the logic control by device;
[0119] Step S404, traverse all groups to determine whether there is a scene execution conflict, if so, execute step S405, if not, execute step S406;
[0120] Step S405, processing scenario execution conflict process;
[0121] Step S406, executing all triggered logic controls.
[0122] In layman's terms, scenarios can be described as user intentions, which can be relatively clear, but are often vague. For example, two scenario examples are defined to illustrate:
[0123] Scenario A: If the door is opened from outside, the corridor wall light turns on.
[0124] Scenario B: Light up the hallway if the door is opened from outdoors.
[0125] Generally speaking, a scene can be understood as "achieving a certain effect" after "satisfying certain conditions".
[0126] The scene task can be regarded as the actual operation of the scene. The entire scene system needs to coordinate the existing device terminals to meet the needs of the scene. Take two scenes as examples:
[0127] Scenario A Task: Monitor the smart door lock X of the entrance door. If it is opened from the outside, turn on the corridor wall lamp Y.
[0128] Scenario B task: Monitor the smart door lock X of the entrance door. If it is opened from the outside, detect the brightness information of the corridor light sensor Z. If the brightness is less than K, turn on the corridor wall light Y.
[0129] In general, a scenario task can be understood as "performing a certain operation on a certain device" after "a certain condition is met on a certain device."
[0130] The scene has descriptions of "conditions", "effects", and "logic". For example, in scene B, "door opens from outdoors" is a trigger condition, and the subsequent "light up the corridor" is a trigger effect; the "if, then" in series is logic. For example, "outdoors" is a constraint condition, "door opens" is a trigger condition; "light up" is a trigger, and "corridor" is an effect constraint. The scene task is composed of "device-side conditions", "device-side execution", and "logic". For scene task B, "corridor door lock opens" is a device-side condition; "turn on corridor wall lamp" is a device-side execution; "if, then" is logic. For example, "entrance door" is a device-side condition constraint, "door lock opens" is a device-side condition; "corridor" is a constraint on the execution device, and "turn on wall lamp" is a device-side execution. In this way, the scene task is matched with the scene.
[0131] The device side provides all the information in the scene task except the logic. For example, "entrance door" is a location attribute of the door lock, "opening the door" is an operation of the door lock, "corridor" is a location attribute of the wall lamp, and "turning on the light" is an operation of the wall lamp. Therefore, the device model can be regarded as: attribute + operation.
[0132] In addition to logic, everything in the scene model can be considered a "capability". When defining a device model, it is also necessary to define a mapping relationship between its attributes, operations and known "capabilities". After establishing the mapping relationship, you can know what capabilities a device model has.
[0133] The process of converting a scene into a scene task is the instantiation of the scene. According to the above examples of scenes and scene tasks, instantiation can be seen as converting "what conditions are met" into "what device end meets what conditions" and "what effects are achieved" into "what operations are performed on what device end". For example, in scene B, "opening the door from the outdoors" is matched to "there is a smart door lock in the corridor with the ability to detect opening from the outdoors", and "lighting up the corridor" is matched to "there is a wall lamp in the corridor with the ability to light up", and the photoreceptor is an optional device end. Solving the problem of "whether it is necessary to light up" is an implicit and optional additional judgment condition, that is, "whether it is necessary to light up" is matched to "there is a photoreceptor in the corridor that can detect the current brightness of the corridor". If there is no such condition, it will not affect the overall scene effect. Here, the necessary capabilities in the scene are called "mandatory capabilities" and the optional capabilities are called "optional capabilities". Optionally, the optional capabilities are the capabilities of the sensor device, that is, the capabilities that can realize various scene detections, such as temperature detection, light detection, humidity detection, etc.
[0134] Scene task conflict refers to some logical conflicts within a single scene or between scenes. Mutually exclusive conflicts are when one condition triggers multiple mutually exclusive operations. For example, turning on and off the air conditioner are two mutually exclusive operations. Scene task A controls the air conditioner to cool when the temperature is higher than 25 degrees; scene task B controls the air conditioner to heat when the temperature is lower than 27 degrees; if the room temperature becomes 26 degrees, the triggering operations of the two scenes are mutually exclusive.
[0135] The disclosed embodiment provides a system for discovering scene execution conflicts, including a scene coordination module and a scene execution module;
[0136] A scene coordination module is used to detect changes in device attributes; generate a device attribute change structure when the device attributes are changed, the device attribute change structure including a first logic control list storing logic control information; trigger a scene execution module of a monitoring device to perform scene execution conflict detection and feedback a third logic control list storing logic control information when the detection result is that there is no scene execution conflict; receive the third logic control list, merge the third logic control list with the first logic control list in the corresponding device attribute change structure to obtain a fourth logic control list; determine whether the logic control information in the fourth logic control list has a scene execution conflict;
[0137] The scene execution module is used to receive the attribute change information and detection instructions issued by the scene coordination module; detect whether there is a scene execution conflict in the second logic control list according to the attribute change information and the detection instruction; if there is a scene execution conflict in the second logic control list, feed back the third logic control list to the scene coordination module to trigger the scene coordination module to obtain the fourth logic control list storing the logic control information and determine whether there is a scene execution conflict in the logic control information in the fourth logic control list.
[0138] The system for discovering scene execution conflicts provided by the embodiments of the present disclosure can enable the scene coordination module to interact concurrently with multiple scene execution modules, and can detect scene execution conflicts between multiple scene execution modules, making it easy for users to discover scene execution conflicts in a timely manner.
[0139] like Figure 5As shown, in some embodiments, the system for scene instantiation includes a scene coordination module 1, a scene instantiation module 2, a scene execution module 3 and a device end 4. The scene coordination module 1 is connected to the scene instantiation module 2, the scene execution module 3 and the device end 4 respectively. The scene coordination module 1 scans the execution module and sends the scene task to the scene execution module 3. The scene coordination module 1 scans the device end list. The scene coordination module 1 requests the scene instantiation module 2 for scene instantiation and receives the instantiation scene fed back by the scene instantiation module 2. The scene execution module 3 is connected to the device end 4, and the scene execution module 3 and the device end 4 perform data exchange to enable the device end 4 to execute the scene task.
[0140] The scene coordination module is responsible for the overall coordination of scene execution and is deployed on a server in the cloud or on a device, such as a smart gateway in a home. In the present invention, it is specifically responsible for maintaining the device end list and the scene execution module list, maintaining the scene model, initiating the instantiation of the scene, pushing the instantiated scene task to the scene execution module, initiating the merging of multiple optional scene tasks, etc.
[0141] The scene instantiation module is responsible for instantiating the scene into a scene task. Similar to the scene coordination module, the instantiation module can be a server deployed in the cloud, or it can be deployed on a device, such as a smart gateway in a home. In some embodiments, the scene instantiation module and the scene coordination module are deployed on the same device.
[0142] The scene execution module is responsible for executing scene tasks. One scene execution module can execute multiple scene tasks. The scene execution module can be a server deployed in the cloud or deployed on a device, such as a smart gateway in a home. It can also be a master control device with certain computing and storage capabilities.
[0143] Combination Figure 6 As shown, an embodiment of the present disclosure provides a device for discovering scene execution conflicts, including a processor (processor) 100 and a memory (memory) 101 storing program instructions. Optionally, the device may also include a communication interface (Communication Interface) 102 and a bus 103. Among them, the processor 100, the communication interface 102, and the memory 101 can communicate with each other through the bus 103. The communication interface 102 can be used for information transmission. The processor 100 can call the program instructions in the memory 101 to execute the method for discovering scene execution conflicts in the above embodiment.
[0144] In addition, the program instructions in the above-mentioned memory 101 can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product.
[0145] The memory 101 is a computer-readable storage medium that can be used to store software programs and computer executable programs, such as program instructions / modules corresponding to the method in the embodiment of the present disclosure. The processor 100 executes the function application and data processing by running the program instructions / modules stored in the memory 101, that is, the method for discovering scene execution conflicts in the above embodiment is implemented.
[0146] The memory 101 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function; the data storage area may store data created according to the use of the terminal device, etc. In addition, the memory 101 may include a high-speed random access memory and may also include a non-volatile memory.
[0147] An apparatus for discovering scene execution conflicts provided by an embodiment of the present disclosure is used. When the attributes of a device change, a device attribute change structure is generated. According to the logic control list obtained by the scene execution module, the logic control list is merged with the logic control list in the corresponding device attribute change structure, and it is determined whether there is a scene execution conflict in the merged logic control list. In this way, the scene coordination module can interact concurrently with multiple scene execution modules, and the scene execution conflicts between multiple scene execution modules can be detected, which is convenient for users to discover scene execution conflicts in a timely manner.
[0148] An embodiment of the present disclosure provides a device, comprising the above-mentioned apparatus for discovering scene execution conflicts.
[0149] Optionally, the devices include computers, servers, and smart user terminals such as smart phones, tablet computers, smart gateways, and smart speakers.
[0150] The device generates a device property change structure when the device properties change, merges the logic control list with the logic control list in the corresponding device property change structure according to the logic control list obtained by the scene execution module, and determines whether there is a scene execution conflict in the merged logic control list. This enables the scene coordination module to interact concurrently with multiple scene execution modules, and can detect scene execution conflicts between multiple scene execution modules, making it easier for users to discover scene execution conflicts in a timely manner.
[0151] An embodiment of the present disclosure provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are configured to execute the above-mentioned method for discovering scene execution conflicts.
[0152] An embodiment of the present disclosure provides a computer program product, which includes a computer program stored on a computer-readable storage medium. The computer program includes program instructions. When the program instructions are executed by a computer, the computer executes the above-mentioned method for discovering scene execution conflicts.
[0153] The computer-readable storage medium mentioned above may be a transient computer-readable storage medium or a non-transitory computer-readable storage medium.
[0154] The technical solution of the embodiment of the present disclosure can be embodied in the form of a software product, which is stored in a storage medium and includes one or more instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in the embodiment of the present disclosure. The aforementioned storage medium may be a non-transient storage medium, including: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes, or a transient storage medium.
[0155] The above description and the accompanying drawings fully illustrate the embodiments of the present disclosure so that those skilled in the art can practice them. Other embodiments may include structural, logical, electrical, process and other changes. The embodiments represent only possible changes. Unless explicitly required, separate components and functions are optional, and the order of operation may vary. The parts and features of some embodiments may be included in or replace the parts and features of other embodiments. Moreover, the words used in this application are only used to describe the embodiments and are not used to limit the claims. As used in the description of the embodiments and the claims, unless the context clearly indicates, the singular forms of "a", "an" and "the" are intended to include plural forms as well. Similarly, the term "and / or" as used in this application refers to any and all possible combinations of listings containing one or more associated ones. In addition, when used in the present application, the term "comprise" and its variants "comprises" and / or comprising refer to the presence of stated features, wholes, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or groups thereof. In the absence of further restrictions, the elements defined by the sentence "comprising a ..." do not exclude the presence of other identical elements in the process, method or device comprising the elements. In this article, each embodiment may focus on the differences from other embodiments, and the same and similar parts between the various embodiments may refer to each other. For the methods, products, etc. disclosed in the embodiments, if they correspond to the method part disclosed in the embodiments, then the relevant parts can refer to the description of the method part.
[0156] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software may depend on the specific application and design constraints of the technical solution. The technicians may use different methods for each specific application to implement the described functions, but such implementations should not be considered to exceed the scope of the embodiments of the present disclosure. The technicians may clearly understand that, for the convenience and simplicity of description, the specific working processes of the systems, devices and units described above may refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here.
[0157] In the embodiments disclosed herein, the disclosed methods and products (including but not limited to devices, equipment, etc.) can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units can be only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between each other shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms. The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to implement this embodiment. In addition, each functional unit in the embodiment of the present disclosure may be integrated in a processing unit, or each unit may exist physically alone, or two or more units may be integrated in one unit.
[0158] The flowchart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to the embodiment of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. In the description corresponding to the flowchart and the block diagram in the accompanying drawings, the operations or steps corresponding to different boxes can also occur in a different order from the order disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. Each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented by a dedicated hardware-based system that performs the specified functions or actions, or may be implemented by a combination of dedicated hardware and computer instructions.
Claims
1. A method for discovering scene execution conflicts, used in a scene coordination module, characterized in that: include: Detect changes in device attributes; generating a device attribute change structure when an attribute of the device changes, the device attribute change structure including a first logic control list storing logic control information; triggering a scene execution module of the monitoring device to perform scene execution conflict detection and feeding back a third logic control list storing logic control information if the detection result shows that there is no scene execution conflict; receiving the third logic control list, and merging the third logic control list with the first logic control list in the corresponding device attribute change structure to obtain a fourth logic control list; Determine whether the logic control information in the fourth logic control list has a scene execution conflict; The device attribute change structure also includes attribute change information and attribute change number corresponding to the first logic control list; Generating a device attribute change structure when an attribute of the device changes includes: caching attribute change information of the device and establishing a unique identifier as an attribute change number of the attribute change information when an attribute of the device changes; An empty first logic control list is established, and the attribute change number, attribute change information and the first logic control list are combined into a device attribute change structure; the device attribute change structure is stored in a preset attribute change dictionary; the attribute change number is determined as a key in the attribute change dictionary.
2. The method according to claim 1, characterized in that The device attribute change structure also includes attribute change information corresponding to the first logic control list; When the property of the device changes, a device property change structure is generated, including: When the attribute of the device changes, cache the attribute change information of the device; An empty first logic control list is established, and the attribute change information and the first logic control list are combined into a device attribute change structure.
3. The method according to claim 1 or 2, characterized in that: Triggering a scene execution module that monitors the device to perform scene execution conflict detection, including: The attribute change information and the detection instruction are sent to the scene execution module monitoring the device, triggering the scene execution module to detect whether there is a scene execution conflict in the corresponding second logic control list.
4. The method according to any one of claims 1 to 2, characterized in that: Determining whether the logic control information in the fourth logic control list has a scene execution conflict includes: It is determined whether there is any mutual exclusion conflict in the logic control information in the fourth logic control list.
5. The method according to claim 4, characterized in that The logical control information includes a scene condition and a corresponding operation, and determining whether the logical control information in the fourth logical control list has a mutually exclusive conflict includes: Determine whether there is a scenario condition in the fourth logic control list that triggers two or more mutually exclusive operations; In the case that there is a scenario condition in the fourth logic control list that triggers two or more mutually exclusive operations, there is a mutual exclusion conflict in the logic control information in the fourth logic control list.
6. A method for discovering scene execution conflicts, used in a scene execution module, characterized in that: include: Receive attribute change information and detection instructions issued by the scene coordination module; Detecting whether the logic control information in the second logic control list has a scene execution conflict according to the attribute change information and the detection instruction; In the case where the logic control information in the second logic control list does not have a scene execution conflict, feeding back the third logic control list to the scene coordination module to trigger the scene coordination module to obtain a fourth logic control list storing the logic control information and determine whether the logic control information in the fourth logic control list has a scene execution conflict; The fourth logic control list is obtained by combining the third logic control list with the first logic control list in the device attribute change structure; wherein the device attribute change structure is generated by the scene coordination module when the attribute of the device changes; The device attribute change structure also includes attribute change information and attribute change number corresponding to the first logical control list; when the attribute of the device changes, a device attribute change structure is generated, including: when the attribute of the device changes, cache the attribute change information of the device and establish a unique identifier as the attribute change number of the attribute change information; establish an empty first logical control list, and form a device attribute change structure with the attribute change number, attribute change information and the first logical control list; the device attribute change structure is stored in a preset attribute change dictionary; and the attribute change number is determined as the key in the attribute change dictionary.
7. The method according to claim 6, characterized in that Detecting whether the logic control information in the second logic control list has a scene execution conflict according to the attribute change information and the detection instruction includes: When the detection instruction is received, it is detected whether the logic control information in the second logic control list corresponding to the attribute change information has a scene execution conflict.
8. The method according to claim 6, characterized in that Detecting whether the logic control information in the second logic control list has a scene execution conflict according to the attribute change information and the detection instruction includes: According to the attribute change information and the detection instruction, it is detected whether the logic control information in the second logic control list has a mutual exclusion conflict.
9. The method according to claim 8, characterized in that The logic control information includes scene conditions and corresponding operations, and detecting whether the logic control information in the second logic control list has a mutual exclusion conflict according to the attribute change information and the detection instruction includes: Detecting, according to the attribute change information and the detection instruction, whether there is a scene condition in the second logic control list that triggers two or more mutually exclusive operations; When there is a scenario condition in the second logic control list that triggers two or more mutually exclusive operations, it is determined that there is a mutually exclusive conflict in the logic control information in the second logic control list.
10. A system for discovering scene execution conflicts, characterized in that: Includes scenario coordination module and scenario execution module; The scene coordination module is used to detect changes in the properties of the device; generate a device property change structure when the properties of the device are changed, the device property change structure includes a first logic control list storing logic control information; trigger the scene execution module monitoring the device to perform scene execution conflict detection and feedback a third logic control list storing logic control information when the detection result is that there is no scene execution conflict; receiving the third logic control list, and merging the third logic control list with the first logic control list in the corresponding device attribute change structure to obtain a fourth logic control list; Determine whether the logic control information in the fourth logic control list has a scene execution conflict; The scene execution module is used to receive the attribute change information and the detection instruction sent by the scene coordination module; detect whether there is a scene execution conflict in the second logic control list according to the attribute change information and the detection instruction; if there is no scene execution conflict in the logic control information in the second logic control list, feed back the third logic control list to the scene coordination module to trigger the scene coordination module to obtain the fourth logic control list storing the logic control information and determine whether there is a scene execution conflict in the logic control information in the fourth logic control list; The device attribute change structure also includes attribute change information and attribute change number corresponding to the first logic control list; Generating a device attribute change structure when an attribute of the device changes includes: caching attribute change information of the device and establishing a unique identifier as an attribute change number of the attribute change information when an attribute of the device changes; An empty first logic control list is established, and the attribute change number, attribute change information and the first logic control list are combined into a device attribute change structure; the device attribute change structure is stored in a preset attribute change dictionary; the attribute change number is determined as a key in the attribute change dictionary.
11. A device for discovering scene execution conflicts, comprising a processor and a memory storing program instructions, characterized in that: The processor is configured to perform the method for discovering scene execution conflicts as described in any one of claims 1 to 9 when executing the program instructions.
12. An electronic device, characterized in that: It comprises the device for discovering scene execution conflicts as claimed in claim 11.
