CN115857375A - Method and device for generating equipment control rule, electronic equipment and storage medium - Google Patents

Method and device for generating equipment control rule, electronic equipment and storage medium Download PDF

Info

Publication number
CN115857375A
CN115857375A CN202211505340.0A CN202211505340A CN115857375A CN 115857375 A CN115857375 A CN 115857375A CN 202211505340 A CN202211505340 A CN 202211505340A CN 115857375 A CN115857375 A CN 115857375A
Authority
CN
China
Prior art keywords
target
execution
trigger
trigger condition
target execution
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211505340.0A
Other languages
Chinese (zh)
Inventor
焦文龙
杨凯
马璇
曾宇娇
许书畅
高晓东
姜梅丹
曹策
刘鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN202211505340.0A priority Critical patent/CN115857375A/en
Publication of CN115857375A publication Critical patent/CN115857375A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Selective Calling Equipment (AREA)

Abstract

The disclosure relates to a method and a device for generating a device control rule, an electronic device and a storage medium, which are used for simplifying a process of creating the device control rule by a user, reducing manual configuration of the user, improving efficiency and facilitating the operation of the user. The method comprises the following steps: entering a rule setting interface in response to a preset selection operation aiming at a target device in the device display interface; filling the equipment adding area of the rule setting interface according to the equipment type of the target equipment; and generating a device control rule according to the trigger condition of the target execution device filled in the execution device adding area and the target execution action, wherein the device control rule is used for controlling the target execution device to execute the target execution action when the trigger condition is met, and the trigger condition comprises at least one of a first trigger condition triggered by the target trigger device filled in the trigger device adding area and a customized second trigger condition.

Description

Method and device for generating equipment control rule, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of device control technologies, and in particular, to a method and an apparatus for generating a device control rule, an electronic device, and a storage medium.
Background
With the development of innovative technologies such as the internet of things, artificial intelligence and 5G, the smart home can be used as one of important application scenes of the internet of things, so that interconnection and intercommunication of various devices in a family can be realized, a user can realize automatic control, remote control and programmable control of the devices, and even automatic service can be performed according to set rules.
In the related art, an application platform of the smart home provides trigger-action programming (TAP for short), provides a convenient business logic flow for a user without code capability, and supports the user to customize rules to specify system behaviors to realize automatic services of equipment. However, the rule setting flow process provided by the application platform is complicated, and a user needs to manually configure various devices, so that the efficiency is low and the user is difficult to operate.
Disclosure of Invention
In order to overcome the problems in the related art, the present disclosure provides a method and an apparatus for generating device control rules, an electronic device, and a storage medium.
According to a first aspect of the embodiments of the present disclosure, there is provided a method for generating a device control rule, the method including:
entering a rule setting interface in response to a preset selection operation aiming at a target device in the device display interface;
filling a device adding area of the rule setting interface according to the device type of the target device, wherein the device type comprises a trigger device type and/or an execution device type, and the device adding area comprises a trigger device adding area and/or an execution device adding area;
and generating a device control rule according to the trigger condition and the target execution action of the target execution device filled in the execution device adding area, wherein the device control rule is used for controlling the target execution device to execute the target execution action when the trigger condition is met, and the trigger condition comprises at least one of a first trigger condition and a customized second trigger condition triggered by the target trigger device filled in the trigger device adding area.
Optionally, the target execution action of the target execution device is determined by at least one of:
determining a current execution action of the target execution device as the target execution action;
determining a historical execution action of the target execution device as the target execution action;
determining a default execution action of the target execution device as the target execution action;
and determining the input execution action of the target execution device as the target execution action.
Optionally, the filling the device adding area of the rule setting interface according to the device type of the target device includes:
when the device type of the target device is the trigger device type, filling the target device into the trigger device adding area;
when the device type of the target device is the execution device type, filling the target device into the execution device adding area;
and when the device type of the target device is the trigger device type and the execution device type at the same time, filling the target device into the execution device adding area.
Optionally, the generating a device control rule according to the trigger condition and the target execution action of the target execution device filled in the execution device adding area includes:
in the case that the target execution device exists in plurality, generating an execution sequence of the plurality of target execution devices in response to a sorting operation for the target execution device;
and generating device control rules aiming at the target execution devices according to the trigger conditions and the execution sequence of the target execution devices and the target execution action of each target execution device, wherein the device control rules aiming at the target execution devices are used for sequentially controlling the target execution devices to execute the corresponding target execution actions according to the execution sequence under the condition that the trigger conditions are met.
Optionally, the generating a device control rule according to the trigger condition and the target execution action of the target execution device filled in the execution device adding area includes:
and if a plurality of target trigger devices exist, generating device control rules for the target trigger devices according to a plurality of first trigger conditions of the target trigger devices and target execution actions of the target execution devices, wherein the device control rules for the target trigger devices are used for controlling the target execution devices to execute the target execution actions if any one of the first trigger conditions is met.
Optionally, the generating a device control rule according to the trigger condition and the target execution action of the target execution device filled in the execution device addition area includes:
and under the condition that the first trigger condition and the second trigger condition exist simultaneously, generating a device control rule aiming at the first trigger condition and the second trigger condition according to the first trigger condition, the second trigger condition and a target execution action of the target execution device, wherein the device control rule aiming at the first trigger condition and the second trigger condition is used for controlling the target execution device to execute the target execution action under the condition that the first trigger condition and the second trigger condition are both satisfied.
Optionally, the preset selection operation includes a long-time pressing of a selection operation of an equipment icon in the equipment display interface and/or a dragging of the selection operation of the equipment icon in the equipment display interface.
According to a second aspect of the embodiments of the present disclosure, there is provided an apparatus for generating a device control rule, the apparatus including:
the response module is configured to respond to preset selection operation aiming at the target equipment in the equipment display interface and enter a rule setting interface;
a filling module configured to fill a device adding area of the rule setting interface according to a device type of the target device, where the device type includes a trigger device type and/or an execution device type, and the device adding area includes a trigger device adding area and/or an execution device adding area;
a generating module configured to generate a device control rule according to a trigger condition and a target execution action of a target execution device filled in the execution device adding area, wherein the device control rule is used for controlling the target execution device to execute the target execution action when the trigger condition is met, and the trigger condition comprises at least one of a first trigger condition and a customized second trigger condition triggered by the target trigger device filled in the trigger device adding area.
According to a third aspect of the embodiments of the present disclosure, there is provided an electronic apparatus including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
entering a rule setting interface in response to a preset selection operation aiming at a target device in the device display interface;
filling a device adding area of the rule setting interface according to the device type of the target device, wherein the device type comprises a trigger device type and/or an execution device type, and the device adding area comprises a trigger device adding area and/or an execution device adding area;
and generating a device control rule according to the trigger condition and the target execution action of the target execution device filled in the execution device adding area, wherein the device control rule is used for controlling the target execution device to execute the target execution action when the trigger condition is met, and the trigger condition comprises at least one of a first trigger condition and a customized second trigger condition triggered by the target trigger device filled in the trigger device adding area.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement the steps of the method of any one of the first aspects of the present disclosure.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
the method comprises the steps of firstly responding to preset selection operation aiming at target equipment in an equipment display interface, entering a rule setting interface, then filling an equipment adding area of the rule setting interface according to the equipment type of the target equipment, and finally generating an equipment control rule according to a trigger condition and a target execution action of target execution equipment filled in an execution equipment adding area, wherein the equipment control rule is used for controlling the target execution equipment to execute the target execution action when the trigger condition is met. By adopting the method, the target equipment can be directly selected to enter the rule setting interface on the equipment display interface, the equipment adding area of the rule setting interface can be automatically filled according to the equipment type of the target equipment, and the equipment control rule is generated according to the trigger condition and the target execution action of the target execution equipment, so that the process of creating the equipment control rule by a user is simplified, the internal content can be automatically filled, the manual configuration of the user is reduced, the efficiency is improved, and the user can conveniently use the method.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
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 disclosure.
FIG. 1 is a diagram illustrating a new interface jump for a device control rule in accordance with an exemplary embodiment;
FIG. 2 is a flow chart illustrating a method of generating device control rules in accordance with an exemplary embodiment;
FIG. 3 is a schematic diagram illustrating entry of a rule-setting interface from a device presentation interface in accordance with an illustrative embodiment;
FIG. 4 is a schematic diagram illustrating another slave device presentation interface entering a rule set interface in accordance with an illustrative embodiment;
FIG. 5 is a block diagram illustrating an apparatus for generating device control rules in accordance with an exemplary embodiment;
FIG. 6 is a block diagram illustrating an electronic device in accordance with an example embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the disclosure, as detailed in the appended claims.
It should be noted that in the present disclosure, the terms "S101", "S102" and the like in the description and claims and the drawings are used for distinguishing the steps, and are not necessarily to be construed as performing the method steps in a specific order or sequence.
The following detailed description of specific embodiments of the present disclosure is provided in connection with the accompanying drawings. It should be understood that the detailed description and specific examples, while indicating the present disclosure, are given by way of illustration and explanation only, not limitation.
In the related art, a user wants to set an appliance control rule for the appliance automation control, for example, an appliance control rule "a hall lantern is turned on if a door lock is opened", and referring to fig. 1, the user needs to click a "+" (newly added) button at the upper right corner of a custom interface of an appliance control system to enter a scene creation interface. The "manual scene" of the scene interface is created for setting manual appliance control rules such as "all lights are turned off by one key", "air conditioner is turned on with temperature set to 25 degrees" and the like, and the "automation" is used for setting appliance control rules for appliance automation control such as "hall lights are turned on if door lock is opened", "air conditioner is turned on if indoor temperature is more than 28 degrees" and the like. Therefore, the user needs to click "automation", enter the rule setting interface, select and store the triggering device "door lock", the triggering condition "door lock open", the executing device "hall lantern" and the executing action "hall lantern open", and generate an equipment control rule "hall lantern is opened if door lock is opened".
In the setting process of the equipment control rule, the whole used path is long, and the newly added button depends on active exploration of a user, so that the development and the use of a common user are not facilitated. The setting process is complex, the user needs to convert own requirements into rules firstly, and then selects the equipment and the configuration parameters one by one, the efficiency is low, and the user is difficult to master.
In view of this, the present disclosure provides a method and an apparatus for generating device control rules, an electronic device, and a storage medium to solve the above technical problems. The method for generating the device control rule is applied to a device control system, for example, an internet of things system such as a control system of an intelligent home, an intelligent logistics control system, and the like, in which an automatic device service can be set, and the disclosure does not limit the method.
Fig. 2 is a flowchart illustrating a method of generating a device control rule according to an exemplary embodiment, the method including the steps of, as shown in fig. 2:
in step S21, in response to a preset selection operation for a target device in the device presentation interface, entering a rule setting interface.
In step S22, the device addition area of the rule setting interface is filled according to the device type of the target device.
The device type comprises a trigger device type and/or an execution device type, and the device adding area comprises a trigger device adding area and/or an execution device adding area.
In step S23, a device control rule is generated from the trigger condition and the target execution action of the target execution device filled in the execution device addition area.
The device control rule is used for controlling the target execution device to execute the target execution action when the trigger condition is met, wherein the trigger condition comprises at least one of a first trigger condition and a customized second trigger condition, and the first trigger condition is triggered by the target trigger device filled in the trigger device adding area.
In the embodiment of the disclosure, a rule setting interface is entered in response to a preset selection operation for a target device in a device display interface, a device adding area of the rule setting interface is filled according to a device type of the target device, and a device control rule is generated according to a trigger condition of a target execution device filled in an execution device adding area and a target execution action, wherein the device control rule is used for controlling the target execution device to execute the target execution action when the trigger condition is met. By adopting the method, the target equipment can be directly selected to enter the rule setting interface on the equipment display interface, the equipment adding area of the rule setting interface can be automatically filled according to the equipment type of the target equipment, and the equipment control rule is generated according to the trigger condition and the target execution action of the target execution equipment, so that the process of creating the equipment control rule by a user is simplified, the internal content can be automatically filled, the manual configuration of the user is reduced, the efficiency is improved, and the user can conveniently use the method.
In order to make the generation method of the device control rule provided by the present disclosure more understood, the following detailed description is given for each step.
In a possible mode, the preset selection operation comprises a long-time pressing selection operation of the equipment icon in the equipment display interface and/or a dragging selection operation of the equipment icon in the equipment display interface.
For example, in addition to the above manner of clicking the new button to enter the rule setting interface, the embodiment of the present disclosure also provides other manners to enter the rule setting interface. As shown in fig. 3, after the user logs in the device control system, the user may press a device icon corresponding to any device on the device display interface, and in response to the operation of pressing any device icon by the user, all device icons are changed into a selectable state, for example, all device icons are grayed and the selected device icon is highlighted, a selection box is added to all device icons, and the like, which is not limited in the present disclosure. At the same time the interface presents a decision button (automation), clicking this button can enter the rule set interface (creation automation). The user may select 1 device setting device control rule, for example, a device control rule of "turn on the air conditioner if the indoor temperature is greater than 28 degrees" for the air conditioner, or may select a device control rule of linking a plurality of device settings, for example, a device control rule of "turn on the hall lantern if the door lock is turned on" for the door lock and the hall lantern, which is not limited by the present disclosure.
For example, as shown in fig. 4, after the user logs in the device control system, the user may press the device icon corresponding to any device for a long time on the device display interface and drag the device icon to the position of the device icon corresponding to another device. In response to a user's long-press operation on any device icon, the interface presents a prompt, for example, "drag to other device can create linkage", when the device icon is dragged to the position of another device icon, whether to generate a device control rule for the two devices can be confirmed to the user in a popup box or other forms, and if the user clicks a determination button, the rule setting interface is entered (creation automation).
Of course, in other possible implementation manners, when the user presses the device icon corresponding to any device for a long time, an addition area may be displayed in the designated area of the interface, the device icon is dragged into the addition area, and other device icons may be continuously dragged into the addition area, and after the user clicks the confirmation button, the rule setting interface is entered, so that the device control rule may be set for the device corresponding to one or more device icons in the addition area. Besides long-time pressing and dragging operations, the device icon may be double-clicked, and the like, as long as the selection operation for the device icon can be implemented, which is not limited by the present disclosure. Therefore, the flow of entering the rule setting interface by the user is simplified, and the user can know the operation steps by giving corresponding prompts, so that the user can conveniently use the rule setting interface.
In a possible manner, the filling the device adding area of the rule setting interface according to the device type of the target device may be: and when the device type of the target device is the trigger device type, filling the target device into the trigger device adding area, when the device type of the target device is the execution device type, filling the target device into the execution device adding area, and when the device type of the target device is both the trigger device type and the execution device type, filling the target device into the execution device adding area.
For example, the device type of the target device may be only a trigger device type, only an execution device type, or both the trigger device type and the execution device type, for example, the door lock is the trigger device type, the hall lantern is the execution device type, the air conditioner is both the trigger device type and the execution device type, and the like, which may be specifically set according to the support capability and the requirement of the device, and this disclosure does not specifically limit this.
Illustratively, in the rule setting interface (creation automation) as shown in fig. 3 or fig. 4, a trigger device addition area and an execution device addition area are included. When the device type of the target device is the trigger device type, the target device is filled into the trigger device adding area, when the device type of the target device is the execution device type, the target device is filled into the execution device adding area, and when the device type of the target device is both the trigger device type and the execution device type, the target device is filled into the execution device adding area, so that manual configuration of a user is reduced, efficiency is improved, and the user can conveniently use the target device.
Of course, in other possible implementation manners, when the device type of the target device is both the trigger device type and the execution device type, the target device may also be filled into the trigger device addition area, specifically, default setting may be performed according to a requirement, a user may also be provided with custom setting, the user immediately selects the addition area or the area added by the user default setting, further, when the device type of other target devices is only the trigger device type, a device that is both the trigger device type and the execution device type is filled into the execution device type, or when the device type of other target devices is only the execution device type, a device that is both the trigger device type and the execution device type is filled into the trigger device type, and the like, which is not limited by the present disclosure.
In a possible approach, the target execution action of the target execution device is determined by at least one of: determining the current execution action of the target execution device as a target execution action, determining the historical execution action of the target execution device as a target execution action, determining the default execution action of the target execution device as a target execution action, and determining the input execution action of the target execution device as a target execution action.
For example, the currently executed action of the target execution device may be determined as the target execution action, for example, the currently executed action of the air conditioner may be determined as the target execution action of the air conditioner if the currently executed action of the air conditioner is "on state, cooling mode, temperature setting 26 degrees". The historical execution actions of the target execution device can also be determined as target execution actions, for example, the execution action at the last time or the execution action with the highest use number in the historical execution actions can be determined as the target execution action. The default execution action of the target execution device may also be determined as the target execution action, for example, the system may preset one or more execution actions for each execution device, one of which is designated as the default execution action. And when there are multiple preset execution actions in the execution device, the execution actions may also be filled in sequence, for example, if the execution action 1 is used in another device control rule, the execution action 2 is taken as a target execution action of a target execution device in the device control rule set this time, and the disclosure does not limit this. Therefore, when the target equipment is automatically filled into the adding area of the executing equipment, the target executing action can be automatically filled, so that manual configuration of a user is reduced, the efficiency is improved, and the user can conveniently use the target executing action.
For example, the user may click a button (e.g., "hall lantern: performing action" shown in fig. 3 or fig. 4) corresponding to the target performing device in the performing device adding area, enter a manual operation of the performing device setting interface, such as modifying the target performing device, adding or modifying the performing action of the target performing device, or the like, or click a "+" button of the performing device adding area, add the target performing device, or the like. For the operation of manually editing the rule setting interface, for example, steps of operations such as adding, modifying, deleting, and the like for the trigger device, the execution device, and the second trigger condition may specifically refer to related technologies, and this disclosure is not described herein again.
It should be noted that, the execution of the execution device usually requires setting more parameters, for example, the air conditioner requires setting parameters such as operating mode and temperature, so that the execution device and the execution device are automatically filled, manual configuration by a user can be greatly reduced, and efficiency is improved. The first trigger condition of the trigger device is usually simple, for example, only two states of opening and closing of the door lock can be set, or only two states of nobody and someone of the human body sensing device can be set. Therefore, in other possible implementation manners, an optional first trigger condition can be provided for the trigger device for the user to select, so as to reduce the operation of manual input by the user. In addition, one of the selectable first trigger conditions may be designated as a default first trigger condition for automatic filling, and the first trigger conditions may also be filled in sequence, for example, if the first trigger condition 1 is used in another device control rule, the first trigger condition 2 is used as a first trigger condition of a target trigger device in the device control rule set this time, and the like, which is not limited in the present disclosure.
In a possible manner, the device control rule generated according to the trigger condition and the target execution action of the target execution device filled in the execution device addition area may be: in the case that a plurality of target execution devices exist, generating an execution sequence of the plurality of target execution devices in response to the sequencing operation for the target execution devices, and generating a device control rule for the plurality of target execution devices according to the trigger condition and the execution sequence of the plurality of target execution devices and the target execution action of each target execution device, wherein the device control rule for the plurality of target execution devices is used for sequentially controlling the plurality of target execution devices to execute the corresponding target execution actions according to the execution sequence when the trigger condition is met.
Exemplarily, taking an apparatus control rule "turn on the lamps 1 and 2 if the human body sensing device senses a person", the apparatus control rule is used for sequentially turning on the lamps 1 and 2 when the human body sensing device senses a person. For example, if the user selects the lamp 1 and then selects the lamp 2 on the device display interface, the selected sequence is used as the execution sequence of the multiple target execution devices, and the execution sequence may be represented by a sequence displayed by the execution device in the execution device adding area or by a parameter of the execution device setting interface, which is not limited in this disclosure. If the user needs to modify the execution sequence of the multiple target execution devices, the corresponding device icon may be dragged in the execution device addition area to adjust the execution sequence, or a parameter indicating the execution sequence in the execution device setting interface may be modified to achieve the purpose of modifying the execution sequence, which is not limited in this disclosure.
Of course, in other possible implementation manners, the execution actions of multiple target execution devices may also be executed simultaneously, for example, the device control rule "turn on the lamps 1 and 2 simultaneously if the human body sensing device senses a human body". It is also possible to set the execution interval of a plurality of target execution devices, for example, "turn on the light 1 if the human body sensing device senses a human body, turn on the light 2 with a delay of 10 seconds", etc., which is not limited by the present disclosure.
In a possible manner, the device control rule generated according to the trigger condition and the target execution action of the target execution device filled in the execution device addition area may be: and if a plurality of target trigger devices exist, generating device control rules for the target trigger devices according to a plurality of first trigger conditions of the target trigger devices and target execution actions of the target execution devices, wherein the device control rules for the target trigger devices are used for controlling the target execution devices to execute the target execution actions when any one of the first trigger conditions is met.
Illustratively, a device control rule including two trigger devices and one executive device is used as an example, for example, a "door lock" is set on a rule setting interface; the triggering condition is as follows: turn on "," induction light; triggering conditions are as follows: sensing a person and a hall lamp; and executing the action: and opening, and generating an equipment control rule after clicking creation, wherein the equipment control rule is used for controlling the hall lantern to be opened when the door lock is opened or the induction lamp induces a person. Therefore, under the condition that the same or multiple executing devices are controlled when the multiple triggering devices meet the triggering conditions, multiple device control rules do not need to be set respectively, the efficiency is improved, the user operation is reduced, and the difficulty in subsequent maintenance caused by the fact that the number of the device control rules is too large is avoided.
In other possible implementation manners, an equipment control rule "the hall lantern is turned on if the door lock is opened and the induction lamp senses that someone is present" may also be set, where the equipment control rule is used to control the hall lantern to be turned on when the door lock is turned on and the induction lamp senses that someone is present, so that a requirement that the target execution equipment is controlled to execute the target execution action when the trigger conditions are simultaneously met by a plurality of trigger equipment is met. The user can carry out self-defined setting according to the demand, and the disclosure does not limit the setting.
In a possible manner, the device control rule generated according to the trigger condition and the target execution action of the target execution device filled in the execution device addition area may be: and under the condition that the first trigger condition and the second trigger condition exist simultaneously, generating a device control rule aiming at the first trigger condition and the second trigger condition according to the first trigger condition, the second trigger condition and the target execution action of the target execution device, wherein the device control rule aiming at the first trigger condition and the second trigger condition is used for controlling the target execution device to execute the target execution action under the condition that the first trigger condition and the second trigger condition are both satisfied.
Illustratively, a device control rule comprising a trigger device, a second trigger condition and an executive device is used as an example, for example, a human body sensing device is arranged on a rule setting interface; triggering conditions are as follows: a person is sensed, and a second trigger condition: room temperature is more than 30 degrees and air conditioning is carried out; and executing the action: the method comprises the steps of starting a refrigeration mode and setting the temperature to be 26 degrees, clicking to create an equipment control rule, controlling an air conditioner to start the refrigeration mode and setting the temperature to be 26 degrees if a sensing lamp senses a person and the room temperature is greater than 30 degrees, and controlling the air conditioner to start the refrigeration mode and setting the temperature to be 26 degrees when the sensing lamp senses the person and the room temperature is greater than 30 degrees. Therefore, the trigger condition of the non-trigger device can be set to control the device control rule of the execution device, such as time condition, temperature condition, humidity condition and the like, so as to meet the user-defined requirement.
In addition, the control target execution device may be configured to execute the target execution action when any one of the first trigger condition and the second trigger condition is satisfied. The device control rule of the second trigger condition control execution device may also be set separately, where if there are multiple second trigger conditions, multiple second trigger conditions may be set to simultaneously satisfy the target execution action executed by the control target execution device, or any one of the multiple second trigger conditions is set to satisfy the target execution action executed by the control target execution device, and so on, which is not limited in this disclosure.
Based on the same inventive concept, the present disclosure further provides an apparatus for generating a device control rule, and with reference to fig. 5, the apparatus for generating a device control rule includes:
and the response module 51 is configured to enter the rule setting interface in response to a preset selection operation aiming at the target device in the device presentation interface.
And the filling module 52 is configured to fill the device adding area of the rule setting interface according to the device type of the target device, where the device type includes a trigger device type and/or an execution device type, and the device adding area includes a trigger device adding area and/or an execution device adding area.
The generating module 53 is configured to generate a device control rule according to the trigger condition of the target execution device filled in the execution device addition area and the target execution action, wherein the device control rule is used for controlling the target execution device to execute the target execution action when the trigger condition is met, and the trigger condition comprises at least one of a first trigger condition triggered by the target trigger device filled in the trigger device addition area and a second trigger condition which is customized.
By adopting the device, the target equipment can be directly selected to enter the rule setting interface on the equipment display page, the equipment adding area of the rule setting interface can be automatically filled according to the equipment type of the target equipment, and the equipment control rule is generated according to the trigger condition and the target execution action of the target execution equipment, so that the process of creating the equipment control rule by a user is simplified, the internal content can be automatically filled, the manual configuration of the user is reduced, the efficiency is improved, and the user can conveniently use the device.
Optionally, the target execution action of the target execution device is determined by at least one of:
determining a current execution action of the target execution device as the target execution action;
determining a historical execution action of the target execution device as the target execution action;
determining a default execution action of the target execution device as the target execution action;
and determining the input execution action of the target execution device as the target execution action.
Optionally, the filling module 52 is configured to:
when the device type of the target device is the trigger device type, filling the target device into the trigger device adding area;
when the device type of the target device is the execution device type, filling the target device into the execution device adding area;
and when the device type of the target device is the trigger device type and the execution device type at the same time, filling the target device into the execution device adding area.
Optionally, the generating module 53 is configured to:
in the case that the target execution device exists in plurality, generating an execution sequence of a plurality of target execution devices in response to the sequencing operation of the target execution device;
and generating device control rules aiming at the target execution devices according to the trigger conditions and the execution sequence of the target execution devices and the target execution action of each target execution device, wherein the device control rules aiming at the target execution devices are used for sequentially controlling the target execution devices to execute the corresponding target execution actions according to the execution sequence under the condition that the trigger conditions are met.
Optionally, the generating module 53 is configured to:
and if a plurality of target trigger devices exist, generating device control rules for the target trigger devices according to a plurality of first trigger conditions of the target trigger devices and target execution actions of the target execution devices, wherein the device control rules for the target trigger devices are used for controlling the target execution devices to execute the target execution actions if any one of the first trigger conditions is met.
Optionally, the generating module 53 is configured to:
and under the condition that the first trigger condition and the second trigger condition exist at the same time, generating a device control rule aiming at the first trigger condition and the second trigger condition according to the first trigger condition, the second trigger condition and a target execution action of the target execution device, wherein the device control rule aiming at the first trigger condition and the second trigger condition is used for controlling the target execution device to execute the target execution action under the condition that the first trigger condition and the second trigger condition are both met.
Optionally, the preset selection operation includes a long-time pressing operation on a device icon in the device display interface and/or a dragging operation on the device icon in the device display interface.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Based on the same inventive concept, the present disclosure also provides an electronic device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
entering a rule setting interface in response to a preset selection operation aiming at a target device in the device display interface;
filling a device adding area of the rule setting interface according to the device type of the target device, wherein the device type comprises a trigger device type and/or an execution device type, and the device adding area comprises a trigger device adding area and/or an execution device adding area;
and generating a device control rule according to the trigger condition and the target execution action of the target execution device filled in the execution device adding area, wherein the device control rule is used for controlling the target execution device to execute the target execution action when the trigger condition is met, and the trigger condition comprises at least one of a first trigger condition and a customized second trigger condition triggered by the target trigger device filled in the trigger device adding area.
Based on the same inventive concept, the present disclosure also provides a computer-readable storage medium having stored thereon computer program instructions, which, when executed by a processor, implement the steps of the above-described method for generating device control rules.
Fig. 6 is a block diagram illustrating an electronic device 600 according to an example embodiment. For example, the electronic device 600 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 6, electronic device 600 may include one or more of the following components: a processing component 602, a memory 604, a power component 606, a multimedia component 608, an audio component 610, an input/output interface 612, a sensor component 614, and a communication component 616.
The processing component 602 generally controls overall operation of the electronic device 600, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 602 may include one or more processors 620 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 602 can include one or more modules that facilitate interaction between the processing component 602 and other components. For example, the processing component 602 may include a multimedia module to facilitate interaction between the multimedia component 608 and the processing component 602.
The memory 604 is configured to store various types of data to support operations at the electronic device 600. Examples of such data include instructions for any application or method operating on the electronic device 600, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 604 may be implemented by any type or combination of volatile or non-volatile memory devices 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 or optical disks.
Power supply component 606 provides power to the various components of electronic device 600. The power components 606 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 600.
The multimedia component 608 includes a screen that provides an output interface between the electronic device 600 and a 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 an input signal from a 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 boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 608 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the electronic device 600 is in an operation mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 610 is configured to output and/or input audio signals. For example, the audio component 610 includes a Microphone (MIC) configured to receive external audio signals when the electronic device 600 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal may further be stored in the memory 604 or transmitted via the communication component 616. In some embodiments, audio component 610 further includes a speaker for outputting audio signals.
The input/output interface 612 provides an interface between the processing component 602 and peripheral interface modules, which may be 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.
The sensor component 614 includes one or more sensors for providing status assessment of various aspects of the electronic device 600. For example, the sensor component 614 may detect an open/closed state of the electronic device 600, the relative positioning of components, such as a display and keypad of the electronic device 600, the sensor component 614 may also detect a change in the position of the electronic device 600 or a component of the electronic device 600, the presence or absence of user contact with the electronic device 600, orientation or acceleration/deceleration of the electronic device 600, and a change in the temperature of the electronic device 600. The sensor assembly 614 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 614 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 614 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 616 is configured to facilitate communications between the electronic device 600 and other devices in a wired or wireless manner. The electronic device 600 may 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 616 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 616 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the electronic device 600 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, micro-controllers, microprocessors or other electronic components for performing the above-described method of generating the device control rules.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 604 comprising instructions, executable by the processor 620 of the electronic device 600 to perform the above-described method of generating device control rules is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
In another exemplary embodiment, a computer program product is also provided, which comprises a computer program executable by a programmable apparatus, the computer program having code portions for performing the above-mentioned method for generating device control rules when executed by the programmable apparatus.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice in the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements 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 appended claims.

Claims (10)

1. A method for generating device control rules, the method comprising:
entering a rule setting interface in response to a preset selection operation aiming at a target device in the device display interface;
filling a device adding area of the rule setting interface according to the device type of the target device, wherein the device type comprises a trigger device type and/or an execution device type, and the device adding area comprises a trigger device adding area and/or an execution device adding area;
and generating a device control rule according to the trigger condition and the target execution action of the target execution device filled in the execution device adding area, wherein the device control rule is used for controlling the target execution device to execute the target execution action when the trigger condition is met, and the trigger condition comprises at least one of a first trigger condition and a customized second trigger condition triggered by the target trigger device filled in the trigger device adding area.
2. The method according to claim 1, wherein the target execution action of the target execution device is determined by at least one of:
determining a current execution action of the target execution device as the target execution action;
determining a historical execution action of the target execution device as the target execution action;
determining a default execution action of the target execution device as the target execution action;
and determining the input execution action of the target execution device as the target execution action.
3. The method for generating the device control rule according to claim 1, wherein the filling the device adding area of the rule setting interface according to the device type of the target device includes:
when the device type of the target device is the trigger device type, filling the target device into the trigger device adding area;
when the device type of the target device is the execution device type, filling the target device into the execution device adding area;
and when the device type of the target device is the trigger device type and the execution device type at the same time, filling the target device into the execution device adding area.
4. The method for generating the device control rule according to claim 1, wherein the generating the device control rule according to the trigger condition and the target execution action of the target execution device filled in the execution device addition region includes:
in the case that the target execution device exists in plurality, generating an execution sequence of the plurality of target execution devices in response to a sorting operation for the target execution device;
and generating device control rules aiming at the target execution devices according to the trigger conditions and the execution sequence of the target execution devices and the target execution action of each target execution device, wherein the device control rules aiming at the target execution devices are used for sequentially controlling the target execution devices to execute the corresponding target execution actions according to the execution sequence under the condition that the trigger conditions are met.
5. The method for generating the device control rule according to claim 1, wherein the generating the device control rule according to the trigger condition and the target execution action of the target execution device filled in the execution device addition region includes:
and if a plurality of target trigger devices exist, generating device control rules for the target trigger devices according to a plurality of first trigger conditions of the target trigger devices and target execution actions of the target execution devices, wherein the device control rules for the target trigger devices are used for controlling the target execution devices to execute the target execution actions if any one of the first trigger conditions is met.
6. The method for generating the device control rule according to claim 1, wherein the generating the device control rule according to the trigger condition and the target execution action of the target execution device filled in the execution device addition region includes:
and under the condition that the first trigger condition and the second trigger condition exist simultaneously, generating a device control rule aiming at the first trigger condition and the second trigger condition according to the first trigger condition, the second trigger condition and a target execution action of the target execution device, wherein the device control rule aiming at the first trigger condition and the second trigger condition is used for controlling the target execution device to execute the target execution action under the condition that the first trigger condition and the second trigger condition are both satisfied.
7. The method for generating the device control rule according to any one of claims 1 to 6, wherein the preset selection operation includes a long-time pressing selection operation of a device icon in the device display interface and/or a dragging selection operation of the device icon in the device display interface.
8. An apparatus for generating a device control rule, the apparatus comprising:
the response module is configured to respond to preset selection operation aiming at the target equipment in the equipment display interface and enter a rule setting interface;
a filling module configured to fill a device adding area of the rule setting interface according to a device type of the target device, where the device type includes a trigger device type and/or an execution device type, and the device adding area includes a trigger device adding area and/or an execution device adding area;
a generating module configured to generate a device control rule according to a trigger condition and a target execution action of a target execution device filled in the execution device adding area, wherein the device control rule is used for controlling the target execution device to execute the target execution action when the trigger condition is met, and the trigger condition comprises at least one of a first trigger condition and a customized second trigger condition triggered by the target trigger device filled in the trigger device adding area.
9. An electronic device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
entering a rule setting interface in response to a preset selection operation aiming at a target device in the device display interface;
filling a device adding area of the rule setting interface according to the device type of the target device, wherein the device type comprises a trigger device type and/or an execution device type, and the device adding area comprises a trigger device adding area and/or an execution device adding area;
and generating a device control rule according to the trigger condition and the target execution action of the target execution device filled in the execution device adding area, wherein the device control rule is used for controlling the target execution device to execute the target execution action when the trigger condition is met, and the trigger condition comprises at least one of a first trigger condition and a customized second trigger condition triggered by the target trigger device filled in the trigger device adding area.
10. A computer-readable storage medium, on which computer program instructions are stored, which program instructions, when executed by a processor, carry out the steps of the method according to any one of claims 1 to 7.
CN202211505340.0A 2022-11-28 2022-11-28 Method and device for generating equipment control rule, electronic equipment and storage medium Pending CN115857375A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211505340.0A CN115857375A (en) 2022-11-28 2022-11-28 Method and device for generating equipment control rule, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211505340.0A CN115857375A (en) 2022-11-28 2022-11-28 Method and device for generating equipment control rule, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115857375A true CN115857375A (en) 2023-03-28

Family

ID=85667363

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211505340.0A Pending CN115857375A (en) 2022-11-28 2022-11-28 Method and device for generating equipment control rule, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115857375A (en)

Similar Documents

Publication Publication Date Title
CN108710306B (en) Control method and device of intelligent equipment and computer readable storage medium
US10015245B2 (en) Method and apparatus for grouping smart device in smart home system
EP3144915B1 (en) Method and apparatus for controlling device, and terminal device
US10564833B2 (en) Method and apparatus for controlling devices
EP3131258A1 (en) Smart household equipment control methods and corresponding apparatus
EP3249509A1 (en) Method and device for playing live videos
CN110196557B (en) Equipment control method, device, mobile terminal and storage medium
CN104391626B (en) Method and device for dynamically displaying equipment list
CN111381746B (en) Parameter adjusting method, device and storage medium
CN106527166B (en) Control method and device of electric appliance
CN107817929A (en) The quick control method and device of smart machine
CN107272427B (en) Control method and device of intelligent equipment
CN111683177B (en) Function parameter adjusting method, function parameter adjusting device and storage medium
CN108874450B (en) Method and device for waking up voice assistant
CN112130719B (en) Page display method, device and system, electronic equipment and storage medium
CN106940653B (en) Method, apparatus and computer-readable storage medium for controlling application program
CN106933111B (en) Method and device for controlling equipment
CN108845852B (en) Control method and device of intelligent equipment and computer readable storage medium
CN113010056A (en) Desktop display control method, device, terminal and storage medium
CN107809545B (en) Control method and device of intelligent equipment and storage medium
CN115857375A (en) Method and device for generating equipment control rule, electronic equipment and storage medium
CN114384848A (en) Interaction method, interaction device, electronic equipment and storage medium
CN106527954B (en) Equipment control method and device and mobile terminal
CN106773753B (en) Equipment control method and device
CN111462284B (en) Animation generation method, animation generation device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination