[go: up one dir, main page]

CN108923988B - Equipment grouping method and device - Google Patents

Equipment grouping method and device Download PDF

Info

Publication number
CN108923988B
CN108923988B CN201810857768.9A CN201810857768A CN108923988B CN 108923988 B CN108923988 B CN 108923988B CN 201810857768 A CN201810857768 A CN 201810857768A CN 108923988 B CN108923988 B CN 108923988B
Authority
CN
China
Prior art keywords
grouping
mesh
mesh device
timing
request
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.)
Active
Application number
CN201810857768.9A
Other languages
Chinese (zh)
Other versions
CN108923988A (en
Inventor
陈海员
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Qingdao Yilai Intelligent Technology Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
Qingdao Yeelink Information 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 Beijing Xiaomi Mobile Software Co Ltd, Qingdao Yeelink Information Technology Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201810857768.9A priority Critical patent/CN108923988B/en
Publication of CN108923988A publication Critical patent/CN108923988A/en
Application granted granted Critical
Publication of CN108923988B publication Critical patent/CN108923988B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0893Assignment of logical groups to network elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/06Selective distribution of broadcast services, e.g. multimedia broadcast multicast service [MBMS]; Services to user groups; One-way selective calling services
    • H04W4/08User group management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • 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
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本公开是关于设备分组方法及装置。该方法包括:检测到将mesh设备划分到mesh设备组的分组指令时,向mesh设备发送分组请求,并启动分组计时器进行计时,其中分组请求中包括mesh设备组的组标识符;在未接收到mesh设备发送的分组响应、且分组计时器的计时到达第一预设时长时,执行与mesh设备对应的分组操作,分组操作用于针对发生可恢复的故障的mesh设备进行分组。该技术方案能够实现将发生可恢复的故障的mesh设备进行成功分组,克服相关技术中由于对无应答的mesh设备均不进行分组而造成分组成功率较低的问题,提高mesh设备的分组成功率,提高设备管理效率。

Figure 201810857768

The present disclosure relates to a device grouping method and device. The method includes: when detecting a grouping instruction for dividing the mesh device into a mesh device group, sending a grouping request to the mesh device, and starting a grouping timer for timing, wherein the grouping request includes a group identifier of the mesh device group; When the grouping response sent by the mesh device is received and the timing of the grouping timer reaches the first preset duration, a grouping operation corresponding to the mesh device is performed, and the grouping operation is used for grouping mesh devices with recoverable faults. The technical solution can realize the successful grouping of mesh devices with recoverable faults, overcome the problem of low grouping efficiency caused by not grouping non-responsive mesh devices in related technologies, and improve the grouping efficiency of mesh devices , Improve equipment management efficiency.

Figure 201810857768

Description

设备分组方法及装置Equipment grouping method and device

技术领域technical field

本公开涉及通信技术领域,尤其涉及设备分组方法及装置。The present disclosure relates to the field of communication technologies, and in particular to a device grouping method and device.

背景技术Background technique

蓝牙技术支持网状(mesh)网络结构,蓝牙mesh网络可以提供设备间多对多的蓝牙通信能力,可以实现将mesh设备组成一个大的网络,方便的实现统一控制和同步控制,提高构建大范围网络覆盖的通信能力。蓝牙mesh网络可以包含数十台、数百甚至数千台mesh设备,这些mesh设备之间可以相互进行信息传递。Bluetooth technology supports a mesh network structure. The Bluetooth mesh network can provide many-to-many Bluetooth communication capabilities between devices. It can realize the formation of mesh devices into a large network, conveniently realize unified control and synchronous control, and improve the construction of large-scale Communication capabilities covered by the network. A Bluetooth mesh network can contain dozens, hundreds, or even thousands of mesh devices, and these mesh devices can transmit information to each other.

相关技术中,可以对蓝牙mesh网络中的mesh设备进行分组管理,以方便用户操作和管理。In related technologies, the mesh devices in the Bluetooth mesh network can be grouped and managed to facilitate user operation and management.

发明内容Contents of the invention

为克服相关技术中存在的问题,本公开实施例提供一种设备分组方法及装置。所述技术方案如下:In order to overcome the problems existing in the related technologies, the embodiments of the present disclosure provide a device grouping method and device. Described technical scheme is as follows:

根据本公开实施例的第一方面,提供一种设备分组方法,包括:According to a first aspect of an embodiment of the present disclosure, a device grouping method is provided, including:

检测到将mesh设备划分到mesh设备组的分组指令时,向所述mesh设备发送分组请求,并启动分组计时器进行计时,其中所述分组请求中包括所述mesh设备组的组标识符;When a grouping instruction for dividing a mesh device into a mesh device group is detected, a grouping request is sent to the mesh device, and a grouping timer is started for timing, wherein the grouping request includes a group identifier of the mesh device group;

在未接收到所述mesh设备发送的分组响应、且所述分组计时器的计时到达第一预设时长时,执行与所述mesh设备对应的分组操作,所述分组操作用于针对发生可恢复的故障的mesh设备进行分组。When the grouping response sent by the mesh device is not received and the timing of the grouping timer reaches a first preset duration, perform a grouping operation corresponding to the mesh device, and the grouping operation is used for resumable response to occurrence Faulty mesh devices are grouped together.

在一个实施例中,所述分组操作包括:向所述mesh设备间隔性地重发所述分组请求,直到接收到所述mesh设备发送的分组响应、或直到重发次数到达预设重发次数。In one embodiment, the grouping operation includes: periodically resending the grouping request to the mesh device until a grouping response sent by the mesh device is received, or until the number of retransmissions reaches a preset number of retransmissions .

在一个实施例中,所述分组操作还包括:In one embodiment, the grouping operation also includes:

当重发次数到达预设重发次数、且未接收到所述mesh设备发送的分组响应时,启动定时查询计时器,在所述定时查询计时器的计时到达第二预设时长时,向所述mesh设备发送所述分组请求;When the number of retransmissions reaches the preset number of retransmissions and the packet response sent by the mesh device is not received, the timing query timer is started, and when the timing of the timing query timer reaches the second preset duration, the The mesh device sends the grouping request;

重复执行上述步骤,直到接收到所述mesh设备发送的分组响应、或直到查询次数到达预设查询次数。The above steps are repeatedly executed until the packet response sent by the mesh device is received, or until the number of queries reaches the preset number of queries.

在一个实施例中,所述分组操作包括:In one embodiment, the grouping operation includes:

启动定时查询计时器,在所述定时查询计时器的计时到达第二预设时长时,向所述mesh设备发送所述分组请求;Start a timing query timer, and send the grouping request to the mesh device when the timing of the timing query timer reaches a second preset duration;

重复执行上述步骤,直到接收到所述mesh设备发送的分组响应、或直到查询次数到达预设查询次数。The above steps are repeatedly executed until the packet response sent by the mesh device is received, or until the number of queries reaches the preset number of queries.

在一个实施例中,所述可恢复的故障至少包括以下任一种故障类型或组合:In one embodiment, the recoverable faults include at least any one or combination of the following fault types:

在指定时间内即可自行恢复至正常工作状态的软件异常、重启软件即可恢复至正常工作状态的软件异常、重启设备即可恢复至正常工作状态的硬件异常、将设备断电并等待预定时间之后再次对设备通电即可恢复至正常工作状态的硬件异常。Software abnormality that can be restored to normal working state by itself within a specified time, software abnormality that can restore the normal working state after restarting the software, hardware abnormality that can restore the normal working state after restarting the device, power off the device and wait for a predetermined time A hardware abnormality that restores the normal working state by powering on the device again afterwards.

在一个实施例中,所述方法还包括:在未接收到所述mesh设备发送的分组响应时,输出分组失败消息,其中所述分组失败消息用于通报针对所述mesh设备的分组操作失败。In one embodiment, the method further includes: when the grouping response sent by the mesh device is not received, outputting a grouping failure message, wherein the grouping failure message is used to notify that the grouping operation for the mesh device fails.

根据本公开实施例的第二方面,提供一种设备分组装置,包括:According to a second aspect of the embodiments of the present disclosure, an apparatus for grouping devices is provided, including:

发送模块,用于检测到将mesh设备划分到mesh设备组的分组指令时,向所述mesh设备发送分组请求,其中所述分组请求中包括所述mesh设备组的组标识符;A sending module, configured to send a grouping request to the mesh device when detecting a grouping instruction for dividing the mesh device into a mesh device group, wherein the grouping request includes a group identifier of the mesh device group;

计时模块,用于启动分组计时器进行计时;A timing module is used to start a grouping timer for timing;

分组模块,用于在未接收到所述mesh设备发送的分组响应、且所述分组计时器的计时到达第一预设时长时,执行与所述mesh设备对应的分组操作,所述分组操作用于针对发生可恢复的故障的mesh设备进行分组。A grouping module, configured to perform a grouping operation corresponding to the mesh device when the grouping response sent by the mesh device is not received and the timing of the grouping timer reaches a first preset duration, the grouping operation uses Used to group mesh devices with recoverable failures.

在一个实施例中,所述分组操作包括:向所述mesh设备间隔性地重发所述分组请求,直到接收到所述mesh设备发送的分组响应、或直到重发次数到达预设重发次数。In one embodiment, the grouping operation includes: periodically resending the grouping request to the mesh device until a grouping response sent by the mesh device is received, or until the number of retransmissions reaches a preset number of retransmissions .

在一个实施例中,所述分组操作还包括:In one embodiment, the grouping operation also includes:

当重发次数到达预设重发次数、且未接收到所述mesh设备发送的分组响应时,启动定时查询计时器,在所述定时查询计时器的计时到达第二预设时长时,向所述mesh设备发送所述分组请求;When the number of retransmissions reaches the preset number of retransmissions and the packet response sent by the mesh device is not received, the timing query timer is started, and when the timing of the timing query timer reaches the second preset duration, the The mesh device sends the grouping request;

重复执行上述步骤,直到接收到所述mesh设备发送的分组响应、或直到查询次数到达预设查询次数。The above steps are repeatedly executed until the packet response sent by the mesh device is received, or until the number of queries reaches the preset number of queries.

在一个实施例中,所述分组操作包括:启动定时查询计时器,在所述定时查询计时器的计时到达第二预设时长时,向所述mesh设备发送所述分组请求;重复执行上述步骤,直到接收到所述mesh设备发送的分组响应、或直到查询次数到达预设查询次数。In one embodiment, the grouping operation includes: starting a timing query timer, and sending the grouping request to the mesh device when the timing of the timing query timer reaches a second preset duration; repeatedly performing the above steps , until the packet response sent by the mesh device is received, or until the number of queries reaches the preset number of queries.

在一个实施例中,所述可恢复的故障至少包括以下任一种故障类型或组合:在指定时间内即可自行恢复至正常工作状态的软件异常、重启软件即可恢复至正常工作状态的软件异常、重启设备即可恢复至正常工作状态的硬件异常、将设备断电并等待预定时间之后再次对设备通电即可恢复至正常工作状态的硬件异常。In one embodiment, the recoverable failures include at least any of the following failure types or combinations: software abnormalities that can recover to normal working conditions within a specified time, software that can recover to normal working conditions after restarting the software Abnormal, hardware abnormality in which the device can be restored to normal working state after restarting the device, hardware abnormality in which the device can be restored to normal working state after powering off the device and waiting for a predetermined time and then powering on the device again.

在一个实施例中,所述装置还包括:In one embodiment, the device also includes:

输出模块,用于在未接收到所述mesh设备发送的分组响应时,输出分组失败消息,其中所述分组失败消息用于通报针对所述mesh设备的分组操作失败。An output module, configured to output a grouping failure message when the grouping response sent by the mesh device is not received, wherein the grouping failure message is used to notify that the grouping operation for the mesh device fails.

根据本公开实施例的第三方面,提供一种设备分组装置,包括:According to a third aspect of the embodiments of the present disclosure, an apparatus for grouping devices is provided, including:

处理器;processor;

用于存储处理器可执行指令的存储器;memory for storing processor-executable instructions;

其中,所述处理器被配置为:Wherein, the processor is configured as:

检测到将mesh设备划分到mesh设备组的分组指令时,向所述mesh设备发送分组请求,并启动分组计时器进行计时,其中所述分组请求中包括所述mesh设备组的组标识符;When a grouping instruction for dividing a mesh device into a mesh device group is detected, a grouping request is sent to the mesh device, and a grouping timer is started for timing, wherein the grouping request includes a group identifier of the mesh device group;

在未接收到所述mesh设备发送的分组响应、且所述分组计时器的计时到达第一预设时长时,执行与所述mesh设备对应的分组操作,所述分组操作用于针对发生可恢复的故障的mesh设备进行分组。When the grouping response sent by the mesh device is not received and the timing of the grouping timer reaches a first preset duration, perform a grouping operation corresponding to the mesh device, and the grouping operation is used for resumable response to occurrence Faulty mesh devices are grouped together.

根据本公开实施例的第四方面,提供一种计算机可读存储介质,其上存储有计算机指令,该指令被处理器执行时实现上述第一方面所述方法的步骤。According to a fourth aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium, on which computer instructions are stored, and when the instructions are executed by a processor, the steps of the method described in the above-mentioned first aspect are implemented.

本公开的实施例提供的技术方案可以包括以下有益效果:该技术方案通过在对mesh设备进行分组的过程中,针对无应答的mesh设备执行分组操作,实现将发生可恢复的故障的mesh设备进行成功分组,克服了相关技术中由于对无应答的mesh设备均不进行分组而造成分组成功率较低的问题,能够提高mesh设备的分组成功率,提高设备管理效率。The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: In the process of grouping mesh devices, the technical solution performs grouping operations on mesh devices that do not respond, so that mesh devices with recoverable faults can be grouped together. The successful grouping overcomes the problem of low grouping efficiency caused by not grouping mesh devices that do not respond in the related art, and can improve the grouping efficiency of mesh devices and improve device management efficiency.

应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure.

附图说明Description of drawings

此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理。The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description serve to explain the principles of the disclosure.

图1是根据一示例性实施例示出的一种设备分组方法的流程图。Fig. 1 is a flowchart showing a method for grouping devices according to an exemplary embodiment.

图2是根据一示例性实施例示出的一种设备分组方法的流程图。Fig. 2 is a flow chart showing a method for grouping devices according to an exemplary embodiment.

图3是根据一示例性实施例示出的设备分组装置的框图。Fig. 3 is a block diagram showing an apparatus for grouping devices according to an exemplary embodiment.

图4是根据一示例性实施例示出的设备分组装置的框图。Fig. 4 is a block diagram showing an apparatus for grouping devices according to an exemplary embodiment.

图5是根据一示例性实施例示出的设备分组装置的框图。Fig. 5 is a block diagram showing an apparatus for grouping devices according to an exemplary embodiment.

图6是根据一示例性实施例示出的设备分组装置的框图。Fig. 6 is a block diagram showing an apparatus for grouping devices according to an exemplary embodiment.

图7是根据一示例性实施例示出的设备分组装置的框图。Fig. 7 is a block diagram showing an apparatus for grouping devices according to an exemplary embodiment.

具体实施方式Detailed ways

这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本公开相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本公开的一些方面相一致的装置和方法的例子。Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numerals in different drawings refer to the same or similar elements unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatuses and methods consistent with aspects of the present disclosure as recited in the appended claims.

相关技术中,为了方便用户的操作和管理,可以对蓝牙mesh网络中的mesh设备进行分组管理。然而,在对mesh设备进行分组的过程中,相关技术对所有无应答的mesh设备均不进行分组,分组成功率较低,造成设备管理效率不高。In related technologies, in order to facilitate user's operation and management, the mesh devices in the Bluetooth mesh network can be grouped and managed. However, in the process of grouping mesh devices, the related technology does not group all mesh devices that do not respond, and the grouping efficiency is low, resulting in low device management efficiency.

为了解决上述问题,本公开实施例提供了一种设备分组方法,该方法包括:检测到将mesh设备划分到mesh设备组的分组指令时,向mesh设备发送分组请求,并启动分组计时器进行计时,其中分组请求中包括mesh设备组的组标识符;在未接收到mesh设备发送的分组响应、且分组计时器的计时到达第一预设时长时,执行与mesh设备对应的分组操作,分组操作用于针对发生可恢复的故障的mesh设备进行分组。本公开实施例通过在对mesh设备进行分组的过程中,针对无应答的mesh设备执行分组操作,实现将发生可恢复的故障的mesh设备进行成功分组,克服相关技术中由于对无应答的mesh设备均不进行分组而造成分组成功率较低的问题,能够提高mesh设备的分组成功率,提高设备管理效率。In order to solve the above problems, an embodiment of the present disclosure provides a device grouping method, the method includes: when detecting a grouping instruction for dividing a mesh device into a mesh device group, sending a grouping request to the mesh device, and starting a grouping timer for timing , wherein the grouping request includes the group identifier of the mesh device group; when the grouping response sent by the mesh device is not received and the timing of the grouping timer reaches the first preset duration, the grouping operation corresponding to the mesh device is performed, and the grouping operation Used to group mesh devices with recoverable failures. In the embodiment of the present disclosure, in the process of grouping mesh devices, grouping operations are performed on mesh devices that do not respond, so that mesh devices with recoverable faults can be successfully grouped, and overcome the problem of mesh devices that do not respond in the related art. The problem of low grouping efficiency caused by not performing grouping can improve the grouping efficiency of mesh devices and improve device management efficiency.

本公开实施例提供的技术方案可以应用于需要对蓝牙mesh网络中的mesh设备进行分组管理或组建子网络的场景中,例如,用户需要将客厅和卧室的mesh设备分别划分成两个子网络,便于用户区分控制。其中,蓝牙mesh网络中的各mesh设备之间可以通过蓝牙技术进行通信。需要说明的是,本公开中涉及的mesh设备是指支持蓝牙mesh技术的蓝牙设备。The technical solutions provided by the embodiments of the present disclosure can be applied to scenarios where mesh devices in a Bluetooth mesh network need to be grouped and managed or sub-networks are established. User differentiated control. Wherein, each mesh device in the Bluetooth mesh network can communicate through the Bluetooth technology. It should be noted that the mesh device involved in this disclosure refers to a Bluetooth device supporting the Bluetooth mesh technology.

基于上述分析,提出以下各具体实施例。Based on the above analysis, the following specific embodiments are proposed.

图1是根据一示例性实施例示出的一种设备分组方法的流程图。该方法的执行主体可以为蓝牙mesh网络中的主蓝牙mesh设备,例如,主蓝牙mesh设备可以是支持蓝牙技术的终端,终端可以是智能手机、蓝牙mesh网关、平板电脑、笔记本、台式机或穿戴式设备等。如图1所示,该方法包括以下步骤101-102:Fig. 1 is a flowchart showing a method for grouping devices according to an exemplary embodiment. The execution subject of this method can be the master Bluetooth mesh device in the Bluetooth mesh network. For example, the master Bluetooth mesh device can be a terminal supporting Bluetooth technology, and the terminal can be a smart phone, a Bluetooth mesh gateway, a tablet computer, a notebook, a desktop computer or a wearable device. equipment, etc. As shown in Figure 1, the method includes the following steps 101-102:

在步骤101中,检测到将mesh设备划分到mesh设备组的分组指令时,向mesh设备发送分组请求,并启动分组计时器进行计时,其中分组请求中包括mesh设备组的组标识符。In step 101, when a grouping instruction for dividing mesh devices into mesh device groups is detected, a grouping request is sent to the mesh devices, and a grouping timer is started for timing, wherein the grouping request includes a group identifier of the mesh device group.

示例的,在需要对蓝牙mesh网络中的mesh设备进行分组管理或组建子网络的场景中,首先,蓝牙mesh网络中的主蓝牙mesh设备发现并找到蓝牙mesh网络中的所有mesh设备,主蓝牙mesh设备分别为每一个mesh设备分配一个在蓝牙mesh网络中唯一的设备标识符,并逐一将设备标识符发送给对应的mesh设备,等待每个mesh设备的应答,确保设备标识符分配成功。以mesh设备a为例,主蓝牙mesh设备为mesh设备a分配一个在蓝牙mesh网络中唯一的设备标识符A,并将设备标识符A发送给对应的mesh设备a,然后等待mesh设备a的应答;在接收到mesh设备a返回的的分配应答时,确定针对mesh设备a的设备标识符分配过程成功。For example, in the scenario where mesh devices in a Bluetooth mesh network need to be managed in groups or subnets are formed, first, the master Bluetooth mesh device in the Bluetooth mesh network discovers and finds all mesh devices in the Bluetooth mesh network, and the master Bluetooth mesh The device assigns each mesh device a unique device identifier in the Bluetooth mesh network, and sends the device identifier to the corresponding mesh device one by one, and waits for the response of each mesh device to ensure that the device identifier is assigned successfully. Taking mesh device a as an example, the master Bluetooth mesh device assigns a unique device identifier A in the Bluetooth mesh network to mesh device a, and sends the device identifier A to the corresponding mesh device a, and then waits for the response of mesh device a ; When receiving the assignment response returned by the mesh device a, it is determined that the device identifier assignment process for the mesh device a is successful.

示例的,当用户需要对蓝牙mesh网络中的mesh设备进行分组管理或组建子网络时,用户可以通过用户设备向主蓝牙mesh设备发送分组指令,分组指令中包括需要被分组的两个以上mesh设备;用户设备例如智能手机、蓝牙mesh网关、平板电脑、笔记本、台式机或穿戴式设备等;或者,用户也可以直接在主蓝牙mesh设备上输入分组指令,并指定需要被分组的两个以上mesh设备。主蓝牙mesh设备在检测到将两个以上mesh设备划分到同一mesh设备组的分组指令时,获取mesh设备组的组标识符;其中,mesh设备组的组标识符可以由主蓝牙mesh设备根据预设算法实时生成,也可以由用户通过用户设备向主蓝牙mesh设备发送mesh设备组的组标识符;每一个mesh设备组的组标识符在同一个蓝牙mesh网络中是唯一的。然后,主蓝牙mesh设备向被分组的两个以上mesh设备分别发送分组请求,其中分组请求中包括mesh设备组的组标识符;分别启动与发往各mesh设备的分组请求对应的分组计时器进行计时,等待每个mesh设备针对发往各自的分组请求的应答,以确保设备分组成功;若在分组计时器的计时到达第一预设时长之前,接收到mesh设备发送的分组响应,则认定针对该mesh设备的设备分组成功;若在分组计时器的计时到达第一预设时长之前,接收到mesh设备发送的分组响应,则认定针对该mesh设备的设备分组成功;若在分组计时器的计时到达第一预设时长、且未接收到mesh设备发送的分组响应时,则可以判定该mesh设备的状态异常。For example, when the user needs to group the mesh devices in the Bluetooth mesh network or form a subnet, the user can send a grouping command to the main Bluetooth mesh device through the user device, and the grouping command includes more than two mesh devices that need to be grouped ;User devices such as smartphones, Bluetooth mesh gateways, tablet computers, notebooks, desktops, or wearable devices; or, users can also directly input grouping instructions on the main Bluetooth mesh device and specify two or more meshes that need to be grouped equipment. When the master bluetooth mesh device detects the grouping instruction that divides more than two mesh devices into the same mesh device group, it obtains the group identifier of the mesh device group; wherein, the group identifier of the mesh device group can be determined by the master bluetooth mesh device according to the preset Assuming that the algorithm is generated in real time, the user can also send the group identifier of the mesh device group to the main Bluetooth mesh device through the user equipment; the group identifier of each mesh device group is unique in the same Bluetooth mesh network. Then, the main bluetooth mesh device sends grouping requests to the two or more mesh devices that are grouped, wherein the grouping requests include the group identifier of the mesh device group; respectively start the grouping timers corresponding to the grouping requests sent to each mesh device. Timing, waiting for the response of each mesh device to its respective grouping request to ensure that the device grouping is successful; if the grouping response sent by the mesh device is received before the grouping timer reaches the first preset The device grouping of the mesh device is successful; if the grouping response sent by the mesh device is received before the timing of the grouping timer reaches the first preset duration, it is determined that the device grouping for the mesh device is successful; if the timing of the grouping timer When the first preset time period is reached and no packet response sent by the mesh device is received, it may be determined that the state of the mesh device is abnormal.

在步骤102中,在未接收到mesh设备发送的分组响应、且分组计时器的计时到达第一预设时长时,执行与mesh设备对应的分组操作,分组操作用于针对发生可恢复的故障的mesh设备进行分组。In step 102, when the grouping response sent by the mesh device is not received and the timing of the grouping timer reaches the first preset duration, the grouping operation corresponding to the mesh device is executed, and the grouping operation is used for recoverable faults Mesh devices are grouped together.

示例的,主蓝牙mesh设备向mesh设备发送分组请求,并启动分组计时器进行计时之后,在未接收到mesh设备发送的分组响应、且分组计时器的计时到达第一预设时长时,则可以判定该mesh设备的状态异常;但是,本公开并不据此就认定针对该状态异常的mesh设备的设备分组失败,而是执行与mesh设备对应的分组操作,用于实现针对发生可恢复的故障的mesh设备进行分组。For example, after the master bluetooth mesh device sends a grouping request to the mesh device and starts the grouping timer for timing, when the grouping response sent by the mesh device is not received and the timing of the grouping timer reaches the first preset duration, it can It is determined that the state of the mesh device is abnormal; however, this disclosure does not determine that the device grouping of the mesh device with the abnormal state has failed, but executes the grouping operation corresponding to the mesh device, which is used to achieve recovery for the occurrence of recoverable faults. The mesh devices are grouped together.

示例的,可恢复的故障至少包括以下任一种故障类型或组合:在指定时间内即可自行恢复至正常工作状态的软件异常或硬件异常、重启软件即可恢复至正常工作状态的软件异常、重启设备即可恢复至正常工作状态的硬件异常、将设备断电并等待预定时间之后再次对设备通电即可恢复至正常工作状态的硬件异常。在指定时间内即可自行恢复至正常工作状态的软件异常或硬件异常,也即暂时的软件异常或硬件异常。需要说明的是,某些由于无应答而被判定为状态异常的mesh设备,可能只是在分组过程中刚好发生了可恢复的软件故障或硬件故障,对于这些发生了可恢复的软件故障或硬件故障的mesh设备,通过特定的操作或处理就可以恢复至正常工作状态。在这些发生可恢复的故障的mesh设备恢复至正常工作状态之后,主蓝牙mesh设备再次对这些mesh设备进行分组,例如,主蓝牙mesh设备执行与mesh设备对应的分组操作,用于实现针对发生可恢复的故障的mesh设备进行分组。For example, recoverable failures include at least any of the following failure types or combinations: software abnormalities or hardware abnormalities that can be restored to normal working conditions within a specified time, software abnormalities that can be restored to normal working conditions by restarting the software, Restart the device to return to the normal working state of the hardware abnormality, power off the device and wait for a predetermined period of time and then power on the device again to return to the hardware abnormality of the normal working state. A software abnormality or hardware abnormality that can be restored to a normal working state within a specified time, that is, a temporary software abnormality or hardware abnormality. It should be noted that some mesh devices that are judged to be abnormal due to no response may just have a recoverable software failure or hardware failure during the grouping process. For these mesh devices, a recoverable software failure or hardware failure has occurred The mesh device can be restored to normal working state through specific operations or processing. After these recoverable faulty mesh devices return to the normal working state, the master Bluetooth mesh device groups these mesh devices again, for example, the master Bluetooth mesh device performs the grouping operation corresponding to the mesh devices to implement Restored failed mesh devices are grouped.

示例的,分组操作至少包括以下任一种操作:Exemplarily, the grouping operation includes at least any of the following operations:

操作a、向mesh设备间隔性地重发分组请求,即重复发送分组请求,连续两次发送分组请求的时间间隔可以相等,也可以不相等,直到接收到mesh设备发送的分组响应、或直到重发次数到达预设重发次数。Operation a. Resend the grouping request to the mesh device at intervals, that is, repeatedly send the grouping request. The time interval between two consecutive grouping requests can be equal or not, until the grouping response sent by the mesh device is received, or until the grouping request is resent. The number of retransmissions reaches the preset number of retransmissions.

操作b、启动定时查询计时器,在定时查询计时器的计时到达第二预设时长时,向mesh设备发送分组请求;重复执行上述步骤,直到接收到mesh设备发送的分组响应、或直到查询次数到达预设查询次数。Operation b. Start the timing query timer, and when the timing of the timing query timer reaches the second preset duration, send a grouping request to the mesh device; repeat the above steps until receiving the grouping response sent by the mesh device, or until the number of queries Reached the preset number of queries.

操作c、向mesh设备间隔性地重发分组请求,即重复发送分组请求,连续两次发送分组请求的时间间隔可以相等,也可以不相等,直到接收到mesh设备发送的分组响应、或直到重发次数到达预设重发次数;当重发次数到达预设重发次数、且未接收到所述mesh设备发送的分组响应时,启动定时查询计时器,在所述定时查询计时器的计时到达第二预设时长时,向所述mesh设备发送所述分组请求;重复执行上述步骤,直到接收到所述mesh设备发送的分组响应、或直到查询次数到达预设查询次数。Operation c. Resend the grouping request to the mesh device at intervals, that is, repeatedly send the grouping request. The time interval between two consecutive grouping requests can be equal or not, until the grouping response sent by the mesh device is received, or until the grouping request is resent. The number of transmissions reaches the preset number of retransmissions; when the number of retransmissions reaches the preset number of retransmissions and the packet response sent by the mesh device is not received, the timing query timer is started, and when the timing of the timing query timer reaches When the second preset duration, send the grouping request to the mesh device; repeat the above steps until receiving the grouping response sent by the mesh device, or until the number of queries reaches the preset number of queries.

需要说明的是,操作b中的第二预设时长可以远大于操作a中的时间间隔。例如,在未接收到mesh设备发送的分组响应、且分组计时器的计时到达第一预设时长时,执行与mesh设备对应的分组操作a,向mesh设备间隔性地重发分组请求,以实现对发生暂时的软件异常或者硬件异常的mesh设备进行分组;若在重发次数到达预设重发次数时还未接收到mesh设备发送的分组响应,则可以认定针对该mesh设备的设备分组失败;或者,若在重发次数到达预设重发次数时还未接收到mesh设备发送的分组响应,则可以设置定时查询,启动定时查询计时器,在定时查询计时器的计时到达第二预设时长时,向mesh设备发送分组请求;重复执行上述步骤,直到接收到mesh设备发送的分组响应、或直到查询次数到达预设查询次数,由于操作b中的第二预设时长可以远大于操作a中的时间间隔,这就可以实现对发生重启软件即可恢复至正常工作状态的软件异常的mesh设备、发生重启设备即可恢复至正常工作状态的硬件异常的mesh设备、或发生将设备断电并等待预定时间之后再次对设备通电即可恢复至正常工作状态的硬件异常的mesh设备进行分组。It should be noted that the second preset duration in operation b may be much longer than the time interval in operation a. For example, when the grouping response sent by the mesh device is not received and the timing of the grouping timer reaches the first preset duration, the grouping operation a corresponding to the mesh device is performed, and the grouping request is periodically resent to the mesh device to realize Group the mesh devices with temporary software or hardware abnormalities; if the grouping response sent by the mesh device has not been received when the number of retransmissions reaches the preset number of retransmissions, it can be determined that the device grouping for the mesh device has failed; Or, if the packet response sent by the mesh device has not been received when the number of retransmissions reaches the preset number of retransmissions, you can set a timing query, start the timing query timer, and when the timing of the timing query timer reaches the second preset duration , send a grouping request to the mesh device; repeat the above steps until the grouping response sent by the mesh device is received, or until the number of queries reaches the preset number of queries, since the second preset duration in operation b can be much longer than that in operation a time interval, which can realize the software abnormal mesh device that can be restored to normal working state after restarting the software, the mesh device with hardware abnormality that can be restored to normal working state after restarting the device, or the device is powered off and After waiting for a predetermined period of time, the mesh devices with hardware abnormalities that can be restored to normal working status can be grouped by powering on the device again.

示例的,主蓝牙mesh设备在执行与mesh设备对应的分组操作之后,仍未接收到mesh设备发送的分组响应时,认定针对该状态异常的mesh设备的设备分组失败,输出分组失败消息,其中分组失败消息用于通报针对mesh设备的分组操作失败。For example, after performing the grouping operation corresponding to the mesh device, the master Bluetooth mesh device still does not receive the grouping response sent by the mesh device, it will determine that the device grouping of the mesh device with an abnormal state has failed, and output a grouping failure message, wherein the grouping The failure message is used to report the failure of the grouping operation for the mesh device.

本公开的实施例提供的技术方案,通过在对mesh设备进行分组的过程中,针对无应答的mesh设备执行分组操作,实现将发生可恢复的故障的mesh设备进行成功分组,克服了相关技术中由于对无应答的mesh设备均不进行分组而造成分组成功率较低的问题,能够提高mesh设备的分组成功率,提高设备管理效率。In the technical solution provided by the embodiments of the present disclosure, in the process of grouping mesh devices, the grouping operation is performed on mesh devices that do not respond, so that mesh devices with recoverable faults can be successfully grouped, which overcomes the problems in related technologies. Due to the problem of low grouping efficiency caused by not grouping mesh devices that do not respond, the grouping efficiency of mesh devices can be improved, and device management efficiency can be improved.

图2是根据一示例性实施例示出的一种设备分组方法的流程图。如图2所示,在图1所示实施例的基础上,本公开涉及的设备分组方法可以包括以下步骤201-208:Fig. 2 is a flow chart showing a method for grouping devices according to an exemplary embodiment. As shown in FIG. 2, on the basis of the embodiment shown in FIG. 1, the device grouping method involved in the present disclosure may include the following steps 201-208:

在步骤201中,检测到将mesh设备划分到mesh设备组的分组指令时,向mesh设备发送分组请求,并启动分组计时器进行计时,其中分组请求中包括mesh设备组的组标识符。In step 201, when a grouping instruction for dividing mesh devices into mesh device groups is detected, a grouping request is sent to the mesh devices, and a grouping timer is started for timing, wherein the grouping request includes a group identifier of the mesh device group.

在步骤202中,检测是否接收到mesh设备发送的分组响应:在接收到mesh设备发送的分组响应、且分组计时器的计时未超过第一预设时长时,转到步骤208;在未接收到mesh设备发送的分组响应、且分组计时器的计时到达第一预设时长时,转到步骤203。In step 202, it is detected whether the group response sent by the mesh device is received: when the group response sent by the mesh device is received and the timing of the group timer does not exceed the first preset duration, go to step 208; When the packet response sent by the mesh device and the timing of the packet timer reaches the first preset duration, go to step 203 .

在步骤203中,向mesh设备间隔性地重发分组请求,直到接收到mesh设备发送的分组响应、或直到重发次数到达预设重发次数。In step 203, the grouping request is periodically resent to the mesh device until a grouping response sent by the mesh device is received, or until the number of resending times reaches a preset number of times of resending.

在步骤204中,检测是否接收到mesh设备发送的分组响应:在接收到mesh设备发送的分组响应、且重发次数未超过预设重发次数时,转到步骤208;在未接收到mesh设备发送的分组响应、且重发次数到达预设重发次数时,转到步骤205。In step 204, check whether the packet response sent by the mesh device is received: when the packet response sent by the mesh device is received and the number of retransmissions does not exceed the preset number of retransmissions, go to step 208; When the sent packet responds and the number of retransmissions reaches the preset number of retransmissions, go to step 205 .

在步骤205中,启动定时查询计时器,在定时查询计时器的计时到达第二预设时长时,向mesh设备发送分组请求;在接收到mesh设备发送的分组响应、或直到查询次数到达预设查询次数之前,重复执行本步骤。In step 205, the timing query timer is started, and when the timing of the timing query timer reaches the second preset duration, a grouping request is sent to the mesh device; when the grouping response sent by the mesh device is received, or until the number of queries reaches the preset Repeat this step until the number of queries is reached.

在步骤206中,检测是否接收到mesh设备发送的分组响应:在接收到mesh设备发送的分组响应、且查询次数未超过预设查询次数时,转到步骤208;在未接收到mesh设备发送的分组响应、且查询次数到达预设查询次数时,转到步骤207。In step 206, check whether the group response sent by the mesh device is received: when the group response sent by the mesh device is received and the number of queries does not exceed the preset number of queries, go to step 208; if the group response sent by the mesh device is not received When the response is grouped and the number of inquiries reaches the preset number of inquiries, go to step 207.

在步骤207中,输出分组失败消息,其中分组失败消息用于通报针对mesh设备的分组操作失败;流程结束。In step 207, a grouping failure message is output, wherein the grouping failure message is used to notify that the grouping operation for the mesh device fails; the process ends.

在步骤208中,输出分组成功消息,其中分组成功消息用于通报针对mesh设备的分组操作成功;流程结束。In step 208, a grouping success message is output, wherein the grouping success message is used to notify that the grouping operation for the mesh device is successful; the process ends.

示例的,分组失败消息中包括:mesh设备的标识符、mesh设备组的组标识符、重发次数、及查询次数。Exemplarily, the grouping failure message includes: the identifier of the mesh device, the group identifier of the mesh device group, the number of retransmissions, and the number of queries.

本公开的实施例提供的技术方案,通过在对mesh设备进行分组的过程中,针对无应答的mesh设备采用间隔性地重发分组请求的方式、定时查询的方式等,实现将发生可恢复的故障的mesh设备进行成功分组,克服了相关技术中由于对无应答的mesh设备均不进行分组而造成分组成功率较低的问题,能够提高mesh设备的分组成功率,提高设备管理效率。In the technical solution provided by the embodiments of the present disclosure, during the process of grouping mesh devices, the method of intermittently resending grouping requests, timing query, etc. for mesh devices that do not respond, realizes that recoverable failures will occur Successful grouping of faulty mesh devices overcomes the problem of low grouping efficiency due to non-responsive mesh devices not being grouped in related technologies, and can increase the grouping efficiency of mesh devices and improve device management efficiency.

下述为本公开装置实施例,可以用于执行本公开方法实施例。The following are device embodiments of the present disclosure, which can be used to implement the method embodiments of the present disclosure.

图3是根据一示例性实施例示出的一种设备分组装置的框图,该装置可以采用各种方式来实施,例如在主蓝牙mesh设备中实施装置的全部组件,或者,在主蓝牙mesh设备侧以耦合的方式实施装置中的组件;该装置可以通过软件、硬件或者两者的结合实现上述本公开涉及的方法,如图3所示,该设备分组装置包括:发送模块301、计时模块302和分组模块303,其中:Fig. 3 is a block diagram of an apparatus for grouping devices according to an exemplary embodiment. The apparatus can be implemented in various ways, for example, implementing all components of the apparatus in the master Bluetooth mesh device, or on the side of the master Bluetooth mesh device The components in the device are implemented in a coupled manner; the device can implement the above-mentioned methods involved in the present disclosure through software, hardware or a combination of the two. As shown in FIG. 3 , the device grouping device includes: a sending module 301, a timing module 302 and Grouping module 303, wherein:

发送模块301被配置为检测到将mesh设备划分到mesh设备组的分组指令时,向mesh设备发送分组请求,其中分组请求中包括mesh设备组的组标识符;The sending module 301 is configured to send a grouping request to the mesh device when detecting a grouping instruction for dividing the mesh device into a mesh device group, wherein the grouping request includes a group identifier of the mesh device group;

计时模块302被配置为启动分组计时器进行计时;The timing module 302 is configured to start a packet timer for timing;

分组模块303被配置为在未接收到mesh设备发送的分组响应、且分组计时器的计时到达第一预设时长时,执行与mesh设备对应的分组操作,分组操作用于针对发生可恢复的故障的mesh设备进行分组。The grouping module 303 is configured to execute a grouping operation corresponding to the mesh device when the grouping response sent by the mesh device is not received and the timing of the grouping timer reaches the first preset duration, and the grouping operation is used for recoverable faults The mesh devices are grouped together.

本公开实施例提供的设备分组装置,通过配置发送模块301检测到将mesh设备划分到mesh设备组的分组指令时,向mesh设备发送分组请求,其中分组请求中包括mesh设备组的组标识符;计时模块302被配置为启动分组计时器进行计时;分组模块303在未接收到mesh设备发送的分组响应、且分组计时器的计时到达第一预设时长时,执行与mesh设备对应的分组操作,分组操作用于针对发生可恢复的故障的mesh设备进行分组,实现将发生可恢复的故障的mesh设备进行成功分组,克服了相关技术中由于对无应答的mesh设备均不进行分组而造成分组成功率较低的问题,能够提高mesh设备的分组成功率,提高设备管理效率。The apparatus for grouping devices provided by the embodiments of the present disclosure sends a grouping request to the mesh devices when the configuration sending module 301 detects a grouping instruction for dividing mesh devices into mesh device groups, wherein the grouping request includes a group identifier of the mesh device group; The timing module 302 is configured to start a grouping timer for timing; the grouping module 303 performs a grouping operation corresponding to the mesh device when the grouping response sent by the mesh device is not received and the timing of the grouping timer reaches a first preset duration, The grouping operation is used to group the mesh devices with recoverable faults, realize the successful grouping of the mesh devices with recoverable faults, and overcome the grouping problem caused by not grouping the mesh devices with no response in the related technology. The problem of low power can improve the grouping power of mesh devices and improve device management efficiency.

在一种可能的实施方式中,分组操作包括:向mesh设备间隔性地重发分组请求,直到接收到mesh设备发送的分组响应、或直到重发次数到达预设重发次数。In a possible implementation manner, the grouping operation includes: resending the grouping request to the mesh device at intervals until a grouping response sent by the mesh device is received, or until the number of resending times reaches a preset number of times of resending.

在一种可能的实施方式中,所述分组操作还包括:In a possible implementation manner, the grouping operation further includes:

当重发次数到达预设重发次数、且未接收到所述mesh设备发送的分组响应时,启动定时查询计时器,在所述定时查询计时器的计时到达第二预设时长时,向所述mesh设备发送所述分组请求;重复执行上述步骤,直到接收到所述mesh设备发送的分组响应、或直到查询次数到达预设查询次数。When the number of retransmissions reaches the preset number of retransmissions and the packet response sent by the mesh device is not received, the timing query timer is started, and when the timing of the timing query timer reaches the second preset duration, the The mesh device sends the grouping request; repeat the above steps until the grouping response sent by the mesh device is received, or until the number of queries reaches the preset number of queries.

在一种可能的实施方式中,分组操作包括:启动定时查询计时器,在定时查询计时器的计时到达第二预设时长时,向mesh设备发送分组请求;重复执行上述步骤,直到接收到mesh设备发送的分组响应、或直到查询次数到达预设查询次数。In a possible implementation manner, the grouping operation includes: starting a timing query timer, and sending a grouping request to the mesh device when the timing of the timing query timer reaches a second preset duration; repeating the above steps until receiving the mesh The packet response sent by the device, or until the number of inquiries reaches the preset number of inquiries.

在一种可能的实施方式中,可恢复的故障至少包括以下任一种故障类型或组合:In a possible implementation manner, recoverable faults include at least any of the following fault types or combinations:

在指定时间内即可自行恢复至正常工作状态的软件异常、重启软件即可恢复至正常工作状态的软件异常、重启设备即可恢复至正常工作状态的硬件异常、将设备断电并等待预定时间之后再次对设备通电即可恢复至正常工作状态的硬件异常。Software abnormality that can be restored to normal working state by itself within a specified time, software abnormality that can restore the normal working state after restarting the software, hardware abnormality that can restore the normal working state after restarting the device, power off the device and wait for a predetermined time A hardware abnormality that restores the normal working state by powering on the device again afterwards.

在一种可能的实施方式中,如图4所示,图3示出的设备分组装置还可以包括:输出模块401,被配置为在未接收到mesh设备发送的分组响应时,输出分组失败消息,其中分组失败消息用于通报针对mesh设备的分组操作失败。In a possible implementation manner, as shown in FIG. 4 , the apparatus for grouping devices shown in FIG. 3 may further include: an output module 401 configured to output a grouping failure message when the grouping response sent by the mesh device is not received , wherein the grouping failure message is used to notify that the grouping operation for the mesh device fails.

图5是根据一示例性实施例示出的一种设备分组装置500的框图,设备分组装置500包括:Fig. 5 is a block diagram showing a device grouping apparatus 500 according to an exemplary embodiment, and the device grouping apparatus 500 includes:

处理器501;Processor 501;

用于存储处理器可执行指令的存储器502;memory 502 for storing processor-executable instructions;

其中,处理器501被配置为:Wherein, the processor 501 is configured as:

检测到将mesh设备划分到mesh设备组的分组指令时,向mesh设备发送分组请求,并启动分组计时器进行计时,其中分组请求中包括mesh设备组的组标识符;When a grouping instruction for dividing the mesh device into a mesh device group is detected, a grouping request is sent to the mesh device, and a grouping timer is started for timing, wherein the grouping request includes a group identifier of the mesh device group;

在未接收到mesh设备发送的分组响应、且分组计时器的计时到达第一预设时长时,执行与mesh设备对应的分组操作,分组操作用于针对发生可恢复的故障的mesh设备进行分组。When the grouping response sent by the mesh device is not received and the timing of the grouping timer reaches the first preset duration, the grouping operation corresponding to the mesh device is executed, and the grouping operation is used to group the mesh devices with recoverable faults.

在一个实施例中,分组操作包括:向mesh设备间隔性地重发分组请求,直到接收到mesh设备发送的分组响应、或直到重发次数到达预设重发次数。In one embodiment, the grouping operation includes: periodically resending the grouping request to the mesh device until receiving a grouping response sent by the mesh device, or until the number of retransmissions reaches a preset number of retransmissions.

在一个实施例中,所述分组操作还包括:In one embodiment, the grouping operation also includes:

当重发次数到达预设重发次数、且未接收到所述mesh设备发送的分组响应时,启动定时查询计时器,在所述定时查询计时器的计时到达第二预设时长时,向所述mesh设备发送所述分组请求;重复执行上述步骤,直到接收到所述mesh设备发送的分组响应、或直到查询次数到达预设查询次数。When the number of retransmissions reaches the preset number of retransmissions and the packet response sent by the mesh device is not received, the timing query timer is started, and when the timing of the timing query timer reaches the second preset duration, the The mesh device sends the grouping request; repeat the above steps until the grouping response sent by the mesh device is received, or until the number of queries reaches the preset number of queries.

在一个实施例中,分组操作包括:In one embodiment, grouping operations include:

启动定时查询计时器,在定时查询计时器的计时到达第二预设时长时,向mesh设备发送分组请求;Start a timing query timer, and send a grouping request to the mesh device when the timing of the timing query timer reaches a second preset duration;

重复执行上述步骤,直到接收到mesh设备发送的分组响应、或直到查询次数到达预设查询次数。The above steps are repeated until the packet response sent by the mesh device is received, or until the number of inquiries reaches the preset number of inquiries.

在一个实施例中,可恢复的故障至少包括以下任一种故障类型或组合:In one embodiment, recoverable faults include at least any one or combination of the following fault types:

在指定时间内即可自行恢复至正常工作状态的软件异常、重启软件即可恢复至正常工作状态的软件异常、重启设备即可恢复至正常工作状态的硬件异常、将设备断电并等待预定时间之后再次对设备通电即可恢复至正常工作状态的硬件异常。Software abnormality that can be restored to normal working state by itself within a specified time, software abnormality that can restore the normal working state after restarting the software, hardware abnormality that can restore the normal working state after restarting the device, power off the device and wait for a predetermined time A hardware abnormality that restores the normal working state by powering on the device again afterwards.

在一个实施例中,上述处理器501还可被配置为:在未接收到mesh设备发送的分组响应时,输出分组失败消息,其中分组失败消息用于通报针对mesh设备的分组操作失败。In an embodiment, the above-mentioned processor 501 may also be configured to: output a grouping failure message when no grouping response sent by the mesh device is received, where the grouping failure message is used to notify that the grouping operation for the mesh device fails.

上述本公开实施例提供的设备分组装置,通过在对mesh设备进行分组的过程中,针对无应答的mesh设备执行分组操作,实现将发生可恢复的故障的mesh设备进行成功分组,克服了相关技术中由于对无应答的mesh设备均不进行分组而造成分组成功率较低的问题,能够提高mesh设备的分组成功率,提高设备管理效率。The device grouping device provided by the above-mentioned embodiment of the present disclosure implements the successful grouping of mesh devices with recoverable faults by performing a grouping operation on mesh devices that do not respond during the process of grouping mesh devices, and overcomes the problems of related technologies. In this method, the grouping efficiency is low due to the non-responsive mesh devices not being grouped, which can improve the grouping efficiency of the mesh devices and improve device management efficiency.

关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。Regarding the apparatus in the foregoing embodiments, the specific manner in which each module executes operations has been described in detail in the embodiments related to the method, and will not be described in detail here.

图6是根据一示例性实施例示出的一种设备分组装置的框图。例如,设备分组装置600可以是蓝牙mesh网络中的主蓝牙mesh设备,比如,支持蓝牙技术的终端,终端可以是智能手机、蓝牙mesh网关、平板电脑、笔记本、台式机或穿戴式设备等。参照图6,设备分组装置600可以包括以下一个或多个组件:处理组件602,存储器604,电源组件606,多媒体组件608,音频组件610,输入/输出(I/O)的接口612,传感器组件614,以及通信组件616。Fig. 6 is a block diagram showing an apparatus for grouping devices according to an exemplary embodiment. For example, the device grouping apparatus 600 may be a master Bluetooth mesh device in a Bluetooth mesh network, such as a terminal supporting Bluetooth technology, and the terminal may be a smart phone, a Bluetooth mesh gateway, a tablet computer, a notebook, a desktop or a wearable device, etc. Referring to FIG. 6, the device grouping apparatus 600 may include one or more of the following components: a processing component 602, a memory 604, a power supply component 606, a multimedia component 608, an audio component 610, an input/output (I/O) interface 612, and a sensor component 614, and a communication component 616.

处理组件602通常控制设备分组装置600的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理组件602可以包括一个或多个处理器620来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件602可以包括一个或多个模块,便于处理组件602和其他组件之间的交互。例如,处理组件602可以包括多媒体模块,以方便多媒体组件608和处理组件602之间的交互。The processing component 602 generally controls the overall operations of the device grouping apparatus 600, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 602 may include one or more processors 620 to execute instructions to complete all or part of the steps of the above method. Additionally, processing component 602 may include one or more modules that facilitate interaction between processing component 602 and other components. For example, processing component 602 may include a multimedia module to facilitate interaction between multimedia component 608 and processing component 602 .

存储器604被配置为存储各种类型的数据以支持在设备分组装置600的操作。这些数据的示例包括用于在设备分组装置600上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器604可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。The memory 604 is configured to store various types of data to support operations at the device grouping apparatus 600 . Examples of such data include instructions for any application or method operating on device grouping apparatus 600, contact data, phonebook data, messages, pictures, videos, and the like. The memory 604 can be implemented by any type of volatile or non-volatile storage device or their combination, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), Magnetic Memory, Flash Memory, Magnetic or Optical Disk.

电源组件606为设备分组装置600的各种组件提供电力。电源组件606可以包括电源管理系统,一个或多个电源,及其他与为设备分组装置600生成、管理和分配电力相关联的组件。The power supply component 606 provides power to various components of the device grouping apparatus 600 . Power components 606 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for device grouping apparatus 600 .

多媒体组件608包括在设备分组装置600和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件608包括一个前置摄像头和/或后置摄像头。当设备分组装置600处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。The multimedia component 608 includes screens that provide an output interface between the device grouping apparatus 600 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may not only sense a boundary of a touch or a swipe action, but also detect duration and pressure associated with the touch or swipe operation. In some embodiments, the multimedia component 608 includes a front camera and/or a rear camera. When the device grouping apparatus 600 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have focal length and optical zoom capability.

音频组件610被配置为输出和/或输入音频信号。例如,音频组件610包括一个麦克风(MIC),当设备分组装置600处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器604或经由通信组件616发送。在一些实施例中,音频组件610还包括一个扬声器,用于输出音频信号。The audio component 610 is configured to output and/or input audio signals. For example, the audio component 610 includes a microphone (MIC) configured to receive external audio signals when the device grouping apparatus 600 is in operation modes, such as call mode, recording mode and voice recognition mode. Received audio signals may be further stored in memory 604 or sent via communication component 616 . In some embodiments, the audio component 610 also includes a speaker for outputting audio signals.

I/O接口612为处理组件602和外围接口模块之间提供接口,上述外围接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。The I/O interface 612 provides an interface between the processing component 602 and a peripheral interface module. The peripheral interface module may be a keyboard, a click wheel, a button, and the like. These buttons may include, but are not limited to: a home button, volume buttons, start button, and lock button.

传感器组件614包括一个或多个传感器,用于为设备分组装置600提供各个方面的状态评估。例如,传感器组件614可以检测到设备分组装置600的打开/关闭状态,组件的相对定位,例如组件为设备分组装置600的显示器和小键盘,传感器组件614还可以检测设备分组装置600或设备分组装置600一个组件的位置改变,用户与设备分组装置600接触的存在或不存在,设备分组装置600方位或加速/减速和设备分组装置600的温度变化。传感器组件614可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件614还可以包括光传感器,如CMOS或CCD图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件614还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。Sensor component 614 includes one or more sensors for providing various aspects of status assessment for device grouping apparatus 600 . For example, the sensor component 614 can detect the open/closed state of the device grouping device 600, the relative positioning of components such as the display and keypad of the device grouping device 600, the sensor component 614 can also detect the device grouping device 600 or the device grouping device 600 a component's position change, presence or absence of user contact with device grouping device 600 , device grouping device 600 orientation or acceleration/deceleration and device grouping device 600 temperature change. The sensor assembly 614 may include a proximity sensor configured to detect the presence of nearby objects in the absence of any physical contact. Sensor assembly 614 may also include optical sensors, such as CMOS or CCD image sensors, for use in imaging applications. In some embodiments, the sensor component 614 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor or a temperature sensor.

通信组件616被配置为便于设备分组装置600和其他设备之间有线或无线方式的通信。设备分组装置600可以接入基于通信标准的无线网络,如WiFi,2G/3G/4G/5G,或它们的组合。在一个示例性实施例中,通信组件616经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,通信组件616还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。The communication component 616 is configured to facilitate wired or wireless communication between the device grouping apparatus 600 and other devices. The device grouping apparatus 600 can access wireless networks based on communication standards, such as WiFi, 2G/3G/4G/5G, or a combination thereof. In an exemplary embodiment, the communication component 616 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 616 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra Wide Band (UWB) technology, Bluetooth (BT) technology and other technologies.

在示例性实施例中,设备分组装置600可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子组件实现,用于执行上述方法。In an exemplary embodiment, device grouping apparatus 600 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field Programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic component implementation for performing the methods described above.

在示例性实施例中,还提供了一种包括指令的非临时性计算机可读存储介质,例如包括指令的存储器604,上述指令可由设备分组装置600的处理器620执行以完成上述方法。例如,非临时性计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。In an exemplary embodiment, there is also provided a non-transitory computer-readable storage medium including instructions, such as the memory 604 including instructions, which can be executed by the processor 620 of the device grouping apparatus 600 to complete the above method. For example, the non-transitory computer readable storage medium may be ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, and the like.

图7是根据一示例性实施例示出的一种设备分组装置的框图。例如,设备分组装置700可以被提供为一服务器。设备分组装置700包括处理组件702,其进一步包括一个或多个处理器,以及由存储器703所代表的存储器资源,用于存储可由处理组件702的执行的指令,例如应用程序。存储器703中存储的应用程序可以包括一个或一个以上的每一个对应于一组指令的模块。此外,处理组件702被配置为执行指令,以执行上述方法。Fig. 7 is a block diagram showing an apparatus for grouping devices according to an exemplary embodiment. For example, the device grouping apparatus 700 may be provided as a server. The device grouping apparatus 700 includes a processing component 702 , which further includes one or more processors, and a memory resource, represented by a memory 703 , for storing instructions executable by the processing component 702 , such as application programs. The application program stored in memory 703 may include one or more modules each corresponding to a set of instructions. In addition, the processing component 702 is configured to execute instructions to perform the above method.

设备分组装置700还可以包括一个电源组件706被配置为执行设备分组装置700的电源管理,一个有线或无线网络接口705被配置为将设备分组装置700连接到网络,和一个输入输出(I/O)接口708。设备分组装置700可以操作基于存储在存储器703的操作系统,例如Windows ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM或类似。The device grouping apparatus 700 may also include a power supply component 706 configured to perform power management of the device grouping apparatus 700, a wired or wireless network interface 705 configured to connect the device grouping apparatus 700 to a network, and an input/output (I/O ) interface 708. The device grouping device 700 can operate based on an operating system stored in the memory 703, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™ or the like.

一种非临时性计算机可读存储介质,当存储介质中的指令由设备分组装置600或设备分组装置700的处理器执行时,使得设备分组装置600或设备分组装置700能够执行如下方法:A non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by the processor of the device grouping device 600 or the device grouping device 700, the device grouping device 600 or the device grouping device 700 can perform the following method:

检测到将mesh设备划分到mesh设备组的分组指令时,向mesh设备发送分组请求,并启动分组计时器进行计时,其中分组请求中包括mesh设备组的组标识符;When a grouping instruction for dividing the mesh device into a mesh device group is detected, a grouping request is sent to the mesh device, and a grouping timer is started for timing, wherein the grouping request includes a group identifier of the mesh device group;

在未接收到mesh设备发送的分组响应、且分组计时器的计时到达第一预设时长时,执行与mesh设备对应的分组操作,分组操作用于针对发生可恢复的故障的mesh设备进行分组。When the grouping response sent by the mesh device is not received and the timing of the grouping timer reaches the first preset duration, the grouping operation corresponding to the mesh device is executed, and the grouping operation is used to group the mesh devices with recoverable faults.

在一个实施例中,分组操作包括:向mesh设备间隔性地重发分组请求,直到接收到mesh设备发送的分组响应、或直到重发次数到达预设重发次数。In one embodiment, the grouping operation includes: periodically resending the grouping request to the mesh device until receiving a grouping response sent by the mesh device, or until the number of retransmissions reaches a preset number of retransmissions.

在一个实施例中,所述分组操作还包括:当重发次数到达预设重发次数、且未接收到所述mesh设备发送的分组响应时,启动定时查询计时器,在所述定时查询计时器的计时到达第二预设时长时,向所述mesh设备发送所述分组请求;重复执行上述步骤,直到接收到所述mesh设备发送的分组响应、或直到查询次数到达预设查询次数。In one embodiment, the grouping operation further includes: when the number of retransmissions reaches the preset number of retransmissions and the group response sent by the mesh device is not received, start a timing query timer, and when the timing query counts When the timing of the timer reaches the second preset time length, send the grouping request to the mesh device; repeat the above steps until the grouping response sent by the mesh device is received, or until the number of queries reaches the preset number of queries.

在一个实施例中,分组操作包括:In one embodiment, grouping operations include:

启动定时查询计时器,在定时查询计时器的计时到达第二预设时长时,向mesh设备发送分组请求;Start a timing query timer, and send a grouping request to the mesh device when the timing of the timing query timer reaches a second preset duration;

重复执行上述步骤,直到接收到mesh设备发送的分组响应、或直到查询次数到达预设查询次数。The above steps are repeated until the packet response sent by the mesh device is received, or until the number of inquiries reaches the preset number of inquiries.

在一个实施例中,可恢复的故障至少包括以下任一种故障类型或组合:In one embodiment, recoverable faults include at least any one or combination of the following fault types:

在指定时间内即可自行恢复至正常工作状态的软件异常、重启软件即可恢复至正常工作状态的软件异常、重启设备即可恢复至正常工作状态的硬件异常、将设备断电并等待预定时间之后再次对设备通电即可恢复至正常工作状态的硬件异常。Software abnormality that can be restored to normal working state by itself within a specified time, software abnormality that can restore the normal working state after restarting the software, hardware abnormality that can restore the normal working state after restarting the device, power off the device and wait for a predetermined time A hardware abnormality that restores the normal working state by powering on the device again afterwards.

在一个实施例中,方法还包括:在未接收到mesh设备发送的分组响应时,输出分组失败消息,其中分组失败消息用于通报针对mesh设备的分组操作失败。In one embodiment, the method further includes: when the grouping response sent by the mesh device is not received, outputting a grouping failure message, wherein the grouping failure message is used to notify that the grouping operation for the mesh device fails.

本领域技术人员在考虑说明书及实践这里公开的公开后,将容易想到本公开的其它实施方案。本申请旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由下面的权利要求指出。Other embodiments of the disclosure will be readily apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any modification, use or adaptation of the present disclosure, and these modifications, uses or adaptations follow the general principles of the present disclosure and include common knowledge or conventional technical means in the technical field not disclosed in the present disclosure . The specification and examples are to be considered exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要求来限制。It should be understood that the present disclosure is not limited to the precise constructions which have been described above and shown in the drawings, and various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (8)

1.一种设备分组方法,其特征在于,应用于蓝牙mesh网络中的第一蓝牙mesh设备,包括:1. A device grouping method, characterized in that, it is applied to the first bluetooth mesh device in the bluetooth mesh network, comprising: 检测到将mesh设备划分到mesh设备组的分组指令时,向所述mesh设备发送分组请求,其中,所述分组指令是用户在需要对蓝牙mesh网络中的mesh设备进行分组管理时向主蓝牙mesh设备发送的,所述分组指令中指定了需要被划分到同一mesh设备组的两个以上mesh设备;所述向所述mesh设备发送分组请求,包括:向被划分到同一mesh设备组的两个以上mesh设备分别发送分组请求;所述分组请求中包括mesh设备组的组标识符,mesh设备组的组标识符由第一蓝牙mesh设备根据预设算法实时生成的或者由用户向第一蓝牙mesh设备发送的,每一个mesh设备组的组标识符在同一个蓝牙mesh网络中是唯一的;When a grouping instruction for dividing a mesh device into a mesh device group is detected, a grouping request is sent to the mesh device, wherein the grouping instruction is sent to the master Bluetooth mesh when the user needs to perform group management on the mesh devices in the Bluetooth mesh network. sent by the device, the grouping instruction specifies two or more mesh devices that need to be divided into the same mesh device group; the sending of the grouping request to the mesh device includes: sending the request to two The above mesh devices respectively send a grouping request; the grouping request includes the group identifier of the mesh device group, and the group identifier of the mesh device group is generated by the first Bluetooth mesh device in real time according to a preset algorithm or sent to the first Bluetooth mesh by the user. Sent by the device, the group identifier of each mesh device group is unique in the same Bluetooth mesh network; 启动分组计时器进行计时,包括:分别启动与发往各mesh设备的分组请求对应的分组计时器进行计时,等待每个mesh设备针对发往各自的分组请求的响应;Start the grouping timer for timing, including: respectively start the grouping timer corresponding to the grouping request sent to each mesh device for timing, and wait for each mesh device to respond to the respective grouping request; 在分组计时器的计时到达第一预设时长之前,接收到mesh设备发送的分组响应,则确定针对所述mesh设备的设备分组成功;Before the timing of the grouping timer reaches the first preset duration, the grouping response sent by the mesh device is received, and then it is determined that the device grouping for the mesh device is successful; 在未接收到mesh设备发送的分组响应、且所述分组计时器的计时到达第一预设时长时,执行与所述mesh设备对应的分组操作,所述分组操作用于针对发生可恢复的故障的mesh设备进行分组;When the grouping response sent by the mesh device is not received and the timing of the grouping timer reaches the first preset duration, the grouping operation corresponding to the mesh device is executed, and the grouping operation is used for recoverable failure The mesh devices are grouped; 所述分组操作包括:The grouping operations include: 向所述mesh设备间隔性地重发所述分组请求,直到接收到所述mesh设备发送的分组响应、或直到重发次数到达预设重发次数;resending the grouping request to the mesh device at intervals until a grouping response sent by the mesh device is received, or until the number of retransmissions reaches a preset number of retransmissions; 当重发次数到达预设重发次数、且未接收到所述mesh设备发送的分组响应时,启动定时查询计时器,在所述定时查询计时器的计时到达第二预设时长时,向所述mesh设备发送所述分组请求;所述第二预设时长远大于所述向所述mesh设备间隔性地重发所述分组请求中的时间间隔,用于等待发生可恢复的故障的mesh设备恢复至正常工作状态;When the number of retransmissions reaches the preset number of retransmissions and the packet response sent by the mesh device is not received, the timing query timer is started, and when the timing of the timing query timer reaches the second preset duration, the The mesh device sends the grouping request; the second preset time length is much longer than the time interval in resending the grouping request to the mesh device at intervals, and is used to wait for a recoverable faulty mesh device return to normal working condition; 重复执行上述步骤,直到接收到所述mesh设备发送的分组响应、或直到查询次数到达预设查询次数。The above steps are repeatedly executed until the packet response sent by the mesh device is received, or until the number of queries reaches the preset number of queries. 2.根据权利要求1所述的方法,其特征在于,所述可恢复的故障至少包括以下任一种故障类型或组合:2. The method according to claim 1, wherein the recoverable faults at least include any of the following fault types or combinations: 在指定时间内即可自行恢复至正常工作状态的软件异常、重启软件即可恢复至正常工作状态的软件异常、重启设备即可恢复至正常工作状态的硬件异常、将设备断电并等待预定时间之后再次对设备通电即可恢复至正常工作状态的硬件异常。Software abnormality that can be restored to normal working state by itself within a specified time, software abnormality that can restore the normal working state after restarting the software, hardware abnormality that can restore the normal working state after restarting the device, power off the device and wait for a predetermined time A hardware abnormality that restores the normal working state by powering on the device again afterwards. 3.根据权利要求1所述的方法,其特征在于,所述方法还包括:3. The method according to claim 1, characterized in that the method further comprises: 在未接收到所述mesh设备发送的分组响应、且查询次数到达预设查询次数时,输出分组失败消息,其中所述分组失败消息用于通报针对所述mesh设备的分组操作失败。When the grouping response sent by the mesh device is not received and the number of queries reaches a preset number of queries, a grouping failure message is output, wherein the grouping failure message is used to notify that the grouping operation for the mesh device fails. 4.一种设备分组装置,其特征在于,应用于蓝牙mesh网络中的第一蓝牙mesh设备,包括:4. A device grouping device, characterized in that it is applied to the first bluetooth mesh device in the bluetooth mesh network, comprising: 发送模块,用于检测到将mesh设备划分到mesh设备组的分组指令时,向mesh设备发送分组请求,其中,所述分组指令是用户在需要对蓝牙mesh网络中的mesh设备进行分组管理时向主蓝牙mesh设备发送的,所述分组指令中指定了需要被划分到同一mesh设备组的两个以上mesh设备;所述向mesh设备发送分组请求,包括:向被划分到同一mesh设备组的两个以上mesh设备分别发送分组请求;所述分组请求中包括mesh设备组的组标识符,mesh设备组的组标识符由第一蓝牙mesh设备根据预设算法实时生成的或者由用户向第一蓝牙mesh设备发送的,每一个mesh设备组的组标识符在同一个蓝牙mesh网络中是唯一的;The sending module is configured to send a grouping request to the mesh device when detecting a grouping instruction for dividing the mesh device into a mesh device group, wherein the grouping instruction is sent to the mesh device when the user needs to perform group management on the mesh device in the Bluetooth mesh network Sent by the master Bluetooth mesh device, the grouping instruction specifies two or more mesh devices that need to be divided into the same mesh device group; the sending of the grouping request to the mesh device includes: sending the request to two mesh devices that are divided into the same mesh device group More than two mesh devices respectively send a grouping request; the grouping request includes the group identifier of the mesh device group, and the group identifier of the mesh device group is generated by the first Bluetooth mesh device in real time according to a preset algorithm or sent to the first Bluetooth by the user. Sent by the mesh device, the group identifier of each mesh device group is unique in the same Bluetooth mesh network; 计时模块,用于启动分组计时器进行计时,包括:分别启动与发往各mesh设备的分组请求对应的分组计时器进行计时,等待每个mesh设备针对发往各自的分组请求的响应;在分组计时器的计时到达第一预设时长之前,接收到mesh设备发送的分组响应,则确定针对所述mesh设备的设备分组成功;The timing module is used to start the grouping timer for timing, including: respectively starting the grouping timers corresponding to the grouping requests sent to each mesh device for timing, waiting for each mesh device to respond to the respective grouping requests; Before the timing of the timer reaches the first preset duration, if the grouping response sent by the mesh device is received, it is determined that the device grouping for the mesh device is successful; 分组模块,用于在未接收到所述mesh设备发送的分组响应、且所述分组计时器的计时到达第一预设时长时,执行与所述mesh设备对应的分组操作,所述分组操作用于针对发生可恢复的故障的mesh设备进行分组;所述分组操作包括:A grouping module, configured to perform a grouping operation corresponding to the mesh device when the grouping response sent by the mesh device is not received and the timing of the grouping timer reaches a first preset duration, the grouping operation uses It is used to group mesh devices with recoverable faults; the grouping operation includes: 向所述mesh设备间隔性地重发所述分组请求,直到接收到所述mesh设备发送的分组响应、或直到重发次数到达预设重发次数;resending the grouping request to the mesh device at intervals until a grouping response sent by the mesh device is received, or until the number of retransmissions reaches a preset number of retransmissions; 当重发次数到达预设重发次数、且未接收到所述mesh设备发送的分组响应时,启动定时查询计时器,在所述定时查询计时器的计时到达第二预设时长时,向所述mesh设备发送所述分组请求;所述第二预设时长远大于所述向所述mesh设备间隔性地重发所述分组请求中的时间间隔,用于等待发生可恢复的故障的mesh设备恢复至正常工作状态;When the number of retransmissions reaches the preset number of retransmissions and the packet response sent by the mesh device is not received, the timing query timer is started, and when the timing of the timing query timer reaches the second preset duration, the The mesh device sends the grouping request; the second preset time length is much longer than the time interval in resending the grouping request to the mesh device at intervals, and is used to wait for a recoverable faulty mesh device return to normal working condition; 重复执行上述步骤,直到接收到所述mesh设备发送的分组响应、或直到查询次数到达预设查询次数。The above steps are repeatedly executed until the packet response sent by the mesh device is received, or until the number of queries reaches the preset number of queries. 5.根据权利要求4所述的装置,其特征在于,所述可恢复的故障至少包括以下任一种故障类型或组合:5. The device according to claim 4, wherein the recoverable faults at least include any of the following fault types or combinations: 在指定时间内即可自行恢复至正常工作状态的软件异常、重启软件即可恢复至正常工作状态的软件异常、重启设备即可恢复至正常工作状态的硬件异常、将设备断电并等待预定时间之后再次对设备通电即可恢复至正常工作状态的硬件异常。Software abnormality that can be restored to normal working state by itself within a specified time, software abnormality that can restore the normal working state after restarting the software, hardware abnormality that can restore the normal working state after restarting the device, power off the device and wait for a predetermined time A hardware abnormality that restores the normal working state by powering on the device again afterwards. 6.根据权利要求4所述的装置,其特征在于,所述装置还包括:6. The device according to claim 4, further comprising: 输出模块,用于在未接收到所述mesh设备发送的分组响应、且查询次数到达预设查询次数时,输出分组失败消息,其中所述分组失败消息用于通报针对所述mesh设备的分组操作失败。An output module, configured to output a grouping failure message when the grouping response sent by the mesh device is not received and the number of queries reaches a preset number of queries, wherein the grouping failure message is used to notify the grouping operation for the mesh device fail. 7.一种设备分组装置,其特征在于,应用于蓝牙mesh网络中的第一蓝牙mesh设备,包括:7. A device grouping device, characterized in that it is applied to the first Bluetooth mesh device in the Bluetooth mesh network, comprising: 处理器;processor; 用于存储处理器可执行指令的存储器;memory for storing processor-executable instructions; 其中,所述处理器被配置为:Wherein, the processor is configured as: 检测到将mesh设备划分到mesh设备组的分组指令时,向所述mesh设备发送分组请求,其中,所述分组指令是用户在需要对蓝牙mesh网络中的mesh设备进行分组管理时向主蓝牙mesh设备发送的,所述分组指令中指定了需要被划分到同一mesh设备组的两个以上mesh设备;所述向所述mesh设备发送分组请求,包括:向被划分到同一mesh设备组的两个以上mesh设备分别发送分组请求;所述分组请求中包括mesh设备组的组标识符,mesh设备组的组标识符由第一蓝牙mesh设备根据预设算法实时生成的或者由用户向第一蓝牙mesh设备发送的,每一个mesh设备组的组标识符在同一个蓝牙mesh网络中是唯一的;When a grouping instruction for dividing a mesh device into a mesh device group is detected, a grouping request is sent to the mesh device, wherein the grouping instruction is sent to the master Bluetooth mesh when the user needs to perform group management on the mesh devices in the Bluetooth mesh network. sent by the device, the grouping instruction specifies two or more mesh devices that need to be divided into the same mesh device group; the sending of the grouping request to the mesh device includes: sending the request to two The above mesh devices respectively send a grouping request; the grouping request includes the group identifier of the mesh device group, and the group identifier of the mesh device group is generated by the first Bluetooth mesh device in real time according to a preset algorithm or sent to the first Bluetooth mesh by the user. Sent by the device, the group identifier of each mesh device group is unique in the same Bluetooth mesh network; 并启动分组计时器进行计时,包括:分别启动与发往各mesh设备的分组请求对应的分组计时器进行计时,等待每个mesh设备针对发往各自的分组请求的响应;And starting the grouping timer for timing, including: respectively starting the grouping timer corresponding to the grouping request sent to each mesh device for timing, waiting for each mesh device to respond to the respective grouping request; 在分组计时器的计时到达第一预设时长之前,接收到mesh设备发送的分组响应,则确定针对所述mesh设备的设备分组成功;Before the timing of the grouping timer reaches the first preset duration, the grouping response sent by the mesh device is received, and then it is determined that the device grouping for the mesh device is successful; 在未接收到所述mesh设备发送的分组响应、且所述分组计时器的计时到达第一预设时长时,执行与所述mesh设备对应的分组操作,所述分组操作用于针对发生可恢复的故障的mesh设备进行分组;When the grouping response sent by the mesh device is not received and the timing of the grouping timer reaches a first preset duration, perform a grouping operation corresponding to the mesh device, and the grouping operation is used for resumable response to occurrence The faulty mesh devices are grouped; 所述分组操作包括:The grouping operations include: 向所述mesh设备间隔性地重发所述分组请求,直到接收到所述mesh设备发送的分组响应、或直到重发次数到达预设重发次数;resending the grouping request to the mesh device at intervals until a grouping response sent by the mesh device is received, or until the number of retransmissions reaches a preset number of retransmissions; 当重发次数到达预设重发次数、且未接收到所述mesh设备发送的分组响应时,启动定时查询计时器,在所述定时查询计时器的计时到达第二预设时长时,向所述mesh设备发送所述分组请求;所述第二预设时长远大于所述向所述mesh设备间隔性地重发所述分组请求中的时间间隔,用于等待发生可恢复的故障的mesh设备恢复至正常工作状态;When the number of retransmissions reaches the preset number of retransmissions and the packet response sent by the mesh device is not received, the timing query timer is started, and when the timing of the timing query timer reaches the second preset duration, the The mesh device sends the grouping request; the second preset time length is much longer than the time interval in resending the grouping request to the mesh device at intervals, and is used to wait for a recoverable faulty mesh device return to normal working condition; 重复执行上述步骤,直到接收到所述mesh设备发送的分组响应、或直到查询次数到达预设查询次数。The above steps are repeatedly executed until the packet response sent by the mesh device is received, or until the number of queries reaches the preset number of queries. 8.一种计算机可读存储介质,其上存储有计算机指令,其特征在于,该指令被处理器执行时实现权利要求1-3中任一项权利要求所述方法的步骤。8. A computer-readable storage medium, on which computer instructions are stored, wherein the steps of the method according to any one of claims 1-3 are implemented when the instructions are executed by a processor.
CN201810857768.9A 2018-07-31 2018-07-31 Equipment grouping method and device Active CN108923988B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810857768.9A CN108923988B (en) 2018-07-31 2018-07-31 Equipment grouping method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810857768.9A CN108923988B (en) 2018-07-31 2018-07-31 Equipment grouping method and device

Publications (2)

Publication Number Publication Date
CN108923988A CN108923988A (en) 2018-11-30
CN108923988B true CN108923988B (en) 2023-04-07

Family

ID=64393220

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810857768.9A Active CN108923988B (en) 2018-07-31 2018-07-31 Equipment grouping method and device

Country Status (1)

Country Link
CN (1) CN108923988B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112035865A (en) * 2020-09-22 2020-12-04 安徽长泰信息安全服务有限公司 Safety supervision system for preventing network data from being leaked

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101621747A (en) * 2009-08-12 2010-01-06 广州海格通信集团股份有限公司 Reliable multicast transmission method of wireless mesh network

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7554996B2 (en) * 2005-09-14 2009-06-30 Cisco Technology, Inc. Controlled distribution of inter-area routing information
US8199658B2 (en) * 2008-03-14 2012-06-12 Cisco Technology, Inc. OAM tools for meshed tunnels in a computer network
US9538571B2 (en) * 2014-12-05 2017-01-03 Dominant Technologies, LLC Communication and data handling in a mesh network using duplex radios
CN105282817A (en) * 2015-11-04 2016-01-27 广东欧珀移动通信有限公司 A kind of MPP speaker selection method and wireless speaker

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101621747A (en) * 2009-08-12 2010-01-06 广州海格通信集团股份有限公司 Reliable multicast transmission method of wireless mesh network

Also Published As

Publication number Publication date
CN108923988A (en) 2018-11-30

Similar Documents

Publication Publication Date Title
CN108496385B (en) Information reporting method and device and bandwidth part-based operation method and device
US12185416B2 (en) Sidelink release method, terminal and network side device
CN108040108B (en) Communication switching method, device, coordination server and readable storage medium
CN106604376B (en) Channel monitoring control method, device and user terminal
WO2020192311A1 (en) Master-slave server switching method and apparatus, electronic device and storage medium
WO2019024604A1 (en) Method and device for associating application with network slice, and communication system
TW201944236A (en) Task processing method, apparatus, and system
JP2022539902A (en) Random access process backoff method, device and system
CN107786794A (en) The electronic installation and method of the image obtained by imaging sensor are provided to application
CN114375597B (en) Signal receiving method, signal sending method and related equipment
EP3142336A1 (en) Synchronization method for notification message of electronic device, and electronic device
WO2016026313A1 (en) Method, device and system for implementing information self-registration, and computer storage medium
WO2019210817A1 (en) Radio link recovery method and terminal
EP3209005A1 (en) Task processing device, intelligent apparatus, task processing method and baseband processor
CN103037195A (en) Method and device used for setting video call parameters and transmission capacity parameters
CN110611920A (en) A wireless link monitoring method and terminal
CN111478817A (en) Network fault handling method, device, storage medium and mobile device
CN113032361B (en) Database configuration changing method and device, electronic equipment and storage medium
CN113946443A (en) Edge device management and active registration method and device and electronic device
CN108923988B (en) Equipment grouping method and device
CN112068876A (en) A process management method, device and system
CN106507505B (en) Disconnection method and device for low-power-consumption Bluetooth connection
CN108702682B (en) AC Limiting Method and Device
CN112804769B (en) Method, device and storage medium for connecting network
CN112468982B (en) Calling method and calling device

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
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder

Address after: 100085 Huarun Qingcai Street 68, Haidian District, Beijing, two stage, 9 floor, 01 rooms.

Patentee after: BEIJING XIAOMI MOBILE SOFTWARE Co.,Ltd.

Patentee after: Qingdao Yilai Intelligent Technology Co.,Ltd.

Address before: 100085 Huarun Qingcai Street 68, Haidian District, Beijing, two stage, 9 floor, 01 rooms.

Patentee before: BEIJING XIAOMI MOBILE SOFTWARE Co.,Ltd.

Patentee before: QINGDAO YEELINK INFORMATION TECHNOLOGY Co.,Ltd.

CP01 Change in the name or title of a patent holder