WO2019227371A1 - Device connection method and apparatus, electronic device, and readable storage medium - Google Patents

Device connection method and apparatus, electronic device, and readable storage medium Download PDF

Info

Publication number
WO2019227371A1
WO2019227371A1 PCT/CN2018/089170 CN2018089170W WO2019227371A1 WO 2019227371 A1 WO2019227371 A1 WO 2019227371A1 CN 2018089170 W CN2018089170 W CN 2018089170W WO 2019227371 A1 WO2019227371 A1 WO 2019227371A1
Authority
WO
WIPO (PCT)
Prior art keywords
target
user terminal
group
devices
information
Prior art date
Application number
PCT/CN2018/089170
Other languages
French (fr)
Chinese (zh)
Inventor
彭灵
陈辉萍
钟城广
盘国权
范高如
李鑫
陈清泉
黄立旺
王增均
朱荆莲
李文彬
姚化桥
俞伟良
陈海裕
杨金桂
李文和
李国凯
郭飞锋
Original Assignee
深圳市蚂蚁雄兵物联技术有限公司
深圳佳比泰智能照明股份有限公司
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 深圳市蚂蚁雄兵物联技术有限公司, 深圳佳比泰智能照明股份有限公司 filed Critical 深圳市蚂蚁雄兵物联技术有限公司
Priority to PCT/CN2018/089170 priority Critical patent/WO2019227371A1/en
Priority to CN201880000626.9A priority patent/CN108781174B/en
Publication of WO2019227371A1 publication Critical patent/WO2019227371A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/2803Home automation networks
    • H04L12/2838Distribution of signals within a home automation network, e.g. involving splitting/multiplexing signals to/from different paths
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/2803Home automation networks
    • H04L12/2816Controlling appliance services of a home automation network by calling their functionalities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management

Abstract

A device connection method and apparatus, an electronic device, and a readable storage medium, relating to the technical field of smart homes. By means of pre-establishing a group and assigning a password to the group, when using a user terminal to establish communication links with smart devices, the present method can assign a plurality of smart devices in the communication range of the user terminal to a group, and can assign the password of the group to all of the smart devices in the group, without needing to implement password configuration for the smart devices individually. Thus, when using the user terminal to implement control of the smart devices, the outcome of the user terminal being able to control one smart device in the group or control all of the smart devices in the group can be achieved, increasing control efficiency, and enhancing the user experience.

Description

设备连接方法、装置、电子设备及可读存储介质Device connection method, device, electronic device and readable storage medium 技术领域Technical field
本公开涉及智能家居技术领域,具体而言,涉及一种设备连接方法、装置、电子设备及可读存储介质。The present disclosure relates to the field of smart home technology, and in particular, to a device connection method, device, electronic device, and readable storage medium.
背景技术Background technique
随着人们生活水平的不断提高,对生活品质的要求也越来越高。便捷、高品质生活成为人们追求的生活标准。智能家居作为人们追求便捷、高品质生活的一个缩影,在人们生活中也越来越受到关注。With the continuous improvement of people's living standards, the requirements for the quality of life have become higher and higher. Convenient, high-quality life has become the standard of life that people are pursuing. As a microcosm of people's pursuit of convenient and high-quality life, smart homes have also received more and more attention in people's lives.
在现有技术中,当用户需要在家中新增家电或电器时,需要将每个新增的家电或电器与用户终端建立连接,在新增的家电或电器较多时,这样各自与智能设备建立连接的方式非常繁琐,并且用户在需要对多个智能设备进行控制时,只能单独的进行控制指令的下发,控制效率低。In the prior art, when a user needs to add a new home appliance or an electric appliance at home, it is necessary to establish a connection between each newly added home appliance or an electric appliance and a user terminal. When there are more new home appliances or appliances, this is to establish a separate connection with a smart device. The connection method is very complicated, and when the user needs to control multiple smart devices, he can only issue control instructions individually, which results in low control efficiency.
发明内容Summary of the Invention
有鉴于此,本公开实施例的目的包括提供一种设备连接方法、装置、电子设备及可读存储介质。In view of this, the objects of the embodiments of the present disclosure include providing a device connection method, an apparatus, an electronic device, and a readable storage medium.
第一方面,本发明实施例提供了一种设备连接方法,应用于用户终端,所述用户终端预先建立至少一个分组,并为所述分组配置组名及对应的分组密码,所述设备连接方法包括:In a first aspect, an embodiment of the present invention provides a device connection method, which is applied to a user terminal. The user terminal establishes at least one group in advance, and configures a group name and a corresponding group password for the group. The device connection method include:
所述用户终端获取所述用户终端通信范围内的所有待连接设备的设备信息;Acquiring, by the user terminal, device information of all devices to be connected within a communication range of the user terminal;
所述用户终端将所有待连接设备中的至少一个目标设备分配至目标分组中;The user terminal assigns at least one target device among all devices to be connected to a target group;
所述用户终端根据所述目标分组对应的组名和分组密码更新所述目标设备的设备信息;Updating, by the user terminal, device information of the target device according to a group name and a group password corresponding to the target group;
所述用户终端根据所述目标分组的分组密码,建立与所述目标分组中至少一个目标设备的通信连接;Establishing, by the user terminal, a communication connection with at least one target device in the target group according to the group password of the target group;
所述用户终端将针对所述目标设备的控制指令,转发至所述目标分组中其他目标设备。The user terminal forwards the control instruction for the target device to other target devices in the target packet.
进一步地,所述用户终端预先建立与后台服务器的通信连接,所述后台服务器预先配置有所有待连接设备的设备信息及对应的测试指令集,所述测试指令集中包括多个测试指令;在所述用户终端将所有待连接设备中的至少一个目标设备分配至目标分组中的步骤之前,该方法还包括:Further, the user terminal establishes a communication connection with a background server in advance, and the background server is pre-configured with device information and corresponding test instruction sets of all devices to be connected, and the test instruction set includes multiple test instructions; Before the step of the user terminal assigning at least one target device among all the devices to be connected to the target group, the method further includes:
所述用户终端建立与后台服务器的通信连接;The user terminal establishes a communication connection with a background server;
所述用户终端将所述设备信息发送至所述后台服务器,以使所述后台服务器根据所述设备信息确定对应的测试指令集;Sending, by the user terminal, the device information to the background server, so that the background server determines a corresponding test instruction set according to the device information;
所述用户终端接收所述测试指令集中的至少一个测试指令。The user terminal receives at least one test instruction in the test instruction set.
进一步地,在获取所述用户终端通信范围内的所有待连接设备的设备信息的步骤之后,该方法还包括:Further, after the step of acquiring device information of all devices to be connected within the communication range of the user terminal, the method further includes:
所述用户终端向所述待连接设备发送测试指令,以使所述待连接设备根据所述测试指令进行测试动作;Sending, by the user terminal, a test instruction to the device to be connected, so that the device to be connected performs a test action according to the test instruction;
所述用户终端根据所述测试指令,生成测试接口;Generating, by the user terminal, a test interface according to the test instruction;
所述用户终端通过所述接口接收外部输入的输入指令;Receiving, by the user terminal, an input instruction externally input through the interface;
当所述输入指令为确定所述测试动作正常的指令时,将所述待连接设备确定为所述目标设 备。When the input instruction is an instruction that determines that the test action is normal, the device to be connected is determined as the target device.
进一步地,所述用户终端预先配置有所述待连接设备的正常状态信息,在获取所述用户终端通信范围内的所有待连接设备的设备信息的步骤之后,该方法还包括:Further, the user terminal is pre-configured with normal state information of the devices to be connected, and after the step of obtaining device information of all the devices to be connected within the communication range of the user terminal, the method further includes:
所述用户终端向所述待连接设备发送第一测试指令,以使所述待连接设备根据所述第一测试指令生成测试结果信息;Sending, by the user terminal, a first test instruction to the device to be connected, so that the device to be connected generates test result information according to the first test instruction;
所述用户终端接收所述测试结果信息,确定所述测试结果信息是否为所述正常状态信息;Receiving, by the user terminal, the test result information, and determining whether the test result information is the normal state information;
所述用户终端将所述测试结果信息为所述正常状态信息的待连接设备,确定为所述目标设备。Determining, by the user terminal, the device to be connected with the test result information as the normal status information as the target device.
进一步地,所述用户终端预先配置有所述待连接设备的正常状态信息,在获取所述用户终端通信范围内的所有待连接设备的设备信息的步骤之后,该方法还包括:Further, the user terminal is pre-configured with normal state information of the devices to be connected, and after the step of obtaining device information of all the devices to be connected within the communication range of the user terminal, the method further includes:
所述用户终端向所述待连接设备发送第二测试指令,所述第二测试指令配置成使接收到该第二测试指令的待连接设备发送响应信息;Sending, by the user terminal, a second test instruction to the device to be connected, where the second test instruction is configured to enable the device to be connected to receive the second test instruction to send response information;
所述用户终端确定是否接收到所述待连接设备的响应信息;Determining, by the user terminal, whether response information of the device to be connected is received;
当所述用户终端确定接收到所述待连接设备的响应信息,将该响应信息对应的待连接设备确定为所述目标设备。When the user terminal determines that the response information of the device to be connected is received, the device to be connected corresponding to the response information is determined as the target device.
进一步地,所述用户终端将针对所述目标设备的控制指令,转发至所述目标分组中其他目标设备的步骤包括:Further, the step of the user terminal forwarding control instructions for the target device to other target devices in the target group includes:
所述用户终端向所述目标设备发送控制指令;The user terminal sends a control instruction to the target device;
所述用户终端根据所述目标设备的设备信息,确定所述目标设备对应的目标分组;Determining, by the user terminal, a target group corresponding to the target device according to the device information of the target device;
所述用户终端确定所述目标分组中包含的所有目标设备的设备信息;Determining, by the user terminal, device information of all target devices included in the target group;
所述用户终端将所述控制指令发送至所述目标分组中所有的目标设备。The user terminal sends the control instruction to all target devices in the target packet.
进一步地,所述目标分组中的所有目标设备预先建立自组网通信连接,以使所述目标分组中的其中一个所述目标设备可将所述控制指令通过所述自组网通信连接发送至所述目标分组中的其他目标设备,所述设备连接方法还包括:Further, all target devices in the target group establish an ad hoc network communication connection in advance, so that one of the target devices in the target group can send the control instruction to the ad hoc network communication connection to For other target devices in the target group, the device connection method further includes:
所述目标设备接收到控制指令后,确定所述目标设备所在目标分组的组名和分组密码;After receiving the control instruction, the target device determines a group name and a group password of a target group in which the target device is located;
所述目标设备根据所述组名和分组密码,将所述控制指令发送至所述目标设备所在的目标分组中的其他目标设备。The target device sends the control instruction to other target devices in a target group where the target device is located according to the group name and the group password.
第二方面,本发明实施例提供了一种设备连接装置,应用于用户终端,所述用户终端预先建立至少一个分组,并为所述分组配置组名及对应的分组密码,所述设备连接装置包括:In a second aspect, an embodiment of the present invention provides a device connection device, which is applied to a user terminal. The user terminal establishes at least one group in advance, and configures a group name and a corresponding group password for the group. The device connection device include:
设备搜索模块,配置成获取所述用户终端通信范围内的所有待连接设备的设备信息;A device search module configured to obtain device information of all devices to be connected within a communication range of the user terminal;
分配模块,配置成将所有待连接设备中的至少一个目标设备分配至目标分组中;An allocation module configured to allocate at least one target device among all the devices to be connected to a target group;
赋值模块,配置成根据所述目标分组对应的组名和分组密码更新所述目标设备的设备信息;An assignment module configured to update device information of the target device according to a group name and a group password corresponding to the target group;
通信模块,配置成根据所述目标分组的分组密码,建立与所述目标分组中至少一个目标设备的通信连接;A communication module configured to establish a communication connection with at least one target device in the target group according to a block password of the target group;
控制模块,配置成所述用户终端将针对所述目标设备的控制指令,转发至所述目标分组中 其他目标设备。The control module is configured so that the user terminal forwards control instructions for the target device to other target devices in the target packet.
进一步地,所述用户终端预先建立与后台服务器的通信连接,所述后台服务器预先配置有所有待连接设备的设备信息及对应的测试指令集,所述测试指令集中包括多个测试指令;在所述用户终端将所有待连接设备中的至少一个目标设备分配至目标分组中之前,所述通信模块还被配置成:Further, the user terminal establishes a communication connection with a background server in advance, and the background server is pre-configured with device information and corresponding test instruction sets of all devices to be connected, and the test instruction set includes multiple test instructions; Before the user terminal allocates at least one target device among all the devices to be connected to the target group, the communication module is further configured to:
建立与后台服务器的通信连接;Establish a communication connection with a background server;
将所述设备信息发送至所述后台服务器,以使所述后台服务器根据所述设备信息确定对应的测试指令集;Sending the device information to the background server, so that the background server determines a corresponding test instruction set according to the device information;
接收所述测试指令集中的至少一个测试指令。Receiving at least one test instruction in the test instruction set.
进一步地,在获取所述用户终端通信范围内的所有待连接设备的设备信息的步骤之后,所述通信模块还被配置成:Further, after the step of acquiring device information of all devices to be connected within a communication range of the user terminal, the communication module is further configured to:
向所述待连接设备发送测试指令,以使所述待连接设备根据所述测试指令进行测试动作;Sending a test instruction to the device to be connected, so that the device to be connected performs a test action according to the test instruction;
所述设备连接装置还包括接口生成模块和输入模块,所述接口生成模块配置成根据所述测试指令,生成测试接口;The device connection device further includes an interface generation module and an input module, and the interface generation module is configured to generate a test interface according to the test instruction;
所述输入模块配置成通过所述接口接收外部输入的输入指令;The input module is configured to receive an externally inputted input instruction through the interface;
所述赋值模块配置成当所述输入指令为确定所述测试动作正常的指令时,将所述待连接设备确定为所述目标设备。The assignment module is configured to determine the device to be connected as the target device when the input instruction is an instruction that determines that the test action is normal.
进一步地,所述通信模块还被配置成:Further, the communication module is further configured to:
向所述待连接设备发送第一测试指令,以使所述待连接设备根据所述第一测试指令生成测试结果信息;Sending a first test instruction to the device to be connected, so that the device to be connected generates test result information according to the first test instruction;
接收所述测试结果信息,确定所述测试结果信息是否为所述正常状态信息;Receiving the test result information, and determining whether the test result information is the normal state information;
将所述测试结果信息为所述正常状态信息的待连接设备,确定为所述目标设备。The device to be connected with the test result information being the normal state information is determined as the target device.
进一步地,所述用户终端预先配置有所述待连接设备的正常状态信息,在获取所述用户终端通信范围内的所有待连接设备的设备信息的步骤之后,所述通信模块还被配置成:Further, the user terminal is pre-configured with normal state information of the devices to be connected, and after the step of obtaining device information of all the devices to be connected within the communication range of the user terminal, the communication module is further configured to:
向所述待连接设备发送第二测试指令,所述第二测试指令配置成使接收到该第二测试指令的待连接设备发送响应信息;Sending a second test instruction to the device to be connected, where the second test instruction is configured to cause the device to be connected to receive the second test instruction to send response information;
所述控制模块配置成确定是否接收到所述待连接设备的响应信息;当所述用户终端确定接收到所述待连接设备的响应信息,将该响应信息对应的待连接设备确定为所述目标设备。The control module is configured to determine whether response information of the device to be connected is received; when the user terminal determines that the response information of the device to be connected is received, determine the device to be connected corresponding to the response information as the target device.
进一步地,所述控制模块将针对所述目标设备的控制指令,转发至所述目标分组中其他目标设备的方法包括:Further, the method in which the control module forwards control instructions for the target device to other target devices in the target packet includes:
所述用户终端向所述目标设备发送控制指令;The user terminal sends a control instruction to the target device;
所述用户终端根据所述目标设备的设备信息,确定所述目标设备对应的目标分组;Determining, by the user terminal, a target group corresponding to the target device according to the device information of the target device;
所述用户终端确定所述目标分组中包含的所有目标设备的设备信息;Determining, by the user terminal, device information of all target devices included in the target group;
所述用户终端将所述控制指令发送至所述目标分组中所有的目标设备。The user terminal sends the control instruction to all target devices in the target packet.
进一步地,所述目标分组中的所有目标设备预先建立自组网通信连接,以使所述目标分组中的其中一个所述目标设备可将所述控制指令通过所述自组网通信连接发送至所述目标分组 中的其他目标设备,所述目标设备还包括:Further, all target devices in the target group establish an ad hoc network communication connection in advance, so that one of the target devices in the target group can send the control instruction to the ad hoc network communication connection to Other target devices in the target group, the target devices further include:
指令确定模块,配置成接收到控制指令后,确定所述目标设备所在目标分组的组名和分组密码;An instruction determination module configured to determine a group name and a group password of a target group where the target device is located after receiving the control instruction;
转发模块,配置成根据所述组名和分组密码,将所述控制指令发送至所述目标设备所在的目标分组中的其他目标设备。The forwarding module is configured to send the control instruction to other target devices in a target group where the target device is located according to the group name and the group password.
第三方面,本发明还提供了一种电子设备,所述电子设备包括存储器和处理器,所述存储器用于存储有可执行程序代码,所述处理器用于读取所述存储器中存储的可执行程序代码以使得所述电子设备执行第一方面所述方法。According to a third aspect, the present invention also provides an electronic device. The electronic device includes a memory and a processor. The memory is configured to store executable program code. The processor is configured to read an available device stored in the memory. Program code is executed to cause the electronic device to perform the method described in the first aspect.
第四方面,本发明实施例提供了一种可读存储介质,所述可读存储介质包括计算机程序,所述计算机程序运行时控制所述可读存储介质所在电子设备执行权第一方面中所述的设备连接方法。In a fourth aspect, an embodiment of the present invention provides a readable storage medium, where the readable storage medium includes a computer program, and when the computer program runs, controls the execution right of the electronic device in which the readable storage medium is located in the first aspect. Device connection method described below.
本申请实施例中的设备连接方法通过预先建立分组,并为分组分配密码,在使用用户终端建立智能设备的通信连接时,可以将用户终端通信范围内的多个智能设备分配进一个分组。就可以实现将分组的密码赋值给分组内的所有智能设备,无需对智能设备单独进行密码的配置。进而在使用用户终端对智能设备进行控制时,可以实现用户终端对分组内的一个智能设备控制,就能够控制分组内的所有智能设备的效果,提高控制效率,提升用户的使用体验。In the device connection method in the embodiment of the present application, by establishing a group in advance and assigning a password to the group, when a user terminal is used to establish a communication connection with a smart device, multiple smart devices within the communication range of the user terminal can be assigned to a group. The password of the group can be assigned to all the smart devices in the group, and there is no need to configure the password of the smart device separately. Furthermore, when the user terminal is used to control the smart device, the user terminal can control one smart device in the group, which can control the effect of all the smart devices in the group, improve the control efficiency, and improve the user experience.
为使本公开的上述目的、特征和优点能更明显易懂,下文特举较佳实施例,并配合所附附图,作详细说明如下。In order to make the above-mentioned objects, features, and advantages of the present disclosure more comprehensible, preferred embodiments are described below in detail with the accompanying drawings as follows.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
为了更清楚地说明本公开实施例的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,应当理解,以下附图仅示出了本公开的某些实施例,因此不应被看作是对范围的限定,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他相关的附图。In order to explain the technical solutions of the embodiments of the present disclosure more clearly, the drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present disclosure, and therefore are not It should be regarded as a limitation on the scope. For those of ordinary skill in the art, other related drawings can be obtained according to these drawings without paying creative work.
图1为本公开较佳实施例提供的设备连接方法的流程示意图。FIG. 1 is a schematic flowchart of a device connection method according to a preferred embodiment of the present disclosure.
图2为本公开较佳实施例提供的设备连接方法的另一流程示意图。FIG. 2 is another schematic flowchart of a device connection method according to a preferred embodiment of the present disclosure.
图3为本公开另一较佳实施例提供的设备连接方法的另一流程示意图。FIG. 3 is another schematic flowchart of a device connection method according to another preferred embodiment of the present disclosure.
图4为本公开较佳实施例提供的设备连接方法的另一流程示意图。FIG. 4 is another schematic flowchart of a device connection method according to a preferred embodiment of the present disclosure.
图5为本公开较佳实施例提供的设备连接方法的另一流程示意图。FIG. 5 is another schematic flowchart of a device connection method according to a preferred embodiment of the present disclosure.
图6为本公开较佳实施例提供的设备连接装置的功能模块示意图。FIG. 6 is a schematic diagram of functional modules of a device connection device according to a preferred embodiment of the present disclosure.
具体实施方式Detailed ways
下面将结合本公开实施例中附图,对本公开实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本公开一部分实施例,而不是全部的实施例。通常在此处附图中描述和示出的本公开实施例的组件可以以各种不同的配置来布置和设计。因此,以下对在附图中提供的本公开的实施例的详细描述并非旨在限制要求保护的本公开的范围,而是仅仅表示本公开的选定实施例。基于本公开的实施例,本领域技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例, 都属于本公开保护的范围。The technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, but not all of the embodiments. The components of embodiments of the present disclosure generally described and illustrated in the drawings herein may be arranged and designed in a variety of different configurations. Accordingly, the following detailed description of embodiments of the present disclosure provided in the accompanying drawings is not intended to limit the scope of the claimed disclosure, but merely to indicate selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without creative work fall within the protection scope of the present disclosure.
应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步定义和解释。同时,在本公开的描述中,术语“第一”、“第二”等仅用于区分描述,而不能理解为指示或暗示相对重要性。It should be noted that similar reference numerals and letters indicate similar items in the following drawings, so once an item is defined in one drawing, it need not be further defined and explained in subsequent drawings. Meanwhile, in the description of the present disclosure, the terms “first”, “second”, and the like are only used to distinguish descriptions, and cannot be understood to indicate or imply relative importance.
如图1所示,为本申请实施例提供的一种设备连接方法,可以应用于用户终端。用户终端可以为手机、平板电脑等设备。所述用户终端可以预先建立至少一个分组,并为所述分组配置组名及对应的分组密码。在本申请实施例中,用户终端和待连接设备上可以设置对应的通信单元,用户终端上的通信单元可以接收待连接设备发送的数据,并且可以向待连接设备发送控制指令。待连接设备可以通过待连接设备上的通信单元接收用户终端发送的数据和控制指令,并且可以将相关信息发送至用户终端。所述设备连接方法可以包括以下步骤。As shown in FIG. 1, a device connection method according to an embodiment of the present application may be applied to a user terminal. The user terminal can be a device such as a mobile phone or a tablet. The user terminal may establish at least one group in advance, and configure a group name and a corresponding group password for the group. In the embodiment of the present application, corresponding communication units may be set on the user terminal and the device to be connected. The communication unit on the user terminal may receive data sent by the device to be connected, and may send a control instruction to the device to be connected. The device to be connected may receive data and control instructions sent by the user terminal through a communication unit on the device to be connected, and may send related information to the user terminal. The device connection method may include the following steps.
步骤S101,所述用户终端获取所述用户终端通信范围内的所有待连接设备的设备信息。Step S101: The user terminal acquires device information of all devices to be connected within a communication range of the user terminal.
用户在使用智能设备时,例如各种智能传感器、智能家电等,都需要通过用户终端建立与各种设备的通信连接,才能通过用户终端控制各个智能设备、进行各种数据的阅读等等操作。能够与用户终端通信连接的各个设备即为待连接设备,用户终端可以是智能手机、平板电脑等设备,或者也可以是仅具备控制智能设备的独立终端。用户终端可以通过蓝牙、Zigbee等通讯协议建立与待连接设备的通信连接,也可以通过其他通信方式连接,本申请实施例并不限制通信连接的具体形式。各个待连接设备上也可以配置对应的通信组件,例如蓝牙组件等等,以便与用户终端通信连接。用户终端在建立与待连接设备的通信连接之前,需要先对通信范围内的待连接设备进行扫描,确定有哪些设备在通信范围之内,以便选择待连接设备中的一个或多个建立通信连接。例如,用户终端可以开启蓝牙功能,通过蓝牙功能扫描蓝牙覆盖范围内的所有待连接设备。在扫描完成后,可以将扫描得到的所有待连接设备的名称以列表形式呈现。在本申请实施例中,设备信息可以包括待连接设备的名称、设备类型、MAC地址等等信息。为了方便进行多个设备的管理,用户可以通过用户终端建立多个分组,用户可以对每个分组内的多个设备统一进行管理。例如,用户可以预先建立一控制家中多个智能灯具的灯具分组,用户可以将需要控制的多个灯具分配进入该灯具分组,用户就可以通过对灯具分组中的一个灯具下发控制指令而实现对灯具分组中的所有灯具下发控制指令。When users use smart devices, such as various smart sensors and smart home appliances, they need to establish communication connections with various devices through the user terminal in order to control various smart devices and read various data through the user terminal. Each device capable of communicating with the user terminal is the device to be connected. The user terminal may be a device such as a smart phone or a tablet computer, or it may be an independent terminal that only controls the smart device. The user terminal may establish a communication connection with the device to be connected through communication protocols such as Bluetooth and Zigbee, or may be connected through other communication methods. The embodiments of the present application do not limit the specific form of the communication connection. Corresponding communication components, such as Bluetooth components, can also be configured on each device to be connected, so as to communicate with the user terminal. Before a user terminal establishes a communication connection with a device to be connected, it needs to scan the devices to be connected within the communication range to determine which devices are within the communication range in order to select one or more of the devices to be connected to establish a communication connection . For example, the user terminal can enable the Bluetooth function, and scan all the devices to be connected within the Bluetooth coverage area through the Bluetooth function. After the scan is completed, the names of all the devices to be connected scanned can be displayed in a list. In the embodiment of the present application, the device information may include information such as a name, a device type, a MAC address, and the like of a device to be connected. In order to facilitate the management of multiple devices, users can establish multiple groups through the user terminal, and users can uniformly manage multiple devices in each group. For example, the user can set up a group of lamps that control multiple smart lamps in the home in advance. The user can assign multiple lamps that need to be controlled into the group of lamps. The user can issue control instructions to one of the lamps in the group to implement All lamps in the lamp group issue control instructions.
步骤S102,所述用户终端将所有待连接设备中的至少一个目标设备分配至目标分组中。In step S102, the user terminal allocates at least one target device among all the devices to be connected to a target group.
通过用户终端搜索到所有待连接设备后,能够被搜索到的设备表明其与用户终端之间的距离处于正常通信距离之内,能够进行正常的通信连接和数据传输。用户可以先确定需要分配的分组,该分组被确定为目标分组,再通过用户终端确定需要被分配进入到该目标分组中的待连接设备为目标设备。用户可以通过用户终端对每个待连接设备的分组情况进行操作,一个目标设备可以被分配进入到一个目标分组中,也可以被分配进入到多个目标分组中。用户终端在建立与待连接设备的通信连接过程中,为了方便日后的使用,可以为每个建立连接的设备分配对应的名称和密码。After all the devices to be connected are searched through the user terminal, the devices that can be searched indicate that the distance between them and the user terminal is within the normal communication distance, and normal communication connections and data transmission can be performed. The user may first determine the group to be allocated, and the group is determined as the target group, and then the user terminal determines that the device to be connected that needs to be allocated into the target group is the target device. The user can operate the grouping situation of each device to be connected through the user terminal. A target device can be assigned to one target group, or it can be assigned to multiple target groups. In the process of establishing a communication connection with the device to be connected, the user terminal may assign a corresponding name and password to each connected device in order to facilitate future use.
步骤S103,所述用户终端根据所述目标分组对应的组名和分组密码更新所述目标设备的设备信息。Step S103: The user terminal updates device information of the target device according to a group name and a group password corresponding to the target group.
在目标设备被分配进入到目标分组中后,用户预先为目标分组设置的名称和密码就可以被赋值给该目标分组中的所有设备。为目标分组设置的密码可作为与目标设备建立通信连接所必须的密码。After the target device is assigned to the target group, the name and password set by the user in advance for the target group can be assigned to all devices in the target group. The password set for the target group can be used as the password necessary to establish a communication connection with the target device.
步骤S104,所述用户终端根据所述目标分组的分组密码,建立与所述目标分组中至少一个目标设备的通信连接。Step S104: The user terminal establishes a communication connection with at least one target device in the target group according to the group password of the target group.
在目标设备被分配好分组密码后,用户终端即可通过分组密码与目标设备建立加密连接,用户可以通过用户终端对目标分组的密码进行修改,密码被修改后即可将新的密码赋值给该目标分组内的所有目标设备。After the target device is assigned a block password, the user terminal can establish an encrypted connection with the target device through the block password. The user can modify the target group password through the user terminal. After the password is modified, the new password can be assigned to the All target devices within the target group.
步骤S105,所述用户终端将针对所述目标设备的控制指令,转发至所述目标分组中其他目标设备。Step S105: The user terminal forwards the control instruction for the target device to other target devices in the target packet.
用户可以通过用户终端对智能设备进行控制,如果不对智能设备进行分组,那么用户在需要对多个设备进行相同的操作时,就需要单独对每个设备进行操作,操作繁琐且控制效率低。在本申请实施例中,用户可以先将需要进行相同操作的多个待连接设备分配至同一目标分组,用户在对该目标分组内的某一个目标设备进行控制时,由于预先建立了目标分组,用户的控制指令就可以被发送至该目标分组内的所有目标设备,实现仅向一个设备发送控制指令,就控制了多个设备的控制效果,提高对智能设备的控制效率。The user can control the smart device through the user terminal. If the smart device is not grouped, when the user needs to perform the same operation on multiple devices, the user needs to operate each device individually, which is tedious operation and low control efficiency. In the embodiment of the present application, the user may first assign multiple devices to be connected to the same target group to the same target group. When the user controls a target device in the target group, because the target group is established in advance, The user's control instruction can be sent to all target devices in the target group, and the control instruction is sent to only one device, which controls the control effect of multiple devices and improves the control efficiency of the smart device.
详细的,如图2所示,步骤S105可以包括以下子步骤。In detail, as shown in FIG. 2, step S105 may include the following sub-steps.
子步骤S151,所述用户终端向所述目标设备发送控制指令。Sub-step S151, the user terminal sends a control instruction to the target device.
用户终端可以选择目标分组中的一个目标设备,并向该目标设备发送控制指令。The user terminal may select a target device in the target group and send a control instruction to the target device.
子步骤S152,所述用户终端根据所述目标设备的设备信息,确定所述目标设备对应的目标分组。In step S152, the user terminal determines a target group corresponding to the target device according to the device information of the target device.
用户终端可以根据控制指令的目标确定该目标设备所在的目标分组。The user terminal may determine the target group where the target device is located according to the target of the control instruction.
子步骤S153,所述用户终端确定所述目标分组中包含的所有目标设备的设备信息。Sub-step S153: The user terminal determines device information of all target devices included in the target group.
在确定了目标设备所在的目标分组后,用户终端可以获取预先被分配在该目标分组内的所有目标设备的设备信息,包括设备的名称、MAC地址等等。After the target group in which the target device is located is determined, the user terminal can obtain device information of all target devices allocated in the target group in advance, including device names, MAC addresses, and so on.
子步骤S154,所述用户终端将所述控制指令发送至所述目标分组中所有的目标设备。Sub-step S154, the user terminal sends the control instruction to all target devices in the target packet.
用户终端可以将针对一个目标分组中其中一个目标设备的控制指令,发送至该目标分组内的所有目标设备。用户不必对目标分组中的每个目标设备进行独立的控制,通过这样的预先分组的形式,实现用户终端对多个目标设备同时控制的目的。The user terminal may send a control instruction for one target device in a target group to all target devices in the target group. The user does not need to perform independent control on each target device in the target group. In this form of pre-grouping, the purpose of the user terminal controlling multiple target devices simultaneously is achieved.
在一种实施方式中,所述用户终端预先建立与后台服务器的通信连接,所述后台服务器预先配置有所有待连接设备的设备信息及对应的测试指令集,所述测试指令集中包括多个测试指令;在所述用户终端将所有待连接设备中的至少一个目标设备分配至目标分组中的步骤之前,如图3所示,该方法还包括以下步骤。In one embodiment, the user terminal establishes a communication connection with a background server in advance, and the background server is pre-configured with device information of all devices to be connected and a corresponding test instruction set, where the test instruction set includes multiple tests Instruction; before the step of the user terminal assigning at least one target device among all the devices to be connected to the target group, as shown in FIG. 3, the method further includes the following steps.
步骤S106,所述用户终端建立与后台服务器的通信连接。Step S106: The user terminal establishes a communication connection with a background server.
用户终端在将待连接设备确定为目标设备时,需要确定该待连接设备为需要控制的设备。例如,用户家中配置了多个智能设备,用户希望通过用户终端对多个智能设备进行控制,由于 在日常环境中,很可能有其他设备也配置了与这些智能设备相同的控制协议。如果智能终端通过蓝牙协议建立与用户终端的通信连接,那么所有具有蓝牙通信模块的装置发出的蓝牙信号都可能被用户终端接收到。此外,还可能出现这样的情况,用户A家中配置了多个智能设备,但该用户A的邻居B也配置了相同规格的只能设备,那么用户A使用的用户终端在进行搜索时,由于用户A与邻居B的实际距离较近,用户A的用户终端很可能就会搜索到邻居B家中的智能设备,显然用户A是并不希望对邻居B家中的智能设备进行控制的,邻居B也并不希望自己家中的设备被其他人控制。因此,用户A在使用用户终端对搜索到的多个智能设备进行分组时,需要对智能设备是否为原本希望控制的设备进行确认。When a user terminal determines a device to be connected as a target device, it needs to determine that the device to be connected is a device that needs to be controlled. For example, multiple smart devices are configured in the user's home, and the user wants to control multiple smart devices through the user terminal. In the daily environment, it is likely that other devices are also configured with the same control protocol as these smart devices. If the smart terminal establishes a communication connection with the user terminal through the Bluetooth protocol, the Bluetooth signals sent by all devices with a Bluetooth communication module may be received by the user terminal. In addition, it may also happen that user A has multiple smart devices configured in his home, but neighbor A of user A is also configured with only devices of the same specifications. Then, when the user terminal used by user A performs a search, The actual distance between A and neighbor B is close. User A's user terminal is likely to search for the smart devices in neighbor B's home. Obviously, user A does not want to control the smart devices in neighbor B's home. You do n’t want the devices in your home to be controlled by others. Therefore, when the user A uses the user terminal to group the searched multiple smart devices, the user A needs to confirm whether the smart device is a device that he originally wants to control.
此外,智能设备在使用过程中,很可能出现功能不正常的情况,如果用户在通过用户终端建立与该功能不正常的智能设备的通信连接之前,没有对智能设备的功能进行测试,在控制过程中就会出现不能正常控制而控制失败的情况。In addition, during the use of the smart device, it is likely that the function of the smart device is abnormal. If the user does not test the function of the smart device before establishing a communication connection with the smart device that is not functioning through the user terminal, the control process There will be cases where the control fails and the control fails.
因此,用户可以通过用户终端先对待连接设备是否为希望控制的设备以及该设备是否正常进行测试。Therefore, the user can first test whether the connected device is a device to be controlled and whether the device is normal through the user terminal.
步骤S107,所述用户终端将所述设备信息发送至所述后台服务器,以使所述后台服务器根据所述设备信息确定对应的测试指令集。Step S107: The user terminal sends the device information to the background server, so that the background server determines a corresponding test instruction set according to the device information.
由于智能设备的种类较多,一个用户所处的环境中可能存在数量众多且规格型号不同的智能设备,用户终端并不能配置有所有智能设备的测试指令。在本申请实施例中,用户终端在通过通信协议搜索到所有待连接设备后,即可获取到所有待连接设备的规格、型号等信息,用户终端通过这些规格、型号等信息可以通过后台服务器获取到这些设备的测试指令集,后台服务器上配置有所有智能设备的测试指令,每个型号的智能设备的测试指令形成与该智能设备对应的测试指令集。Because there are many types of smart devices, there may be a large number of smart devices with different specifications and models in the environment where a user is located. The user terminal cannot be configured with test instructions for all smart devices. In the embodiment of the present application, after searching for all the devices to be connected through the communication protocol, the user terminal can obtain the specifications, models, and other information of all the devices to be connected. The user terminal can obtain these specifications, models, and other information through the background server. To the test instruction set of these devices, the test instructions of all smart devices are configured on the background server, and the test instructions of each model of the smart device form a test instruction set corresponding to the smart device.
步骤S108,所述用户终端接收所述测试指令集中的至少一个测试指令。Step S108: The user terminal receives at least one test instruction in the test instruction set.
在后台服务器确定了用户终端获取的智能设备对应的测试指令集后,后台服务器可以向用户终端发送测试指令集中的至少一个指令,用户终端通过接收到的测试指令即可对智能设备进行测试。After the background server determines the test instruction set corresponding to the smart device obtained by the user terminal, the background server can send at least one instruction in the test instruction set to the user terminal, and the user terminal can test the smart device through the received test instruction.
详细的,如图4所示,在获取所述用户终端通信范围内的所有待连接设备的设备信息的步骤之后,该方法还包括以下步骤。Specifically, as shown in FIG. 4, after the step of acquiring device information of all devices to be connected within the communication range of the user terminal, the method further includes the following steps.
步骤S109,所述用户终端向所述待连接设备发送测试指令,以使所述待连接设备根据所述测试指令进行测试动作。Step S109: The user terminal sends a test instruction to the device to be connected, so that the device to be connected performs a test action according to the test instruction.
用户终端在接收到后台服务器下发的测试指令后,用户终端可以将测试指令发送至待连接设备。可以理解的是,不同的智能设备对应的测试指令不同,例如,智能灯具对应的测试指令可以包括开灯、关灯、调亮、调暗等。智能窗帘的测试指令可以包括打开窗帘、关闭窗帘等等。After the user terminal receives the test instruction issued by the background server, the user terminal can send the test instruction to the device to be connected. It can be understood that the test instructions corresponding to different smart devices are different. For example, the test instructions corresponding to smart lamps may include turning on, turning off, dimming, and dimming. Test instructions for smart curtains can include opening curtains, closing curtains, and so on.
步骤S110,所述用户终端根据所述测试指令,生成测试接口。Step S110: The user terminal generates a test interface according to the test instruction.
用户终端在将测试指令发送至待连接设备后,待连接设备即可根据测试指令进行对应的测试动作,但智能终端是否正确进行了测试动作,用户终端是无法确定的,可以通过用户终端的操作者进行判断。此外,还可能出现对用户并不希望控制的设备进行了测试的情况。如前所述, 用户A仅仅希望通过用户终端控制自己家中的智能设备,但由于邻居B家中的智能设备也可以被用户A的用户终端搜索到,如果没有进行测试,或者虽然进行了测试但用户没有进行确定,就会出现邻居B家中的智能设备被用户A的用户终端进行了分组。虽然,邻居B可以通过预先对自己家中的设备进行配置密码来规避被用户A分组的情况,但如果邻居B家中的智能设备没有配置密码或者配置了出厂密码,就仍然可能出现被用户A的用户终端控制的情况。After the user terminal sends the test instruction to the device to be connected, the device to be connected can perform the corresponding test action according to the test instruction, but the user terminal cannot determine whether the smart terminal has performed the test action correctly, and can be operated by the user terminal. Judge. In addition, it is possible to test equipment that the user does not want to control. As mentioned earlier, user A only wants to control the smart devices in his own home through the user terminal, but since the smart devices in neighbor B's home can also be searched by user A's user terminal, if the test is not performed, or if the test is performed but the user Without making a determination, it will appear that the smart devices in neighbor B's home are grouped by the user terminal of user A. Although neighbor B can pre-configure a password for the device in his home to avoid being grouped by user A, if the smart device in neighbor B's home is not configured with a password or a factory password, users of user A may still appear Case of terminal control.
因此,用户终端在向智能设备发送了控制指令后,可以生成测试接口,用户终端可以通过测试借口接收外部输入的指令,以确定智能设备是否正常。Therefore, after the user terminal sends a control instruction to the smart device, a test interface can be generated, and the user terminal can receive an externally input instruction through a test excuse to determine whether the smart device is normal.
步骤S111,所述用户终端通过所述接口接收外部输入的输入指令。Step S111: The user terminal receives an externally input input instruction through the interface.
用户终端可以通过测试接口接收用户输入的指令,例如,用户终端在向一智能灯具发送了开灯的测试指令后,且该智能灯具打开,用户终端可以生成“灯具是否开启”的页面,用户在确定了智能灯具已经正常打开后,用户可以通过用户终端选择“灯具打开”的选项,用户终端即可确定智能灯具的开灯测试是正常的。并且,由于引入了用户确认的步骤,用户只有通过测试流程在确定了智能设备正是自己希望控制的设备后,才会进行分组的操作,从而规避用户对其他用户的智能设备进行控制的情况。The user terminal can receive instructions input by the user through the test interface. For example, after the user terminal sends a test instruction to turn on the light to a smart lamp, and the smart lamp is turned on, the user terminal can generate a page of "whether the lamp is turned on". After it is determined that the smart luminaire has been normally turned on, the user can select the option of “lamp on” through the user terminal, and the user terminal can determine that the turn-on test of the smart luminaire is normal. In addition, since the user confirmation step is introduced, the user will only perform grouping operations after determining that the smart device is the device he wants to control through the test process, thereby avoiding the situation where the user controls the smart devices of other users.
步骤S112,当所述输入指令为确定所述测试动作正常的指令时,将所述待连接设备确定为所述目标设备。Step S112: When the input instruction is an instruction that determines that the test action is normal, determine the device to be connected as the target device.
通过上述的测试流程,用户在输入了智能设备一切正常的指令后,用户终端就可以将该待连接设备确定为目标设备。Through the above test process, after the user inputs all normal instructions of the smart device, the user terminal can determine the device to be connected as the target device.
在另一种具体实施方式中,所述用户终端预先配置有所述待连接设备的正常状态信息,在获取所述用户终端通信范围内的所有待连接设备的设备信息的步骤之后,如图5所示,该方法还可以包括以下步骤。In another specific implementation manner, the user terminal is pre-configured with normal state information of the devices to be connected, and after the step of obtaining device information of all the devices to be connected within the communication range of the user terminal, as shown in FIG. 5 As shown, the method may further include the following steps.
步骤S113,所述用户终端向所述待连接设备发送第一测试指令,以使所述待连接设备根据所述第一测试指令生成测试结果信息。Step S113: The user terminal sends a first test instruction to the device to be connected, so that the device to be connected generates test result information according to the first test instruction.
如前所述,用户可以通过用户终端输入智能设备是否正常的指令,某些智能设备可以根据设备的动作情况确定该设备是否处于正常状态,而无需用户参与。这样的方式适用于用户已经将所有的希望控制的智能设备列为了待连接设备,或者用户终端周边没有存在用户不希望控制的智能设备。这样的测试流程,用户终端将从后台服务器接收到的测试指令中的至少一条发送至待连接设备,待连接设备根据接收到的测试指令进行对应的测试动作,并根据测试动作的结果向用户终端反馈测试结果。As mentioned above, the user can input an instruction on whether the smart device is normal through the user terminal, and some smart devices can determine whether the device is in a normal state according to the action of the device without user participation. This method is suitable for a user who has listed all the smart devices that he wants to control as the devices to be connected, or there are no smart devices that the user does not want to control around the user terminal. In such a test process, the user terminal sends at least one of the test instructions received from the background server to the device to be connected, and the device to be connected performs a corresponding test action according to the received test instruction, and sends the test action to the user terminal according to the result of the test action. Feedback test results.
步骤S114,所述用户终端接收所述测试结果信息,确定所述测试结果信息是否为所述正常状态信息。Step S114: The user terminal receives the test result information, and determines whether the test result information is the normal state information.
智能设备可以将该设备是否正确执行了第一测试结果的指令发送至用户终端,用户终端在接收到测试结果信息后,即可通过测试结果信息确定接收了第一测试指令的智能设备是否正确执行了第一测试指令。The smart device can send the instruction of whether the device has correctly executed the first test result to the user terminal. After receiving the test result information, the user terminal can determine whether the smart device that has received the first test instruction executes the test correctly through the test result information. The first test instruction.
步骤S115,所述用户终端将所述测试结果信息为所述正常状态信息的待连接设备,确定为所述目标设备。In step S115, the user terminal determines the test result information to be a device to be connected in the normal state information, and determines the target device as the target device.
对于正确执行了测试指令的待连接设备,表明该待连接设备通过了测试流程,其功能正常且是用户希望控制的设备,即可将这样的设备确定为目标设备。For a device to be connected that has correctly executed the test instruction, it indicates that the device to be connected has passed the test process, its function is normal and the device that the user wishes to control, and such a device can be determined as the target device.
在另一种具体实施方式中,所述用户终端预先配置有所述待连接设备的正常状态信息,在获取所述用户终端通信范围内的所有待连接设备的设备信息的步骤之后,该方法还包括以下步骤。In another specific implementation manner, the user terminal is pre-configured with normal status information of the devices to be connected, and after the step of obtaining device information of all the devices to be connected within the communication range of the user terminal, the method further Include the following steps.
步骤S116,所述用户终端向所述待连接设备发送第二测试指令,所述第二测试指令配置成使接收到该第二测试指令的待连接设备发送响应信息。In step S116, the user terminal sends a second test instruction to the device to be connected, and the second test instruction is configured to enable the device to be connected to receive the second test instruction to send response information.
某些智能设备在使用过程中,如果没有存在特定的激活条件,该智能设备是不能进行特定的工作的。例如,在智能门窗报警器中,该智能门窗报警器只有在安装位置的门窗被打开时才会进行报警。这样的情况,在进行测试时,是并不能进行是否能够正常进行报警的测试的。因此,对于这样的智能设备,智能进行是否能够进行数据通信的测试。因此,在本申请实施例中,用户终端可以向待连接设备发送第二测试指令,待连接设备如果功能正常可以根据该第二测试指令向用户终端反馈以响应信息。During the use of some smart devices, if there is no specific activation condition, the smart device cannot perform specific work. For example, in the smart door and window alarm, the smart door and window alarm will only alarm when the door and window in the installation position are opened. In such a case, it is impossible to test whether the alarm can be performed normally when the test is performed. Therefore, for such a smart device, a test of whether data communication can be performed is performed intelligently. Therefore, in the embodiment of the present application, the user terminal may send a second test instruction to the device to be connected, and if the function of the device to be connected is normal, the user terminal may feedback to the user terminal in response to the information according to the second test instruction.
步骤S117,所述用户终端确定是否接收到所述待连接设备的响应信息。Step S117: The user terminal determines whether response information of the device to be connected is received.
用户终端即可通过确定是否接收到了响应信息来确定待连接设备是否可以被确定为目标设备。The user terminal can determine whether the device to be connected can be determined as the target device by determining whether the response information is received.
步骤S118,当所述用户终端确定接收到所述待连接设备的响应信息,将该响应信息对应的待连接设备确定为所述目标设备。Step S118: When the user terminal determines that the response information of the device to be connected is received, determine the device to be connected corresponding to the response information as the target device.
用户终端如果接收到了待连接设备反馈的响应信息,表明该待连接设备的通信功能正常,用户终端即可将该待连接设备确定为目标设备。If the user terminal receives the response information fed back by the device to be connected, indicating that the communication function of the device to be connected is normal, the user terminal can determine the device to be connected as the target device.
所述用户终端将针对所述目标设备的控制指令,转发至所述目标分组中其他目标设备的步骤包括:The step of the user terminal forwarding control instructions for the target device to other target devices in the target group includes:
在上述实施例中,用户终端可以向多个目标设备发送控制指令,在用户终端与多个目标设备组成的系统中,用户终端作为系统的中心向其他目标设备发送控制指令。在实际使用过程中,所述目标分组中的所有目标设备还可以预先建立自组网通信连接,以使所述目标分组中的其中一个所述目标设备可将所述控制指令通过所述自组网通信连接发送至所述目标分组中的其他目标设备。通过这样的自组网通信连接,目标设备可以作为控制指令的转发者,用户终端仍然作为控制指令的最初生成端,但控制指令可以由一个目标设备发送至另一个目标设备。所述设备连接方法还包括以下步骤。In the above embodiment, the user terminal may send control instructions to multiple target devices. In a system composed of the user terminal and multiple target devices, the user terminal serves as the center of the system and sends control instructions to other target devices. In actual use, all target devices in the target group may also establish an ad hoc network communication connection in advance, so that one of the target devices in the target group may pass the control instruction through the self-group. The network communication connection is sent to other target devices in the target packet. Through such an ad hoc network communication connection, the target device can serve as a repeater of the control instruction, and the user terminal still serves as the original generating end of the control instruction, but the control instruction can be sent by one target device to another target device. The device connection method further includes the following steps.
步骤S118,所述目标设备接收到控制指令后,确定所述目标设备所在目标分组的组名和分组密码。Step S118: After receiving the control instruction, the target device determines a group name and a group password of a target group where the target device is located.
步骤S119,所述目标设备根据所述组名和分组密码,将所述控制指令发送至所述目标设备所在的目标分组中的其他目标设备。Step S119: The target device sends the control instruction to other target devices in the target group where the target device is located according to the group name and the group password.
通过将同一个目标分组内的所有目标设备配置相同的分组密码,目标设备可以通过预先配置的相同组名和分组密码建立各自之间的通信连接。例如,在一个目标分组中,包括设备A和设备B,用户终端针对设备A下发的控制指令可以再由设备A转发给设备B,从而无需用户终端再向设备B 发送控制指令,提供控制效率。By configuring all target devices in the same target group with the same group password, the target device can establish a communication connection between each other through the same group name and group password configured in advance. For example, in a target packet, including device A and device B, the control instructions issued by the user terminal for device A can be forwarded by device A to device B, so that the user terminal does not need to send control instructions to device B again, providing control efficiency .
综上所述,本申请实施例中的设备连接方法通过预先建立分组,并为分组分配密码,在使用用户终端建立智能设备的通信连接时,可以将用户终端通信范围内的多个智能设备分配进一个分组。就可以实现将分组的密码赋值给分组内的所有智能设备,无需对智能设备单独进行密码的配置。进而在使用用户终端对智能设备进行控制时,可以实现用户终端对分组内的一个智能设备控制,就能够控制分组内的所有智能设备的效果,提高控制效率,提升用户的使用体验。In summary, the device connection method in the embodiment of the present application can establish a group in advance and assign a password to the group. When a user terminal is used to establish a smart device communication connection, multiple smart devices within the communication range of the user terminal can be allocated. Into a group. The password of the group can be assigned to all the smart devices in the group, and there is no need to configure the password of the smart device separately. Furthermore, when the user terminal is used to control the smart device, the user terminal can control one smart device in the group, which can control the effect of all the smart devices in the group, improve the control efficiency, and improve the user experience.
如图6所示,本发明实施例还提供了一种设备连接装置110,应用于用户终端,所述用户终端预先建立至少一个分组,并为所述分组配置组名及对应的分组密码,所述设备连接装置包括:As shown in FIG. 6, an embodiment of the present invention further provides a device connection device 110, which is applied to a user terminal. The user terminal establishes at least one group in advance, and configures a group name and a corresponding group password for the group. The device connection device includes:
设备搜索模块1101,配置成获取所述用户终端通信范围内的所有待连接设备的设备信息;A device search module 1101 configured to obtain device information of all devices to be connected within a communication range of the user terminal;
分配模块1102,配置成将所有待连接设备中的至少一个目标设备分配至目标分组中;An allocation module 1102, configured to allocate at least one target device among all devices to be connected to a target group;
赋值模块1103,配置成根据所述目标分组对应的组名和分组密码更新所述目标设备的设备信息;An assignment module 1103 configured to update device information of the target device according to a group name and a group password corresponding to the target group;
通信模块1104,配置成根据所述目标分组的分组密码,建立与所述目标分组中至少一个目标设备的通信连接;A communication module 1104 configured to establish a communication connection with at least one target device in the target group according to a block password of the target group;
控制模块1105,配置成所述用户终端将针对所述目标设备的控制指令,转发至所述目标分组中其他目标设备。The control module 1105 is configured so that the user terminal forwards control instructions for the target device to other target devices in the target packet.
进一步地,所述用户终端预先建立与后台服务器的通信连接,所述后台服务器预先配置有所有待连接设备的设备信息及对应的测试指令集,所述测试指令集中包括多个测试指令;在所述用户终端将所有待连接设备中的至少一个目标设备分配至目标分组中之前,所述通信模块还被配置成:Further, the user terminal establishes a communication connection with a background server in advance, and the background server is pre-configured with device information and corresponding test instruction sets of all devices to be connected, and the test instruction set includes multiple test instructions; Before the user terminal allocates at least one target device among all the devices to be connected to the target group, the communication module is further configured to:
建立与后台服务器的通信连接;Establish a communication connection with a background server;
将所述设备信息发送至所述后台服务器,以使所述后台服务器根据所述设备信息确定对应的测试指令集;Sending the device information to the background server, so that the background server determines a corresponding test instruction set according to the device information;
接收所述测试指令集中的至少一个测试指令。Receiving at least one test instruction in the test instruction set.
进一步地,在获取所述用户终端通信范围内的所有待连接设备的设备信息的步骤之后,所述通信模块还被配置成:Further, after the step of acquiring device information of all devices to be connected within a communication range of the user terminal, the communication module is further configured to:
向所述待连接设备发送测试指令,以使所述待连接设备根据所述测试指令进行测试动作;Sending a test instruction to the device to be connected, so that the device to be connected performs a test action according to the test instruction;
所述设备连接装置还包括接口生成模块和输入模块,所述接口生成模块配置成根据所述测试指令,生成测试接口;The device connection device further includes an interface generation module and an input module, and the interface generation module is configured to generate a test interface according to the test instruction;
所述输入模块配置成通过所述接口接收外部输入的输入指令;The input module is configured to receive an externally inputted input instruction through the interface;
所述赋值模块配置成当所述输入指令为确定所述测试动作正常的指令时,将所述待连接设备确定为所述目标设备。The assignment module is configured to determine the device to be connected as the target device when the input instruction is an instruction that determines that the test action is normal.
进一步地,所述通信模块还被配置成:Further, the communication module is further configured to:
向所述待连接设备发送第一测试指令,以使所述待连接设备根据所述第一测试指令生成测试结果信息;Sending a first test instruction to the device to be connected, so that the device to be connected generates test result information according to the first test instruction;
接收所述测试结果信息,确定所述测试结果信息是否为所述正常状态信息;Receiving the test result information, and determining whether the test result information is the normal state information;
将所述测试结果信息为所述正常状态信息的待连接设备,确定为所述目标设备。The device to be connected with the test result information being the normal state information is determined as the target device.
进一步地,所述用户终端预先配置有所述待连接设备的正常状态信息,在获取所述用户终端通信范围内的所有待连接设备的设备信息的步骤之后,所述通信模块还被配置成:Further, the user terminal is pre-configured with normal state information of the devices to be connected, and after the step of obtaining device information of all the devices to be connected within the communication range of the user terminal, the communication module is further configured to:
向所述待连接设备发送第二测试指令,所述第二测试指令配置成使接收到该第二测试指令的待连接设备发送响应信息;Sending a second test instruction to the device to be connected, where the second test instruction is configured to cause the device to be connected to receive the second test instruction to send response information;
所述控制模块配置成确定是否接收到所述待连接设备的响应信息;当所述用户终端确定接收到所述待连接设备的响应信息,将该响应信息对应的待连接设备确定为所述目标设备。The control module is configured to determine whether response information of the device to be connected is received; when the user terminal determines that the response information of the device to be connected is received, determine the device to be connected corresponding to the response information as the target device.
进一步地,所述控制模块将针对所述目标设备的控制指令,转发至所述目标分组中其他目标设备的方法包括:Further, the method in which the control module forwards control instructions for the target device to other target devices in the target packet includes:
所述用户终端向所述目标设备发送控制指令;The user terminal sends a control instruction to the target device;
所述用户终端根据所述目标设备的设备信息,确定所述目标设备对应的目标分组;Determining, by the user terminal, a target group corresponding to the target device according to the device information of the target device;
所述用户终端确定所述目标分组中包含的所有目标设备的设备信息;Determining, by the user terminal, device information of all target devices included in the target group;
所述用户终端将所述控制指令发送至所述目标分组中所有的目标设备。The user terminal sends the control instruction to all target devices in the target packet.
进一步地,所述目标分组中的所有目标设备预先建立自组网通信连接,以使所述目标分组中的其中一个所述目标设备可将所述控制指令通过所述自组网通信连接发送至所述目标分组中的其他目标设备,所述目标设备还包括:Further, all target devices in the target group establish an ad hoc network communication connection in advance, so that one of the target devices in the target group can send the control instruction to the ad hoc network communication connection to Other target devices in the target group, the target devices further include:
指令确定模块,配置成接收到控制指令后,确定所述目标设备所在目标分组的组名和分组密码;An instruction determination module configured to determine a group name and a group password of a target group where the target device is located after receiving the control instruction;
转发模块,配置成根据所述组名和分组密码,将所述控制指令发送至所述目标设备所在的目标分组中的其他目标设备。The forwarding module is configured to send the control instruction to other target devices in a target group where the target device is located according to the group name and the group password.
本发明实施例还提供了一种电子设备,所述电子设备包括存储器和处理器,所述存储器用于存储有可执行程序代码,所述处理器用于读取所述存储器中存储的可执行程序代码以使得所述电子设备执行上述设备连接方法。本发明实施例还提供了一种可读存储介质,所述可读存储介质包括计算机程序,所述计算机程序运行时控制所述可读存储介质所在电子设备执行上述设备连接方法。An embodiment of the present invention further provides an electronic device. The electronic device includes a memory and a processor. The memory is used to store executable program code, and the processor is used to read the executable program stored in the memory. Code to cause the electronic device to perform the device connection method described above. An embodiment of the present invention further provides a readable storage medium, where the readable storage medium includes a computer program, and when the computer program runs, controls an electronic device where the readable storage medium is located to perform the foregoing device connection method.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,也可以通过其它的方式实现。以上所描述的装置实施例仅仅是示意性的,例如,附图中的流程图和框图显示了根据本公开的多个实施例的装置、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或代码的一部分,所述模块、程序段或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现方式中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may also be implemented in other ways. The device embodiments described above are only schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the architecture, functions, and functions of devices, methods, and computer program products according to various embodiments of the present disclosure. operating. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code, which contains one or more components for implementing a specified logical function Executable instructions. It should also be noted that in some alternative implementations, the functions marked in the blocks may also occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented in a dedicated hardware-based system that performs the specified function or action. , Or it can be implemented with a combination of dedicated hardware and computer instructions.
另外,在本公开各个实施例中的各功能模块可以集成在一起形成一个独立的部分,也可以是各 个模块单独存在,也可以两个或两个以上模块集成形成一个独立的部分。In addition, the functional modules in the various embodiments of the present disclosure may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
所述功能如果以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本公开的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本公开各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present disclosure is essentially a part that contributes to the existing technology or a part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in various embodiments of the present disclosure. The foregoing storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disks or optical disks and other media that can store program codes . It should be noted that in this article, relational terms such as first and second are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that these entities or operations There is any such actual relationship or order among them. Moreover, the terms "including", "comprising", or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or device that includes a series of elements includes not only those elements but also those that are not explicitly listed Or other elements inherent to such a process, method, article, or device. Without more restrictions, the elements defined by the sentence "including a ..." do not exclude the existence of other identical elements in the process, method, article, or equipment that includes the elements.
以上所述仅为本公开的优选实施例而已,并不用于限制本公开,对于本领域的技术人员来说,本公开可以有各种更改和变化。凡在本公开的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本公开的保护范围之内。应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步定义和解释。The above are only preferred embodiments of the present disclosure, and are not intended to limit the present disclosure. For those skilled in the art, the present disclosure may have various modifications and changes. Any modification, equivalent replacement, or improvement made within the spirit and principle of this disclosure shall be included in the protection scope of this disclosure. It should be noted that similar reference numerals and letters indicate similar items in the following drawings, so once an item is defined in one drawing, it need not be further defined and explained in subsequent drawings.
以上所述,仅为本公开的具体实施方式,但本公开的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本公开揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本公开的保护范围之内。因此,本公开的保护范围应以权利要求的保护范围为准。The above are only specific implementations of the present disclosure, but the scope of protection of the present disclosure is not limited to this. Any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in this disclosure. It should be covered by the protection scope of this disclosure. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.
工业实用性Industrial applicability
本公开提供了一种设备连接方法、装置、电子设备及可读存储介质。可以实现用户终端对分组内的一个智能设备控制,就能够控制分组内的所有智能设备的效果,提高控制效率,提升用户的使用体验。The present disclosure provides a device connection method, device, electronic device, and readable storage medium. It can implement the control of a smart device in a group by a user terminal, which can control the effect of all smart devices in a group, improve the control efficiency, and improve the user experience.

Claims (16)

  1. 一种设备连接方法,其特征在于,应用于用户终端,所述用户终端预先建立至少一个分组,并为所述分组配置组名及对应的分组密码,所述设备连接方法包括:A device connection method, which is characterized in that it is applied to a user terminal. The user terminal establishes at least one group in advance, and configures a group name and a corresponding group password for the group. The device connection method includes:
    所述用户终端获取所述用户终端通信范围内的所有待连接设备的设备信息;Acquiring, by the user terminal, device information of all devices to be connected within a communication range of the user terminal;
    所述用户终端将所有待连接设备中的至少一个目标设备分配至目标分组中;The user terminal assigns at least one target device among all devices to be connected to a target group;
    所述用户终端根据所述目标分组对应的组名和分组密码更新所述目标设备的设备信息;Updating, by the user terminal, device information of the target device according to a group name and a group password corresponding to the target group;
    所述用户终端根据所述目标分组的分组密码,建立与所述目标分组中至少一个目标设备的通信连接;Establishing, by the user terminal, a communication connection with at least one target device in the target group according to the group password of the target group;
    所述用户终端将针对所述目标设备的控制指令,转发至所述目标分组中其他目标设备。The user terminal forwards the control instruction for the target device to other target devices in the target packet.
  2. 根据权利要求1所述的设备连接方法,其特征在于,所述用户终端预先建立与后台服务器的通信连接,所述后台服务器预先配置有所有待连接设备的设备信息及对应的测试指令集,所述测试指令集中包括多个测试指令;在所述用户终端将所有待连接设备中的至少一个目标设备分配至目标分组中的步骤之前,该方法还包括:The device connection method according to claim 1, wherein the user terminal establishes a communication connection with a background server in advance, and the background server is pre-configured with device information and corresponding test instruction sets of all devices to be connected, so that The test instruction set includes a plurality of test instructions; before the step of the user terminal assigning at least one target device among all devices to be connected to a target group, the method further includes:
    所述用户终端建立与后台服务器的通信连接;The user terminal establishes a communication connection with a background server;
    所述用户终端将所述设备信息发送至所述后台服务器,以使所述后台服务器根据所述设备信息确定对应的测试指令集;Sending, by the user terminal, the device information to the background server, so that the background server determines a corresponding test instruction set according to the device information;
    所述用户终端接收所述测试指令集中的至少一个测试指令。The user terminal receives at least one test instruction in the test instruction set.
  3. 根据权利要求1所述的设备连接方法,其特征在于,在获取所述用户终端通信范围内的所有待连接设备的设备信息的步骤之后,该方法还包括:The device connection method according to claim 1, wherein after the step of acquiring device information of all devices to be connected within a communication range of the user terminal, the method further comprises:
    所述用户终端向所述待连接设备发送测试指令,以使所述待连接设备根据所述测试指令进行测试动作;Sending, by the user terminal, a test instruction to the device to be connected, so that the device to be connected performs a test action according to the test instruction;
    所述用户终端根据所述测试指令,生成测试接口;Generating, by the user terminal, a test interface according to the test instruction;
    所述用户终端通过所述接口接收外部输入的输入指令;Receiving, by the user terminal, an input instruction externally input through the interface;
    当所述输入指令为确定所述测试动作正常的指令时,将所述待连接设备确定为所述目标设备。When the input instruction is an instruction that determines that the test action is normal, the device to be connected is determined as the target device.
  4. 根据权利要求1所述的设备连接方法,其特征在于,所述用户终端预先配置有所述待连接设备的正常状态信息,在获取所述用户终端通信范围内的所有待连接设备的设备信息的步骤之后,该方法还包括:The device connection method according to claim 1, wherein the user terminal is pre-configured with normal state information of the device to be connected, and the device information of all the devices to be connected within the communication range of the user terminal is acquired. After the steps, the method further includes:
    所述用户终端向所述待连接设备发送第一测试指令,以使所述待连接设备根据所述第一测试指令生成测试结果信息;Sending, by the user terminal, a first test instruction to the device to be connected, so that the device to be connected generates test result information according to the first test instruction;
    所述用户终端接收所述测试结果信息,确定所述测试结果信息是否为所述正常状态信息;Receiving, by the user terminal, the test result information, and determining whether the test result information is the normal state information;
    所述用户终端将所述测试结果信息为所述正常状态信息的待连接设备,确定为所述目标设 备。The user terminal determines that the test result information is the device to be connected in the normal state information, and determines the target device as the target device.
  5. 根据权利要求1所述的设备连接方法,其特征在于,所述用户终端预先配置有所述待连接设备的正常状态信息,在获取所述用户终端通信范围内的所有待连接设备的设备信息的步骤之后,该方法还包括:The device connection method according to claim 1, wherein the user terminal is pre-configured with normal state information of the device to be connected, and the device information of all the devices to be connected within the communication range of the user terminal is acquired. After the steps, the method further includes:
    所述用户终端向所述待连接设备发送第二测试指令,所述第二测试指令配置成使接收到该第二测试指令的待连接设备发送响应信息;Sending, by the user terminal, a second test instruction to the device to be connected, where the second test instruction is configured to enable the device to be connected to receive the second test instruction to send response information;
    所述用户终端确定是否接收到所述待连接设备的响应信息;Determining, by the user terminal, whether response information of the device to be connected is received;
    当所述用户终端确定接收到所述待连接设备的响应信息,将该响应信息对应的待连接设备确定为所述目标设备。When the user terminal determines that the response information of the device to be connected is received, the device to be connected corresponding to the response information is determined as the target device.
  6. 根据权利要求1至5任意一项所述的设备连接方法,其特征在于,所述用户终端将针对所述目标设备的控制指令,转发至所述目标分组中其他目标设备的步骤包括:The device connection method according to any one of claims 1 to 5, wherein the step of the user terminal forwarding control instructions for the target device to other target devices in the target group includes:
    所述用户终端向所述目标设备发送控制指令;The user terminal sends a control instruction to the target device;
    所述用户终端根据所述目标设备的设备信息,确定所述目标设备对应的目标分组;Determining, by the user terminal, a target group corresponding to the target device according to the device information of the target device;
    所述用户终端确定所述目标分组中包含的所有目标设备的设备信息;Determining, by the user terminal, device information of all target devices included in the target group;
    所述用户终端将所述控制指令发送至所述目标分组中所有的目标设备。The user terminal sends the control instruction to all target devices in the target packet.
  7. 根据权利要求1至5任意一项所述的设备连接方法,其特征在于,所述目标分组中的所有目标设备预先建立自组网通信连接,以使所述目标分组中的其中一个所述目标设备可将所述控制指令通过所述自组网通信连接发送至所述目标分组中的其他目标设备,所述设备连接方法还包括:The device connection method according to any one of claims 1 to 5, wherein all target devices in the target group establish an ad hoc network communication connection in advance, so that one of the targets in the target group The device may send the control instruction to other target devices in the target packet through the ad hoc network communication connection, and the device connection method further includes:
    所述目标设备接收到控制指令后,确定所述目标设备所在目标分组的组名和分组密码;After receiving the control instruction, the target device determines a group name and a group password of a target group in which the target device is located;
    所述目标设备根据所述组名和分组密码,将所述控制指令发送至所述目标设备所在的目标分组中的其他目标设备。The target device sends the control instruction to other target devices in a target group where the target device is located according to the group name and the group password.
  8. 一种设备连接装置,其特征在于,应用于用户终端,所述用户终端预先建立至少一个分组,并为所述分组配置组名及对应的分组密码,所述设备连接装置包括:A device connection device, which is characterized in that it is applied to a user terminal. The user terminal establishes at least one group in advance, and configures a group name and a corresponding group password for the group. The device connection device includes:
    设备搜索模块,配置成获取所述用户终端通信范围内的所有待连接设备的设备信息;A device search module configured to obtain device information of all devices to be connected within a communication range of the user terminal;
    分配模块,配置成将所有待连接设备中的至少一个目标设备分配至目标分组中;An allocation module configured to allocate at least one target device among all the devices to be connected to a target group;
    赋值模块,配置成根据所述目标分组对应的组名和分组密码更新所述目标设备的设备信息;An assignment module configured to update device information of the target device according to a group name and a group password corresponding to the target group;
    通信模块,配置成根据所述目标分组的分组密码,建立与所述目标分组中至少一个目标设备的通信连接;A communication module configured to establish a communication connection with at least one target device in the target group according to a block password of the target group;
    控制模块,配置成所述用户终端将针对所述目标设备的控制指令,转发至所述目标分组中其他目标设备。The control module is configured so that the user terminal forwards control instructions for the target device to other target devices in the target packet.
  9. 根据权利要求8所述的设备连接装置,其特征在于,所述用户终端预先建立与后台服务器的通信连接,所述后台服务器预先配置有所有待连接设备的设备信息及对应的测试指令集,所述测试指令集中包括多个测试指令;在所述用户终端将所有待连接设备中的至少一个目标设备分配至目标分组中之前,所述通信模块还被配置成:The device connection device according to claim 8, wherein the user terminal establishes a communication connection with a background server in advance, and the background server is pre-configured with device information of all devices to be connected and corresponding test instruction sets, The test instruction set includes a plurality of test instructions; before the user terminal allocates at least one target device among all the devices to be connected to a target group, the communication module is further configured to:
    建立与后台服务器的通信连接;Establish a communication connection with a background server;
    将所述设备信息发送至所述后台服务器,以使所述后台服务器根据所述设备信息确定对应的测试指令集;Sending the device information to the background server, so that the background server determines a corresponding test instruction set according to the device information;
    接收所述测试指令集中的至少一个测试指令。Receiving at least one test instruction in the test instruction set.
  10. 根据权利要求8所述的设备连接装置,其特征在于,在获取所述用户终端通信范围内的所有待连接设备的设备信息的步骤之后,所述通信模块还被配置成:The device connection device according to claim 8, wherein after the step of acquiring device information of all devices to be connected within a communication range of the user terminal, the communication module is further configured to:
    向所述待连接设备发送测试指令,以使所述待连接设备根据所述测试指令进行测试动作;Sending a test instruction to the device to be connected, so that the device to be connected performs a test action according to the test instruction;
    所述设备连接装置还包括接口生成模块和输入模块,所述接口生成模块配置成根据所述测试指令,生成测试接口;The device connection device further includes an interface generation module and an input module, and the interface generation module is configured to generate a test interface according to the test instruction;
    所述输入模块配置成通过所述接口接收外部输入的输入指令;The input module is configured to receive an externally inputted input instruction through the interface;
    所述赋值模块配置成当所述输入指令为确定所述测试动作正常的指令时,将所述待连接设备确定为所述目标设备。The assignment module is configured to determine the device to be connected as the target device when the input instruction is an instruction that determines that the test action is normal.
  11. 根据权利要求8所述的设备连接装置,其特征在于,所述用户终端预先配置有所述待连接设备的正常状态信息,所述通信模块还被配置成:The device connection device according to claim 8, wherein the user terminal is pre-configured with normal state information of the device to be connected, and the communication module is further configured to:
    向所述待连接设备发送第一测试指令,以使所述待连接设备根据所述第一测试指令生成测试结果信息;Sending a first test instruction to the device to be connected, so that the device to be connected generates test result information according to the first test instruction;
    接收所述测试结果信息,确定所述测试结果信息是否为所述正常状态信息;Receiving the test result information, and determining whether the test result information is the normal state information;
    将所述测试结果信息为所述正常状态信息的待连接设备,确定为所述目标设备。The device to be connected with the test result information being the normal state information is determined as the target device.
  12. 根据权利要求8所述的设备连接装置,其特征在于,所述用户终端预先配置有所述待连接设备的正常状态信息,在获取所述用户终端通信范围内的所有待连接设备的设备信息的步骤之后,所述通信模块还被配置成:The device connection device according to claim 8, wherein the user terminal is pre-configured with normal state information of the device to be connected, and the device information of all the devices to be connected within the communication range of the user terminal is acquired. After the steps, the communication module is further configured to:
    向所述待连接设备发送第二测试指令,所述第二测试指令配置成使接收到该第二测试指令的待连接设备发送响应信息;Sending a second test instruction to the device to be connected, where the second test instruction is configured to cause the device to be connected to receive the second test instruction to send response information;
    所述控制模块配置成确定是否接收到所述待连接设备的响应信息;当所述用户终端确定接收到所述待连接设备的响应信息,将该响应信息对应的待连接设备确定为所述目标设备。The control module is configured to determine whether response information of the device to be connected is received; when the user terminal determines that the response information of the device to be connected is received, determine the device to be connected corresponding to the response information as the target device.
  13. 根据权利要求8至12任意一项所述的设备连接装置,其特征在于,所述控制模块将针对所述目标设备的控制指令,转发至所述目标分组中其他目标设备的方法包括:The device connection device according to any one of claims 8 to 12, wherein the method for the control module to forward control instructions for the target device to other target devices in the target group includes:
    所述用户终端向所述目标设备发送控制指令;The user terminal sends a control instruction to the target device;
    所述用户终端根据所述目标设备的设备信息,确定所述目标设备对应的目标分组;Determining, by the user terminal, a target group corresponding to the target device according to the device information of the target device;
    所述用户终端确定所述目标分组中包含的所有目标设备的设备信息;Determining, by the user terminal, device information of all target devices included in the target group;
    所述用户终端将所述控制指令发送至所述目标分组中所有的目标设备。The user terminal sends the control instruction to all target devices in the target packet.
  14. 根据权利要求8至12任意一项所述的设备连接装置,其特征在于,所述目标分组中的所有目标设备预先建立自组网通信连接,以使所述目标分组中的其中一个所述目标设备可将所述控制指令通过所述自组网通信连接发送至所述目标分组中的其他目标设备,所述目标设备还包括:The device connection device according to any one of claims 8 to 12, wherein all target devices in the target group establish an ad hoc network communication connection in advance, so that one of the targets in the target group The device may send the control instruction to other target devices in the target packet through the ad hoc network communication connection, and the target device further includes:
    指令确定模块,配置成接收到控制指令后,确定所述目标设备所在目标分组的组名和分组密码;An instruction determination module configured to determine a group name and a group password of a target group where the target device is located after receiving the control instruction;
    转发模块,配置成根据所述组名和分组密码,将所述控制指令发送至所述目标设备所在的目标分组中的其他目标设备。The forwarding module is configured to send the control instruction to other target devices in a target group where the target device is located according to the group name and the group password.
  15. 一种电子设备,其特征在于,所述电子设备包括存储器和处理器,所述存储器用于存储有可执行程序代码,所述处理器用于读取所述存储器中存储的可执行程序代码以使得所述电子设备执行权利要求1-7任一项所述方法。An electronic device, wherein the electronic device includes a memory and a processor, where the memory is used to store executable program code, and the processor is used to read the executable program code stored in the memory so that The electronic device performs the method according to any one of claims 1-7.
  16. 一种可读存储介质,所述可读存储介质包括计算机程序,其特征在于:所述计算机程序运行时控制所述可读存储介质所在电子设备执行权利要求1-7中任意一项所述的设备连接方法。A readable storage medium includes a computer program, and is characterized in that: when the computer program runs, the electronic device in which the readable storage medium is located executes any one of claims 1-7. Device connection method.
PCT/CN2018/089170 2018-05-31 2018-05-31 Device connection method and apparatus, electronic device, and readable storage medium WO2019227371A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2018/089170 WO2019227371A1 (en) 2018-05-31 2018-05-31 Device connection method and apparatus, electronic device, and readable storage medium
CN201880000626.9A CN108781174B (en) 2018-05-31 2018-05-31 Device connection method and device, electronic device and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/089170 WO2019227371A1 (en) 2018-05-31 2018-05-31 Device connection method and apparatus, electronic device, and readable storage medium

Publications (1)

Publication Number Publication Date
WO2019227371A1 true WO2019227371A1 (en) 2019-12-05

Family

ID=64029083

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/089170 WO2019227371A1 (en) 2018-05-31 2018-05-31 Device connection method and apparatus, electronic device, and readable storage medium

Country Status (2)

Country Link
CN (1) CN108781174B (en)
WO (1) WO2019227371A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111860560A (en) * 2019-12-31 2020-10-30 北京骑胜科技有限公司 Model parameter adjusting method and device, electronic equipment and readable storage medium
CN112327640A (en) * 2020-08-28 2021-02-05 深圳Tcl新技术有限公司 Single-product equipment control method, device and equipment based on two-dimensional code and storage medium
CN112565348A (en) * 2020-11-17 2021-03-26 华帝股份有限公司 Intelligent equipment testing method and system, computer equipment and storage medium
CN114167739A (en) * 2021-11-29 2022-03-11 珠海格力电器股份有限公司 Equipment control method, system and device and electronic equipment

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110380926A (en) * 2019-07-01 2019-10-25 珠海格力电器股份有限公司 Network automatic test approach, terminal and the computer-readable medium of networked devices
CN111176130B (en) * 2020-01-07 2022-05-24 华为技术有限公司 Equipment control method, equipment control method and equipment control system
CN112788570A (en) * 2020-12-31 2021-05-11 广州技象科技有限公司 Internet of things equipment management method and device
CN115376229B (en) * 2022-08-26 2023-11-07 广东好太太智能家居有限公司 Intelligent lock binding method and device, storage medium and computer equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105807617A (en) * 2014-12-30 2016-07-27 西安Tcl软件开发有限公司 Control method and control device for intelligent household devices
CN105979002A (en) * 2016-06-29 2016-09-28 联想(北京)有限公司 Information processing method and electronic equipment
WO2017172152A1 (en) * 2016-03-31 2017-10-05 Intel Corporation Registration of devices in secure domain
CN107566229A (en) * 2017-08-25 2018-01-09 西安电子科技大学 The packet control process of intelligent domestic system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105093942A (en) * 2014-10-26 2015-11-25 深圳市艾瑟网络技术有限公司 Intelligent household system and group control method based on the intelligent household system
CN105791032B (en) * 2016-05-04 2018-12-07 珠海格力电器股份有限公司 The test method and device of transport protocol between intelligent appliance and mobile terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105807617A (en) * 2014-12-30 2016-07-27 西安Tcl软件开发有限公司 Control method and control device for intelligent household devices
WO2017172152A1 (en) * 2016-03-31 2017-10-05 Intel Corporation Registration of devices in secure domain
CN105979002A (en) * 2016-06-29 2016-09-28 联想(北京)有限公司 Information processing method and electronic equipment
CN107566229A (en) * 2017-08-25 2018-01-09 西安电子科技大学 The packet control process of intelligent domestic system

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111860560A (en) * 2019-12-31 2020-10-30 北京骑胜科技有限公司 Model parameter adjusting method and device, electronic equipment and readable storage medium
CN111860560B (en) * 2019-12-31 2023-12-08 北京骑胜科技有限公司 Model parameter adjustment method and device, electronic equipment and readable storage medium
CN112327640A (en) * 2020-08-28 2021-02-05 深圳Tcl新技术有限公司 Single-product equipment control method, device and equipment based on two-dimensional code and storage medium
CN112565348A (en) * 2020-11-17 2021-03-26 华帝股份有限公司 Intelligent equipment testing method and system, computer equipment and storage medium
CN114167739A (en) * 2021-11-29 2022-03-11 珠海格力电器股份有限公司 Equipment control method, system and device and electronic equipment
CN114167739B (en) * 2021-11-29 2023-12-08 珠海格力电器股份有限公司 Equipment control method, system and device and electronic equipment

Also Published As

Publication number Publication date
CN108781174A (en) 2018-11-09
CN108781174B (en) 2021-09-17

Similar Documents

Publication Publication Date Title
WO2019227371A1 (en) Device connection method and apparatus, electronic device, and readable storage medium
KR102305360B1 (en) Standalone wireless lighting application
US10743390B2 (en) Out-of-the-box commissioning of a control system
WO2019227386A1 (en) Smart button configuration method and smart button
US10285247B2 (en) Control installation for a lighting system and method for configuring and putting into service said control installation
JP6479007B2 (en) Commissioning the Zigbee® Light Link network
JP6839103B2 (en) How to set up the equipment in the lighting system
KR20240024315A (en) Control and/or registration of smart devices, locally by an assistant client device
CN111176130A (en) Equipment control method, equipment control method and equipment control system
US20210297483A1 (en) Discovery and configuration of iot devices
US20210367838A1 (en) System and method for distributed home automation control
WO2019227379A1 (en) Network connection method and apparatus, and readable storage medium
JP7405753B2 (en) Commissioning method and apparatus with controlled participation mode
US10939532B2 (en) Secure commissioning of wireless enabled lighting devices
US20210235566A1 (en) System, method and devices for implementing a factory reset of a luminaire
US20210212187A1 (en) A system for configuring a lighting device
EP3384633B1 (en) Installation of building automation devices
AU2019208160A1 (en) A system for configuring a control device of a mesh network of connected devices
Krammer et al. Easy provisioning of building automation systems using visual light communication

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18920753

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18920753

Country of ref document: EP

Kind code of ref document: A1