Nothing Special   »   [go: up one dir, main page]

CN118584825A - Device control method, device, electronic device, storage medium and program product - Google Patents

Device control method, device, electronic device, storage medium and program product Download PDF

Info

Publication number
CN118584825A
CN118584825A CN202410575633.9A CN202410575633A CN118584825A CN 118584825 A CN118584825 A CN 118584825A CN 202410575633 A CN202410575633 A CN 202410575633A CN 118584825 A CN118584825 A CN 118584825A
Authority
CN
China
Prior art keywords
space
state
target
information
indication information
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
CN202410575633.9A
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.)
Lumi United Technology Co Ltd
Original Assignee
Lumi United Technology 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 Lumi United Technology Co Ltd filed Critical Lumi United Technology Co Ltd
Priority to CN202410575633.9A priority Critical patent/CN118584825A/en
Publication of CN118584825A publication Critical patent/CN118584825A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B15/00Systems controlled by a computer
    • G05B15/02Systems controlled by a computer electric
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/418Total factory control, i.e. centrally controlling a plurality of machines, e.g. direct or distributed numerical control [DNC], flexible manufacturing systems [FMS], integrated manufacturing systems [IMS] or computer integrated manufacturing [CIM]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • H04L67/125Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks involving control of end-device applications over a network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/30Services specially adapted for particular environments, situations or purposes
    • H04W4/33Services specially adapted for particular environments, situations or purposes for indoor environments, e.g. buildings
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/26Pc applications
    • G05B2219/2642Domotique, domestic, home control, automation, smart house
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Automation & Control Theory (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Medical Informatics (AREA)
  • Manufacturing & Machinery (AREA)
  • Quality & Reliability (AREA)
  • General Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Selective Calling Equipment (AREA)

Abstract

本申请涉及一种设备控制方法、装置、电子设备、存储介质和计算机程序产品,涉及物联网技术领域,可应用于智能家居等领域。本申请能够提高设备控制效率及便捷性。该方法包括:获得目标空间状态标示信息,该目标空间状态标示信息用于标示由空间中第一设备使该空间呈现的目标状态,该第一设备包括使空间形成目标状态的设备,然后应用该目标空间状态标示信息,以在目标状态满足再现条件时,控制空间中第二设备使空间呈现上述目标状态,该第二设备包括使空间再现目标状态的设备。

The present application relates to a device control method, apparatus, electronic device, storage medium and computer program product, and relates to the field of Internet of Things technology, and can be applied to fields such as smart home. The present application can improve the efficiency and convenience of device control. The method includes: obtaining target space state marking information, the target space state marking information is used to mark the target state presented by the first device in the space, the first device includes a device that makes the space form a target state, and then applying the target space state marking information to control the second device in the space to make the space present the above-mentioned target state when the target state meets the reproduction condition, and the second device includes a device that makes the space reproduce the target state.

Description

设备控制方法、装置、电子设备、存储介质和程序产品Device control method, device, electronic device, storage medium and program product

技术领域Technical Field

本申请涉及物联网技术领域,特别是涉及一种设备控制方法、装置、电子设备、存储介质和计算机程序产品。The present application relates to the technical field of Internet of Things, and in particular to a device control method, apparatus, electronic device, storage medium and computer program product.

背景技术Background Art

随着物联网技术的发展,通过物联网技术可以将空间内的各种设备连接起来,实现智能化控制和管理。以智能家居为例,智能家居可以通过物联网技术将居住空间内的各种设备连接起来,实现智能化控制和管理。其中,用户可以通过遥控器、手机的应用程序等方式向连接的各种设备发送指令实现智能、便捷、高效的控制。With the development of the Internet of Things technology, various devices in the space can be connected through the Internet of Things technology to achieve intelligent control and management. Taking smart homes as an example, smart homes can connect various devices in the living space through the Internet of Things technology to achieve intelligent control and management. Among them, users can send instructions to various connected devices through remote controls, mobile phone applications, etc. to achieve intelligent, convenient and efficient control.

基于目前技术提供的设备控制方法,用户根据其需求设定好例如居住空间内的各种设备的参数后,当在例如一段时间后又有同样需求时,需要用户再次逐个设定这些设备的参数。因此,对设备的控制效率及便捷性有待提升。Based on the device control method provided by the current technology, after the user sets the parameters of various devices in the living space according to their needs, when the same needs arise again after a period of time, the user needs to set the parameters of these devices one by one again. Therefore, the control efficiency and convenience of the devices need to be improved.

发明内容Summary of the invention

基于此,有必要针对上述技术问题,提供一种设备控制方法、装置、电子设备、存储介质和计算机程序产品。Based on this, it is necessary to provide a device control method, apparatus, electronic device, storage medium and computer program product to address the above technical problems.

第一方面,本申请提供了一种设备控制方法。所述方法包括:In a first aspect, the present application provides a device control method. The method comprises:

获得目标空间状态标示信息;所述目标空间状态标示信息用于标示由空间中第一设备使所述空间呈现的目标状态;所述第一设备包括使所述空间形成所述目标状态的设备;Obtaining target space state marking information; the target space state marking information is used to mark the target state presented by the first device in the space; the first device includes a device that causes the space to form the target state;

应用所述目标空间状态标示信息,以在所述目标状态满足再现条件时,控制所述空间中第二设备使所述空间呈现所述目标状态;所述第二设备包括使所述空间再现所述目标状态的设备。The target space state marking information is applied to control a second device in the space to make the space present the target state when the target state meets the reproduction condition; the second device includes a device that makes the space reproduce the target state.

在其中一个实施例中,所述获得目标空间状态标示信息,包括:响应于状态创建指令,展示当前空间状态标示信息;所述当前空间状态标示信息对应所述空间当前呈现的状态;响应于状态确认指令,获得目标空间状态标示信息;所述目标空间状态标示信息包括受确认的当前空间状态标示信息。In one of the embodiments, obtaining the target space state indication information includes: in response to a state creation instruction, displaying current space state indication information; the current space state indication information corresponds to the current state of the space; in response to a state confirmation instruction, obtaining the target space state indication information; the target space state indication information includes the confirmed current space state indication information.

在其中一个实施例中,还包括:获取所述空间中所述第一设备当前的状态信息;根据所述空间中所述第一设备当前的状态信息,得到当前空间状态标示信息。In one of the embodiments, it also includes: obtaining current status information of the first device in the space; and obtaining current space status indication information according to the current status information of the first device in the space.

在其中一个实施例中,所述获得目标空间状态标示信息,包括:响应于场景创建指令,提供一个或多个可选空间状态标示信息;响应于状态选择指令,获得目标空间状态标示信息;所述目标空间状态标示信息包括被选择的可选空间状态标示信息。In one of the embodiments, obtaining the target space state marking information includes: providing one or more optional space state marking information in response to a scene creation instruction; obtaining the target space state marking information in response to a state selection instruction; the target space state marking information includes the selected optional space state marking information.

在其中一个实施例中,所述应用所述目标空间状态标示信息,包括:关联所述目标空间状态标示信息与目标场景;若所述目标场景满足执行条件,则根据所述目标空间状态标示信息和所述空间中所述第二设备当前的状态信息,发送对应的设备控制指令至所述第二设备,以控制所述第二设备使所述空间呈现所述目标状态;和/或,所述应用所述目标空间状态标示信息,包括:若所述目标状态满足所述再现条件,则根据所述目标空间状态标示信息和所述空间中所述第二设备当前的状态信息,发送对应的设备控制指令至所述第二设备,以控制所述第二设备使所述空间呈现所述目标状态。In one embodiment, the application of the target space status indication information includes: associating the target space status indication information with a target scene; if the target scene satisfies an execution condition, sending a corresponding device control instruction to the second device based on the target space status indication information and the current status information of the second device in the space, so as to control the second device to make the space present the target state; and/or, the application of the target space status indication information includes: if the target state satisfies the reproduction condition, sending a corresponding device control instruction to the second device based on the target space status indication information and the current status information of the second device in the space, so as to control the second device to make the space present the target state.

在其中一个实施例中,所述第一设备的数量为多个;所述第二设备的数量为多个;所述根据所述目标空间状态标示信息和所述空间中所述第二设备当前的状态信息,发送对应的设备控制指令至所述第二设备,包括:若所述空间中多个所述第二设备与所述空间中多个所述第一设备不同,则根据所述空间中多个所述第二设备当前的状态信息得到当前空间状态标示信息,根据所述当前空间状态标示信息以及所述目标空间状态标示信息,发送对应的设备控制指令至多个所述第二设备。In one embodiment, there are multiple first devices; there are multiple second devices; and sending corresponding device control instructions to the second devices based on the target space status indication information and the current status information of the second devices in the space includes: if the multiple second devices in the space are different from the multiple first devices in the space, obtaining current space status indication information based on the current status information of the multiple second devices in the space, and sending corresponding device control instructions to the multiple second devices based on the current space status indication information and the target space status indication information.

在其中一个实施例中,所述根据所述当前空间状态标示信息以及所述目标空间状态标示信息,发送对应的设备控制指令至多个所述第二设备,包括:若所述空间中多个所述第二设备与所述空间中多个所述第一设备完全不同,则根据所述当前空间状态标示信息与所述目标空间状态标示信息的差异以及多个所述第二设备当前的状态信息,得到应用于多个所述第二设备中目标第二设备的第一设备控制指令;发送所述第一设备控制指令至所述目标第二设备,以使所述目标第二设备执行所述第一设备控制指令后的当前空间状态标示信息与所述目标空间状态标示信息相同。In one of the embodiments, the corresponding device control instructions are sent to multiple second devices based on the current space state indication information and the target space state indication information, including: if the multiple second devices in the space are completely different from the multiple first devices in the space, then based on the difference between the current space state indication information and the target space state indication information and the current state information of the multiple second devices, a first device control instruction applied to a target second device among the multiple second devices is obtained; and the first device control instruction is sent to the target second device so that the current space state indication information of the target second device after executing the first device control instruction is the same as the target space state indication information.

在其中一个实施例中,所述根据所述当前空间状态标示信息以及所述目标空间状态标示信息,发送对应的设备控制指令至多个所述第二设备,包括:若在所述空间中多个所述第二设备与所述空间中多个所述第一设备部分不同,则获取相同设备的目标状态信息;所述相同设备为多个所述第二设备中与多个所述第一设备相同的设备;所述目标状态信息与所述目标空间状态标示信息对应;所述目标状态信息用于表示使所述空间呈现所述目标状态时所述相同设备的设备状态;根据所述相同设备的目标状态信息以及所述相同设备当前的状态信息,发送第二设备控制指令至所述相同设备,以使所述相同设备达到所述目标状态信息表示的所述设备状态;根据所述相同设备执行所述第二设备控制指令后的当前空间状态标示信息与所述目标空间状态标示信息的差异以及不同设备当前的状态信息,得到应用于所述不同设备的第三设备控制指令;所述不同设备为多个所述第二设备中与多个所述第一设备不同的设备;发送所述第三设备控制指令至所述不同设备,以使所述不同设备执行所述第二设备控制指令后的当前空间状态标示信息与所述目标空间状态标示信息相同。In one of the embodiments, sending corresponding device control instructions to multiple second devices according to the current space state indication information and the target space state indication information includes: if the multiple second devices in the space are partially different from the multiple first devices in the space, obtaining the target state information of the same device; the same device is the same device as the multiple first devices among the multiple second devices; the target state information corresponds to the target space state indication information; the target state information is used to indicate the device state of the same device when the space presents the target state; sending a second device control instruction to the same device according to the target state information of the same device and the current state information of the same device so that the same device reaches the device state indicated by the target state information; obtaining a third device control instruction applied to the different device according to the difference between the current space state indication information and the target space state indication information after the same device executes the second device control instruction and the current state information of the different device; the different device is a device different from the multiple first devices among the multiple second devices; sending the third device control instruction to the different device so that the current space state indication information of the different device after executing the second device control instruction is the same as the target space state indication information.

在其中一个实施例中,所述根据所述目标空间状态标示信息和所述空间中所述第二设备当前的状态信息,发送对应的设备控制指令至所述第二设备,包括:若所述空间中所述第二设备与所述空间中所述第一设备相同,则根据所述第一设备的目标状态信息和所述第二设备当前的状态信息,发送对应的设备控制指令至所述第二设备;所述目标状态信息与所述目标空间状态标示信息对应;所述目标状态信息用于表示使所述空间呈现所述目标状态时所述第一设备的设备状态。In one of the embodiments, sending corresponding device control instructions to the second device based on the target space status indication information and the current status information of the second device in the space includes: if the second device in the space is the same as the first device in the space, sending corresponding device control instructions to the second device based on the target status information of the first device and the current status information of the second device; the target status information corresponds to the target space status indication information; the target status information is used to indicate the device status of the first device when making the space present the target status.

第二方面,本申请还提供了一种设备控制装置。所述装置包括:In a second aspect, the present application also provides a device control apparatus. The apparatus comprises:

信息获得模块,用于获得目标空间状态标示信息;所述目标空间状态标示信息用于标示由空间中第一设备使所述空间呈现的目标状态;所述第一设备包括使所述空间形成所述目标状态的设备;An information acquisition module, used for acquiring target space state marking information; the target space state marking information is used for marking the target state presented by the first device in the space; the first device includes a device that causes the space to form the target state;

信息应用模块,用于应用所述目标空间状态标示信息,以在所述目标状态满足再现条件时,控制所述空间中第二设备使所述空间呈现所述目标状态;所述第二设备包括使所述空间再现所述目标状态的设备。An information application module is used to apply the target space state indication information to control a second device in the space to make the space present the target state when the target state meets the reproduction condition; the second device includes a device that makes the space reproduce the target state.

第三方面,本申请还提供了一种电子设备。所述电子设备包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时实现以下步骤:In a third aspect, the present application further provides an electronic device. The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:

获得目标空间状态标示信息;所述目标空间状态标示信息用于标示由空间中第一设备使所述空间呈现的目标状态;所述第一设备包括使所述空间形成所述目标状态的设备;应用所述目标空间状态标示信息,以在所述目标状态满足再现条件时,控制所述空间中第二设备使所述空间呈现所述目标状态;所述第二设备包括使所述空间再现所述目标状态的设备。Obtain target space state identification information; the target space state identification information is used to identify the target state presented by the first device in the space; the first device includes a device that causes the space to form the target state; apply the target space state identification information to control the second device in the space to make the space present the target state when the target state meets the reproduction condition; the second device includes a device that causes the space to reproduce the target state.

第四方面,本申请还提供了一种计算机可读存储介质。所述计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现以下步骤:In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:

获得目标空间状态标示信息;所述目标空间状态标示信息用于标示由空间中第一设备使所述空间呈现的目标状态;所述第一设备包括使所述空间形成所述目标状态的设备;应用所述目标空间状态标示信息,以在所述目标状态满足再现条件时,控制所述空间中第二设备使所述空间呈现所述目标状态;所述第二设备包括使所述空间再现所述目标状态的设备。Obtain target space state identification information; the target space state identification information is used to identify the target state presented by the first device in the space; the first device includes a device that causes the space to form the target state; apply the target space state identification information to control the second device in the space to make the space present the target state when the target state meets the reproduction condition; the second device includes a device that causes the space to reproduce the target state.

第五方面,本申请还提供了一种计算机程序产品。所述计算机程序产品,包括计算机程序,该计算机程序被处理器执行时实现以下步骤:In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:

获得目标空间状态标示信息;所述目标空间状态标示信息用于标示由空间中第一设备使所述空间呈现的目标状态;所述第一设备包括使所述空间形成所述目标状态的设备;应用所述目标空间状态标示信息,以在所述目标状态满足再现条件时,控制所述空间中第二设备使所述空间呈现所述目标状态;所述第二设备包括使所述空间再现所述目标状态的设备。Obtain target space state identification information; the target space state identification information is used to identify the target state presented by the first device in the space; the first device includes a device that causes the space to form the target state; apply the target space state identification information to control the second device in the space to make the space present the target state when the target state meets the reproduction condition; the second device includes a device that causes the space to reproduce the target state.

上述设备控制方法、装置、电子设备、存储介质和计算机程序产品,可通过目标空间状态标示信息的记录与应用,在由空间中第一设备使空间呈现目标状态时记录目标空间状态标示信息,并据此在目标状态满足再现条件时控制空间中第二设备使空间呈现目标空间状态标示信息标示的目标状态,实现基于空间的目标状态呈现的对例如家居空间内各设备的自适应调整,且使空间的目标状态的再现不依赖特定特备、特定指令,提高设备控制效率及便捷性。The above-mentioned device control method, apparatus, electronic device, storage medium and computer program product can record and apply the target space state indication information, record the target space state indication information when the first device in the space makes the space present the target state, and accordingly control the second device in the space to make the space present the target state indicated by the target space state indication information when the target state meets the reproduction condition, thereby realizing adaptive adjustment of various devices in, for example, a home space based on the presentation of the target state of the space, and making the reproduction of the target state of the space independent of specific equipment or specific instructions, thereby improving the efficiency and convenience of device control.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

图1为本申请一个实施例的设备控制方法的应用环境图;FIG1 is an application environment diagram of a device control method according to an embodiment of the present application;

图2为本申请一个实施例的设备控制方法的流程示意图;FIG2 is a schematic diagram of a flow chart of a device control method according to an embodiment of the present application;

图3为本申请一个示例中创建空间状态的界面示意图;FIG3 is a schematic diagram of an interface for creating a space state in an example of the present application;

图4为本申请一个示例中创建场景的界面示意图;FIG4 is a schematic diagram of an interface for creating a scene in an example of the present application;

图5为本申请一个应用实施例中照明控制面板的界面示意图;FIG5 is a schematic diagram of an interface of a lighting control panel in an application embodiment of the present application;

图6为本申请一个应用实施例中设备注册与配置方法的流程示意图;FIG6 is a schematic diagram of a flow chart of a device registration and configuration method in an application embodiment of the present application;

图7为本申请一个应用实施例中设备控制方法的流程示意图;FIG7 is a schematic diagram of a flow chart of a device control method in an application embodiment of the present application;

图8为本申请一个应用实施例中设备控制方法的时序图;FIG8 is a timing diagram of a device control method in an application embodiment of the present application;

图9为本申请一个实施例的设备控制装置的结构框图;FIG9 is a structural block diagram of a device control device according to an embodiment of the present application;

图10为本申请一个实施例的电子设备的内部结构图。FIG. 10 is a diagram showing the internal structure of an electronic device according to an embodiment of the present application.

具体实施方式DETAILED DESCRIPTION

为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

本申请实施例提供的设备控制方法,可以应用于如图1所示的应用环境中,该应用环境可以是智能家居系统,该智能家居系统可以包括:云/云端服务器、路由器、网关、用户终端(如手机、平板电脑)、多个设备(如智能灯具、智能插座、智能窗帘、智能空调、传感器、开关)等。在智能家居系统中,各设备可通过ZIGBEE/蓝牙与网关连接,网关和用户终端可分别通过WiFi与路由器连接。另外用户终端也可通过2G/3G/4G/5G、WiFi等与云/云端服务器建立网络连接,从而可以获取云/云端服务器下发的数据。The device control method provided in the embodiment of the present application can be applied to the application environment shown in Figure 1, which can be a smart home system. The smart home system may include: cloud/cloud servers, routers, gateways, user terminals (such as mobile phones, tablet computers), multiple devices (such as smart lamps, smart sockets, smart curtains, smart air conditioners, sensors, switches), etc. In the smart home system, each device can be connected to the gateway via ZIGBEE/Bluetooth, and the gateway and user terminal can be connected to the router via WiFi respectively. In addition, the user terminal can also establish a network connection with the cloud/cloud server via 2G/3G/4G/5G, WiFi, etc., so that the data sent by the cloud/cloud server can be obtained.

对于智能家居系统,其系统配置方式可以是:用户终端上装有对应的应用程序,首先可以在应用程序上添加至少一个网关设备,当添加其它的设备(如智能灯具、智能插座、智能窗帘、智能空调、传感器、开关)时,可点击应用程序的界面中的添加设备按钮,并在添加界面选择该设备需要接入的网关设备,即可将该设备添加进该网关对应的ZIGBEE网络,进而与其它添加入的设备以及网关一起组成ZIGBEE局域网络。当应用程序与路由器、网关在同一局域网络中时,应用程序可通过局域网路径与网关以及连接至网关的设备进行交互;当应用程序与路由器、网关不在同一局域网络中时,应用程序可以通过广域网路径与网关以及连接至网关的设备进行交互。For the smart home system, the system configuration method can be: the corresponding application is installed on the user terminal, and at least one gateway device can be added to the application first. When adding other devices (such as smart lamps, smart sockets, smart curtains, smart air conditioners, sensors, switches), you can click the Add Device button in the application interface, and select the gateway device that the device needs to access in the Add interface, and then add the device to the ZIGBEE network corresponding to the gateway, and then form a ZIGBEE local area network with other added devices and gateways. When the application, router, and gateway are in the same local area network, the application can interact with the gateway and the devices connected to the gateway through the local area network path; when the application, router, and gateway are not in the same local area network, the application can interact with the gateway and the devices connected to the gateway through the wide area network path.

基于如图1所示的智能家居系统,目前技术提供的设备控制方法,用户可以根据其需求在应用程序上设定好居住空间内的各种设备(如智能灯具、智能插座、智能窗帘、智能空调、传感器、开关)的参数,但当在一段时间后又有同样需求时,需要用户再次在应用程序上逐个重新设定这些设备的参数,这种方式是低效且缺乏便捷性的。Based on the smart home system as shown in FIG1 , the device control method provided by current technology allows users to set parameters of various devices in the living space (such as smart lamps, smart sockets, smart curtains, smart air conditioners, sensors, switches) on the application according to their needs. However, when the same need arises again after a period of time, users are required to reset the parameters of these devices one by one on the application, which is inefficient and lacks convenience.

对此,本申请提供的设备控制方法,可以由用户终端通过目标空间状态标示信息的记录与应用,无需用户手动重新设定设备参数,能够实现基于空间的目标状态呈现的对家居空间内各设备的自适应调整,且使空间的目标状态的再现不依赖特定特备、特定指令,提高设备控制效率及便捷性。In this regard, the device control method provided by the present application can be realized by the user terminal through the recording and application of the target space status indication information, without the need for the user to manually reset the device parameters. It can realize the adaptive adjustment of each device in the home space based on the target state of the space, and make the reproduction of the target state of the space independent of specific equipment or specific instructions, thereby improving the efficiency and convenience of device control.

以下结合各实施例及相应附图对本申请的设备控制方法进行详细说明。The device control method of the present application is described in detail below in conjunction with various embodiments and corresponding drawings.

在一个实施例中,如图2所示,本申请提供了一种设备控制方法,该方法可以应用于图1中的用户终端,该方法可以包括以下步骤:In one embodiment, as shown in FIG. 2 , the present application provides a device control method, which can be applied to the user terminal in FIG. 1 , and the method may include the following steps:

步骤S201,获得目标空间状态标示信息,目标空间状态标示信息用于标示由空间中第一设备使空间呈现的目标状态;第一设备包括使空间形成目标状态的设备。Step S201, obtaining target space state marking information, where the target space state marking information is used to mark the target state presented by the first device in the space; the first device includes a device that causes the space to form a target state.

步骤S202,应用目标空间状态标示信息,以在目标状态满足再现条件时,控制空间中第二设备使空间呈现目标状态;第二设备包括使空间再现目标状态的设备。Step S202, applying the target space state marking information to control the second device in the space to make the space present the target state when the target state meets the reproduction condition; the second device includes a device that makes the space reproduce the target state.

本实施例的设备控制方法重点在于目标空间状态标示信息的记录以及应用。其中,目标空间状态标示信息是指用于标示由空间中第一设备使空间呈现的目标状态的信息,该第一设备包括使该空间形成该目标状态的设备,该第一设备的数量通常是多个,不同的第一设备的设备类型可以相同,也可以不同,通过空间中设备类型相同或不同的多个设备可使得空间整体呈现某种状态。作为一个示例,第一设备可以包括多个智能灯,用户可以将该多个智能灯都设置为关闭状态,此时空间整体呈现的状态则是全部灯关闭的状态,该状态可以被用户在用户终端的应用程序上确定为目标状态,而由此用户终端的应用程序在步骤S201中可以获得目标空间状态标示信息,该示例中的目标空间状态标示信息用于标示由空间中多个智能灯使空间呈现的目标状态为全部灯关闭的状态,该目标空间状态标示信息可以用文字“全部灯关闭”来表示。作为另一示例,第一设备可以包括多个智能灯,用户可以将该多个智能灯的其中一个智能灯设置为开启状态,其余的智能灯设置为关闭状态,此时空间整体呈现的状态则是任一灯开着的状态,该状态也可以被用户在用户终端的应用程序上确定为目标状态,而由此用户终端的应用程序在步骤S201中可以获得目标空间状态标示信息,该示例中的目标空间状态标示信息用于标示由空间中多个智能灯使空间呈现的目标状态为任一灯开着的状态,该目标空间状态标示信息可以用文字“任一灯开着”来表示。The device control method of this embodiment focuses on the recording and application of the target space state marking information. Among them, the target space state marking information refers to information used to mark the target state presented by the first device in the space. The first device includes a device that makes the space form the target state. The number of the first devices is usually multiple, and the device types of different first devices can be the same or different. The space as a whole can be presented in a certain state through multiple devices of the same or different device types in the space. As an example, the first device can include multiple smart lights. The user can set the multiple smart lights to the off state. At this time, the state presented by the space as a whole is the state of all lights off. This state can be determined as the target state by the user on the application of the user terminal, and the application of the user terminal can obtain the target space state marking information in step S201. The target space state marking information in this example is used to indicate that the target state presented by the multiple smart lights in the space is the state of all lights off. The target space state marking information can be represented by the text "all lights off". As another example, the first device may include multiple smart lights. The user can set one of the multiple smart lights to be on and the rest of the smart lights to be off. At this time, the overall state of the space is the state in which any light is on. This state can also be determined as a target state by the user on the application of the user terminal, and the application of the user terminal can obtain the target space state indication information in step S201. The target space state indication information in this example is used to indicate that the target state of the space presented by multiple smart lights in the space is the state in which any light is on. The target space state indication information can be expressed by the text "any light is on".

因此,通过本申请的步骤S201,可以记录下用于标示由空间中第一设备使空间呈现的目标状态的目标空间状态标示信息,该步骤相当于为空间中各设备创建空间快照,创建空间快照可以视作将空间中各设备的状态转化到空间状态的过程,也即步骤S201中,用户可以将空间中的各第一设备通过参数设置/调节的方式达到一个状态(如上述的智能灯的开启状态、关闭状态等),这样空间会因各第一设备的状态而整体呈现出一个状态(如上述的全部灯关闭的状态、任一灯开着的状态等),此时可以由用户在用户终端的应用程序上将该空间呈现的状态确认为目标状态,由此用户终端的应用程序在步骤S201中记录对应该目标状态的目标空间状态标示信息,相当于进行将空间中各设备的状态到空间状态的转化处理,达到为空间中各设备创建空间快照的效果。Therefore, through step S201 of the present application, the target space state identification information used to indicate the target state presented by the first device in the space can be recorded. This step is equivalent to creating a space snapshot for each device in the space. Creating a space snapshot can be regarded as a process of converting the state of each device in the space into a space state, that is, in step S201, the user can set/adjust each first device in the space to a state (such as the on state, off state, etc. of the above-mentioned smart light) through parameter setting/adjustment. In this way, the space will present a state as a whole due to the state of each first device (such as the state of all lights being off, the state of any light being on, etc.). At this time, the user can confirm the state presented by the space as the target state on the application of the user terminal. The application of the user terminal records the target space state identification information corresponding to the target state in step S201, which is equivalent to converting the state of each device in the space to the space state, thereby achieving the effect of creating a space snapshot for each device in the space.

目标空间状态标示信息的应用于步骤S202进行。步骤S202中,用户终端的应用程序应用该目标空间状态标示信息,以在目标状态满足再现条件时,控制空间中第二设备使空间呈现该目标状态。The application of the target space state indication information is performed in step S202. In step S202, the application program of the user terminal applies the target space state indication information to control the second device in the space to make the space present the target state when the target state meets the reproduction condition.

其中,用户终端的应用程序可以在获得目标空间状态标示信息后应用该目标空间状态标示信息,也可以在目标状态满足再现条件时应用该目标空间状态标示信息,其目标在于当目标状态满足再现条件时,控制空间中第二设备使空间呈现该目标状态(如上述的全部灯关闭的状态、任一灯开着的状态等)。其中,目标状态的再现条件可以由用户根据实际需要进行设置,作为示例,再现条件可以包括但不限于是受到用户主动触发、到达每天的某个时刻、检测到用户进入空间中某些区域。用户可以在用户终端的应用程序中设置再现条件,用户终端的应用程序可以将该再现条件与上述的目标空间状态标示信息进行关联,由此,目标状态满足再现条件时,可以根据目标空间状态标示信息控制空间中第二设备使空间呈现目标状态。Among them, the application of the user terminal can apply the target space state marking information after obtaining the target space state marking information, and can also apply the target space state marking information when the target state meets the reproduction condition. Its goal is to control the second device in the space to make the space present the target state (such as the above-mentioned state of all lights off, the state of any light on, etc.). Among them, the reproduction condition of the target state can be set by the user according to actual needs. As an example, the reproduction condition may include but is not limited to being actively triggered by the user, arriving at a certain time of the day, and detecting that the user enters certain areas in the space. The user can set the reproduction condition in the application of the user terminal, and the application of the user terminal can associate the reproduction condition with the above-mentioned target space state marking information. Thus, when the target state meets the reproduction condition, the second device in the space can be controlled according to the target space state marking information to make the space present the target state.

作为目标空间状态标示信息的应用的一种实施方式,用户终端的应用程序可以在获得目标空间状态标示信息后,检测目标状态是否满足再现条件,当目标状态满足再现条件时,由用户终端的应用程序根据目标空间状态标示信息向网关发送对应的设备控制指令(集),再由网关将该设备控制指令(集)传递至第二设备。作为目标空间状态标示信息的应用的另一种实施方式,用户终端的应用程序可以在获得目标空间状态标示信息后,将目标空间状态标示信息发送至网关,由网关检测目标状态是否满足再现条件,当目标状态满足再现条件时,由网关根据目标空间状态标示信息向第二设备发送对应的设备控制指令(集)。其中,第二设备包括使空间再现上述目标状态的设备,第二设备的数量通常也是多个,需要说明的是,第二设备与第一设备可以是相同的,也可以是不相同的,即在形成目标状态时的空间中的设备可以与再现该目标状态的空间中的设备相同或不同,其中,相同包括完全相同,不同包括完全不同或部分不同,仍以多个智能灯(智能灯1、智能灯2、智能灯3和智能灯4)为例,第一设备可以包括智能灯1、智能灯2、智能灯3,空间中形成的目标状态设为全部灯关闭的状态,那么第二设备可以包括智能灯1、智能灯2、智能灯3,为完全相同,第二设备也可以包括智能灯1、智能灯2、智能灯4,为部分不同,第二设备还可以包括智能灯4,为完全不同,对此,步骤S202中应用对应的目标空间状态标示信息,可以在目标状态(全部灯关闭的状态)满足再现条件时,在完全相同、部分不同、完全不同的情况下发送相应的设备控制指令至各智能灯,使空间呈现全部灯关闭的状态,由此可以完成从空间快照到设备控制指令的映射,使得空间状态的再现无需受限于特定的设备或指令,即便是在空间内设备发生变动的情况下,也仍然能够基于记录的目标空间状态标示信息对例如家居空间内各设备进行自适应调整实现空间状态的再现,提高了设备控制效率及便捷性。As one implementation method of the application of the target space state indication information, the application of the user terminal can detect whether the target state meets the reproduction condition after obtaining the target space state indication information. When the target state meets the reproduction condition, the application of the user terminal sends the corresponding device control instruction (set) to the gateway according to the target space state indication information, and the gateway then transmits the device control instruction (set) to the second device. As another implementation method of the application of the target space state indication information, the application of the user terminal can send the target space state indication information to the gateway after obtaining the target space state indication information, and the gateway detects whether the target state meets the reproduction condition. When the target state meets the reproduction condition, the gateway sends the corresponding device control instruction (set) to the second device according to the target space state indication information. Among them, the second device includes a device that enables the space to reproduce the above-mentioned target state, and the number of second devices is usually also multiple. It should be noted that the second device and the first device can be the same or different, that is, the device in the space when the target state is formed can be the same or different from the device in the space that reproduces the target state, wherein the same includes completely the same, and different includes completely different or partially different. Taking multiple smart lights (smart light 1, smart light 2, smart light 3 and smart light 4) as an example, the first device can include smart light 1, smart light 2, smart light 3, and the target state formed in the space is set to the state where all lights are turned off. Then the second device can include smart light 1, smart light 2, smart light 3. To be completely the same, the second device can also include smart light 1, smart light 2, smart light 3. 2. Smart light 4 is partially different. The second device may also include smart light 4, which is completely different. In this regard, the corresponding target space state indication information is applied in step S202. When the target state (the state of all lights being turned off) meets the reproduction condition, the corresponding device control instructions can be sent to each smart light in the completely identical, partially different, or completely different states, so that the space presents a state where all lights are turned off. In this way, the mapping from space snapshot to device control instructions can be completed, so that the reproduction of the space state does not need to be limited to specific devices or instructions. Even if the equipment in the space changes, it is still possible to adaptively adjust the devices in, for example, the home space based on the recorded target space state indication information to achieve the reproduction of the space state, thereby improving the efficiency and convenience of device control.

本实施例的设备控制方法,可通过目标空间状态标示信息的记录与应用,在由空间中第一设备使空间呈现目标状态时记录目标空间状态标示信息,并据此在目标状态满足再现条件时控制空间中第二设备使空间呈现目标空间状态标示信息标示的目标状态,实现基于空间的目标状态呈现的对例如家居空间内各设备的自适应调整,且使空间的目标状态的再现不依赖特定特备、特定指令,提高设备控制效率及便捷性。The device control method of this embodiment can record and apply the target space state identification information, record the target space state identification information when the first device in the space makes the space present the target state, and accordingly control the second device in the space to make the space present the target state indicated by the target space state identification information when the target state meets the reproduction condition, thereby realizing adaptive adjustment of various devices in, for example, a home space based on the presentation of the target state of the space, and making the reproduction of the target state of the space independent of specific equipment or specific instructions, thereby improving the efficiency and convenience of device control.

对于步骤S201中的获得目标空间状态标示信息,在其中一些实施例中,可以包括以下步骤:Regarding obtaining the target space state indication information in step S201, in some embodiments, the following steps may be included:

响应于状态创建指令,展示当前空间状态标示信息;当前空间状态标示信息对应空间当前呈现的状态;响应于状态确认指令,获得目标空间状态标示信息;目标空间状态标示信息包括受确认的当前空间状态标示信息。In response to a state creation instruction, current space state identification information is displayed; the current space state identification information corresponds to the current state of the space; in response to a state confirmation instruction, target space state identification information is obtained; the target space state identification information includes the confirmed current space state identification information.

本实施例的方案可以在用户终端的应用程序中提供UI界面(User Interface,用户界面)便于用户快速创建及确认空间的目标状态,用户终端的应用程序可由此获得目标空间状态标示信息。结合图3,用户终端的应用程序中可以展示包含状态创建触发按钮等形式组件(如图3示出的空间快照按钮),使得用户可以通过点击该状态创建触发按钮触发状态创建指令,用户终端的应用程序响应于状态创建指令,展示当前空间状态标示信息,该当前空间状态标示信息对应空间当前呈现的状态,该空间当前呈现的状态可由第一设备使得空间呈现出来,如上所述的,第一设备的数量通常是多个,第一设备的设备类型也可以是多种的,作为示例,第一设备可以包括多个智能灯、智能窗帘,如图3示出的,当前空间状态标示信息可以包括多项信息,每项信息可以对应第一设备的不同设备类型等,例如,当前空间状态标示信息可以包括照明项的信息(灯全开)、遮阳项的信息(窗帘全关)等,每项信息各自可以对应空间指令,该空间指令用于实现相应项信息的状态控制,如空间指令可以包括打开全部灯(对应照明项的信息)、关闭全部窗帘(对应遮阳项的信息)等,在目标空间状态标示信息确定后,通过在目标状态满足再现条件时执行该些空间指令可以向相应的第二设备下发对应的设备控制指令使空间呈现目标状态。其中,基于如图3示出的当前空间状态标示信息,用户终端的应用程序可以分别在各项信息处提供状态勾选项,用户可以通过在相应项信息处选中状态勾选项触发状态确认指令,用户终端的应用程序响应于状态确认指令,可根据用户最终选中的各项信息得到受确认的当前空间状态标示信息,将该受确认的当前空间状态标示信息作为目标空间状态标示信息,如用户选中照明项的信息(灯全开)、遮阳项的信息(窗帘全关),则受确认的当前空间状态标示信息为灯全开、窗帘全关。The solution of this embodiment can provide a UI (User Interface) in the application of the user terminal to facilitate the user to quickly create and confirm the target state of the space, and the application of the user terminal can obtain the target space state identification information. In conjunction with Figure 3, the application of the user terminal can display components such as a state creation trigger button (such as the space snapshot button shown in Figure 3), so that the user can trigger the state creation instruction by clicking the state creation trigger button. The application of the user terminal responds to the state creation instruction and displays the current space state identification information. The current space state identification information corresponds to the current state of the space. The current state of the space can be presented by the first device. As mentioned above, the number of first devices is usually multiple, and the device type of the first device can also be multiple. As an example, the first device can include multiple smart lights and smart curtains. As shown in Figure 3, the current The space status indication information may include multiple items of information, each of which may correspond to different device types of the first device, etc. For example, the current space status indication information may include information on lighting items (all lights on), information on sunshade items (all curtains closed), etc. Each item of information may correspond to a space instruction, which is used to implement state control of the corresponding item information. For example, the space instruction may include turning on all lights (corresponding to the information on the lighting item), closing all curtains (corresponding to the information on the sunshade item), etc. After the target space status indication information is determined, by executing these space instructions when the target state meets the reproduction conditions, the corresponding device control instructions can be sent to the corresponding second device to make the space present the target state. Among them, based on the current space status indication information as shown in Figure 3, the application of the user terminal can provide a status check option at each item of information respectively. The user can trigger the status confirmation instruction by selecting the status check option at the corresponding item of information. The application of the user terminal responds to the status confirmation instruction and can obtain the confirmed current space status indication information according to the various items of information finally selected by the user, and use the confirmed current space status indication information as the target space status indication information. For example, if the user selects the information of the lighting item (lights on fully) and the information of the sunshade item (curtains closed fully), the confirmed current space status indication information is lights on fully and curtains closed fully.

对于上述实施例中的当前空间状态标示信息,在一个实施例中,可以通过以下步骤获得,步骤可以包括:In one embodiment, the current space state indication information in the above embodiment can be obtained through the following steps, which may include:

获取空间中第一设备当前的状态信息;根据空间中第一设备当前的状态信息,得到当前空间状态标示信息。Obtain current status information of the first device in the space; and obtain current space status indication information based on the current status information of the first device in the space.

本实施例的方案可以在空间状态的创建及确认的过程中由用户终端的应用程序可通过网关不断获取空间中第一设备当前的状态信息(表示如开启状态、关闭状态的信息),其中第一设备的数量可以是多个,第一设备的设备类型也可以是多种,将空间中第一设备当前的状态信息实时转化为当前空间状态标示信息并展示在如图3示出的界面上,即向用户展示的当前空间状态标示信息可以随着空间中第一设备当前的状态的变化而发生变化,由此,用户终端的应用程序向用户展示当前空间状态标示信息时,用户还可以通过手动、语音控制等方式调整/设置第一设备的状态,本实施例的方案可实时将空间中第一设备当前的状态信息转化为当前空间状态标示信息并在用户终端的应用程序的界面上显示,使得用户可以实时获知空间整体呈现出其所需要的目标状态,提高空间状态设置的效率及便捷性。The scheme of this embodiment can be that during the process of creating and confirming the space status, the application of the user terminal can continuously obtain the current status information of the first device in the space (information such as the on state and the off state) through the gateway, wherein the number of the first devices can be multiple, and the device types of the first devices can also be multiple, and the current status information of the first device in the space is converted into the current space status indication information in real time and displayed on the interface as shown in Figure 3, that is, the current space status indication information displayed to the user can change with the change of the current state of the first device in the space. Therefore, when the application of the user terminal displays the current space status indication information to the user, the user can also adjust/set the state of the first device by manual or voice control. The scheme of this embodiment can convert the current state information of the first device in the space into the current space status indication information in real time and display it on the interface of the application of the user terminal, so that the user can know in real time that the space as a whole presents the target state he needs, thereby improving the efficiency and convenience of space status setting.

基于如上所述的实施例,对于步骤S202中的应用目标空间状态标示信息,在一些实施例中,可以包括:Based on the above-mentioned embodiments, the application target space state indication information in step S202 may include, in some embodiments:

关联目标空间状态标示信息与目标场景;若目标场景满足执行条件,则根据目标空间状态标示信息和空间中第二设备当前的状态信息,发送对应的设备控制指令至第二设备,以控制第二设备使空间呈现目标状态。Associate the target space status indication information with the target scene; if the target scene meets the execution conditions, send the corresponding device control instruction to the second device according to the target space status indication information and the current status information of the second device in the space to control the second device to make the space present the target state.

本实施例可以在空间状态的创建及确认过程将确认的目标空间状态标示信息应用至场景执行中,通过将目标空间状态标示信息与目标场景(用户创建的场景)进行关联,当目标场景满足执行条件时可视为目标状态满足再现条件,控制空间中第二设备使空间呈现目标状态。结合图3,用户可以在确认目标空间状态标示信息时输入目标场景的场景名称如“进入卧室”,用户可以通过点击“一键创建”使得用户终端的应用程序将目标空间状态标示信息与目标场景“进入卧室”进行关联,可展示目标场景“进入卧室”,用户还可以设置目标场景的执行条件,与如上所述的目标状态的再现条件的设置类似,目标场景的执行条件可以包括但不限于是受到用户主动触发、到达每天的某个时刻、检测到用户进入空间中某些区域。由此,用户终端的应用程序可以在检测到目标场景满足执行条件时控制空间中第二设备使空间呈现目标状态。其中,若目标场景满足执行条件,则用户终端的应用程序可以通过网关实时获取空间中第二设备当前的状态信息,根据目标空间状态标示信息和空间中第二设备当前的状态信息,发送对应的设备控制指令至第二设备,以控制第二设备使空间呈现目标状态。基于本实施例的方案,可以使得目标空间状态标示信息/空间快照的信息高效且便捷地应用至场景的创建与执行中,非常便于用户实现特定场景的空间状态设置及再现。In this embodiment, the confirmed target space state marking information can be applied to the scene execution during the creation and confirmation process of the space state. By associating the target space state marking information with the target scene (scene created by the user), when the target scene meets the execution condition, it can be regarded as the target state meets the reproduction condition, and the second device in the space is controlled to make the space present the target state. In conjunction with Figure 3, the user can enter the scene name of the target scene such as "enter the bedroom" when confirming the target space state marking information. The user can click "One-click creation" to make the application of the user terminal associate the target space state marking information with the target scene "enter the bedroom", and the target scene "enter the bedroom" can be displayed. The user can also set the execution condition of the target scene, which is similar to the setting of the reproduction condition of the target state as described above. The execution condition of the target scene can include but is not limited to being actively triggered by the user, reaching a certain time of the day, and detecting that the user enters certain areas in the space. As a result, the application of the user terminal can control the second device in the space to make the space present the target state when it is detected that the target scene meets the execution condition. Among them, if the target scene meets the execution conditions, the application of the user terminal can obtain the current status information of the second device in the space in real time through the gateway, and send the corresponding device control instruction to the second device according to the target space status indication information and the current status information of the second device in the space, so as to control the second device to make the space present the target state. Based on the scheme of this embodiment, the target space status indication information/space snapshot information can be efficiently and conveniently applied to the creation and execution of the scene, which is very convenient for users to realize the space status setting and reproduction of specific scenes.

上述实施例中的根据目标空间状态标示信息和空间中第二设备当前的状态信息,发送对应的设备控制指令至第二设备,在其中一个实施例中,可以包括:In the above embodiment, according to the target space state indication information and the current state information of the second device in the space, sending the corresponding device control instruction to the second device may include, in one embodiment:

若空间中第二设备与空间中第一设备相同,则根据第一设备的目标状态信息和第二设备当前的状态信息,发送对应的设备控制指令至第二设备;目标状态信息与目标空间状态标示信息对应;目标状态信息用于表示使空间呈现目标状态时第一设备的设备状态。If the second device in the space is the same as the first device in the space, the corresponding device control instruction is sent to the second device based on the target state information of the first device and the current state information of the second device; the target state information corresponds to the target space state indication information; the target state information is used to indicate the device state of the first device when the space presents the target state.

本实施例中,对于执行状态再现时空间中第二设备与第一设备相同的情况,用户终端的应用程序可以获取第一设备的目标状态信息,其中该目标状态信息与目标空间状态标示信息对应,目标状态信息用于表示使空间呈现目标状态时第一设备的设备状态(开启状态、关闭状态等),用户终端的应用程序可以在记录目标空间状态标示信息时一并记录第一设备的状态信息(此为第一设备的目标状态信息,或称为设备快照的信息),然后根据该第一设备的目标状态信息和与之相同的第二设备当前的状态信息,生成并发送对应的设备控制指令至该第二设备,即若执行状态再现时空间中第二设备(智能灯1、智能灯2)与第一设备(智能灯1、智能灯2)相同,则用户终端的应用程序在形成如“灯全开”等空间的目标状态时,可一并记录智能灯1、智能灯2的目标状态信息为表示开启状态的信息等,那么在再现如“灯全开”等空间的目标状态时,用户终端的应用程序可以根据智能灯1、智能灯2的目标状态信息及其当前的状态信息,发送对应的设备控制指令至智能灯1、智能灯2,如当智能灯1、智能灯2当前的状态信息表示关闭状态时,发送开启的设备控制指令至智能灯1、智能灯2,由此可以在再现时较好地还原形成空间的目标状态时各设备本身的状态。In this embodiment, for the case where the second device in the space is the same as the first device when state reproduction is performed, the application of the user terminal can obtain the target state information of the first device, wherein the target state information corresponds to the target space state identification information, and the target state information is used to indicate the device state (on state, off state, etc.) of the first device when the space presents the target state. The application of the user terminal can record the state information of the first device when recording the target space state identification information (this is the target state information of the first device, or information called a device snapshot), and then generate and send the corresponding device control instruction to the second device based on the target state information of the first device and the current state information of the second device that is the same as the first device. That is, if the second device in the space is the same as the first device when state reproduction is performed, The second device (smart light 1, smart light 2) is the same as the first device (smart light 1, smart light 2). When the application of the user terminal forms the target state of the space such as "all lights on", the target state information of smart light 1 and smart light 2 can be recorded as information indicating the on state. Then, when reproducing the target state of the space such as "all lights on", the application of the user terminal can send corresponding device control instructions to smart light 1 and smart light 2 according to the target state information of smart light 1 and smart light 2 and its current state information. For example, when the current state information of smart light 1 and smart light 2 indicates the off state, the on device control instruction is sent to smart light 1 and smart light 2. Therefore, the state of each device itself when the target state of the space is formed can be better restored during reproduction.

上述实施例中,第一设备的数量可以为多个;第二设备的数量可以为多个;根据目标空间状态标示信息和空间中第二设备当前的状态信息,发送对应的设备控制指令至第二设备,在另外一些实施例中,可以包括:In the above embodiment, the number of first devices may be multiple; the number of second devices may be multiple; according to the target space state indication information and the current state information of the second device in the space, sending the corresponding device control instruction to the second device, in some other embodiments, may include:

若空间中多个第二设备与空间中多个第一设备不同,则根据空间中多个第二设备当前的状态信息得到当前空间状态标示信息,根据当前空间状态标示信息以及目标空间状态标示信息,发送对应的设备控制指令至多个第二设备。If the multiple second devices in the space are different from the multiple first devices in the space, the current space status indication information is obtained according to the current status information of the multiple second devices in the space, and the corresponding device control instructions are sent to the multiple second devices according to the current space status indication information and the target space status indication information.

本实施例中,执行状态再现时空间中第二设备的数量可以是多个,形成目标状态时空间中第一设备的数量可以是多个。对于执行状态再现时空间中多个第二设备与形成目标状态时空间中多个第一设备不同的情况,可以分多个第二设备与多个第一设备完全不同或部分不同来处理。In this embodiment, the number of second devices in the space when the state is reproduced can be multiple, and the number of first devices in the space when the target state is formed can be multiple. If the multiple second devices in the space when the state is reproduced are different from the multiple first devices in the space when the target state is formed, the multiple second devices can be treated as completely different or partially different from the multiple first devices.

在其中一个实施例中,上述根据当前空间状态标示信息以及目标空间状态标示信息,发送对应的设备控制指令至多个第二设备,可以包括:In one embodiment, sending corresponding device control instructions to multiple second devices according to the current space state indication information and the target space state indication information may include:

若空间中多个第二设备与空间中多个第一设备完全不同,则根据当前空间状态标示信息与目标空间状态标示信息的差异以及多个第二设备当前的状态信息,得到应用于多个第二设备中目标第二设备的第一设备控制指令;发送第一设备控制指令至目标第二设备,以使目标第二设备执行第一设备控制指令后的当前空间状态标示信息与目标空间状态标示信息相同。If the multiple second devices in the space are completely different from the multiple first devices in the space, then based on the difference between the current space state indication information and the target space state indication information and the current state information of the multiple second devices, a first device control instruction applied to the target second device among the multiple second devices is obtained; and the first device control instruction is sent to the target second device so that the current space state indication information after the target second device executes the first device control instruction is the same as the target space state indication information.

本实施例中,在空间中多个第二设备与空间中多个第一设备完全不同的情况下,无法直接用形成目标状态时记录的设备的目标状态信息完成对该些第二设备的设备控制指令下发,对此,用户终端的应用程序可以根据空间中多个第二设备当前的状态信息得到当前空间状态标示信息,然后根据该当前空间状态标示信息与目标空间状态标示信息的差异以及该多个第二设备当前的状态信息,得到应用于多个第二设备中目标第二设备的第一设备控制指令,其中目标第二设备就是该多个第二设备中(一个或多个)需要接收设备控制指令的设备,然后发送第一设备控制指令至该目标第二设备,以使得该目标第二设备执行第一设备控制指令后,实时检测到的当前空间状态标示信息与目标空间状态标示信息相同,由此完成空间的目标状态的再现,达到空间状态再现的效果。作为示例,例如灯全关的目标状态,设处于关闭状态的智能灯1、智能灯2形成该目标状态,该目标状态再现时,空间中的第二设备设为包括处于开启状态的智能灯3、智能灯4,此时属于多个第二设备与多个第一设备完全不同的情况,那么根据空间中第二设备(智能灯3、智能灯4)当前的状态信息得到当前空间状态标示信息为标示灯全开的信息,此时根据当前空间状态标示信息与目标空间状态标示信息(标示灯全关的信息)的差异,结合第二设备(智能灯3、智能灯4)当前的状态信息(均处于开启状态),可以得到应用于目标第二设备(智能灯3、智能灯4)的第一设备控制指令(关闭指令),发送该第一设备控制指令(关闭指令)至目标第二设备(智能灯3、智能灯4),由此达到空间的目标状态再现的效果。In this embodiment, when the multiple second devices in the space are completely different from the multiple first devices in the space, it is impossible to directly use the target state information of the device recorded when the target state is formed to complete the issuance of device control instructions to the second devices. In this regard, the application of the user terminal can obtain the current space state identification information based on the current state information of the multiple second devices in the space, and then obtain the first device control instruction applied to the target second device among the multiple second devices based on the difference between the current space state identification information and the target space state identification information and the current state information of the multiple second devices, wherein the target second device is (one or more) the device among the multiple second devices that needs to receive the device control instruction, and then send the first device control instruction to the target second device, so that after the target second device executes the first device control instruction, the current space state identification information detected in real time is the same as the target space state identification information, thereby completing the reproduction of the target state of the space and achieving the effect of space state reproduction. As an example, for example, the target state of all lights being off is assumed to be that smart lights 1 and smart lights 2 being in the off state form the target state. When the target state is reproduced, the second devices in the space are set to include smart lights 3 and smart lights 4 being in the on state. At this time, the multiple second devices are completely different from the multiple first devices. Then, according to the current state information of the second devices (smart lights 3 and smart lights 4) in the space, the current space state indication information is obtained as information indicating that all lights are on. At this time, according to the difference between the current space state indication information and the target space state indication information (information indicating that all lights are off), combined with the current state information of the second devices (smart lights 3 and smart lights 4) (both are in the on state), the first device control instruction (off instruction) applied to the target second devices (smart lights 3 and smart lights 4) can be obtained, and the first device control instruction (off instruction) is sent to the target second devices (smart lights 3 and smart lights 4), thereby achieving the effect of reproducing the target state of the space.

在另外一个实施例中,上述根据当前空间状态标示信息以及目标空间状态标示信息,发送对应的设备控制指令至多个第二设备,可以包括:In another embodiment, sending corresponding device control instructions to multiple second devices according to the current space state indication information and the target space state indication information may include:

若在空间中多个第二设备与空间中多个第一设备部分不同,则获取相同设备的目标状态信息;相同设备为多个第二设备中与多个第一设备相同的设备;目标状态信息与目标空间状态标示信息对应;目标状态信息用于表示使空间呈现目标状态时相同设备的设备状态;根据相同设备的目标状态信息以及相同设备当前的状态信息,发送第二设备控制指令至相同设备,以使相同设备达到目标状态信息表示的设备状态;根据相同设备执行第二设备控制指令后的当前空间状态标示信息与目标空间状态标示信息的差异以及不同设备当前的状态信息,得到应用于不同设备的第三设备控制指令;不同设备为多个第二设备中与多个第一设备不同的设备;发送第三设备控制指令至不同设备,以使不同设备执行第二设备控制指令后的当前空间状态标示信息与目标空间状态标示信息相同。If multiple second devices in the space are partially different from multiple first devices in the space, then the target state information of the same device is obtained; the same device is a device among the multiple second devices that is the same as the multiple first devices; the target state information corresponds to the target space state indication information; the target state information is used to indicate the device state of the same device when the space presents the target state; according to the target state information of the same device and the current state information of the same device, a second device control instruction is sent to the same device to make the same device reach the device state indicated by the target state information; according to the difference between the current space state indication information and the target space state indication information after the same device executes the second device control instruction and the current state information of the different devices, a third device control instruction applied to the different device is obtained; the different device is a device among the multiple second devices that is different from the multiple first devices; the third device control instruction is sent to the different device so that the current space state indication information after the different device executes the second device control instruction is the same as the target space state indication information.

本实施例中,以任一灯开着的目标状态为例,设处于关闭状态的智能灯1、开启状态的智能灯2形成该目标状态,该目标状态再现时,空间中的第二设备设为包括处于关闭状态的智能灯2、处于开启状态的智能灯3,此时属于空间中多个第二设备与空间中多个第一设备部分不同的情况,考虑在再现时较好地还原形成空间的目标状态时各设备本身的状态,本实施例可以先获取相同设备的目标状态信息,该相同设备为多个第二设备中与多个第一设备相同的设备(即智能灯2),目标状态信息与目标空间状态标示信息对应,目标状态信息用于表示使空间呈现目标状态时该相同设备的设备状态,在一个示例中,目标空间状态标示信息用于标示任一灯开着的目标状态,相同设备(智能灯2)的目标状态信息则为表示开启状态的信息,然后可以根据该相同设备的目标状态信息(表示开启状态)以及该相同设备当前的状态信息(表示关闭状态),发送第二设备控制指令(开启指令)至相同设备(智能灯2),使得相同设备(智能灯2)达到目标状态信息表示的设备状态(开启状态),然后可以检测得到该相同设备(智能灯2)执行该第二设备控制指令(开启指令)后的当前空间状态标示信息为标示灯全开的信息,然后可以根据该当前空间状态标示信息(标示灯全开的信息)与目标空间状态标示信息(标示任一灯开着的信息)的差异以及不同设备当前的状态信息,得到应用于该不同设备的第三设备控制指令,其中,不同设备是指多个第二设备中与多个第一设备不同的设备(即智能灯3),其当前的状态信息则为表示开启状态的信息,由此得到应用于该不同设备(智能灯3)的第三设备控制指令则为关闭指令,然后发送该第三设备控制指令(关闭指令)至该不同设备(智能灯3),以使该不同设备(智能灯3)执行第三设备控制指令(关闭指令)后的当前空间状态标示信息与目标空间状态标示信息相同,即都是标示任一灯开着的信息,由此可以在再现空间的目标状态的同时较好地还原该空间的目标状态时各设备本身的状态。In this embodiment, taking the target state of any light being on as an example, it is assumed that the smart light 1 in the off state and the smart light 2 in the on state form the target state. When the target state is reproduced, the second device in the space is set to include the smart light 2 in the off state and the smart light 3 in the on state. At this time, the multiple second devices in the space are partially different from the multiple first devices in the space. Considering that the state of each device itself when the target state of the space is formed is better restored during reproduction, the target state information of the same device can be first obtained in this embodiment. The same device is the same device as the multiple first devices among the multiple second devices (i.e., the smart light 2). The target state information corresponds to the target space state marking information. The target state information is used to indicate the device state of the same device when the space presents the target state. In one example, the target space state marking information is used to indicate the target state of any light being on, and the target state information of the same device (smart light 2) is information indicating the on state. Then, according to the target state information of the same device (indicating the on state) and the current state information of the same device (indicating the off state), the second device control instruction (on instruction) can be sent to the same device (smart light 2), so that the same device The device (smart light 2) reaches the device state (on state) indicated by the target state information, and then the current space state indication information after the same device (smart light 2) executes the second device control instruction (on instruction) can be detected as information indicating that all lights are on, and then the third device control instruction applied to the different device can be obtained according to the difference between the current space state indication information (information indicating that all lights are on) and the target space state indication information (information indicating that any light is on) and the current state information of the different device, wherein the different device refers to a device in the multiple second devices that is different from the multiple first devices. (i.e., smart light 3), its current status information is information indicating the on state, and the third device control instruction applied to the different device (smart light 3) is a shut-down instruction, and then the third device control instruction (shut-down instruction) is sent to the different device (smart light 3), so that the current space status indication information after the different device (smart light 3) executes the third device control instruction (shut-down instruction) is the same as the target space status indication information, that is, both are information indicating that any light is on, thereby reproducing the target state of the space while better restoring the state of each device itself when the space is in the target state.

此外,在多个第二设备与多个第一设备部分不同的情况下,也可以直接根据当前空间状态标示信息以及目标空间状态标示信息的差异以及该多个第二设备当前的状态信息得到应用于该多个第二设备中目标第二设备的第四设备控制指令,然后发送该第四设备控制指令至目标第二设备,以使目标第二设备执行第四设备控制指令后的当前空间状态标示信息与目标空间状态标示信息相同。以任一灯开着的目标状态为例,设处于关闭状态的智能灯1、开启状态的智能灯2形成该目标状态,该目标状态再现时,空间中的第二设备设为包括处于关闭状态的智能灯2、智能灯3,此时可以根据当前空间状态标示信息(标示灯全关的信息)与目标空间状态标示信息(标示任一灯开着的信息)的差异以及多个第二设备(智能灯2、智能灯3)当前的状态信息(均处于关闭状态),得到应用于该多个第二设备中目标第二设备(智能灯2或智能灯3)的第四设备控制指令(开启指令),然后发送该第四设备控制指令(开启指令)至目标第二设备(智能灯2或智能灯3),以使检测得到的目标第二设备(智能灯2或智能灯3)执行第四设备控制指令(开启指令)后的当前空间状态标示信息与目标空间状态标示信息相同,即都是标示任一灯开着的信息,从而达到再现空间的目标状态的效果。In addition, when the multiple second devices are partially different from the multiple first devices, the fourth device control instruction applied to the target second device among the multiple second devices can be obtained directly based on the difference between the current space state identification information and the target space state identification information and the current state information of the multiple second devices, and then the fourth device control instruction is sent to the target second device, so that the current space state identification information of the target second device after executing the fourth device control instruction is the same as the target space state identification information. Taking the target state in which any light is on as an example, it is assumed that smart light 1 in the off state and smart light 2 in the on state form the target state. When the target state is reproduced, the second devices in the space are set to include smart light 2 and smart light 3 in the off state. At this time, according to the difference between the current space state indication information (information indicating that all lights are off) and the target space state indication information (information indicating that any light is on) and the current state information of multiple second devices (smart light 2, smart light 3) (all in the off state), a fourth device control instruction (on instruction) applied to the target second device (smart light 2 or smart light 3) among the multiple second devices can be obtained, and then the fourth device control instruction (on instruction) is sent to the target second device (smart light 2 or smart light 3), so that the current space state indication information of the target second device (smart light 2 or smart light 3) after executing the fourth device control instruction (on instruction) is the same as the target space state indication information, that is, both are information indicating that any light is on, thereby achieving the effect of reproducing the target state of the space.

上述实施例的方案能够在形成与执行空间的目标状态时设备发生变动的情况下自适应调整对设备的控制,确保空间状态再现的执行效果。The solution of the above-mentioned embodiment can adaptively adjust the control of the device when the device changes when forming and executing the target state of the space, thereby ensuring the execution effect of the spatial state reproduction.

对于步骤S201中的获得目标空间状态标示信息,在另外一些实施例中,可以包括以下步骤:Regarding obtaining the target space state indication information in step S201, in some other embodiments, the following steps may be included:

响应于场景创建指令,提供一个或多个可选空间状态标示信息;响应于状态选择指令,获得目标空间状态标示信息;目标空间状态标示信息包括被选择的可选空间状态标示信息。In response to a scene creation instruction, one or more optional space state marking information is provided; in response to a state selection instruction, target space state marking information is obtained; the target space state marking information includes the selected optional space state marking information.

本实施例的方案可以在创建场景过程中直接选择空间状态标示信息(空间快照的信息)作为场景的执行目标,从而提高场景创建的效率及便捷性。结合图4,用户终端的应用程序可以接收用户的场景创建指令,展示包含状态创建触发按钮等形式组件(图4示出的空间快照按钮),用户点击该空间快照按钮展示一个或多个可选空间状态标示信息,该可选空间状态标示信息可以包括当前空间状态标示信息、一个或多个历史空间状态标示信息,历史空间状态标示信息可以是由用户以往所创建的空间状态标示信息,用户可以对这些可选空间状态标示信息进行选择,如选择当前空间状态标示信息、历史空间状态标示信息等,对当前空间状态标示信息、历史空间状态标示信息的选择可以视为触发状态选择指令,用户终端的应用程序可以根据用户选择的可选空间状态标示信息得到目标空间状态标示信息,即目标空间状态标示信息包括被选择的可选空间状态标示信息。其中,用户也可以对可选空间状态标示信息中的多项信息进行选择性勾选形成最终的目标空间状态标示信息。The solution of this embodiment can directly select the space state marking information (space snapshot information) as the execution target of the scene during the scene creation process, thereby improving the efficiency and convenience of scene creation. In conjunction with Figure 4, the application of the user terminal can receive the user's scene creation instruction, display a form component including a state creation trigger button (the space snapshot button shown in Figure 4), and the user clicks the space snapshot button to display one or more optional space state marking information. The optional space state marking information may include the current space state marking information, one or more historical space state marking information, and the historical space state marking information may be the space state marking information created by the user in the past. The user can select these optional space state marking information, such as selecting the current space state marking information, the historical space state marking information, etc. The selection of the current space state marking information and the historical space state marking information can be regarded as a trigger state selection instruction. The application of the user terminal can obtain the target space state marking information according to the optional space state marking information selected by the user, that is, the target space state marking information includes the selected optional space state marking information. Among them, the user can also selectively check multiple pieces of information in the optional space state marking information to form the final target space state marking information.

基于上述实施例,对于步骤S202中的应用空间状态标示信息,在一些实施例中,可以包括:Based on the above embodiment, the application space status indication information in step S202 may include, in some embodiments:

关联目标空间状态标示信息与目标场景;若目标场景满足执行条件,则根据目标空间状态标示信息和空间中第二设备当前的状态信息,发送对应的设备控制指令至第二设备,以控制第二设备使空间呈现目标状态。Associate the target space status indication information with the target scene; if the target scene meets the execution conditions, send the corresponding device control instruction to the second device according to the target space status indication information and the current status information of the second device in the space to control the second device to make the space present the target state.

结合图4,本实施例的方案可以在创建场景过程中将选择的目标空间状态标示信息关联为场景的执行目标,在设置好场景的条件后,可以根据目标场景是否满足执行条件来执行空间的目标状态的再现。其中,用户在选择可选空间状态标示信息作为目标空间状态标示信息后,可以输入目标场景的场景名称如“进入卧室”,用户可以通过点击“一键创建”使得用户终端的应用程序将目标空间状态标示信息与目标场景“进入卧室”进行关联,用户终端的应用程序可以展示用户所创建的各场景(如进入卧室、离开卧室、睡眠场景等)并对其进行管理,如编辑各场景的执行目标、执行条件等等。由此,用户终端的应用程序可以在检测到目标场景满足执行条件时控制空间中第二设备使空间呈现目标状态。基于本实施例的方案,可以在场景的创建中非常高效且便捷地选择并关联目标空间状态标示信息/空间快照的信息,非常便于用户创建、管理及实现所需场景。In conjunction with FIG. 4 , the solution of this embodiment can associate the selected target space state indication information as the execution target of the scene during the scene creation process. After setting the conditions of the scene, the reproduction of the target state of the space can be executed according to whether the target scene meets the execution conditions. Among them, after selecting the optional space state indication information as the target space state indication information, the user can enter the scene name of the target scene such as "enter the bedroom". The user can click "one-click creation" to make the application of the user terminal associate the target space state indication information with the target scene "enter the bedroom". The application of the user terminal can display the various scenes created by the user (such as entering the bedroom, leaving the bedroom, sleeping scenes, etc.) and manage them, such as editing the execution targets, execution conditions, etc. of each scene. Thus, the application of the user terminal can control the second device in the space to make the space present the target state when it is detected that the target scene meets the execution conditions. Based on the solution of this embodiment, the target space state indication information/space snapshot information can be selected and associated very efficiently and conveniently in the creation of the scene, which is very convenient for users to create, manage and realize the required scenes.

上述实施例中的根据目标空间状态标示信息和空间中第二设备当前的状态信息,发送对应的设备控制指令至第二设备,在其中一个实施例中,可以包括:In the above embodiment, according to the target space state indication information and the current state information of the second device in the space, sending the corresponding device control instruction to the second device may include, in one embodiment:

若空间中第二设备与空间中第一设备相同,则根据第一设备的目标状态信息和第二设备当前的状态信息,发送对应的设备控制指令至第二设备;其中,目标状态信息与目标空间状态标示信息对应;目标状态信息用于表示使空间呈现目标状态时第一设备的设备状态。If the second device in the space is the same as the first device in the space, a corresponding device control instruction is sent to the second device based on the target state information of the first device and the current state information of the second device; wherein the target state information corresponds to the target space state indication information; the target state information is used to indicate the device state of the first device when making the space present the target state.

本实施例中,目标场景满足执行条件时,可以视为目标状态满足再现条件,由此可以执行目标场景的执行目标即空间的目标状态的再现,对于执行状态再现时空间中第二设备与空间中第一设备相同的情况下对第二设备的控制处理,在前述实施例中已有相应说明,在此不作赘述。由此可以在再现时较好地还原形成空间的目标状态时各设备本身的状态,达到目标场景的执行目标。In this embodiment, when the target scene meets the execution condition, it can be regarded as the target state meets the reproduction condition, so that the execution target of the target scene, that is, the reproduction of the target state of the space, can be executed. When the second device in the space is the same as the first device in the space during the reproduction of the execution state, the control processing of the second device has been described in the previous embodiment, and will not be repeated here. In this way, the state of each device itself when the target state of the space is formed can be better restored during the reproduction, and the execution target of the target scene can be achieved.

上述实施例中,第一设备的数量可以为多个;第二设备的数量可以为多个;根据目标空间状态标示信息和空间中第二设备当前的状态信息,发送对应的设备控制指令至第二设备,在另外一些实施例中,可以包括:In the above embodiment, the number of first devices may be multiple; the number of second devices may be multiple; according to the target space state indication information and the current state information of the second device in the space, sending the corresponding device control instruction to the second device, in some other embodiments, may include:

若空间中多个第二设备与空间中多个第一设备不同,则根据空间中多个第二设备当前的状态信息得到当前空间状态标示信息,根据当前空间状态标示信息以及目标空间状态标示信息,发送对应的设备控制指令至多个第二设备。If the multiple second devices in the space are different from the multiple first devices in the space, the current space status indication information is obtained according to the current status information of the multiple second devices in the space, and the corresponding device control instructions are sent to the multiple second devices according to the current space status indication information and the target space status indication information.

本实施例中,目标场景满足执行条件时,可以视为目标状态满足再现条件,由此可以执行所创建的目标场景的执行目标即空间的目标状态的再现,也可以分为多个第二设备与多个第一设备完全不同或部分不同来处理。该两部分的处理在前述的实施例中已有相应说明,在此不作赘述。本实施例的方案能够在所创建的目标场景满足执行条件时,形成与执行空间的目标状态时设备发生变动的情况下自适应调整对设备的控制,确保空间状态再现的执行效果,达到所创建的目标场景的执行目标。In this embodiment, when the target scene meets the execution conditions, it can be regarded as the target state meets the reproduction conditions, thereby executing the execution target of the created target scene, that is, the reproduction of the target state of the space, or it can be divided into multiple second devices that are completely different from or partially different from multiple first devices for processing. The processing of these two parts has been correspondingly described in the aforementioned embodiments and will not be repeated here. The scheme of this embodiment can adaptively adjust the control of the device when the target state of the space changes when the created target scene meets the execution conditions, thereby ensuring the execution effect of the spatial state reproduction and achieving the execution goal of the created target scene.

对于步骤S202中的应用目标空间状态标示信息,除以上实施例提及的应用于场景的关联及执行以外,也可以单独作为执行目标,在一些实施例中,可以包括以下步骤:The application target space state indication information in step S202 may be used as an execution target separately in addition to the association and execution of the application scene mentioned in the above embodiments. In some embodiments, the following steps may be included:

若目标状态满足再现条件,则根据目标空间状态标示信息和空间中第二设备当前的状态信息,发送对应的设备控制指令至第二设备,以控制第二设备使空间呈现目标状态。If the target state meets the reproduction conditions, a corresponding device control instruction is sent to the second device according to the target space state indication information and the current state information of the second device in the space to control the second device to make the space present the target state.

本实施例中,目标状态的再现条件可以根据用户所需进行设置,用户可以设置传感器的触发条件,将其作为目标状态的再现条件等等,用户终端的应用程序确定目标状态满足再现条件时,可以控制空间中第二设备使空间呈现目标状态。其中,用户终端的应用程序可以通过网关实时获取空间中第二设备当前的状态信息,根据目标空间状态标示信息和空间中第二设备当前的状态信息,发送对应的设备控制指令至第二设备,以控制第二设备使空间呈现目标状态。基于本实施例的方案,可以将目标空间状态标示信息/空间快照的信息单独作为执行目标,可以便于用户快速部署需要再现的空间的目标状态。In this embodiment, the reproduction condition of the target state can be set according to the needs of the user. The user can set the trigger condition of the sensor and use it as the reproduction condition of the target state, etc. When the application of the user terminal determines that the target state meets the reproduction condition, it can control the second device in the space to make the space present the target state. Among them, the application of the user terminal can obtain the current status information of the second device in the space in real time through the gateway, and send the corresponding device control instruction to the second device according to the target space status indication information and the current status information of the second device in the space, so as to control the second device to make the space present the target state. Based on the scheme of this embodiment, the target space status indication information/space snapshot information can be used as an execution target separately, which can facilitate users to quickly deploy the target state of the space that needs to be reproduced.

基于此,上述实施例中的根据目标空间状态标示信息和空间中第二设备当前的状态信息,发送对应的设备控制指令至第二设备,在其中一个实施例中,可以包括:Based on this, in the above embodiment, according to the target space state indication information and the current state information of the second device in the space, sending the corresponding device control instruction to the second device, in one embodiment, may include:

若空间中第二设备与空间中第一设备相同,则根据第一设备的目标状态信息和第二设备当前的状态信息,发送对应的设备控制指令至第二设备;其中,目标状态信息与目标空间状态标示信息对应;目标状态信息用于表示使空间呈现目标状态时第一设备的设备状态。If the second device in the space is the same as the first device in the space, a corresponding device control instruction is sent to the second device based on the target state information of the first device and the current state information of the second device; wherein the target state information corresponds to the target space state indication information; the target state information is used to indicate the device state of the first device when making the space present the target state.

本实施例中,在将空间状态标示信息/空间快照的信息单独作为执行目标时,对于执行状态再现时空间中第二设备与空间中第一设备相同的情况下对第二设备的控制处理,也可参照前述实施例中的相应说明,在此不作赘述。In this embodiment, when the space status identification information/space snapshot information is used as a separate execution target, the control processing of the second device in the space when the second device in the space is the same as the first device in the space when the execution state is reproduced can also refer to the corresponding description in the aforementioned embodiment, and will not be repeated here.

上述实施例中,第一设备的数量可以为多个;第二设备的数量可以为多个;根据目标空间状态标示信息和空间中第二设备当前的状态信息,发送对应的设备控制指令至第二设备,在另外一些实施例中,可以包括:In the above embodiment, the number of first devices may be multiple; the number of second devices may be multiple; according to the target space state indication information and the current state information of the second device in the space, sending the corresponding device control instruction to the second device, in some other embodiments, may include:

若空间中多个第二设备与空间中多个第一设备不同,则根据空间中多个第二设备当前的状态信息得到当前空间状态标示信息,根据当前空间状态标示信息以及目标空间状态标示信息,发送对应的设备控制指令至多个第二设备。If the multiple second devices in the space are different from the multiple first devices in the space, the current space status indication information is obtained according to the current status information of the multiple second devices in the space, and the corresponding device control instructions are sent to the multiple second devices according to the current space status indication information and the target space status indication information.

本实施例中,在将空间状态标示信息/空间快照的信息单独作为执行目标时,执行状态再现时空间中第二设备的数量可以是多个,形成目标状态时空间中第一设备的数量可以是多个。对于执行状态再现时空间中多个第二设备与形成目标状态时空间中多个第一设备不同的情况,也可以分多个第二设备与多个第一设备完全不同或部分不同来处理。该两部分的处理在前述的实施例中也已有相应说明,在此不作赘述。本实施例的方案能够在将空间状态标示信息/空间快照的信息单独作为执行目标时,在形成与执行空间的目标状态时设备发生变动的情况下自适应调整对设备的控制,确保空间状态再现的执行效果。In this embodiment, when the spatial state identification information/spatial snapshot information is used alone as the execution target, the number of second devices in the space when the execution state is reproduced can be multiple, and the number of first devices in the space when the target state is formed can be multiple. For the situation where the multiple second devices in the space when the execution state is reproduced are different from the multiple first devices in the space when the target state is formed, the multiple second devices can also be treated as completely different or partially different from the multiple first devices. The processing of these two parts has also been explained accordingly in the aforementioned embodiments and will not be repeated here. The scheme of this embodiment can adaptively adjust the control of the device when the spatial state identification information/spatial snapshot information is used alone as the execution target, when the device changes when the target state of the space is formed and executed, to ensure the execution effect of the spatial state reproduction.

以智能家居作为应用场景对本申请的设备控制方法进行说明,本应用实施例中,本申请的设备控制方法通过目标空间状态标示信息的记录与应用,可以实现对多个设备的快速、灵活控制,不受设备和环境状态变化的影响,能自适应设备状态变化,确保场景指令的执行效果,通过建立空间和设备的状态映射关系以及状态和指令的转化关系,实现空间内设备状态的统一管理和综合计算,可以将空间内所有设备的状态进行统一管理,可以利用目标空间状态标示信息创建场景,满足再现条件时根据目标空间状态标示信息实时转化为对空间内设备的设备控制指令以执行作为场景执行目标的目标空间状态标示信息或称为空间快照的信息,根据目标状态自适应控制设备。本应用实施例中,可以先基于空间内的实体设备的状态映射为目标空间状态标示信息,再基于目标空间状态标示信息创建场景,在基于所创建场景的执行条件的满足,根据目标空间状态标示信息对该空间下的实体设备进行实时控制,而在形成目标空间状态标示信息与执行目标空间状态标示信息的空间下的实体设备可以相同,也可以做了更新、替换或删减,以此完成三映射转化,包括设备状态到空间状态、空间状态到空间指令、空间指令到设备指令,从而实现基于空间状态再现的对设备进行自适应控制。The device control method of the present application is explained using smart home as an application scenario. In the present application embodiment, the device control method of the present application can achieve fast and flexible control of multiple devices through the recording and application of target space status identification information. It is not affected by changes in device and environmental status, can adapt to device status changes, and ensure the execution effect of scene instructions. By establishing a state mapping relationship between space and device and a conversion relationship between status and instructions, unified management and comprehensive calculation of device status in the space are achieved. The status of all devices in the space can be uniformly managed, and scenes can be created using target space status identification information. When the reproduction conditions are met, the target space status identification information is converted into device control instructions for devices in the space in real time to execute the target space status identification information or information called space snapshot as the scene execution target, and the device is adaptively controlled according to the target state. In this application embodiment, the state of the physical device in the space can be first mapped to the target space state identification information, and then a scene can be created based on the target space state identification information. When the execution conditions of the created scene are met, the physical devices in the space are controlled in real time according to the target space state identification information. The physical devices in the space that form the target space state identification information and execute the target space state identification information can be the same, or they can be updated, replaced or deleted, thereby completing the three mapping transformations, including device state to space state, space state to space instruction, and space instruction to device instruction, thereby realizing adaptive control of the device based on space state reproduction.

本应用实施例中,可以将目标空间状态标示信息/空间快照的信息用于在智能家居产品中创建场景,场景的执行可以包括打开/关闭多个设备、设置多个设备的状态等,智能家居产品中的设备可以但不限于是智能灯具、智能插座、智能窗帘、智能空调等等。In this application embodiment, the target space status identification information/space snapshot information can be used to create scenes in smart home products. The execution of the scenes can include turning on/off multiple devices, setting the status of multiple devices, etc. The devices in the smart home products can be but are not limited to smart lamps, smart sockets, smart curtains, smart air conditioners, etc.

在本应用实施例的智能家居产品的功能特性层面:In terms of the functional characteristics of the smart home products in this application embodiment:

①可以一键创建空间快照得到目标空间状态标示信息/空间快照的信息,将空间当前的多个设备的状态转化为目标空间状态标示信息/空间快照的信息,可以关联至所创建的场景,作为场景的执行目标,可以存储至场景指令。① You can create a space snapshot with one click to obtain the target space status identification information/space snapshot information, convert the current status of multiple devices in the space into the target space status identification information/space snapshot information, which can be associated with the created scene as the execution target of the scene and can be stored in the scene instruction.

②可以实时控制设备,将场景指令转化为设备指令,实现空间内设备状态的批量控制。② It can control devices in real time, convert scene instructions into device instructions, and realize batch control of device status in the space.

③可以自适应设备状态变化,根据执行时空间内设备的实际情况进行设备控制的调整,保证场景指令的执行效果,即保证空间的目标状态的再现效果。③ It can adapt to changes in device status and adjust device control according to the actual conditions of the devices in the space during execution to ensure the execution effect of scene instructions, that is, to ensure the reproduction effect of the target state of the space.

④可以支持创建多个场景,用户可以根据不同的场景需求创建不同的场景,如“睡眠场景”、“进入卧室”等。④It can support the creation of multiple scenes. Users can create different scenes according to different scene requirements, such as "sleeping scene", "entering the bedroom", etc.

⑤支持手动控制,用户可以通过应用程序手动控制设备的开关、亮度、颜色等参数,实现更加灵活且便捷的控制。⑤Supports manual control. Users can manually control the device's switch, brightness, color and other parameters through the application, achieving more flexible and convenient control.

在本应用实施例的智能家居产品的操作层面:At the operational level of the smart home product in this application embodiment:

①用户可以下载并安装智能家居产品的应用程序,创建账号并登录。① Users can download and install the application of smart home products, create an account and log in.

②将智能设备连接到应用程序,完成设备注册和配置。②Connect the smart device to the application to complete device registration and configuration.

③手动将设备调节至场景所需的状态,如打开客厅灯、关闭卧室灯、开启空调等。③Manually adjust the device to the state required by the scene, such as turning on the living room light, turning off the bedroom light, turning on the air conditioner, etc.

④一键创建空间快照得到目标空间状态标示信息/空间快照的信息,将空间当前的多个设备的状态转化为目标空间状态标示信息/空间快照的信息,可以关联至所创建的场景,作为场景的执行目标,可以存储至场景指令。④ Create a space snapshot with one click to obtain the target space status identification information/space snapshot information, convert the current status of multiple devices in the space into the target space status identification information/space snapshot information, which can be associated with the created scene as the execution target of the scene and can be stored in the scene instruction.

⑤可以在应用程序中创建如“睡眠场景”、“进入卧室”等场景,选择已保存的目标空间状态标示信息/空间快照的信息作为该场景的执行目标。⑤ You can create scenes such as "sleep scene" and "enter the bedroom" in the application, and select the saved target space status identification information/space snapshot information as the execution target of the scene.

⑥在需要触发所创建场景时,用户可以在应用程序中触发执行该场景的场景指令,相应的设备控制指令会被下发到设备上,实现快速、便捷的控制多个设备的场景操作。⑥ When the created scene needs to be triggered, the user can trigger the scene command to execute the scene in the application, and the corresponding device control command will be sent to the device, realizing fast and convenient scene operation of controlling multiple devices.

⑦如果设备状态发生变化,会根据目标空间状态标示信息/空间快照的信息自动进行调整,确保场景指令的执行效果。用户也可以手动控制设备的开关、亮度、颜色等参数,实现更加灵活的控制。⑦ If the device status changes, it will automatically adjust according to the target space status indication information/space snapshot information to ensure the execution effect of the scene command. Users can also manually control the device's switch, brightness, color and other parameters to achieve more flexible control.

结合图4,在应用程序的界面中,用户可以选择创建新的场景,操作方式可以包括;In conjunction with FIG4 , in the interface of the application, the user can choose to create a new scene, and the operation methods may include:

①进入智能家居应用程序,选择手动控制设备,将设备调节至场景所需的状态。① Enter the smart home application, select manual control of the device, and adjust the device to the state required by the scene.

②点击“创建场景-空间快照”按钮,将空间当前的多个设备的状态转化为目标空间状态标示信息/空间快照的信息,可以关联至所创建的场景,作为场景的执行目标,可以存储至场景指令。② Click the "Create Scene - Space Snapshot" button to convert the current status of multiple devices in the space into target space status identification information/space snapshot information, which can be associated with the created scene as the execution target of the scene and can be stored in the scene instruction.

③可以选择需要控制的设备,并设置设备的状态,例如打开客厅灯、关闭卧室灯、开启空调等。③You can select the device you want to control and set the status of the device, such as turning on the living room light, turning off the bedroom light, turning on the air conditioner, etc.

④命名场景并点击“一键创建”按钮,从而将得到的目标空间状态标示信息/空间快照的信息关联至所创建的场景,作为场景的执行目标,存储至场景指令,将该场景指令保存到应用程序中。④ Name the scene and click the "One-click Create" button to associate the target space status identification information/space snapshot information with the created scene as the execution target of the scene, store it in the scene instruction, and save the scene instruction to the application.

⑤在下次需要使用该场景的指令时,用户只需在应用程序中选择该场景指令,应用程序可以自动将相应的设备控制指令下发到对应的设备上,实现快速、便捷的控制多个设备的场景操作。⑤ The next time you need to use the instructions of this scene, the user only needs to select the scene instruction in the application, and the application can automatically send the corresponding device control instructions to the corresponding device, realizing fast and convenient scene operation of controlling multiple devices.

⑥如果设备状态发生变化,应用程序可以根据目标空间状态标示信息/空间快照的信息自动进行调整,确保场景指令的执行效果。用户也可以手动控制设备的开关、亮度、颜色等参数,实现更加灵活的控制。⑥ If the device status changes, the application can automatically adjust according to the target space status indication information/space snapshot information to ensure the execution effect of the scene command. Users can also manually control the device's switch, brightness, color and other parameters to achieve more flexible control.

以下为操作方式的示例:Here's an example of how to do it:

①用户可以创建一个“睡眠场景”的场景,其执行目标可以包括关闭客厅灯、打开卧室灯、调整空调温度为适宜的温度。① Users can create a "sleep scene", the execution goals of which may include turning off the living room lights, turning on the bedroom lights, and adjusting the air-conditioning temperature to a suitable temperature.

②用户进入智能家居应用程序,选择手动控制设备,将设备调节至该场景所需的状态,即关闭客厅灯、打开卧室灯、调整空调温度为适宜的温度。②The user enters the smart home application, selects manual control of the device, and adjusts the device to the state required for the scene, that is, turning off the living room light, turning on the bedroom light, and adjusting the air-conditioning temperature to a suitable temperature.

③点击“创建场景-空间快照”按钮,将空间当前的多个设备的状态转化为目标空间状态标示信息/空间快照的信息,可以关联至所创建的场景,作为场景的执行目标,可以存储至场景指令。③ Click the "Create Scene - Space Snapshot" button to convert the current status of multiple devices in the space into target space status identification information/space snapshot information, which can be associated with the created scene as the execution target of the scene and can be stored in the scene instruction.

④选择需要控制的设备,可以包括客厅灯、卧室灯和空调,并设置设备的状态,例如关闭客厅灯、打开卧室灯、调整空调温度为适宜的温度。④ Select the devices to be controlled, which may include living room lights, bedroom lights, and air conditioners, and set the status of the devices, such as turning off the living room lights, turning on the bedroom lights, and adjusting the air conditioner temperature to a suitable temperature.

⑤命名“睡眠场景”并点击“一键创建”按钮,从而将得到的目标空间状态标示信息/空间快照的信息关联至“睡眠场景”,作为“睡眠场景”的执行目标,存储至“睡眠场景”的场景指令,将该场景指令保存到应用程序中。⑤ Name the scene "Sleep Scene" and click the "One-Click Create" button to associate the target space status identification information/space snapshot information with the "Sleep Scene" as the execution target of the "Sleep Scene", store the scene instructions of the "Sleep Scene", and save the scene instructions to the application.

⑥在睡觉时,用户可以在应用程序中选择“睡眠场景”以触发其对应的场景指令,应用程序可以自动根据目标空间状态标示信息/空间快照的信息转化为设备控制指令发送到对应的设备上,实现快速、便捷的控制多个设备的场景操作。⑥ When sleeping, users can select "Sleep Scene" in the application to trigger the corresponding scene command. The application can automatically convert the target space status identification information/space snapshot information into device control instructions and send them to the corresponding device, realizing fast and convenient scene operation of controlling multiple devices.

⑦如果设备状态发生变化,应用程序可以根据目标空间状态标示信息/空间快照的信息自动进行调整,确保场景指令的执行效果。用户也可以手动控制设备的开关、亮度、颜色等参数(如图5为照明控制面板的界面示意图),实现更加灵活的控制。⑦ If the device status changes, the application can automatically adjust according to the target space status indication information/space snapshot information to ensure the execution effect of the scene command. Users can also manually control the device's switch, brightness, color and other parameters (Figure 5 is a schematic diagram of the lighting control panel interface) to achieve more flexible control.

结合图1,本应用实施例为实现智能家居场景控制,所需的硬件环境可以包括智能设备(设备)、智能网关(网关)和用户终端等,其中,智能设备包括智能灯、智能插座、智能窗帘、智能空调、智能音响等,可以通过Wi-Fi、ZigBee、蓝牙等协议连接到智能网关上,智能网关负责将智能设备的数据进行汇聚和转发,并与用户终端(智能手机、平板电脑等)上运行的应用程序进行通信负责用户和智能设备之间的交互和控制。In conjunction with Figure 1, in order to realize smart home scene control, the hardware environment required by this application embodiment may include smart devices (devices), smart gateways (gateways) and user terminals, etc., wherein the smart devices include smart lights, smart sockets, smart curtains, smart air conditioners, smart speakers, etc., which can be connected to the smart gateway through Wi-Fi, ZigBee, Bluetooth and other protocols. The smart gateway is responsible for aggregating and forwarding the data of the smart devices, and communicating with the applications running on the user terminals (smartphones, tablets, etc.) to be responsible for the interaction and control between users and smart devices.

基于此,结合图6和7对本应用实施例的实现逻辑进行说明。Based on this, the implementation logic of this application embodiment is explained in conjunction with Figures 6 and 7.

首先进行设备注册与配置,用户通过智能家居应用程序,将智能设备连接到智能网关上,并完成设备注册和配置。如图6所示,用户打开智能家居应用程序,选择添加设备功能,应用程序搜索附近的智能设备,显示在应用程序中供用户选择,用户选择要添加的设备,并将其与智能网关进行配对,配对成功后,应用程序会提示用户进行设备注册和配置,用户按照应用程序提示的步骤,完成设备注册和配置,其中,这些步骤可以包括选择设备的类型、连接Wi-Fi、设置设备名称和位置等等,注册和配置完成后,设备可以与智能网关进行通信,准备进入场景控制模式。由此可进行场景配置及设备控制,如图7所示,用户手动将设备调节到场景所需的状态,如打开客厅灯、关闭卧室灯、开启空调等,然后用户可以在应用程序中点击“创建场景-空间快照”按钮,获取空间内多个设备的状态信息,并将其转化为目标空间状态标示信息/空间快照的信息(对应空间的目标状态),在此完成设备状态到空间状态的映射关系,然后可以将目标空间状态标示信息/空间快照的信息存储至场景指令,场景指令存储完成后,用户可以在应用程序中查看和编辑该场景指令(可以包括所选设备的状态和参数信息),在此完成空间状态到场景指令的映射关系,可以在下次执行该场景指令时快速恢复空间的目标状态。其中,用户可以在应用程序中创建多个场景指令,在创建场景指令时,用户可以选择已保存的目标空间状态标示信息/空间快照的信息,作为该场景指令的执行目标。接着,在执行场景指令时,用户只需在应用程序中选择该场景指令,就会自动将相应的设备控制指令下发到对应的设备上,实现快速、便捷的控制多个设备的场景操作。用户也可以手动控制设备的开关、亮度、颜色等参数,实现更加灵活的控制。执行场景指令时,智能网关可以不断获取各个智能设备的状态信息,并将其汇聚到应用程序中,应用程序可以对这些状态信息进行处理和分析,以确保场景指令的执行效果,如果设备状态发生变化,应用程序会自动进行调整,保证场景指令的执行效果。其中,执行场景指令时,可以检测空间内是否存在新设备(无对应的设备状态存储),若没有则执行设备指令,若设备状态发生变化,根据场景指令转化为设备指令并下发该新的设备指令,在此完成场景指令到设备指令的映射关系,由此实现快速、便捷的控制多个设备的场景操作。First, the device is registered and configured. The user connects the smart device to the smart gateway through the smart home application and completes the device registration and configuration. As shown in Figure 6, the user opens the smart home application and selects the add device function. The application searches for nearby smart devices and displays them in the application for the user to choose. The user selects the device to be added and pairs it with the smart gateway. After the pairing is successful, the application prompts the user to register and configure the device. The user follows the steps prompted by the application to complete the device registration and configuration. These steps may include selecting the type of device, connecting to Wi-Fi, setting the device name and location, etc. After the registration and configuration are completed, the device can communicate with the smart gateway and is ready to enter the scene control mode. In this way, scene configuration and device control can be performed. As shown in FIG7 , the user manually adjusts the device to the state required by the scene, such as turning on the living room light, turning off the bedroom light, turning on the air conditioner, etc. Then the user can click the "Create Scene-Space Snapshot" button in the application to obtain the state information of multiple devices in the space, and convert it into the target space state indication information/space snapshot information (corresponding to the target state of the space), and complete the mapping relationship between the device state and the space state, and then the target space state indication information/space snapshot information can be stored in the scene instruction. After the scene instruction is stored, the user can view and edit the scene instruction in the application (which can include the state and parameter information of the selected device), and complete the mapping relationship between the space state and the scene instruction, and can quickly restore the target state of the space when the scene instruction is executed next time. Among them, the user can create multiple scene instructions in the application. When creating a scene instruction, the user can select the saved target space state indication information/space snapshot information as the execution target of the scene instruction. Then, when executing the scene instruction, the user only needs to select the scene instruction in the application, and the corresponding device control instruction will be automatically issued to the corresponding device, realizing fast and convenient scene operation of controlling multiple devices. Users can also manually control the device's switch, brightness, color and other parameters to achieve more flexible control. When executing scene instructions, the smart gateway can continuously obtain the status information of each smart device and aggregate it into the application. The application can process and analyze this status information to ensure the execution effect of the scene instructions. If the device status changes, the application will automatically adjust to ensure the execution effect of the scene instructions. Among them, when executing scene instructions, it can detect whether there is a new device in the space (no corresponding device status storage). If not, the device instruction is executed. If the device status changes, it is converted into a device instruction according to the scene instruction and the new device instruction is issued. The mapping relationship between scene instructions and device instructions is completed here, thereby realizing fast and convenient scene operations to control multiple devices.

图8示出本应用实施例的时序图,展示了本应用实施例中空间快照创建场景指令的基本过程。其中,用户手动将设备调节至场景所需的状态,然后在应用程序中创建空间快照得到目标空间状态标示信息/空间快照的信息,将其存储为场景指令。在下次需要使用该场景指令时,用户在应用程序中选择该场景指令,应用程序发送对应的设备控制指令至智能网关,智能网关再将指令下发到对应的智能设备上,实现场景指令的执行。本应用实施例的时序图中示出以下参与者:Figure 8 shows a timing diagram of the present application embodiment, which illustrates the basic process of creating scene instructions from a spatial snapshot in the present application embodiment. Among them, the user manually adjusts the device to the state required by the scene, and then creates a spatial snapshot in the application to obtain the target space state identification information/spatial snapshot information, and stores it as a scene instruction. The next time the scene instruction is needed, the user selects the scene instruction in the application, and the application sends the corresponding device control instruction to the smart gateway, which then sends the instruction to the corresponding smart device to execute the scene instruction. The following participants are shown in the timing diagram of the present application embodiment:

用户:可手动调节设备状态,创建和选择场景指令。User: Can manually adjust device status, create and select scene instructions.

应用程序:负责场景指令的管理和处理,将指令发送给智能网关。Application: responsible for the management and processing of scene instructions and sending the instructions to the smart gateway.

智能网关:负责接收应用程序发送的指令,并将指令下发到对应的智能设备上。Smart gateway: responsible for receiving instructions sent by the application and sending the instructions to the corresponding smart devices.

智能设备(智能灯、智能插座、智能窗帘、智能空调等):可以接收智能网关发送的指令并执行相应操作。Smart devices (smart lights, smart sockets, smart curtains, smart air conditioners, etc.): can receive instructions sent by the smart gateway and perform corresponding operations.

本应用实施例可以包括以下步骤:This application embodiment may include the following steps:

步骤1,用户手动将设备调节至场景所需的状态。Step 1: The user manually adjusts the device to the state required by the scene.

步骤2,用户在应用程序中创建空间快照得到目标空间状态标示信息/空间快照的信息,并将其存储为场景指令。Step 2: The user creates a space snapshot in the application to obtain target space state identification information/space snapshot information, and stores it as a scene instruction.

步骤3,在下次需要使用该场景指令时,用户在应用程序中选择该场景指令。Step 3: The user selects the scene command in the application program when the scene command is needed next time.

步骤4,应用程序根据场景指令发送对应的设备控制指令给智能网关。Step 4: The application sends corresponding device control instructions to the smart gateway according to the scene instructions.

步骤5,智能网关将设备控制指令下发给各个智能设备。Step 5: The smart gateway sends the device control instructions to each smart device.

步骤6,智能设备执行相应操作,并将执行结果返回给智能网关。Step 6: The smart device executes the corresponding operation and returns the execution result to the smart gateway.

步骤7,如果设备状态发生变化,应用程序可根据空间快照自动进行设备控制指令的调整,保证场景指令的执行效果。Step 7: If the device status changes, the application can automatically adjust the device control instructions according to the space snapshot to ensure the execution effect of the scene instructions.

其中,在智能家居设备的状态控制中,基于语音识别技术,用户可以通过语音命令控制智能家居设备的状态,在空间快照的创建及场景指令的形成和执行中,用户也可以通过语音指令创建和执行场景指令,从而实现智能家居设备的控制。Among them, in the status control of smart home devices, based on voice recognition technology, users can control the status of smart home devices through voice commands. In the creation of space snapshots and the formation and execution of scene instructions, users can also create and execute scene instructions through voice commands, thereby realizing the control of smart home devices.

其中,基于传感器技术,用户还可以根据环境变化创建和执行场景指令,可以设置传感器的触发条件,并将其作为场景指令进行保存,当条件发生变化时,智能家居设备会自动执行相应的操作。Among them, based on sensor technology, users can also create and execute scene instructions according to environmental changes. They can set the trigger conditions of the sensor and save them as scene instructions. When the conditions change, the smart home devices will automatically perform the corresponding operations.

其中,基于机器学习技术,在用户的授权下,可以通过对用户行为和环境数据的分析,自动学习用户的习惯和偏好,从而自动生成场景指令,无需用户手动创建和编辑场景指令,智能家居系统可以根据用户的行为和环境变化自动调整设备状态。Among them, based on machine learning technology, with the user's authorization, it can automatically learn the user's habits and preferences by analyzing the user's behavior and environmental data, and automatically generate scene instructions. There is no need for the user to manually create and edit scene instructions. The smart home system can automatically adjust the device status according to the user's behavior and environmental changes.

在整体上,本应用实施例的设备控制方法,可以提高智能家居系统的场景配置的直观性、便捷性和适应性,有益效果可以包括:On the whole, the device control method of this application embodiment can improve the intuitiveness, convenience and adaptability of the scene configuration of the smart home system, and the beneficial effects may include:

(1)提高场景配置的直观性:通过图形化界面,使用户可以直观地创建和编辑智能家居场景,无需了解复杂的技术细节,从而提高了场景配置的直观性。(1) Improving the intuitiveness of scene configuration: Through a graphical interface, users can intuitively create and edit smart home scenes without having to understand complex technical details, thereby improving the intuitiveness of scene configuration.

(2)提高场景配置的便捷性:基于空间快照,用户可以手动调节设备状态,然后一键式地将其保存为场景指令,以后只需选择该指令即可实现设备状态的快速调节,从而提高了场景配置的便捷性。(2) Improve the convenience of scene configuration: Based on the spatial snapshot, the user can manually adjust the device status and then save it as a scene command with one click. In the future, the user only needs to select the command to quickly adjust the device status, thereby improving the convenience of scene configuration.

(3)提高场景配置的适应性:采用了智能化控制和管理,用户可以根据自己的需求自由配置智能家居场景,从而提高了场景配置的适应性。(3) Improve the adaptability of scene configuration: With the adoption of intelligent control and management, users can freely configure smart home scenes according to their needs, thereby improving the adaptability of scene configuration.

(4)降低用户的使用门槛:通过简化智能家居设备的配置和管理流程,降低了用户使用智能家居设备的门槛,使得更多的用户能够轻松地享受智能家居带来的便利和舒适。(4) Lowering the threshold for users to use smart home devices: By simplifying the configuration and management process of smart home devices, the threshold for users to use smart home devices is lowered, allowing more users to easily enjoy the convenience and comfort brought by smart homes.

(5)提高用户体验:通过智能化控制和管理,可以使用户更加方便地管理和控制智能家居设备,提高用户体验。(5) Improve user experience: Through intelligent control and management, users can manage and control smart home devices more conveniently, improving user experience.

(6)提高系统的可扩展性:采用模块化设计,可以方便地扩展新的智能设备,并与已有的设备进行无缝集成。这样可以保证系统的可扩展性,满足不同用户的需求。(6) Improve system scalability: The modular design allows for easy expansion of new smart devices and seamless integration with existing devices. This ensures system scalability and meets the needs of different users.

由此,本应用实施例的设备控制方法可以提高智能家居系统的场景配置的直观性、便捷性和适应性,使得用户可以更加轻松地配置和管理智能家居设备,提高用户体验和生活质量,同时本申请的设备控制方法有望为智能家居系统的未来发展提供更多的想象空间和技术支持。Therefore, the device control method of the present application embodiment can improve the intuitiveness, convenience and adaptability of the scene configuration of the smart home system, so that users can configure and manage smart home devices more easily, improve user experience and quality of life. At the same time, the device control method of the present application is expected to provide more imagination space and technical support for the future development of the smart home system.

应该理解的是,虽然如上所述的各实施例所涉及的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,如上所述的各实施例所涉及的流程图中的至少一部分步骤可以包括多个步骤或者多个阶段,这些步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤中的步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

基于同样的发明构思,本申请实施例还提供了一种用于实现上述所涉及的设备控制方法的设备控制装置。该装置所提供的解决问题的实现方案与上述方法中所记载的实现方案相似,故下面所提供的一个或多个设备控制装置实施例中的具体限定可以参见上文中对于设备控制方法的限定,在此不再赘述。Based on the same inventive concept, the embodiment of the present application also provides a device control device for implementing the device control method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in one or more device control device embodiments provided below can refer to the limitations on the device control method above, and will not be repeated here.

在一个实施例中,如图9所示,提供了一种设备控制装置,该装置900可以包括:In one embodiment, as shown in FIG9 , a device control apparatus is provided, and the apparatus 900 may include:

信息获得模块901,用于获得目标空间状态标示信息;所述目标空间状态标示信息用于标示由空间中第一设备使所述空间呈现的目标状态;所述第一设备包括使所述空间形成所述目标状态的设备;The information acquisition module 901 is used to obtain target space state marking information; the target space state marking information is used to mark the target state presented by the first device in the space; the first device includes a device that causes the space to form the target state;

信息应用模块902,用于应用所述目标空间状态标示信息,以在所述目标状态满足再现条件时,控制所述空间中第二设备使所述空间呈现所述目标状态;所述第二设备包括使所述空间再现所述目标状态的设备。The information application module 902 is used to apply the target space state marking information to control the second device in the space to make the space present the target state when the target state meets the reproduction condition; the second device includes a device that makes the space reproduce the target state.

在一个实施例中,信息获得模块901,用于响应于状态创建指令,展示当前空间状态标示信息;所述当前空间状态标示信息对应所述空间当前呈现的状态;响应于状态确认指令,获得目标空间状态标示信息;所述目标空间状态标示信息包括受确认的当前空间状态标示信息。In one embodiment, the information acquisition module 901 is used to display current space state indication information in response to a state creation instruction; the current space state indication information corresponds to the current state of the space; in response to a state confirmation instruction, the target space state indication information is obtained; the target space state indication information includes the confirmed current space state indication information.

在一个实施例中,信息获得模块901,还用于获取所述空间中所述第一设备当前的状态信息;根据所述空间中所述第一设备当前的状态信息,得到当前空间状态标示信息。In one embodiment, the information acquisition module 901 is further used to obtain the current status information of the first device in the space; and obtain the current space status indication information according to the current status information of the first device in the space.

在一个实施例中,信息获得模块901,用于响应于场景创建指令,提供一个或多个可选空间状态标示信息;响应于状态选择指令,获得目标空间状态标示信息;所述目标空间状态标示信息包括被选择的可选空间状态标示信息。In one embodiment, the information acquisition module 901 is used to provide one or more optional space state marking information in response to a scene creation instruction; and to obtain target space state marking information in response to a state selection instruction; the target space state marking information includes the selected optional space state marking information.

在一个实施例中,信息应用模块902,用于关联所述目标空间状态标示信息与目标场景;若所述目标场景满足执行条件,则根据所述目标空间状态标示信息和所述空间中所述第二设备当前的状态信息,发送对应的设备控制指令至所述第二设备,以控制所述第二设备使所述空间呈现所述目标状态;和/或,信息应用模块902,用于若所述目标状态满足所述再现条件,则根据所述目标空间状态标示信息和所述空间中所述第二设备当前的状态信息,发送对应的设备控制指令至所述第二设备,以控制所述第二设备使所述空间呈现所述目标状态。In one embodiment, the information application module 902 is used to associate the target space state indication information with the target scene; if the target scene satisfies the execution condition, then according to the target space state indication information and the current state information of the second device in the space, a corresponding device control instruction is sent to the second device to control the second device to make the space present the target state; and/or, the information application module 902 is used to send the corresponding device control instruction to the second device to control the second device to make the space present the target state if the target state satisfies the reproduction condition.

在一个实施例中,所述第一设备的数量为多个;所述第二设备的数量为多个;信息应用模块902,用于若所述空间中多个所述第二设备与所述空间中多个所述第一设备不同,则根据所述空间中多个所述第二设备当前的状态信息得到当前空间状态标示信息,根据所述当前空间状态标示信息以及所述目标空间状态标示信息,发送对应的设备控制指令至多个所述第二设备。In one embodiment, the number of the first devices is multiple; the number of the second devices is multiple; the information application module 902 is used to obtain the current space status indication information according to the current status information of the multiple second devices in the space if the multiple second devices in the space are different from the multiple first devices in the space, and send corresponding device control instructions to the multiple second devices according to the current space status indication information and the target space status indication information.

在一个实施例中,信息应用模块902,用于若所述空间中多个所述第二设备与所述空间中多个所述第一设备完全不同,则根据所述当前空间状态标示信息与所述目标空间状态标示信息的差异以及多个所述第二设备当前的状态信息,得到应用于多个所述第二设备中目标第二设备的第一设备控制指令;发送所述第一设备控制指令至所述目标第二设备,以使所述目标第二设备执行所述第一设备控制指令后的当前空间状态标示信息与所述目标空间状态标示信息相同。In one embodiment, the information application module 902 is used to obtain a first device control instruction applied to a target second device among the multiple second devices if the multiple second devices in the space are completely different from the multiple first devices in the space, based on the difference between the current space state indication information and the target space state indication information and the current state information of the multiple second devices; and send the first device control instruction to the target second device so that the current space state indication information of the target second device after executing the first device control instruction is the same as the target space state indication information.

在一个实施例中,信息应用模块902,用于若在所述空间中多个所述第二设备与所述空间中多个所述第一设备部分不同,则获取相同设备的目标状态信息;所述相同设备为多个所述第二设备中与多个所述第一设备相同的设备;所述目标状态信息与所述目标空间状态标示信息对应;所述目标状态信息用于表示使所述空间呈现所述目标状态时所述相同设备的设备状态;根据所述相同设备的目标状态信息以及所述相同设备当前的状态信息,发送第二设备控制指令至所述相同设备,以使所述相同设备达到所述目标状态信息表示的所述设备状态;根据所述相同设备执行所述第二设备控制指令后的当前空间状态标示信息与所述目标空间状态标示信息的差异以及不同设备当前的状态信息,得到应用于所述不同设备的第三设备控制指令;所述不同设备为多个所述第二设备中与多个所述第一设备不同的设备;发送所述第三设备控制指令至所述不同设备,以使所述不同设备执行所述第二设备控制指令后的当前空间状态标示信息与所述目标空间状态标示信息相同。In one embodiment, the information application module 902 is used to obtain target state information of the same device if multiple second devices in the space are partially different from multiple first devices in the space; the same device is a device among the multiple second devices that is the same as the multiple first devices; the target state information corresponds to the target space state indication information; the target state information is used to indicate the device state of the same device when the space presents the target state; according to the target state information of the same device and the current state information of the same device, send a second device control instruction to the same device so that the same device reaches the device state indicated by the target state information; according to the difference between the current space state indication information and the target space state indication information after the same device executes the second device control instruction and the current state information of the different device, obtain a third device control instruction applied to the different device; the different device is a device among the multiple second devices that is different from the multiple first devices; send the third device control instruction to the different device so that the current space state indication information after the different device executes the second device control instruction is the same as the target space state indication information.

在一个实施例中,信息应用模块902,用于若所述空间中所述第二设备与所述空间中所述第一设备相同,则根据所述第一设备的目标状态信息和所述第二设备当前的状态信息,发送对应的设备控制指令至所述第二设备;所述目标状态信息与所述目标空间状态标示信息对应;所述目标状态信息用于表示使所述空间呈现所述目标状态时所述第一设备的设备状态。In one embodiment, the information application module 902 is used to send corresponding device control instructions to the second device if the second device in the space is the same as the first device in the space, based on the target state information of the first device and the current state information of the second device; the target state information corresponds to the target space state indication information; the target state information is used to indicate the device state of the first device when making the space present the target state.

上述设备控制装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于电子设备中的处理器中,也可以以软件形式存储于电子设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。Each module in the above-mentioned device control device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in an electronic device in the form of hardware, or can be stored in a memory in an electronic device in the form of software, so that the processor can call and execute operations corresponding to each module above.

在一个实施例中,提供了一种电子设备,该电子设备可以是终端,其内部结构图可以如图10所示。该电子设备包括处理器、存储器、输入/输出接口、通信接口、显示单元和输入装置。其中,处理器、存储器和输入/输出接口通过系统总线连接,通信接口、显示单元和输入装置通过输入/输出接口连接到系统总线。其中,该电子设备的处理器用于提供计算和控制能力。该电子设备的存储器包括非易失性存储介质和内存储器。该非易失性存储介质存储有操作系统和计算机程序。该内存储器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该电子设备的输入/输出接口用于处理器与外部设备之间交换信息。该电子设备的通信接口用于与外部的设备进行有线或无线方式的通信,无线方式可通过WiFi、移动蜂窝网络、NFC(近场通信)或其他技术实现。该计算机程序被处理器执行时以实现一种设备控制方法。该电子设备的显示单元用于形成视觉可见的画面,可以是显示屏、投影装置或虚拟现实成像装置。显示屏可以是液晶显示屏或者电子墨水显示屏,该电子设备的输入装置可以是显示屏上覆盖的触摸层,也可以是电子设备外壳上设置的按键、轨迹球或触控板,还可以是外接的键盘、触控板或鼠标等。In one embodiment, an electronic device is provided, which may be a terminal, and its internal structure diagram may be shown in FIG10. The electronic device includes a processor, a memory, an input/output interface, a communication interface, a display unit, and an input device. The processor, the memory, and the input/output interface are connected via a system bus, and the communication interface, the display unit, and the input device are connected to the system bus via the input/output interface. The processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input/output interface of the electronic device is used to exchange information between the processor and an external device. The communication interface of the electronic device is used to communicate with an external device in a wired or wireless manner, and the wireless manner may be implemented through WiFi, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a device control method is implemented. The display unit of the electronic device is used to form a visually visible picture, which may be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the electronic device housing, or an external keyboard, touchpad or mouse.

本领域技术人员可以理解,图10中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的电子设备的限定,具体的电子设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。Those skilled in the art will understand that the structure shown in FIG. 10 is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the electronic device to which the scheme of the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

在一个实施例中,提供了一种电子设备,包括存储器和处理器,存储器中存储有计算机程序,该处理器执行计算机程序时实现上述各方法实施例中的步骤。In one embodiment, an electronic device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

在一个实施例中,提供了一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现上述各方法实施例中的步骤。In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above method embodiments are implemented.

在一个实施例中,提供了一种计算机程序产品,包括计算机程序,该计算机程序被处理器执行时实现上述各方法实施例中的步骤。In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

需要说明的是,本申请所涉及的用户信息(包括但不限于用户设备信息、用户个人信息等)和数据(包括但不限于用于分析的数据、存储的数据、展示的数据等),均为经用户授权或者经过各方充分授权的信息和数据,且相关数据的收集、使用和处理需要遵守相关国家和地区的相关法律法规和标准。It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、数据库或其它介质的任何引用,均可包括非易失性和易失性存储器中的至少一种。非易失性存储器可包括只读存储器(Read-OnlyMemory,ROM)、磁带、软盘、闪存、光存储器、高密度嵌入式非易失性存储器、阻变存储器(ReRAM)、磁变存储器(Magnetoresistive Random Access Memory,MRAM)、铁电存储器(Ferroelectric RandomAccess Memory,FRAM)、相变存储器(Phase Change Memory,PCM)、石墨烯存储器等。易失性存储器可包括随机存取存储器(RandomAccess Memory,RAM)或外部高速缓冲存储器等。作为说明而非局限,RAM可以是多种形式,比如静态随机存取存储器(Static RandomAccess Memory,SRAM)或动态随机存取存储器(Dynamic RandomAccessMemory,DRAM)等。本申请所提供的各实施例中所涉及的数据库可包括关系型数据库和非关系型数据库中至少一种。非关系型数据库可包括基于区块链的分布式数据库等,不限于此。本申请所提供的各实施例中所涉及的处理器可为通用处理器、中央处理器、图形处理器、数字信号处理器、可编程逻辑器、基于量子计算的数据处理逻辑器等,不限于此。Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对本申请专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请的保护范围应以所附权利要求为准。The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims (13)

1.一种设备控制方法,其特征在于,所述方法包括:1. A device control method, characterized in that the method comprises: 获得目标空间状态标示信息;所述目标空间状态标示信息用于标示由空间中第一设备使所述空间呈现的目标状态;所述第一设备包括使所述空间形成所述目标状态的设备;Obtaining target space state marking information; the target space state marking information is used to mark the target state presented by the first device in the space; the first device includes a device that causes the space to form the target state; 应用所述目标空间状态标示信息,以在所述目标状态满足再现条件时,控制所述空间中第二设备使所述空间呈现所述目标状态;所述第二设备包括使所述空间再现所述目标状态的设备。The target space state marking information is applied to control a second device in the space to make the space present the target state when the target state meets the reproduction condition; the second device includes a device that makes the space reproduce the target state. 2.根据权利要求1所述的方法,其特征在于,所述获得目标空间状态标示信息,包括:2. The method according to claim 1, characterized in that the step of obtaining the target space state indication information comprises: 响应于状态创建指令,展示当前空间状态标示信息;所述当前空间状态标示信息对应所述空间当前呈现的状态;In response to the state creation instruction, display current space state indication information; the current space state indication information corresponds to the current state of the space; 响应于状态确认指令,获得目标空间状态标示信息;所述目标空间状态标示信息包括受确认的当前空间状态标示信息。In response to the status confirmation instruction, target space status indication information is obtained; the target space status indication information includes the confirmed current space status indication information. 3.根据权利要求2所述的方法,其特征在于,还包括:3. The method according to claim 2, further comprising: 获取所述空间中所述第一设备当前的状态信息;Acquire current status information of the first device in the space; 根据所述空间中所述第一设备当前的状态信息,得到当前空间状态标示信息。Current space state indication information is obtained according to the current state information of the first device in the space. 4.根据权利要求1所述的方法,其特征在于,所述获得目标空间状态标示信息,包括:4. The method according to claim 1, wherein obtaining target space state indication information comprises: 响应于场景创建指令,提供一个或多个可选空间状态标示信息;In response to the scene creation instruction, provide one or more optional space state indication information; 响应于状态选择指令,获得目标空间状态标示信息;所述目标空间状态标示信息包括被选择的可选空间状态标示信息。In response to the state selection instruction, target space state marking information is obtained; the target space state marking information includes selected optional space state marking information. 5.根据权利要求1至4任一项所述的方法,其特征在于,5. The method according to any one of claims 1 to 4, characterized in that: 所述应用所述目标空间状态标示信息,包括:The target space state indication information of the application includes: 关联所述目标空间状态标示信息与目标场景;若所述目标场景满足执行条件,则根据所述目标空间状态标示信息和所述空间中所述第二设备当前的状态信息,发送对应的设备控制指令至所述第二设备,以控制所述第二设备使所述空间呈现所述目标状态;Associating the target space state indication information with a target scene; if the target scene satisfies an execution condition, sending a corresponding device control instruction to the second device according to the target space state indication information and the current state information of the second device in the space, so as to control the second device to make the space present the target state; 和/或,and/or, 若所述目标状态满足所述再现条件,则根据所述目标空间状态标示信息和所述空间中所述第二设备当前的状态信息,发送对应的设备控制指令至所述第二设备,以控制所述第二设备使所述空间呈现所述目标状态。If the target state satisfies the reproduction condition, a corresponding device control instruction is sent to the second device according to the target space state indication information and the current state information of the second device in the space, so as to control the second device to make the space present the target state. 6.根据权利要求5所述的方法,其特征在于,所述第一设备的数量为多个;所述第二设备的数量为多个;所述根据所述目标空间状态标示信息和所述空间中所述第二设备当前的状态信息,发送对应的设备控制指令至所述第二设备,包括:6. The method according to claim 5, characterized in that the number of the first devices is multiple; the number of the second devices is multiple; and the sending of the corresponding device control instruction to the second device according to the target space state indication information and the current state information of the second device in the space comprises: 若所述空间中多个所述第二设备与所述空间中多个所述第一设备不同,则根据所述空间中多个所述第二设备当前的状态信息得到当前空间状态标示信息,根据所述当前空间状态标示信息以及所述目标空间状态标示信息,发送对应的设备控制指令至多个所述第二设备。If the multiple second devices in the space are different from the multiple first devices in the space, the current space status indication information is obtained according to the current status information of the multiple second devices in the space, and the corresponding device control instructions are sent to the multiple second devices according to the current space status indication information and the target space status indication information. 7.根据权利要求6所述的方法,其特征在于,所述根据所述当前空间状态标示信息以及所述目标空间状态标示信息,发送对应的设备控制指令至多个所述第二设备,包括:7. The method according to claim 6, wherein the sending corresponding device control instructions to the plurality of second devices according to the current space state indication information and the target space state indication information comprises: 若所述空间中多个所述第二设备与所述空间中多个所述第一设备完全不同,则根据所述当前空间状态标示信息与所述目标空间状态标示信息的差异以及多个所述第二设备当前的状态信息,得到应用于多个所述第二设备中目标第二设备的第一设备控制指令;If the plurality of second devices in the space are completely different from the plurality of first devices in the space, obtaining a first device control instruction applied to a target second device among the plurality of second devices according to the difference between the current space state indication information and the target space state indication information and the current state information of the plurality of second devices; 发送所述第一设备控制指令至所述目标第二设备,以使所述目标第二设备执行所述第一设备控制指令后的当前空间状态标示信息与所述目标空间状态标示信息相同。The first device control instruction is sent to the target second device, so that the current space state indication information of the target second device after executing the first device control instruction is the same as the target space state indication information. 8.根据权利要求6所述的方法,其特征在于,所述根据所述当前空间状态标示信息以及所述目标空间状态标示信息,发送对应的设备控制指令至多个所述第二设备,包括:8. The method according to claim 6, wherein the sending corresponding device control instructions to the plurality of second devices according to the current space state indication information and the target space state indication information comprises: 若在所述空间中多个所述第二设备与所述空间中多个所述第一设备部分不同,则获取相同设备的目标状态信息;所述相同设备为多个所述第二设备中与多个所述第一设备相同的设备;所述目标状态信息与所述目标空间状态标示信息对应;所述目标状态信息用于表示使所述空间呈现所述目标状态时所述相同设备的设备状态;If the plurality of second devices in the space are partially different from the plurality of first devices in the space, then the target state information of the same device is obtained; the same device is the same device as the plurality of first devices among the plurality of second devices; the target state information corresponds to the target space state marking information; the target state information is used to indicate the device state of the same device when the space presents the target state; 根据所述相同设备的目标状态信息以及所述相同设备当前的状态信息,发送第二设备控制指令至所述相同设备,以使所述相同设备达到所述目标状态信息表示的所述设备状态;Sending a second device control instruction to the same device according to the target state information of the same device and the current state information of the same device, so that the same device reaches the device state represented by the target state information; 根据所述相同设备执行所述第二设备控制指令后的当前空间状态标示信息与所述目标空间状态标示信息的差异以及不同设备当前的状态信息,得到应用于所述不同设备的第三设备控制指令;所述不同设备为多个所述第二设备中与多个所述第一设备不同的设备;According to the difference between the current space state indication information and the target space state indication information after the same device executes the second device control instruction and the current state information of the different device, a third device control instruction applied to the different device is obtained; the different device is a device among the plurality of the second devices that is different from the plurality of the first devices; 发送所述第三设备控制指令至所述不同设备,以使所述不同设备执行所述第二设备控制指令后的当前空间状态标示信息与所述目标空间状态标示信息相同。The third device control instruction is sent to the different device, so that the current space state indication information after the different device executes the second device control instruction is the same as the target space state indication information. 9.根据权利要求5所述的方法,其特征在于,所述根据所述目标空间状态标示信息和所述空间中所述第二设备当前的状态信息,发送对应的设备控制指令至所述第二设备,包括:9. The method according to claim 5, characterized in that the sending of the corresponding device control instruction to the second device according to the target space state indication information and the current state information of the second device in the space comprises: 若所述空间中所述第二设备与所述空间中所述第一设备相同,则根据所述第一设备的目标状态信息和所述第二设备当前的状态信息,发送对应的设备控制指令至所述第二设备;所述目标状态信息与所述目标空间状态标示信息对应;所述目标状态信息用于表示使所述空间呈现所述目标状态时所述第一设备的设备状态。If the second device in the space is the same as the first device in the space, a corresponding device control instruction is sent to the second device according to the target state information of the first device and the current state information of the second device; the target state information corresponds to the target space state indication information; the target state information is used to indicate the device state of the first device when making the space present the target state. 10.一种设备控制装置,其特征在于,所述装置包括:10. A device control device, characterized in that the device comprises: 信息获得模块,用于获得目标空间状态标示信息;所述目标空间状态标示信息用于标示由空间中第一设备使所述空间呈现的目标状态;所述第一设备包括使所述空间形成所述目标状态的设备;An information acquisition module, used for acquiring target space state marking information; the target space state marking information is used for marking the target state presented by the first device in the space; the first device includes a device that causes the space to form the target state; 信息应用模块,用于应用所述目标空间状态标示信息,以在所述目标状态满足再现条件时,控制所述空间中第二设备使所述空间呈现所述目标状态;所述第二设备包括使所述空间再现所述目标状态的设备。An information application module is used to apply the target space state indication information to control a second device in the space to make the space present the target state when the target state meets the reproduction condition; the second device includes a device that makes the space reproduce the target state. 11.一种电子设备,包括存储器和处理器,所述存储器存储有计算机程序,其特征在于,所述处理器执行所述计算机程序时实现权利要求1至9中任一项所述的方法的步骤。11. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, wherein the processor implements the steps of the method according to any one of claims 1 to 9 when executing the computer program. 12.一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1至9中任一项所述的方法的步骤。12. A computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented. 13.一种计算机程序产品,包括计算机程序,其特征在于,该计算机程序被处理器执行时实现权利要求1至9中任一项所述的方法的步骤。13. A computer program product, comprising a computer program, characterized in that when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.
CN202410575633.9A 2024-05-10 2024-05-10 Device control method, device, electronic device, storage medium and program product Pending CN118584825A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410575633.9A CN118584825A (en) 2024-05-10 2024-05-10 Device control method, device, electronic device, storage medium and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410575633.9A CN118584825A (en) 2024-05-10 2024-05-10 Device control method, device, electronic device, storage medium and program product

Publications (1)

Publication Number Publication Date
CN118584825A true CN118584825A (en) 2024-09-03

Family

ID=92528772

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410575633.9A Pending CN118584825A (en) 2024-05-10 2024-05-10 Device control method, device, electronic device, storage medium and program product

Country Status (1)

Country Link
CN (1) CN118584825A (en)

Similar Documents

Publication Publication Date Title
JP7015333B2 (en) User-defined scene for home automation
CN109725541A (en) Generation method, device, electronic equipment and the storage medium of automation
WO2022022121A1 (en) Interactive method for establishing device linkage scene, and storage medium and electronic device
CN105490897A (en) Household appliance control method and device, as well as mobile terminal
CN113055255A (en) Scene configuration method and device of intelligent household appliance, storage medium and electronic equipment
WO2017157337A1 (en) Control method and device for smart home
JP2016503539A (en) Logical sensor server for the logical sensor platform
CN109660387A (en) Management method, device, server and the storage medium of configuration data of device
CN109918273A (en) A kind of data display method, device, terminal device and storage medium
JP6187041B2 (en) Device management apparatus, device management method, program, and device management system
CN113110093A (en) Control method, device and equipment of intelligent household control panel and storage medium
CN111158256A (en) Intelligent household scene simulation and equipment control method and system based on intelligent television
CN113572669A (en) Scene processing method and device, intelligent gateway and processor
CN104808601A (en) Intelligent home control server
CN118584825A (en) Device control method, device, electronic device, storage medium and program product
CN114285688A (en) Equipment replacement method, device, gateway, system and medium
CN204315077U (en) A kind of intelligentized omnipotent infrared remote control system
CN111650845B (en) Home multicast control method, system and computer readable storage medium
CN113721519A (en) Control system and method of intelligent switch panel
WO2024152841A1 (en) Management method for smart home device, and device
CN118353728A (en) Remote control device configuration method, device and storage medium
CN119225600A (en) Controlled device binding method and device and knob switch device
CN118655790A (en) A method, device, medium and product for realizing switchable scene
CN118426646A (en) Interaction method, device, terminal and storage medium based on space object model
CN118655793A (en) Smart home device control method, system, device, electronic device and medium

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