Equipment control method and device and storage medium
By identifying and judging the attributes and contents of smart home automation rules and determining their compliance, it solves the problems of difficulty in selecting conditions and difficulty in compliance detection when creating rules, and improves the efficiency and accuracy of the creation process.
Patent Information
- Application Number
- CN202311126836.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-01
- Publication Date
- 2025-03-04
AI Technical Summary
When users create smart home automation rules, it is difficult for users to choose the appropriate smart device functional conditions, and they cannot detect the compliance of the rules in real time, resulting in complex creation process and prone to errors.
By obtaining and identifying the properties and contents that trigger the execution of TAP rules, the compliance of the rules is determined and device control is performed based on compliance. Specific steps include identifying the attributes and contents of the trigger class and execution class conditions, judging their consistency to determine the compliance of the rules.
Improves the user experience when creating automation rules, reduces the occurrence of errors, and simplifies the display and compliance inspection of smart home automation control scenarios.
Smart Images

Figure CN119556600A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of smart home automation, and in particular to a device control method, device and storage medium. Background Art
[0002] The mainstream paradigm of smart home automation rules is the Trigger-Action Programming (TAP) unified paradigm. When ordinary users create automation rules, the biggest problem they encounter is how to choose the functional conditions of smart devices. Users can only set the trigger conditions in advance and then add execution to create an automation rule that conforms to the TAP paradigm. However, during the creation process, users cannot be demonstrated the smart home automation control scenario, nor can they be prompted for compliance of the rules in a timely manner. They can only wait until the creation is completed and observe whether the execution meets expectations through the trigger conditions. Summary of the invention
[0003] In order to overcome the problems existing in the related art, the present disclosure provides a device control method, apparatus and storage medium.
[0004] According to a first aspect of an embodiment of the present disclosure, there is provided a device control method, including:
[0005] Obtain a trigger execution TAP rule for controlling a device; identify the attributes and content of the TAP rule, wherein the attributes include category attributes and / or room attributes of the device, wherein the category attributes include proprietary category attributes, general category attributes, or composite category attributes, and the content includes content direction and content value; determine compliance of the TAP rule based on the attributes and the content, and control the device based on the compliance.
[0006] In one embodiment, the number of the TAP rules is one or more, and each TAP rule includes a trigger class condition and an execution class condition; identifying the attributes and content of the TAP rule includes: identifying the attributes and content of the trigger class condition to obtain trigger class attributes and trigger class content, and identifying the attributes and content of the execution class condition to obtain execution class attributes and execution class content; determining the compliance of the TAP rule based on the attributes and the content includes: determining the compliance of the TAP rule based on the consistency between the trigger class attributes and the execution class attributes, and the consistency between the trigger class content and the execution class content.
[0007] In one implementation, determining compliance of the TAP rule based on consistency between the trigger attribute and the execution attribute, and consistency between the trigger content and the execution content, includes:
[0008] If the trigger attribute and the execution attribute are both proprietary category attributes, and the sub-attributes included in the proprietary category attributes are consistent, and the directions corresponding to the trigger content and the execution content are consistent, then it is determined that the TAP rule is not compliant.
[0009] In one embodiment, the method further comprises:
[0010] If there is a composite category attribute in the trigger attribute and the execution attribute, the sub-attributes in the composite category attribute are decomposed to obtain the proprietary category attributes corresponding to the sub-attributes.
[0011] In one implementation, determining compliance of the TAP rule based on consistency between the trigger attribute and the execution attribute, and consistency between the trigger content and the execution content, includes:
[0012] If the sub-attributes included in the trigger attribute and the execution attribute are consistent, but the directions corresponding to the trigger content and the execution content are inconsistent, the compliance of the TAP rule is determined based on the trigger content value and the execution content value.
[0013] In one embodiment, determining the compliance of the TAP rule based on the trigger content value and the execution content value includes: determining the positive content value and the negative content value in the trigger content direction and the execution content direction; if the positive content value is greater than the negative content value, determining that the TAP rule is compliant.
[0014] In one implementation, the trigger attribute and the execution attribute, the trigger content and the execution content belong to the same TAP rule.
[0015] In one embodiment, the TAP rule includes a first TAP rule and a second TAP rule; the compliance of the TAP rule is determined based on the consistency between the trigger class attribute and the execution class attribute, and the consistency between the trigger class content and the execution class content, including: if the sub-attributes included in the trigger class attribute and the execution class attribute in the first TAP rule and the second TAP rule are inconsistent, then the TAP rule is determined to be non-compliant; if the sub-attributes included in the trigger class attribute and the execution class attribute in the first TAP rule and the second TAP rule are consistent, then the compliance of the TAP rule is determined based on the consistency between the corresponding trigger class content and execution class content in the first TAP rule and the second TAP rule.
[0016] In one embodiment, the compliance of the TAP rule is determined based on the consistency between the trigger content and the execution content corresponding to each of the first TAP rule and the second TAP rule, including: if the content directions of the execution content of the first TAP rule and the trigger content of the second TAP rule are inconsistent, the TAP rule is determined to be non-compliant; if the content directions of the execution content of the first TAP rule and the trigger content of the second TAP rule are consistent and positive, and the content value of the execution content of the first TAP rule is the largest, and the content value of the execution content of the second TAP rule is the smallest, the TAP rule is determined to be compliant; if the content directions of the execution content of the first TAP rule and the trigger content of the second TAP rule are consistent and both are negative, the content value of the execution content of the first rule is the smallest, and the content value of the execution content of the second rule is the largest, the TAP rule is determined to be compliant.
[0017] According to a second aspect of an embodiment of the present disclosure, there is provided a device control apparatus, including:
[0018] An acquisition unit is used to acquire a trigger execution TAP rule for controlling a device; an identification unit is used to identify the attributes and content of the TAP rule, wherein the attributes include category attributes and / or room attributes of the device, the category attributes include proprietary category attributes, general category attributes or composite category attributes, and the content includes content direction and content value; an execution unit is used to determine the compliance of the TAP rule based on the attributes and the content, and control the device based on the compliance.
[0019] In one embodiment, the number of the TAP rules is one or more, and each TAP rule includes a trigger class condition and an execution class condition; the identification unit identifies the attributes and content of the TAP rule in the following manner: identifies the attributes and content of the trigger class condition to obtain trigger class attributes and trigger class content, and identifies the attributes and content of the execution class condition to obtain execution class attributes and execution class content; the execution unit determines the compliance of the TAP rule based on the attributes and the content in the following manner, including: determining the compliance of the TAP rule based on the consistency between the trigger class attributes and the execution class attributes, and the consistency between the trigger class content and the execution class content.
[0020] In one embodiment, the execution unit determines the compliance of the TAP rule based on the consistency between the trigger class attribute and the execution class attribute, and the consistency between the trigger class content and the execution class content in the following manner: if the trigger class attribute and the execution class attribute are both proprietary category attributes, and the sub-attributes included in the proprietary category attributes are consistent, and the directions corresponding to the trigger class content and the execution class content are consistent, then the TAP rule is determined to be non-compliant.
[0021] In one embodiment, the execution unit is further used for: if there is a composite category attribute in the trigger attribute and the execution attribute, then disassembling the sub-attributes in the composite category attribute to obtain the proprietary category attribute corresponding to the sub-attribute.
[0022] In one embodiment, the execution unit determines the compliance of the TAP rule based on the consistency between the trigger class attribute and the execution class attribute, and the consistency between the trigger class content and the execution class content in the following manner: if the sub-attributes included in the trigger class attribute and the execution class attribute are consistent, but the directions corresponding to the trigger class content and the execution class content are inconsistent, then the compliance of the TAP rule is determined based on the trigger class content value and the execution class content value.
[0023] In one embodiment, the execution unit determines the compliance of the TAP rule based on the trigger content value and the execution content value in the following manner: determine the positive content value and the negative content value in the trigger content direction and the execution content direction; if the positive content value is greater than the negative content value, determine that the TAP rule is compliant.
[0024] In one implementation, the trigger attribute and the execution attribute, the trigger content and the execution content belong to the same TAP rule.
[0025] In one embodiment, the TAP rule includes a first TAP rule and a second TAP rule; the execution unit determines the compliance of the TAP rule based on the consistency between the trigger class attribute and the execution class attribute, and the consistency between the trigger class content and the execution class content in the following manner: if the sub-attributes included in the trigger class attribute and the execution class attribute in the first TAP rule and the second TAP rule are inconsistent, the TAP rule is determined to be non-compliant; if the sub-attributes included in the trigger class attribute and the execution class attribute in the first TAP rule and the second TAP rule are consistent, the compliance of the TAP rule is determined based on the consistency between the corresponding trigger class content and execution class content in the first TAP rule and the second TAP rule.
[0026] In one embodiment, the execution unit determines the compliance of the TAP rule based on the consistency between the trigger content and the execution content corresponding to each of the first TAP rule and the second TAP rule in the following manner: if the content directions of the execution content of the first TAP rule and the trigger content of the second TAP rule are inconsistent, the TAP rule is determined to be non-compliant; if the content directions of the execution content of the first TAP rule and the trigger content of the second TAP rule are consistent and positive, and the content value of the execution content of the first TAP rule is the largest, and the content value of the execution content of the second TAP rule is the smallest, then the TAP rule is determined to be compliant; if the content directions of the execution content of the first TAP rule and the trigger content of the second TAP rule are consistent and both are negative, the content value of the execution content of the first rule is the smallest, and the content value of the execution content of the second rule is the largest, then the TAP rule is determined to be compliant.
[0027] According to a third aspect of an embodiment of the present disclosure, there is provided a device control apparatus, including:
[0028] A processor; a memory for storing processor executable instructions; wherein the processor is configured to: execute the device control method described in the first aspect or any one of the embodiments of the first aspect.
[0029] According to the fourth aspect of an embodiment of the present disclosure, a storage medium is provided, in which instructions are stored. When the instructions in the storage medium are executed by a processor of a terminal, the terminal is enabled to execute the device control method described in the first aspect or any one of the embodiments of the first aspect.
[0030] The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: obtaining a trigger to execute a TAP rule for controlling a device, identifying the attributes and content of the TAP rule, determining the compliance of the TAP rule based on the attributes and the content, and controlling the device based on the compliance.
[0031] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0033] Figure 1 The present invention is a flowchart of a device control method according to an exemplary embodiment.
[0034] Figure 2 The invention is a flowchart showing a method of determining compliance of the TAP rule based on the attribute and the content according to an exemplary embodiment.
[0035] Figure 3 The present invention is a flowchart of a device control method according to an exemplary embodiment.
[0036] Figure 4 The present invention is a flowchart of a device control method according to an exemplary embodiment.
[0037] Figure 5 The present invention is a flowchart of a device control method according to an exemplary embodiment.
[0038] Figure 6 The present invention is a flowchart showing a method of determining compliance of the TAP rule based on the trigger content value and the execution content value according to an exemplary embodiment.
[0039] Figure 7 The present invention is a flowchart of a device control method according to an exemplary embodiment.
[0040] Figure 8 The present invention is a flowchart of a device control method according to an exemplary embodiment.
[0041] Fig. 9 The present invention is a flowchart of a device control method according to an exemplary embodiment.
[0042] Fig.10 The present invention is a flowchart of a device control method according to an exemplary embodiment.
[0043] Fig.11 The present invention is a flowchart of a device control method according to an exemplary embodiment.
[0044] Fig.12 The present invention is a flowchart of a device control method according to an exemplary embodiment.
[0045] Fig.13 The invention is a block diagram of a device control apparatus according to an exemplary embodiment.
[0046] Fig.14 The invention is a block diagram of a device control apparatus according to an exemplary embodiment.
[0047] Fig.15 The invention is a block diagram of a device control apparatus according to an exemplary embodiment. DETAILED DESCRIPTION
[0048] Here, exemplary embodiments will be described in detail, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present disclosure.
[0049] Smart home automation technology refers to the use of various smart devices and systems to achieve automated control and management of the home environment. With the continuous development of science and technology, smart home automation technology is also constantly improving and improving. In particular, the standardization and popularization of the unified paradigm technical rules of smart home automation trigger execution process (Trigger-Action Programming, TAP) or event-condition-action (Event-Condition-Action, ECA), so that all program processes related to smart home automation control will be based on this paradigm and automatically perform corresponding tasks through trigger conditions. At present, the development status of the field of smart home automation technology is mainly reflected in the following aspects:
[0050] Diversification of smart devices: With the continuous emergence of various smart devices, such as smart speakers, smart door locks, smart lamps, etc., people can control and manage their home environment more conveniently.
[0051] 1) Integration of the Internet and the Internet of Things: Through the Internet and the Internet of Things technology, people can remotely control and manage their home environment, such as remotely controlling air conditioners, TVs and other devices through mobile phone applications (Application, APP);
[0052] 2) Application of artificial intelligence technology: Artificial intelligence technology can make smart home systems more intelligent and adaptive, such as achieving more convenient operation through voice recognition, image recognition and other technologies;
[0053] 3) Security and privacy protection: As people’s awareness of security and privacy protection increases, smart home systems also need to pay more attention to data security and user privacy protection.
[0054] In short, smart home automation technology will become more and more mature and perfect in the future, and will be widely used in people's daily lives.
[0055] Currently, users need to have a high technical threshold to customize or create new home automation rules. They need to understand programs and processes, device functions and features, home scene planning, etc. These undoubtedly make the popularization of smart home automation face many challenges. The average user has no programming skills or program concepts, and even does not understand the functional properties of the device. TAP is a programming model that enables users to connect services and devices by writing if-then rules. As these systems are deployed in more and more complex scenarios, users must be able to identify programming errors and think about how to fix them. Common TAP programming errors include rule logic errors, condition non-compliance errors, trigger or execution errors, etc. For example, rule logic errors may cause rules to be triggered repeatedly or cannot be triggered, condition non-compliance errors may cause rules to be triggered or fail to trigger as expected, and trigger or execution errors may cause rules to fail to be executed correctly. To prevent these errors, programming best practices and specifications need to be used, such as using input validation, error handling, and logging mechanisms. At the same time, automation platform-level mechanisms can also be used to detect and prevent certain categories of errors. After the condition configuration is completed, the device execution can be completed smoothly and in line with user expectations, avoiding typical rule logic errors, especially the incompliance between the creation conditions and device execution, which are mainly concentrated in control flow errors (Control-Flow Bugs).
[0056] The mainstream paradigm of smart home automation rules is the TAP unified paradigm, that is, the trigger execution process, so some devices are used for Trigger trigger condition judgment in TAP. The biggest problem that ordinary users encounter when creating automation rules is how to choose the functional conditions of smart devices. Simply put, users have no concept of automation trigger, execution and other conditions. Users can only set the trigger conditions in advance and then add execution to create an automation rule that conforms to the TAP paradigm. However, during the creation process, users cannot demonstrate the smart home automation control scenario to users, nor can they prompt the compliance of the rules in time. They can only wait for the creation to be completed and observe whether the execution meets expectations through the trigger conditions. Especially when the TAP system is deployed in more and more complex scenarios, users must be able to identify programming errors and think about how to fix them. However, users are actually unable to consciously identify similar control flow errors (Control-Flow Bugs). There are three types of control flow errors (Control-FlowBugs) (all using the creation of air conditioning automation rules as an example).
[0057] 1) Infinite Loop:
[0058] In an automated system, if a sensor detects an event and triggers a device execution, which in turn triggers the event detected by the sensor, this can result in an infinite loop.
[0059] Trigger1: When the temperature in the living room drops to 24 degrees →Action1: Turn on the air conditioning heating mode in the living room; →Trigger2: When the temperature in the living room rises to 28 degrees Action2: Open the windows in the living room to cool down; →... This logic will cause the two rules to operate continuously in a loop.
[0060] 2) Contradictory Action:
[0061] In an automation system, if a sensor detects an event and triggers an equipment action, the equipment performs a contradictory action.
[0062] Trigger: When the living room temperature drops to 24 degrees → Action: Turn on the dehumidification mode of the living room air conditioner. In this logic, cooling has nothing to do with dehumidification, and it is obvious that the operations performed by the device are contradictory.
[0063] Or: Trigger: When the temperature in the living room drops to 24 degrees → Action: Turn on the cooling mode of the living room air conditioner, turn on the heating mode of the living room air conditioner. It is obvious in this logic that the operations performed by the device are also contradictory or invalid.
[0064] Or: Trigger1: When the living room temperature drops to 24 degrees → Action1: Turn on the living room air conditioner heating mode to the target temperature of 30 degrees; → Trigger2: When the living room temperature rises to 28 degrees → Action2: Turn on the living room air conditioner cooling mode to the target temperature of 22 degrees; → …
[0065] The two rules will cause the living room air conditioner to perform contradictory operations of heating and cooling at the same time between 28 degrees and 30 degrees.
[0066] 3) Repeated Triggering:
[0067] The user expected a rule to be triggered only once, but in fact it was triggered multiple times.
[0068] Trigger: When the temperature in the living room rises to 28 degrees → Action: Turn on the air conditioning heating mode in the living room.
[0069] This logic will cause the living room air conditioner to execute heating mode when the living room temperature is above 28 degrees, and the temperature will continue to rise and remain in the triggering living room temperature condition range without stopping.
[0070] These errors are not detectable and fixable by users and are currently one of the biggest mistakes and difficulties for users to create and use smart home automation.
[0071] Users need to understand the trigger conditions and execution tasks corresponding to the device functions like programmers, and they need to have programming thinking. The logic and process based on program execution need to be manually screened and sorted, which has a considerable threshold and complexity. The creation cost is high, the user experience is poor, and it is difficult to popularize. Among them, for the selection of complex conditions, it is difficult for users to have a more efficient grasp of the relationship logic and attributes between the trigger conditions, and it is also difficult to understand or perceive the various complex parameter values corresponding to the equipment, which makes it easy to make errors in the process of creating smart home automation.
[0072] Based on this, an embodiment of the present disclosure provides a device control method, which obtains a trigger execution TAP rule for controlling a device, identifies the attributes and content of the TAP rule, determines the compliance of the TAP rule based on the attributes and content, and controls the device based on the compliance.
[0073] Figure 1 is a flow chart of a device control method according to an exemplary embodiment. Figure 1 As shown, the following steps are included.
[0074] In step S101, a trigger execution TAP rule for controlling a device is obtained.
[0075] In step S102, the attributes and contents of the TAP rule are identified.
[0076] In the disclosed embodiment, the attributes include category attributes and / or room attributes of the device, the category attributes include proprietary category attributes, general category attributes or composite category attributes, and the content includes content direction and content value.
[0077] Exemplarily, the rules are first summarized, attributes (preferences) are marked, and content (data) is extracted.
[0078] In App, rule conditions have two elements: preference and data.
[0079] Rule:E Trigger (preference,data)→E Action (preference, data), that is, the rule includes trigger class (attribute, content) → execution class (attribute, content).
[0080] 1) Preferences are divided into category attributes and room attributes;
[0081] Category attributes are divided into proprietary categories, general categories, and composite categories.
[0082] a. The trigger conditions of the proprietary category and the corresponding execution conditions of the proprietary category are generally effective only when they are matched.
[0083] Exclusive category attributes, such as lighting, environment, curtains, security, cleaning, and other major categories:
[0084] Lighting: Lights related to lighting, switches for controlling lights, and sensors related to lighting, etc.
[0085] Environment category: air quality-related conditioning equipment includes air conditioners, purifiers, humidifiers, dehumidifiers, fresh air blowers, etc., as well as ventilation doors and windows, and air quality-related sensors, etc.;
[0086] Security category: cameras, door locks, and exterior windows related to security protection, as well as sensors for monitoring water, smoke, and toxic and hazardous gases;
[0087] Cleaning (clean) category: washing machines, clothes drying racks, sweeping machines, etc. related to cleaning;
[0088] b. General category attributes include human trigger or presence status, notification reminder, time, geographic location, etc. The trigger conditions or execution conditions of general categories can be flexibly matched and are not restricted.
[0089] c. The triggering conditions or execution conditions of a composite category include two or more category attributes, for example:
[0090] Curtain: Equipment related to curtain motors. Because it is related to lighting and privacy, it also includes two major categories: lighting and security.
[0091] Window: Equipment related to window openers. Because it is related to the internal and external air environment and security, it also includes the attributes of the two major categories of environment and security.
[0092] The room attributes are user-defined. Only the rule conditions related to the device and the operations related to the device execution have room attributes: living room, bedroom, kitchen, etc.
[0093] 2) Content (data): direction and value;
[0094] Direction: opening or closing, rising or falling, arriving or leaving, etc. It is divided into positive and negative. For example, opening, rising or arriving can be defined as positive, and the opposite is negative.
[0095] Value: a set value, time or place, etc.
[0096] In step S103, compliance of the TAP rule is determined based on the attributes and content, and the device is controlled based on the compliance.
[0097] In the disclosed embodiment, the compliance of the TAP rule is determined based on the category attributes and / or room attributes of the TAP rule and the value and direction of the TAP rule content, and the device is controlled based on the compliance.
[0098] In the embodiment of the present disclosure, the number of TAP rules is one or more, and each TAP rule includes a triggering condition and an execution condition.
[0099] In the embodiment of the present disclosure, the TAP rule may be a single rule or multiple rules.
[0100] In the disclosed embodiment, Rule:E Trigger →E Action (Trigger class → Execution class).
[0101] For example, based on the TAP unified paradigm, the trigger condition is generally an instantaneous time "point" or event "point", and the execution (Action) is also an instantaneous event "point". In addition to determining the relationship between the trigger and the execution (Action) within a single rule, it is also necessary to consider the mutual influence between multiple rules. According to the TAP paradigm, there are two types of mode rules:
[0102] One is EE (Event→Event), where the first Event in ESE refers to the trigger condition and the second Event refers to the execution condition;
[0103] The other is ESE (Event-State→Event), in which the events that are satisfied at the same time are trigger conditions in a specific state (State corresponds to Condition).
[0104] In the disclosed embodiment, the trigger condition attributes and contents are identified to obtain the trigger attributes and trigger contents, and the execution condition attributes and contents are identified to obtain the execution attributes and execution contents.
[0105] In the embodiment of the present disclosure, the attributes and contents of the triggering conditions and the attributes and contents of the execution conditions in the rules are identified and acquired.
[0106] Figure 2 is a flow chart of a device control method according to an exemplary embodiment. Figure 2 As shown, the following steps are included.
[0107] In step S201, based on the consistency between the trigger attributes and the execution attributes, and the consistency between the trigger content and the execution content.
[0108] In the embodiment of the present disclosure, compliance of the TAP rule is determined based on the consistency of the trigger attribute and the execution attribute, and the consistency of the value and direction of the trigger content and the execution content.
[0109] In step S202, compliance of the TAP rule is determined.
[0110] Figure 3 is a flow chart of a device control method according to an exemplary embodiment. Figure 3 As shown, the following steps are included.
[0111] In step S301, if the trigger attribute and the execution attribute are both proprietary category attributes, and the sub-attributes included in the proprietary category attributes are consistent, and the directions corresponding to the trigger content and the execution content are consistent.
[0112] In step S302, it is determined that the TAP rule is not compliant.
[0113] For example, Trigger: When the living room temperature rises to 28 degrees → Action: Turn on the living room air conditioning heating mode. That is, the trigger attribute and the execution attribute are both proprietary category attributes, and the temperature sub-attributes included in the proprietary category attributes are consistent, and the directions corresponding to the trigger content and the execution content are consistent, which are both temperature increase. It is determined that the TAP rule is not compliant.
[0114] Rule:E Trigger →E Action
[0115]
[0116] e perp 1=e perp 2
[0117] Figure 4 is a flow chart of a device control method according to an exemplary embodiment. Figure 4 As shown, the following steps are included.
[0118] In step S401, if there is a composite category attribute in the trigger attribute and the execution attribute, the sub-attributes in the composite category attribute are decomposed.
[0119] In step S402, the exclusive category attribute corresponding to the sub-attribute is obtained.
[0120] In the embodiment of the present disclosure, if there are composite category attributes in the attributes of the triggering condition and the attributes of the execution condition, the composite category attributes are decomposed into single attributes to obtain corresponding proprietary category attributes.
[0121] Figure 5 is a flow chart of a device control method according to an exemplary embodiment. Figure 5 As shown, the following steps are included.
[0122] In step S501, if the sub-attributes included in the trigger attribute and the execution attribute are consistent, but the directions corresponding to the trigger content and the execution content are inconsistent.
[0123] In step S502, compliance of the TAP rule is determined based on the trigger content value and the execution content value.
[0124] In the embodiment of the present disclosure, if the sub-attributes included in the trigger class attributes and the execution class attributes are consistent, but the directions corresponding to the trigger class content and the execution class content are inconsistent, and the positive content values in the trigger class and the execution class are greater than the negative content values, it is determined that the TAP rule is compliant.
[0125] In the embodiment of the present disclosure, if the sub-attributes included in the trigger class attributes and the execution class attributes are consistent, but the directions corresponding to the trigger class content and the execution class content are inconsistent, and the positive content values in the trigger class and the execution class are less than the negative content values, it is determined that the TAP rule is not compliant.
[0126] Figure 6 is a flow chart of a device control method according to an exemplary embodiment. Figure 6 As shown, the following steps are included.
[0127] In step S601, the positive content value and the negative content value in the trigger content direction and the execution content direction are determined.
[0128] In step S602, if the positive content value is greater than the negative content value, it is determined that the TAP rule is compliant.
[0129] In the embodiment of the present disclosure, if the direction of the triggering content is positive and the direction of the execution content is negative, the triggering content value should be greater than the execution content value.
[0130] In the embodiment of the present disclosure, if the direction of the triggering content is negative and the direction of the execution content is positive, the triggering content value should be smaller than the execution content value.
[0131] In the embodiment of the present disclosure, the trigger attribute and the execution attribute, the trigger content and the execution content belong to the same TAP rule.
[0132] In the disclosed embodiment, Rule:E Trigger (preference,data)→E Action (preference, data), that is, the rule includes trigger class (attribute, content) → execution class (attribute, content).
[0133] For example,
[0134] E Trigger ={e perp ,e data}.(Trigger conditions include attributes (preference) and content (data))
[0135] e perp (cate,room); (the trigger condition attribute (preference) includes the category attribute and the room attribute)
[0136] e data (direction, value); (the trigger condition content (data) includes direction (direction) and value (value))
[0137]
[0138] Device execution operations also have two elements: properties (preference) and content (data).
[0139] Among them, the execution type device attributes (preference): category (category) and room (room) attributes;
[0140] The execution class device content (data): direction (direction), value (value).
[0141] E Action ={e perp ,e data}.(Execution class conditions include attributes (preference) and content (data))
[0142] e perp(cate,room); (The execution condition attribute (preference) includes the category attribute and the room attribute)
[0143] e data (direction, value); (the trigger condition content (data) includes direction (direction) and value (value))
[0144]
[0145] In the embodiment of the present disclosure, the TAP rule includes trigger-type attributes and content and execution-type attributes and content.
[0146] Figure 7 is a flow chart of a device control method according to an exemplary embodiment. Figure 7 As shown, the following steps are included.
[0147] In step S701, if the sub-attributes included in the trigger attribute and the execution attribute in the first TAP rule and the second TAP rule are inconsistent.
[0148] In step S702, it is determined that the TAP rule is not compliant.
[0149] In the embodiment of the present disclosure, when a single TAP rule is compliant, it is determined whether there are multiple other rules. If so, the compliance of multiple TAP rules is determined. The attributes and contents corresponding to the trigger class and execution class of each rule are obtained, and the attributes and contents of each TAP rule are compared two by two. If the sub-attributes included in the trigger class attribute and the execution class attribute in the first TAP rule and the second TAP rule are inconsistent, it is determined that the TAP rule is not compliant.
[0150] Figure 8 is a flow chart of a device control method according to an exemplary embodiment. Figure 8 As shown, the following steps are included.
[0151] In step S801, if the sub-attributes included in the trigger attribute and the execution attribute in the first TAP rule and the second TAP rule are consistent.
[0152] In step S802, compliance of the TAP rule is determined based on the consistency between the trigger content and the execution content corresponding to the first TAP rule and the second TAP rule.
[0153] In the embodiment of the present disclosure, if the sub-attributes included in the trigger class attributes and the execution class attributes in the first TAP rule and the second TAP rule are consistent, if the execution class content direction of the first TAP rule is consistent with the trigger class content direction of the second TAP rule, and the trigger class content value of the first TAP rule and the execution class content value of the second TAP rule meet the requirements, then compliance is achieved.
[0154] For example, take creating air conditioning automation rules as an example.
[0155] Trigger1: When the temperature in the living room drops to 24 degrees → Action1: Living room air conditioning heating mode;
[0156] Rule 1 new :E T rigger1 →E Action1 (Trigger Conditions → Execution Conditions)
[0157]
[0158]
[0159] Trigger2: When the temperature in the living room rises to 28 degrees → Action2: Open the windows in the living room to cool down.
[0160] Rule 2 new :E Trigger2 →E Action2
[0161]
[0162] The temperature sub-attribute in the environment category is consistent, i.e. perp1 =e perp2 =e perp3 =e perp4 , and the execution content direction of the first TAP rule is consistent with the trigger content direction of the second TAP rule, and the trigger content value of the first TAP rule and the execution content value of the second TAP rule meet the requirements, then it is compliant.
[0163] For example, take creating air conditioning automation rules as an example.
[0164] Trigger 1: When the living room temperature drops to 24 degrees → Action 1: Turn on the living room air conditioning heating mode to the target temperature of 30 degrees;
[0165] Rule 1 new :E Trigger1 →E Action1
[0166]
[0167] Trigger2: When the living room temperature rises to 28 degrees → Action2: Turn on the living room air conditioning cooling mode to the target temperature of 22 degrees.
[0168] Rule 2 new :E Trigger2 →E Action2
[0169]
[0170] e perp1 =e perp2 =e perp3 =e perp4 , that is, the attribute values of the trigger class attribute and the execution class attribute in the first TAP rule and the second TAP rule are the same, (The execution content direction of the first TAP rule and the trigger content direction of the second TAP rule are both positive), then e data2 (value) <e data3 (value) (the execution class content value of the first TAP rule is less than the trigger class content value of the second TAP rule), and (The direction of the trigger content in the first TAP rule and the direction of the execution content in the second TAP rule are both negative), then e data4 (value)>e data1 (value) (the triggering content value of the first TAP rule is less than the execution content value of the second TAP rule), then it is compliant.
[0171] In the embodiment of the present disclosure, if the sub-attributes included in the trigger class attributes and the execution class attributes in the first TAP rule and the second TAP rule are consistent, if the execution class content direction of the first TAP rule is consistent with the trigger class content direction of the second TAP rule, and the trigger class content value of the first TAP rule and the execution class content value of the second TAP rule do not meet the requirements, then it is non-compliant.
[0172] For example, let's take the creation of air conditioning automation rules as an example. The temperature sub-attribute in the environment category is consistent, that is, e perp1 =e perp2 =e perp3 =e perp4 , and the execution content direction of the first TAP rule is consistent with the trigger content direction of the second TAP rule, and the trigger content value of the first TAP rule and the execution content value of the second TAP rule do not meet the requirements, then it is non-compliant.
[0173] Trigger1: When the temperature in the living room drops to 24 degrees → Action1: Living room air conditioning heating mode;
[0174] Rule 1:E Trigger1 →E Action1
[0175]
[0176] Trigger2: When the temperature in the living room rises to 28 degrees → Action2: Open the windows in the living room to cool down.
[0177] Rule 2: E Trigger2 →E Action2
[0178]
[0179] There is nothing wrong with each rule. In the second rule, window is a composite attribute, which includes the temperature sub-attribute in the environment category. perp1 =e perp2 =e perp3 =e perp4 . And the execution content in the first rule is e data1 ↓24,e data2 ↑Thermostatic logic can be achieved, the second rule e data3 ↑28,e data4 ↓(Assuming the outdoor temperature is higher than e data3 ) can also achieve temperature control logic.
[0180] But when the two tuning rules are connected together, e data1 ↓24,e data2 ↑→e data3 ↑28,e data4 ↓…will continue in an infinite loop, resulting in non-compliance.
[0181] For example, take creating air conditioning automation rules as an example.
[0182] Trigger 1: When the living room temperature drops to 24 degrees → Action 1: Turn on the living room air conditioning heating mode to the target temperature of 30 degrees;
[0183] Rule 1:E Trigger1 →E Action1
[0184]
[0185] Trigger2: When the living room temperature rises to 28 degrees → Action2: Turn on the living room air conditioning cooling mode to the target temperature of 22 degrees.
[0186] Rule 2: E Trigger2 →E Action2
[0187]
[0188] There is no problem with each rule alone. perp1 =e perp2 =e perp3 = perp4 , and the first rule executes content e data1 ↓24,e data2 ↑30 can achieve temperature control logic, the second rule e data3 ↑28,e data4 ↓22 can also achieve temperature control logic. Rule 1 is full e data1 (direction)=-e data2 (direction), e data1 (value) <e data2 (value), and rule 2 satisfies e data3 (direction)=-e data4 (direction), e data3 (value)>e data4 (value), but when the two tuning rules are connected together, then e data1 ↓24,e data2 ↑30+e data3 ↑28,e data4 ↓22, the execution condition temperature rise value of rule one exceeds the trigger condition temperature rise value of rule two, thus affecting each other and resulting in non-compliance.
[0189] In an embodiment of the present disclosure, if the sub-attributes included in the trigger class attributes and the execution class attributes in the first TAP rule and the second TAP rule are consistent, and if the execution class content direction of the first TAP rule is inconsistent with the trigger class content direction of the second TAP rule, the TAP rule is determined to be non-compliant.
[0190] Fig. 9 is a flow chart of a device control method according to an exemplary embodiment. Fig. 9 As shown, the following steps are included.
[0191] In step S901, if the content directions of the execution content of the first TAP rule and the triggering content of the second TAP rule are inconsistent.
[0192] In step S902, it is determined that the TAP rule is not compliant.
[0193] In the embodiment of the present disclosure, if the execution content direction of the first TAP rule is positive and the trigger content direction of the second TAP rule is negative, it is determined that the TAP rule is non-compliant.
[0194] In the embodiment of the present disclosure, if the execution content direction of the first TAP rule is negative and the trigger content direction of the second TAP rule is positive, it is determined that the TAP rule is non-compliant.
[0195] Fig.10 is a flow chart of a device control method according to an exemplary embodiment. Fig.10 As shown, the following steps are included.
[0196] In step S1001, if the content directions of the execution content of the first TAP rule and the trigger content of the second TAP rule are consistent and positive, and the content value of the execution content of the first TAP rule is the largest, the content value of the execution content of the second TAP rule is the smallest.
[0197] In step S1002, it is determined whether the TAP rules are compliant.
[0198] Fig.11 is a flow chart of a device control method according to an exemplary embodiment. Fig.11 As shown, the following steps are included.
[0199] In step S1101, if the execution content of the first TAP rule and the trigger content of the second TAP rule have the same content direction and are both negative, the content value of the execution content of the first rule is the smallest, and the content value of the execution content of the second rule is the largest.
[0200] In step S1102 , it is determined whether the TAP rules are compliant.
[0201] Fig.12 is a flow chart of a device control method according to an exemplary embodiment. Fig.12 shown.
[0202] Get the category attributes corresponding to each condition, whether it is a proprietary category, a general category, or a composite category, and the room attributes corresponding to each condition. Get the content of the execution condition, and then determine the logical relationship.
[0203] 1) Summarize, mark and extract the attributes and contents of trigger type A and execution type B conditions, and distinguish between proprietary category attributes, general category attributes and composite category attributes;
[0204] 2) Obtain the category attributes corresponding to each condition, whether it is a proprietary category, a general category, or a conforming category, and the room attributes corresponding to each condition. Obtain the content of the execution class conditions, and then determine whether the logical relationship between the trigger class A and the execution class B conditions will cause control flow errors (Control-Flow Bugs);
[0205] 3) Determine whether the trigger category A and execution category B conditions are exclusive categories or composite categories. If they are exclusive categories or composite categories, determine whether the sub-attributes in the category attributes are consistent: that is, Rule: E TriggerA →
[0206] E ActionB (Trigger condition A → Execution condition B), e perpA =e perpB (Sub-attributes are consistent);
[0207] 4) Determine whether the directions in the contents of trigger class A and execution class B are consistent, and compare the values in the contents. First, e dataA (direction)=-e dataB (direction)
[0208] (i.e. the directions in the contents of the conditions of the break trigger class A and the execution class B are inconsistent), then if
[0209] Then satisfy e dataA (value)>
[0210] e dataB (value) (the value of the triggering condition A is greater than the value of the executing condition B); if
[0211] Then satisfy e dataA (value)<
[0212] e dataB (value) (the value of the triggering condition A is less than the value of the executing condition B);
[0213] 5) If any of the conditions in the judgment trigger category A and execution category B is a general category attribute, the rule is not affected and is logically established;
[0214] 6) If there are multiple rules, and each rule is judged to be ok, for example, the impact between the rules is judged: whether the sub-attributes in the category attributes of each condition of all rules are consistent, for example, the judgment trigger class A and execution class B conditions in rule 1 and the judgment trigger class C and execution class D conditions in rule 2:
[0215] That is, Rule 1:E TriggerA →E ActionB , Rule2:E TriggerC →E ActionD
[0216] Then perpA =e perpB =e perpC =e perpD …(the sub-attributes in the category attributes are the same)
[0217] Continue to determine whether the directions in the contents of the trigger and execution conditions of each rule are consistent, and compare the values in the contents:
[0218] First, if e dataA (direction) = e dataD (direction) = positive (the directions in the contents of the trigger type A and execution type D conditions between rules are both positive), e dataB (direction) = e dataC (direction) = negative (the directions of the execution class B and trigger class C conditions between rules are both negative), then e dataD (value)>e dataA (value) (the content value of the execution class D between rules is greater than the content value of the trigger class A) and e dataC (value)>e dataB (value) (the content value of trigger class C between rules is greater than the content value of execution class B); if e dataA (direction) = e dataD (dir ection) = negative, e dataB (direction) = e dataC (direction) = positive, then e dataD (value) <e dataA (value) (the content value of the execution class D between rules is less than the content value of the trigger class A) and e dataC (value) <e dataB (value) (the content value of trigger class C among rules is less than the content value of execution class B).
[0219] The following uses the creation of air conditioning automation rules as an example to explain control flow errors.
[0220] 1) Infinite Loop Problem
[0221] Trigger1: When the temperature in the living room drops to 24 degrees → Action1: Living room air conditioning heating mode;
[0222] Rule 1:E Trigger1 →E Action1
[0223]
[0224] Trigger2: When the temperature in the living room rises to 28 degrees → Action2: Open the windows in the living room to cool down.
[0225] Rule 2: E Trigger2 →E Action2
[0226]
[0227] There is nothing wrong with each rule. In the second rule, window is a composite attribute, which includes the temperature sub-attribute in the environment category. perp1 =e perp2 =e perp3 =e perp4 . And the execution content in the first rule is e data1 ↓24,e data2 ↑Thermostatic logic can be achieved, the second rule e data3 ↑28,e data4 ↓(Assuming the outdoor temperature is higher than e data3 ) can also achieve temperature control logic.
[0228] After the two tuning rules are connected, e data1 ↓24,e data2 ↑→e data3 ↑28,e data4 ↓...will continue indefinitely. So e data2 The default in (increase, default) is set to a value less than 28, that is, e data2 (value) <e data3 (value) is established, for example, it can be adjusted to:
[0229] Rule 1 new :E Trigger1 →E Action1
[0230]
[0231] Rule 2 new :ETrigger2 →E Action2
[0232]
[0233] 2) Contradictory Action Problem
[0234] Trigger: When the temperature in the living room drops to 24 degrees →Action: Turn on the dehumidification mode of the living room air conditioner.
[0235] Rule:E Trigger →E Action
[0236]
[0237] The paradox here is that the trigger attribute and execution attribute in the rule are inconsistent, that is, perp1 ≠e perp2 , so adjust e perp1 =e perp2 , and based on the conclusion in the infinite loop:
[0238] e data1 (direction)=-e data2 (direction), such as
[0239] Then e data1 (value) <e data2 (value)
[0240] It can be established, for example, adjusted to:
[0241] Rule new :E Trigger →E Action
[0242]
[0243] Trigger: When the temperature in the living room drops to 24 degrees → Action: Turn on the cooling mode of the living room air conditioner, and turn on the heating mode of the living room air conditioner.
[0244] Rule:E Trigger1 →E Action1+Action2
[0245]
[0246]
[0247] E aircondition2 ={eperp3 (temperature,living room),e data3 (increase,default)}.
[0248] Because e perp1 =e perp2 =e perp3 , but the execution content data2 =-e data3 This leads to a paradox of executing the exact opposite operation. So when the condition triggers the content e data1 (direction)=-e data2 (direction) or e data1 (direction)=-e data3 (direction) is established, and condition E aircondition1 Just delete it.
[0249] For continuous device execution, if Then data1 (value) <e data2 (value) <e data3 (value), for example, adjusted to:
[0250] Rule new :E Trigger1 →E Action1+Action2
[0251]
[0252] 3) Repeated Triggering Problem
[0253] Trigger: When the temperature in the living room rises to 28 degrees → Action: Turn on the air conditioning heating mode in the living room.
[0254] Rule:E Trigger →E Action
[0255]
[0256] e perp1 =e perp2 (Sub-attributes are the same) then e must be satisfied data1 (direction)=-e data2 (direction) (opposite direction), e data1 (value)>e data2 (value), for example, edata2 (increase, default) is adjusted to:
[0257] Rule new :E Trigger →E Action
[0258]
[0259] In the disclosed embodiment, the trigger and execution conditions in the rules are summarized, marked and extracted by attributes and content, and the proprietary category attributes, general category attributes and composite category attributes are distinguished. The category attributes corresponding to each condition are obtained, whether it is a proprietary category, a general category or a composite category, and the room attributes corresponding to each condition are obtained. The content of the execution conditions is obtained, and then the logical relationship between the trigger and execution conditions and whether there are control-flow bugs between the rules are determined.
[0260] In a single rule, determine whether the directions in the contents of the trigger and execution conditions are consistent, and compare the values in the contents.
[0261] If there are multiple rules, and each rule is judged to be ok, continue to judge whether the sub-attributes in the category attributes of each condition of all rules are consistent, and compare the values in the content, and finally determine whether all automation rules of the entire smart home have the potential risk of mutual influence.
[0262] The method and mathematical model are simple and easy to expand, and have low requirements on the algorithm and computing power of the rule system. They can improve the efficiency of users setting automation rules, reduce the occurrence of errors, and reduce the control risk of the entire smart home automation system. The application scenario of the disclosed technical solution is very typical. When a user needs to create an automation rule, strict calculation and planning are required before creation. Based on the TAP / ECA paradigm, in addition to the situation where each rule itself will not produce errors, there will be no contradictions between rules.
[0263] The present disclosure solves the inherent compliance of rules and the compliance between rules in ECA based on the TAP unified paradigm, wherein in the App, the execution class condition can be multiple events executed serially based on timing logic.
[0264] The present invention discloses a design for compliance judgment based on automation rules of TAP paradigm, especially laying a solid foundation for the recommended configuration of future smart home automation scenarios; it can quickly judge whether a single rule has an impact on other multiple rules during the user's setting of automation rules. It compares each rule itself and between rules to avoid control flow errors, and improves the efficiency and accuracy of automation rule creation.
[0265] Based on the same concept, an embodiment of the present disclosure also provides a device control apparatus.
[0266] It is understandable that the device control device provided in the embodiment of the present disclosure includes hardware structures and / or software modules corresponding to the execution of each function in order to realize the above functions. In combination with the units and algorithm steps of each example disclosed in the embodiment of the present disclosure, the embodiment of the present disclosure can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the technical solution of the embodiment of the present disclosure.
[0267] Fig.13 is a block diagram of a device control apparatus according to an exemplary embodiment. Fig.13 The device 100 includes an acquisition unit 101, an identification unit 102 and an execution unit 103.
[0268] An acquisition unit 101 is used to acquire a trigger execution TAP rule for controlling a device; an identification unit 102 is used to identify the attributes and content of the TAP rule, wherein the attributes include category attributes and / or room attributes of the device, the category attributes include proprietary category attributes, general category attributes or composite category attributes, and the content includes content direction and content value; an execution unit 103 is used to determine the compliance of the TAP rule based on the attributes and the content, and control the device based on the compliance.
[0269] In the embodiment of the present disclosure, the number of the TAP rules is one or more, and each TAP rule includes a trigger class condition and an execution class condition; the identification unit 102 identifies the attributes and content of the TAP rule in the following manner: identifies the attributes and content of the trigger class condition to obtain trigger class attributes and trigger class content, and identifies the attributes and content of the execution class condition to obtain execution class attributes and execution class content; the execution unit 103 determines the compliance of the TAP rule based on the attributes and the content in the following manner, including: determining the compliance of the TAP rule based on the consistency between the trigger class attributes and the execution class attributes, and the consistency between the trigger class content and the execution class content.
[0270] In the embodiment of the present disclosure, the execution unit 103 determines the compliance of the TAP rule based on the consistency between the trigger class attribute and the execution class attribute, and the consistency between the trigger class content and the execution class content in the following manner: if the trigger class attribute and the execution class attribute are both proprietary category attributes, and the sub-attributes included in the proprietary category attributes are consistent, and the directions corresponding to the trigger class content and the execution class content are consistent, then the TAP rule is determined to be non-compliant.
[0271] In the embodiment of the present disclosure, the execution unit 103 is further used to: if there is a composite category attribute in the trigger class attribute and the execution class attribute, then disassemble the sub-attributes in the composite category attribute to obtain the proprietary category attribute corresponding to the sub-attribute.
[0272] In the embodiment of the present disclosure, the execution unit 103 determines the compliance of the TAP rule based on the consistency between the trigger class attribute and the execution class attribute, and the consistency between the trigger class content and the execution class content in the following manner: if the sub-attributes included in the trigger class attribute and the execution class attribute are consistent, but the directions corresponding to the trigger class content and the execution class content are inconsistent, then the compliance of the TAP rule is determined based on the trigger class content value and the execution class content value.
[0273] In the embodiment of the present disclosure, the execution unit 103 determines the compliance of the TAP rule based on the trigger content value and the execution content value in the following manner: determine the positive content value and the negative content value in the trigger content direction and the execution content direction; if the positive content value is greater than the negative content value, the TAP rule is determined to be compliant.
[0274] In the embodiment of the present disclosure, the trigger attribute and the execution attribute, the trigger content and the execution content belong to the same TAP rule.
[0275] In an embodiment of the present disclosure, the TAP rule includes a first TAP rule and a second TAP rule; the execution unit determines the compliance of the TAP rule based on the consistency between the trigger class attribute and the execution class attribute, and the consistency between the trigger class content and the execution class content in the following manner 103: if the sub-attributes included in the trigger class attribute and the execution class attribute in the first TAP rule and the second TAP rule are inconsistent, the TAP rule is determined to be non-compliant; if the sub-attributes included in the trigger class attribute and the execution class attribute in the first TAP rule and the second TAP rule are consistent, the compliance of the TAP rule is determined based on the consistency between the corresponding trigger class content and execution class content in the first TAP rule and the second TAP rule.
[0276] In the embodiment of the present disclosure, the execution unit 103 determines the compliance of the TAP rule based on the consistency between the trigger content and the execution content corresponding to each of the first TAP rule and the second TAP rule in the following manner: if the content directions of the execution content of the first TAP rule and the trigger content of the second TAP rule are inconsistent, the TAP rule is determined to be non-compliant; if the content directions of the execution content of the first TAP rule and the trigger content of the second TAP rule are consistent and positive, and the content value of the execution content of the first TAP rule is the largest, and the content value of the execution content of the second TAP rule is the smallest, then the TAP rule is determined to be compliant; if the content directions of the execution content of the first TAP rule and the trigger content of the second TAP rule are consistent and both are negative, the content value of the execution content of the first rule is the smallest, and the content value of the execution content of the second rule is the largest, then the TAP rule is determined to be compliant.
[0277] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0278] Fig.14 2 is a block diagram of an apparatus 200 for device control according to an exemplary embodiment. The apparatus 200 may be provided as a terminal. For example, the apparatus 200 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0279] Reference Fig.14, the device 200 may include one or more of the following components: a processing component 202 , a memory 204 , a power component 206 , a multimedia component 208 , an audio component 210 , an input / output (I / O) interface 212 , a sensor component 214 , and a communication component 216 .
[0280] The processing component 202 generally controls the overall operation of the device 200, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 202 may include one or more processors 220 to execute instructions to perform all or part of the steps of the above-described method. In addition, the processing component 202 may include one or more modules to facilitate interaction between the processing component 202 and other components. For example, the processing component 202 may include a multimedia module to facilitate interaction between the multimedia component 208 and the processing component 202.
[0281] The memory 204 is configured to store various types of data to support operations on the device 200. Examples of such data include instructions for any application or method operating on the device 200, contact data, phone book data, messages, pictures, videos, etc. The memory 204 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0282] The power component 206 provides power to the various components of the device 200. The power component 206 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 200.
[0283] The multimedia component 208 includes a screen that provides an output interface between the device 200 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 208 includes a front camera and / or a rear camera. When the device 200 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0284] The audio component 210 is configured to output and / or input audio signals. For example, the audio component 210 includes a microphone (MIC), and when the device 200 is in an operation mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 204 or sent via the communication component 216. In some embodiments, the audio component 210 also includes a speaker for outputting audio signals.
[0285] I / O interface 212 provides an interface between processing component 202 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0286] The sensor assembly 214 includes one or more sensors for providing various aspects of the status assessment of the device 200. For example, the sensor assembly 214 can detect the open / closed state of the device 200, the relative positioning of components, such as the display and keypad of the device 200, the sensor assembly 214 can also detect the position change of the device 200 or a component of the device 200, the presence or absence of user contact with the device 200, the orientation or acceleration / deceleration of the device 200 and the temperature change of the device 200. The sensor assembly 214 can include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 214 can also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 214 can also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor or a temperature sensor.
[0287] The communication component 216 is configured to facilitate wired or wireless communication between the device 200 and other devices. The device 200 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 216 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 216 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0288] In an exemplary embodiment, the apparatus 200 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above method.
[0289] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 204 including instructions, and the instructions can be executed by the processor 220 of the device 200 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0290] Fig.15 is a block diagram of an apparatus 300 for device control according to an exemplary embodiment. For example, the apparatus 300 may be provided as a server. Fig.15 , the apparatus 300 includes a processing component 322, which further includes one or more processors, and a memory resource represented by a memory 332 for storing instructions, such as an application, that can be executed by the processing component 322. The application stored in the memory 332 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 322 is configured to execute the instructions to perform the above method.
[0291] The device 300 may also include a power supply component 326 configured to perform power management of the device 300, a wired or wireless network interface 350 configured to connect the device 300 to a network, and an input / output (I / O) interface 358. The device 300 may operate based on an operating system stored in the memory 332, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, or the like.
[0292] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 332 including instructions, which can be executed by the processing component 322 of the device 300 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0293] It is to be understood that in the present disclosure, "plurality" refers to two or more than two, and other quantifiers are similar. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. The singular forms "a", "the" and "the" are also intended to include plural forms, unless the context clearly indicates other meanings.
[0294] It is further understood that the terms "first", "second", etc. are used to describe various information, but such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other, and do not indicate a specific order or degree of importance. In fact, the expressions "first", "second", etc. can be used interchangeably. For example, without departing from the scope of the present disclosure, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as the first information.
[0295] It will be further understood that the terms “center”, “longitudinal”, “lateral”, “front”, “back”, “up”, “down”, “left”, “right”, “vertical”, “horizontal”, “top”, “bottom”, “inside”, “outside”, etc., indicating orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, are only for the convenience of describing the present embodiment and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation.
[0296] It can be further understood that, unless otherwise specified, “connection” includes a direct connection without other components between the two, and also includes an indirect connection with other components between the two.
[0297] It is further understood that, although the operations are described in a specific order in the drawings in the embodiments of the present disclosure, it should not be understood as requiring the operations to be performed in the specific order shown or in a serial order, or requiring the execution of all the operations shown to obtain the desired results. In certain environments, multitasking and parallel processing may be advantageous.
[0298] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any modifications, uses or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure.
[0299] It should be understood that the present disclosure is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the scope of the appended claims.
Claims
1. A device control method, characterized in that: The method comprises: Get the trigger execution TAP rules for controlling the device; Identify the attributes and content of the TAP rule, the attributes include category attributes and / or room attributes of the device, the category attributes include proprietary category attributes, general category attributes or composite category attributes, and the content includes content direction and content value; Compliance of the TAP rule is determined based on the attribute and the content, and the device is controlled based on the compliance.
2. The method according to claim 1, characterized in that The number of the TAP rules is one or more, and each TAP rule includes a trigger condition and an execution condition; The identifying attributes and contents of the TAP rule include: Identifying the attributes and contents of the triggering condition to obtain the triggering attributes and triggering contents, and identifying the attributes and contents of the execution condition to obtain the execution attributes and execution contents; The determining, based on the attribute and the content, compliance of the TAP rule includes: Compliance of the TAP rule is determined based on consistency between the triggering attributes and the execution attributes, and consistency between the triggering content and the execution content.
3. The method according to claim 2, characterized in that The determining the compliance of the TAP rule based on the consistency between the trigger attribute and the execution attribute, and the consistency between the trigger content and the execution content, includes: If the trigger attribute and the execution attribute are both proprietary category attributes, and the sub-attributes included in the proprietary category attributes are consistent, and the directions corresponding to the trigger content and the execution content are consistent, then it is determined that the TAP rule is not compliant.
4. The method according to claim 3, characterized in that The method further comprises: If there is a composite category attribute in the trigger attribute and the execution attribute, the sub-attributes in the composite category attribute are decomposed to obtain the proprietary category attributes corresponding to the sub-attributes.
5. The method according to claim 2, characterized in that: The determining the compliance of the TAP rule based on the consistency between the trigger attribute and the execution attribute, and the consistency between the trigger content and the execution content, includes: If the sub-attributes included in the trigger attribute and the execution attribute are consistent, but the directions corresponding to the trigger content and the execution content are inconsistent, the compliance of the TAP rule is determined based on the trigger content value and the execution content value.
6. The method according to claim 1, characterized in that The determining the compliance of the TAP rule based on the trigger content value and the execution content value includes: Determine the positive content value and the negative content value in the trigger content direction and the execution content direction; If the positive content value is greater than the negative content value, it is determined that the TAP rule is compliant.
7. The method according to any one of claims 2 to 6, characterized in that The trigger attribute and the execution attribute, the trigger content and the execution content belong to the same TAP rule.
8. The method according to claim 2, characterized in that: The TAP rule includes a first TAP rule and a second TAP rule; The determining the compliance of the TAP rule based on the consistency between the trigger attribute and the execution attribute, and the consistency between the trigger content and the execution content, includes: If the sub-attributes included in the trigger attribute and the execution attribute in the first TAP rule and the second TAP rule are inconsistent, it is determined that the TAP rule is non-compliant; If the sub-attributes included in the trigger class attributes and the execution class attributes in the first TAP rule and the second TAP rule are consistent, the compliance of the TAP rule is determined based on the consistency between the corresponding trigger class content and execution class content in the first TAP rule and the second TAP rule.
9. The method according to claim 8, characterized in that The determining the compliance of the TAP rule based on the consistency between the triggering content and the execution content corresponding to each of the first TAP rule and the second TAP rule includes: If the execution content of the first TAP rule is inconsistent with the triggering content of the second TAP rule, the TAP rule is determined to be non-compliant; If the content directions of the execution content of the first TAP rule and the trigger content of the second TAP rule are consistent and positive, and the content value of the execution content of the first TAP rule is the largest, and the content value of the execution content of the second TAP rule is the smallest, then the TAP rule is determined to be compliant; If the execution content of the first TAP rule and the trigger content of the second TAP rule have the same content direction and are both negative, the content value of the execution content of the first rule is the smallest, and the content value of the execution content of the second rule is the largest, then the TAP rule is determined to be compliant.
10. A device control device, characterized in that: include: An acquisition unit, used for acquiring a trigger execution TAP rule for controlling a device; an identification unit, configured to identify the attributes and content of the TAP rule, wherein the attributes include category attributes and / or room attributes of the device, the category attributes include proprietary category attributes, general category attributes, or composite category attributes, and the content includes content direction and content value; An execution unit is used to determine compliance of the TAP rule based on the attribute and the content, and control the device based on the compliance.
11. The device control device according to claim 10, characterized in that: The number of the TAP rules is one or more, and each TAP rule includes a trigger condition and an execution condition; The identification unit identifies the attributes and content of the TAP rule in the following manner: Identifying the attributes and contents of the triggering condition to obtain the triggering attributes and triggering contents, and identifying the attributes and contents of the execution condition to obtain the execution attributes and execution contents; The execution unit determines compliance of the TAP rule based on the attribute and the content in the following manner, including: Compliance of the TAP rule is determined based on consistency between the triggering attributes and the execution attributes, and consistency between the triggering content and the execution content.
12. The device control device according to claim 11, characterized in that: The execution unit determines compliance of the TAP rule based on consistency between the triggering attribute and the execution attribute, and consistency between the triggering content and the execution content in the following manner: If the trigger attribute and the execution attribute are both proprietary category attributes, and the sub-attributes included in the proprietary category attributes are consistent, and the directions corresponding to the trigger content and the execution content are consistent, then it is determined that the TAP rule is not compliant.
13. The device control device according to claim 12, characterized in that: The execution unit is also used for: If there is a composite category attribute in the trigger attribute and the execution attribute, the sub-attributes in the composite category attribute are decomposed to obtain the proprietary category attributes corresponding to the sub-attributes.
14. The device control device according to claim 11, characterized in that: The execution unit determines compliance of the TAP rule based on consistency between the triggering attribute and the execution attribute, and consistency between the triggering content and the execution content in the following manner: If the sub-attributes included in the trigger attribute and the execution attribute are consistent, but the directions corresponding to the trigger content and the execution content are inconsistent, the compliance of the TAP rule is determined based on the trigger content value and the execution content value.
15. The device control apparatus according to claim 10, characterized in that: The execution unit determines compliance of the TAP rule based on the trigger content value and the execution content value in the following manner: Determine the positive content value and the negative content value in the trigger content direction and the execution content direction; If the positive content value is greater than the negative content value, it is determined that the TAP rule is compliant.
16. The device control device according to claims 11 to 15, characterized in that: The trigger attribute and the execution attribute, the trigger content and the execution content belong to the same TAP rule.
17. The device control apparatus according to claim 11, characterized in that: The TAP rule includes a first TAP rule and a second TAP rule; The execution unit determines compliance of the TAP rule based on consistency between the triggering attribute and the execution attribute, and consistency between the triggering content and the execution content in the following manner: If the sub-attributes included in the trigger attribute and the execution attribute in the first TAP rule and the second TAP rule are inconsistent, it is determined that the TAP rule is non-compliant; If the sub-attributes included in the trigger class attributes and the execution class attributes in the first TAP rule and the second TAP rule are consistent, the compliance of the TAP rule is determined based on the consistency between the corresponding trigger class content and execution class content in the first TAP rule and the second TAP rule.
18. The device control apparatus according to claim 17, characterized in that: The execution unit determines compliance of the TAP rule based on consistency between the triggering content and the execution content corresponding to the first TAP rule and the second TAP rule in the following manner: If the execution content of the first TAP rule is inconsistent with the triggering content of the second TAP rule, the TAP rule is determined to be non-compliant; If the content directions of the execution content of the first TAP rule and the trigger content of the second TAP rule are consistent and positive, and the content value of the execution content of the first TAP rule is the largest, and the content value of the execution content of the second TAP rule is the smallest, then the TAP rule is determined to be compliant; If the execution content of the first TAP rule and the trigger content of the second TAP rule have the same content direction and are both negative, the content value of the execution content of the first rule is the smallest, and the content value of the execution content of the second rule is the largest, then the TAP rule is determined to be compliant.
19. A device control device, characterized in that: include: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to: execute the device control method described in any one of claims 1 to 9.
20. A non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a processor of a mobile terminal, the terminal is enabled to execute the device control method according to any one of claims 1 to 9.