CN115604688A - Device address allocation method, device, electronic device and storage medium - Google Patents
Device address allocation method, device, electronic device and storage medium Download PDFInfo
- Publication number
- CN115604688A CN115604688A CN202110784318.3A CN202110784318A CN115604688A CN 115604688 A CN115604688 A CN 115604688A CN 202110784318 A CN202110784318 A CN 202110784318A CN 115604688 A CN115604688 A CN 115604688A
- Authority
- CN
- China
- Prior art keywords
- address
- gateway device
- address set
- gateway
- communication
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 81
- 238000004891 communication Methods 0.000 claims abstract description 144
- 230000015654 memory Effects 0.000 claims description 36
- 238000004590 computer program Methods 0.000 claims description 13
- 238000010586 diagram Methods 0.000 description 18
- 230000001360 synchronised effect Effects 0.000 description 9
- 230000005291 magnetic effect Effects 0.000 description 6
- 230000006870 function Effects 0.000 description 5
- 230000003068 static effect Effects 0.000 description 4
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 230000003993 interaction Effects 0.000 description 2
- 230000005294 ferromagnetic effect Effects 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/80—Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W8/00—Network data management
- H04W8/26—Network addressing or numbering for mobility support
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W84/00—Network topologies
- H04W84/18—Self-organising networks, e.g. ad-hoc networks or sensor networks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W88/00—Devices specially adapted for wireless communication networks, e.g. terminals, base stations or access point devices
- H04W88/16—Gateway arrangements
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Databases & Information Systems (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
本申请公开了一种设备地址分配方法、装置、电子设备及存储介质。其中,方法应用于蓝牙Mesh网络中的网关设备,所述方法包括:若存在待入网节点设备向所述网关设备发起地址分配请求,则在网关设备的地址集中确定所述待入网节点设备的通信地址;所述地址集表征所述网关设备进行本地地址分配所使用的通信地址集合,所述地址集由服务器向所述网关设备预先发送。
The application discloses a device address assignment method, device, electronic device and storage medium. Wherein, the method is applied to a gateway device in a Bluetooth Mesh network, and the method includes: if there is a node device to be connected to the network that initiates an address allocation request to the gateway device, determining the communication of the node device to be connected to the network in the address set of the gateway device Address; the address set represents the communication address set used by the gateway device for local address allocation, and the address set is sent to the gateway device in advance by the server.
Description
技术领域technical field
本申请涉及物联网领域,尤其涉及一种设备地址分配方法、装置、电子设备及存储介质。The present application relates to the field of the Internet of Things, and in particular to a device address allocation method, device, electronic device and storage medium.
背景技术Background technique
相关技术中,蓝牙Mesh设备的地址信息可以在设备上电运行时通过可信设备向服务端申请地址,导致地址分配效率低,而在网络较差的场合中在线分配地址的成功率也会降低,并且还会额外的耗费相应的网络资源。In the related technology, the address information of the Bluetooth Mesh device can apply for an address from the server through the trusted device when the device is powered on, resulting in low address allocation efficiency, and the success rate of online address allocation will also be reduced in poor network situations. , and additionally consume corresponding network resources.
发明内容Contents of the invention
本申请实施例提供一种设备地址分配方法、装置、电子设备及存储介质,以至少解决相关技术出现的设备地址分配的效率与成功率降低的问题。Embodiments of the present application provide a device address assignment method, device, electronic device, and storage medium, so as to at least solve the problem of reduced efficiency and success rate of device address assignment in related technologies.
本申请实施例的技术方案是这样实现的:The technical scheme of the embodiment of the application is realized in this way:
本申请实施例提供了一种设备地址分配方法,应用于蓝牙Mesh网络中的网关设备,所述方法包括:The embodiment of the present application provides a device address allocation method, which is applied to a gateway device in a Bluetooth Mesh network, and the method includes:
若存在待入网节点设备向所述网关设备发起地址分配请求,则在网关设备的地址集中确定所述待入网节点设备的通信地址;所述地址集表征所述网关设备进行本地地址分配所使用的通信地址集合,所述地址集由服务器向所述网关设备预先发送。If there is a node device to be networked to initiate an address allocation request to the gateway device, then determine the communication address of the node device to be networked in the address set of the gateway device; the address set represents the address used by the gateway device for local address allocation A communication address set, the address set is sent by the server to the gateway device in advance.
本申请实施例还提供了另一种设备地址分配方法,应用于蓝牙Mesh网络中的网关设备,所述方法包括:The embodiment of the present application also provides another device address allocation method, which is applied to a gateway device in a Bluetooth Mesh network, and the method includes:
向服务器发送地址集分配请求;Send an address set allocation request to the server;
接收所述服务器基于所述地址集分配请求返回的地址集;所述地址集表征所述网关设备进行本地地址分配所使用的通信地址集合。receiving an address set returned by the server based on the address set allocation request; the address set represents a communication address set used by the gateway device for local address allocation.
本申请实施例还提供了另一种设备地址分配方法,应用于服务器,所述方法包括:The embodiment of the present application also provides another device address allocation method, which is applied to the server, and the method includes:
接收蓝牙Mesh网络中的网关设备发送的地址集分配请求;所述蓝牙Mesh网络中包括至少一个网关设备;Receive an address set allocation request sent by a gateway device in a Bluetooth Mesh network; include at least one gateway device in the Bluetooth Mesh network;
在设定地址库中确定所述网关设备的地址集;所述地址集表征所述网关设备进行本地地址分配所使用的通信地址集合;Determine the address set of the gateway device in the set address library; the address set represents the communication address set used by the gateway device for local address allocation;
将所述网关设备的地址集返回至所述网关设备。returning the address set of the gateway device to the gateway device.
本申请实施例还提供了一种设备地址分配装置,包括:The embodiment of the present application also provides a device address allocation device, including:
第一确定单元,用于若存在待入网节点设备向所述网关设备发起地址分配请求,则在网关设备的地址集中确定所述待入网节点设备的通信地址;所述地址集表征所述网关设备进行本地地址分配所使用的通信地址集合,所述地址集由服务器向所述网关设备预先发送。The first determining unit is configured to determine the communication address of the node device to be connected to the network in the address set of the gateway device if there is a node device to be connected to the network that initiates an address allocation request to the gateway device; the address set represents the gateway device A communication address set used for local address allocation, where the address set is sent by the server to the gateway device in advance.
本申请实施例还提供了另一种设备地址分配装置,包括:The embodiment of the present application also provides another apparatus for allocating device addresses, including:
第一发送单元,用于向服务器发送地址集分配请求;a first sending unit, configured to send an address set allocation request to a server;
第一接收单元,用于接收所述服务器基于所述地址集分配请求返回的地址集;所述地址集表征所述网关设备进行本地地址分配所使用的通信地址集合。The first receiving unit is configured to receive the address set returned by the server based on the address set allocation request; the address set represents a communication address set used by the gateway device for local address allocation.
本申请实施例还提供了另一种设备地址分配装置,包括:The embodiment of the present application also provides another apparatus for allocating device addresses, including:
第二接收单元,用于接收蓝牙Mesh网络中的网关设备发送的地址集分配请求;所述蓝牙Mesh网络中包括至少一个网关设备;The second receiving unit is used to receive the address set allocation request sent by the gateway device in the Bluetooth Mesh network; the Bluetooth Mesh network includes at least one gateway device;
第二确定单元,用于在设定地址库中确定所述网关设备的地址集;所述地址集表征所述网关设备进行本地地址分配所使用的通信地址集合;The second determination unit is configured to determine the address set of the gateway device in the set address library; the address set represents the communication address set used by the gateway device for local address allocation;
第二发送单元,用于将所述网关设备的地址集返回至所述网关设备。The second sending unit is configured to return the address set of the gateway device to the gateway device.
本申请实施例还提供了一种电子设备,包括:The embodiment of the present application also provides an electronic device, including:
处理器和用于存储能够在处理器上运行的计算机程序的存储器,a processor and memory for storing computer programs capable of running on the processor,
其中,所述处理器用于运行所述计算机程序时,执行上述任一方法的步骤。Wherein, when the processor is configured to run the computer program, it executes the steps of any one of the above methods.
本申请实施例还提供了一种存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现上述任一方法的步骤。The embodiment of the present application also provides a storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of any one of the above methods are implemented.
在本申请实施例中,蓝牙Mesh网络中的网关设备通过预先从服务器获取的地址集为待入网节点设备分配通信地址,由于网关设备能够提前获取到本地地址分配所使用的多个通信地址集合,从而设备不需要通过访问云端便能够为多个待入网节点设备直接分配通信地址,提高了为节点设备分配地址的效率,减少了设备到云端的流程消耗,并且还能提高设备分配地址的效率与成功率。In this embodiment of the application, the gateway device in the Bluetooth Mesh network allocates a communication address for the node device to be connected to the network through the address set obtained in advance from the server. Since the gateway device can obtain multiple communication address sets used for local address allocation in advance, Therefore, the device can directly allocate communication addresses for multiple node devices to be connected to the network without accessing the cloud, which improves the efficiency of address allocation for node devices, reduces the process consumption from the device to the cloud, and can also improve the efficiency of device address allocation. Success rate.
附图说明Description of drawings
图1为本申请一实施例提供的设备地址分配方法的实现流程示意图;FIG. 1 is a schematic diagram of an implementation flow of a device address allocation method provided by an embodiment of the present application;
图2为本申请一实施例提供的网关设备为不同的待入网节点设备分配通信地址的示意图;FIG. 2 is a schematic diagram of a gateway device according to an embodiment of the present application assigning communication addresses to different node devices to be connected to the network;
图3为本申请一实施例提供的设备地址分配方法的实现流程示意图;FIG. 3 is a schematic diagram of an implementation flow of a device address allocation method provided by an embodiment of the present application;
图4为本申请又一实施例提供的设备地址分配方法的实现流程示意图;FIG. 4 is a schematic diagram of the implementation flow of a device address allocation method provided in another embodiment of the present application;
图5为本申请一实施例提供的一种设备地址分配的流程示意图;FIG. 5 is a schematic flow diagram of a device address assignment provided by an embodiment of the present application;
图6为本申请一实施例提供的设备地址分配方法的实现流程示意图;FIG. 6 is a schematic diagram of an implementation flow of a device address allocation method provided by an embodiment of the present application;
图7为本申请又一实施例提供的设备地址分配方法的实现流程示意图;FIG. 7 is a schematic diagram of an implementation flow of a device address allocation method provided in another embodiment of the present application;
图8为本申请一实施例提供的服务器为不同网关设备分配地址集的示意图;FIG. 8 is a schematic diagram of a server providing address sets for different gateway devices according to an embodiment of the present application;
图9为本申请一实施例提供的设备地址分配方法的实现流程示意图;FIG. 9 is a schematic diagram of an implementation flow of a device address allocation method provided by an embodiment of the present application;
图10为本申请一实施例提供的服务器为网关设备分配地址集的流程图Fig. 10 is a flow chart of the server assigning an address set to a gateway device according to an embodiment of the present application
图11为本申请一实施例提供的设备地址分配装置的结构示意图;FIG. 11 is a schematic structural diagram of a device address allocation device provided by an embodiment of the present application;
图12为本申请一实施例提供的设备地址分配装置的结构示意图;FIG. 12 is a schematic structural diagram of a device address allocation device provided by an embodiment of the present application;
图13为本申请一实施例提供的设备地址分配装置的结构示意图;FIG. 13 is a schematic structural diagram of a device address allocation device provided by an embodiment of the present application;
图14为本申请一实施例提供电子设备的硬件组成结构示意图。FIG. 14 is a schematic diagram of a hardware composition structure of an electronic device provided by an embodiment of the present application.
具体实施方式detailed description
下面结合附图及具体实施例对本申请作进一步详细的说明。The present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.
以下描述中,为了说明而不是为了限定,提出了诸如特定系统结构、技术之类的具体细节,以便透彻理解本申请实施例。然而,本领域的技术人员应当清楚,在没有这些具体细节的其它实施例中也可以实现本申请。在其它情况中,省略对众所周知的系统、装置以及方法的详细说明,以免不必要的细节妨碍本申请的描述。In the following description, specific details such as specific system structures and technologies are presented for the purpose of illustration rather than limitation, so as to thoroughly understand the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, devices, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
需要说明的是,本申请实施例所记载的技术方案之间,在不冲突的情况下,可以任意组合。It should be noted that the technical solutions described in the embodiments of the present application may be combined arbitrarily if there is no conflict.
另外,在本申请实施例中,“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。In addition, in the embodiments of the present application, "first", "second", etc. are used to distinguish similar objects, and are not necessarily used to describe a specific sequence or sequence.
本申请实施例提供了一种设备地址分配方法,图1为本申请实施例的设备地址分配方法的一种流程示意图。如图1所示,所述方法应用于蓝牙Mesh网络中的网络设备,所述方法包括:An embodiment of the present application provides a device address allocation method, and FIG. 1 is a schematic flowchart of the device address allocation method in the embodiment of the present application. As shown in Figure 1, the method is applied to a network device in a Bluetooth Mesh network, and the method includes:
若存在待入网节点设备向所述网关设备发起地址分配请求,则在网关设备的地址集中确定所述待入网节点设备的通信地址;所述地址集表征所述网关设备进行本地地址分配所使用的通信地址集合,所述地址集由服务器向所述网关设备预先发送。If there is a node device to be networked to initiate an address allocation request to the gateway device, then determine the communication address of the node device to be networked in the address set of the gateway device; the address set represents the address used by the gateway device for local address allocation A communication address set, the address set is sent by the server to the gateway device in advance.
这里,网关设备需要为节点设备分配通信地址以使节点设备能够与其他设备进行通信,待入网节点设备表示需要网关设备分配通信地址的节点设备,待入网节点设备是通过向网关设备发起地址分配请求以获取通信地址,网关设备根据待入网节点设备发起的地址分配请求,在网关设备的地址集中确定待入网节点设备的通信地址,待入网节点设备能够根据分配的通信地址实现与其他设备的通信,其中,网关设备的地址集是网关设备预先向服务器申请获取的,网设备的地址集中至少包括一个通信地址,是网关设备在为待入网节点设备分配通信地址时所使用的通信地址集合。在实际应用中,网关设备的地址集含有的通信地址数量可以满足网关设备在可支持的入网设备的最大数量的范围内为不同待入网节点设备分配通信地址,因此网关设备通过网关设备的地址集能够满足不同的待入网节点设备的通信地址分配的需求,并不需要再次向服务器请求进行本地地址分配的通信地址,从而可以迅速地为待入网节点设备分配通信地址,提高了为节点设备分配地址的效率,节省了网络资源。如图2所示,图2示出了网关设备为不同的待入网节点设备分配通信地址的示意图。在实际应用中,由于待入网节点设备的通信地址是从网关设备的地址集中确定的,因此,通过网关设备的地址集中通信地址的分配情况,能够获知网关设备下节点设备的接入情况。Here, the gateway device needs to assign a communication address to the node device so that the node device can communicate with other devices. The node device to be connected to the network represents the node device that needs the gateway device to allocate a communication address. The node device to be connected to the network sends an address allocation request to the gateway device. To obtain the communication address, the gateway device determines the communication address of the node device to be networked in the address set of the gateway device according to the address assignment request initiated by the node device to be networked, and the node device to be networked can communicate with other devices according to the assigned communication address, Wherein, the address set of the gateway device is acquired by the gateway device through application from the server in advance, and the address set of the network device includes at least one communication address, which is the communication address set used by the gateway device when assigning a communication address to a node device to be connected to the network. In practical applications, the number of communication addresses contained in the address set of the gateway device can satisfy the requirement that the gateway device allocate communication addresses for different node devices to be connected to the network within the range of the maximum number of devices that can be supported by the gateway device. It can meet the communication address allocation requirements of different node devices to be connected to the network, and does not need to request the communication address of the local address distribution from the server again, so that the communication address can be quickly allocated to the node devices to be connected to the network, and the address allocation for node devices is improved. efficiency and save network resources. As shown in FIG. 2 , FIG. 2 shows a schematic diagram of the gateway device assigning communication addresses to different node devices to be connected to the network. In practical applications, since the communication address of the node device to be connected to the network is determined from the address set of the gateway device, the access status of the node device under the gateway device can be known through the allocation of communication addresses in the address set of the gateway device.
在一实施例中,如图3所示,所述在网关设备的地址集中确定所述待入网节点设备的通信地址,包括:In one embodiment, as shown in FIG. 3, the determining the communication address of the node device to be networked in the address set of the gateway device includes:
S301:接收所述待入网节点设备发送的地址分配请求。S301: Receive an address allocation request sent by the node device to be connected to the network.
这里,当待入网节点设备需要网关设备进行本地地址分配的时候,会向网关设备发送用于地址分配请求,网关设备接收到地址分配请求后,会为待入网节点设备分配通信地址。在实际应用中,网关设备通过地址分配请求能够确定需要进行通信地址分配的待入网设备,在存在多个待入网设备需要进行本地分配的时候,网关设备能够基于地址分配请求为不同的待入网设备有序地分配通信地址,进一步提高设备地址分配的效率。Here, when the node device to be connected to the network needs the gateway device to perform local address allocation, it will send an address allocation request to the gateway device, and the gateway device will allocate a communication address for the node device to be connected to the network after receiving the address allocation request. In practical applications, the gateway device can determine the devices to be connected to the network that need to be assigned communication addresses through the address allocation request. Allocate communication addresses in an orderly manner, further improving the efficiency of device address allocation.
S302:基于所述地址分配请求,在所述网关设备的地址集中确定所述待入网节点设备的通信地址。S302: Based on the address assignment request, determine the communication address of the node device to be networked in the address set of the gateway device.
这里,网关设备响应地址分配请求,在网关设备的地址集中确定待入网节点设备的通信地址,从而能够实现为待入网节点设备分配通信地址。Here, the gateway device responds to the address allocation request, and determines the communication address of the node device to be connected to the network in the address set of the gateway device, so that the communication address of the node device to be connected to the network can be allocated.
在一实施例中,所述在网关设备的地址集中确定所述待入网节点设备的通信地址,包括:In an embodiment, the determining the communication address of the node device to be networked in the address set of the gateway device includes:
在所述网关设备的地址集中未分配的通信地址中,随机确定其中一个作为所述待入网节点设备的通信地址。Among the unallocated communication addresses in the address set of the gateway device, randomly determine one of them as the communication address of the node device to be connected to the network.
这里,当一个通信地址同时分配给多个节点设备,会导致共用一个通信地址的节点设备出现冲突,使得节点设备的数据交互等操作会发生错误,节点设备无法正常工作,因此网关设备在进行本地地址分配的时候会遵循一个通信地址分配给一个待接入节点设备,也就是说,不允许同一个通信地址设备分配给多个节点设备使用。此外,网关设备在网关设备的地址集中为待入网节点设备确定通信地址的时候,可以在网关设备的地址集中未分配的通信地址中随机为待入网节点设备分配通信地址,示例地,网关设备的地址集为2001-3000,当存在待接入节点设备A与待接入节点设备B先后向网关设备请求通信地址分配,那么可以从网关设备的地址集中随机确定一个未分配的通信地址给待接入节点设备A,例如,分配给待接入设备A的通信地址为2500,那么不能再将通信地址2500分配给待接入节点设备B,由于通信地址是随机分配的,因此,分配给待接入节点设备B通信地址可以为2800。Here, when a communication address is assigned to multiple node devices at the same time, it will cause conflicts between the node devices sharing the same communication address, which will cause errors in the data interaction and other operations of the node devices, and the node devices cannot work normally. Therefore, the gateway device is performing local When assigning addresses, a communication address is assigned to a node device to be accessed, that is to say, the same communication address device is not allowed to be assigned to multiple node devices. In addition, when the gateway device determines the communication address for the node device to be connected to the network in the address set of the gateway device, it can randomly assign a communication address to the node device to be connected to the network from the unallocated communication addresses in the address set of the gateway device. For example, the gateway device's The address set is 2001-3000. When there is node device A to be accessed and node device B to be accessed to request communication address allocation from the gateway device successively, an unallocated communication address can be randomly determined from the address set of the gateway device to the node to be connected to. Incoming node device A, for example, if the communication address assigned to the device A to be accessed is 2500, then the communication address 2500 can no longer be assigned to the node device B to be accessed. Since the communication address is randomly assigned, it is assigned to the The communication address of ingress node device B may be 2800.
在上述实施例中,蓝牙Mesh网络中的网关设备通过预先从服务器获取的地址集为待入网节点设备分配通信地址,由于网关设备能够提前获取到本地地址分配所使用的多个通信地址集合,从而设备不需要通过访问云端便能够为多个待入网节点设备直接分配通信地址,提高了为节点设备分配地址的效率,减少了设备到云端的流程消耗,并且还能提高设备分配地址的效率与成功率。In the above embodiments, the gateway device in the Bluetooth Mesh network allocates communication addresses for the node devices to be connected to the network through the address set obtained from the server in advance, because the gateway device can obtain multiple communication address sets used for local address allocation in advance, so The device can directly allocate communication addresses for multiple node devices to be connected to the network without accessing the cloud, which improves the efficiency of address allocation for node devices, reduces the process consumption from devices to the cloud, and can also improve the efficiency and success of device address allocation Rate.
本申请实施例还提供了另一种设备地址分配方法,如图4所示,所述方法应用于蓝牙Mesh网络中的网关设备,所述方法包括:The embodiment of the present application also provides another device address allocation method, as shown in Figure 4, the method is applied to a gateway device in a Bluetooth Mesh network, and the method includes:
S401:向服务器发送地址集分配请求。S401: Send an address set allocation request to the server.
这里,网关设备负责为待入网节点设备分配通信地址,相应地,网关设备需要获取进行本地地址分配所使用的通信地址,在实际应用中,网关设备进行本地地址分配所使用的通信地址是由服务器管理的,因此,网关设备通过向服务器发送的地址集分配请求,向服务器请求为网关设备分配地址集。Here, the gateway device is responsible for allocating communication addresses for the node devices to be connected to the network. Correspondingly, the gateway device needs to obtain the communication address used for local address allocation. In practical applications, the communication address used by the gateway device for local address allocation is provided by the server Therefore, the gateway device requests the server to allocate an address set for the gateway device through the address set allocation request sent to the server.
S402:接收所述服务器基于所述地址集分配请求返回的地址集;所述地址集表征所述网关设备进行本地地址分配所使用的通信地址集合。S402: Receive an address set returned by the server based on the address set allocation request; the address set represents a communication address set used by the gateway device for local address allocation.
这里,网关设备接收服务器基于地址集分配请求返回的地址集,地址集为网关设备进行本地地址分配所使用的通信地址集合,网关设备能够从地址集中为待入网节点设备分配通信地址。在实际应用中,由于网关设备获取的地址集中含有多个通信地址,一般地,地址集中的通信地址数量能够满足网关设备在支持的入网节点设备的最大数量范围内为待入网节点设备分配通信地址,因此,地址集能够满足网关设备为不同的待入网节点设备进行通信地址分配的需求,从而提高了设备地址分配的效率。Here, the gateway device receives the address set returned by the server based on the address set allocation request. The address set is the communication address set used by the gateway device for local address allocation, and the gateway device can allocate a communication address to the node device to be connected to the network from the address set. In practical applications, since the address set obtained by the gateway device contains multiple communication addresses, generally, the number of communication addresses in the address set can meet the requirements of the gateway device to allocate communication addresses to the node devices to be networked within the maximum number of supported network node devices , therefore, the address set can meet the requirements of the gateway device for allocating communication addresses for different node devices to be connected to the network, thereby improving the efficiency of device address allocation.
在一实施例中,所述向服务器发送地址集分配请求,包括:In an embodiment, the sending the address set allocation request to the server includes:
向所述服务器发送携带有所述网关设备的能力信息的地址集分配请求,以使所述服务器根据所述网关设备的能力信息在设定地址库中确定与所述网关设备的能力匹配的地址集;其中,所述网关设备的能力信息至少包括以下任一项:sending an address set allocation request carrying capability information of the gateway device to the server, so that the server determines an address matching the capability of the gateway device in a set address library according to the capability information of the gateway device set; wherein, the capability information of the gateway device includes at least any of the following:
所述网关设备的入网节点设备的最大接入量;The maximum access volume of the network access node device of the gateway device;
所述网关设备当前入网节点设备的接入量;The access volume of the current network access node device of the gateway device;
所述蓝牙Mesh网络中全部网关设备的数量。The number of all gateway devices in the Bluetooth Mesh network.
这里,网关设备向服务器发送的地址集分配请求携带有网关设备的能力信息,从而服务器向网关设备返回的地址集能够与网关设备的能力匹配,其中,网关设备的能力信息可以为网关设备的入网节点设备的最大接入量,在实际应用中,网关设备存在最大的承载量,也就是说,网关设备支持的入网节点设备的数量是有限的,例如,网关设备可以同时支持5个入网节点设备,服务器根据地址集分配请求携带的网关设备的能力信息,向网关设别返回的地址集中包含了5个通信地址,使得网关设备有充足的通信地址分配给待入网节点设备,避免在为节点设备分配地址的时候多次与服务器进行通信,提高了节点设备地址的分配效率。在实际应用中,网关设备的能力信息还可以为网关设备当前入网节点设备的接入量,通过网关设备当前入网节点设备的接入量,可以获知网关设备当前还允许的待入网设备的接入量,以使服务器向网关设备返回的地址集的通信地址数量至少能够满足网关设备可允许的待入网设备的接入量。此外,地址集分配请求还可以携带蓝牙Mesh网络中网关设备的数量,那么可以通过平均分配的方式确定为每个网关设备分配的地址集所含有的通信地址数量。Here, the address set allocation request sent by the gateway device to the server carries the capability information of the gateway device, so that the address set returned by the server to the gateway device can match the capability of the gateway device, wherein the capability information of the gateway device can be the gateway device's network access The maximum access capacity of node devices. In practical applications, gateway devices have the largest carrying capacity, that is to say, the number of network access node devices supported by gateway devices is limited. For example, gateway devices can support 5 network access node devices at the same time , according to the capability information of the gateway device carried in the address set allocation request, the address set returned by the server to the gateway device contains 5 communication addresses, so that the gateway device has enough communication addresses to allocate to the node device to be connected to the network, and avoids When assigning addresses, it communicates with the server multiple times, which improves the efficiency of assigning node device addresses. In practical applications, the capability information of the gateway device can also be the access amount of the current network node device of the gateway device. Through the access amount of the current network node device of the gateway device, the access of the device to be networked that is currently allowed by the gateway device can be obtained. amount, so that the number of communication addresses in the address set returned by the server to the gateway device can at least meet the access amount of devices to be connected to the network allowed by the gateway device. In addition, the address set allocation request can also carry the number of gateway devices in the Bluetooth Mesh network, so the number of communication addresses contained in the address set allocated to each gateway device can be determined by means of average allocation.
在一实施例中,所述向服务器发送地址集分配请求,包括:In an embodiment, the sending the address set allocation request to the server includes:
在存在待入网节点设备向所述网关设备发起地址分配请求的情况下,向所述服务器发送所述地址集分配请求。When there is a node device to be networked that initiates an address allocation request to the gateway device, the address set allocation request is sent to the server.
这里,网关设备检测到存在待入网节点设备的情况下,表示网关设备需要向待入网节点设备分配通信地址,从而可以通过待入网节点设备的存在情况,触发网关设备向服务器发送地址集分配请求,以从服务器中获取地址集为待入网节点设备分配通信地址。在实际应用中,当在网关设备已经获取了地址集或者网关设备的地址集中存在可分配的通信地址的情况下,即使存在待入网节点设备,也不需要再向服务器发送地址集分配请求,从而可以降低节点设备地址分配的流程,降低网络资源的消耗。如图5所示,图5示出了一种设备地址分配的流程示意图,首先,待入网节点设备与网关设备建立连接,网关设备检测到存在待入网节点设备后,向服务器发送地址集分配请求,并接收服务器基于地址集分配请求返回的地址集,待入网节点设备向网关设备发出地址分配请求,网关设备基于地址分配请求在网关设备的地址集中确定待入网节点设备的通信地址,并将通信地址返回到待入网节点设备,从而提高了为设备分配地址的效率。Here, when the gateway device detects that there is a node device to be connected to the network, it means that the gateway device needs to allocate a communication address to the node device to be connected to the network, so that the gateway device can be triggered to send an address set allocation request to the server through the existence of the node device to be connected to the network. Obtain the address set from the server to allocate communication addresses for the node devices to be connected to the network. In practical applications, when the gateway device has acquired the address set or there is an assignable communication address in the address set of the gateway device, even if there is a node device to be connected to the network, there is no need to send an address set allocation request to the server, thus It can reduce the process of node device address allocation and reduce the consumption of network resources. As shown in Figure 5, Figure 5 shows a schematic flow diagram of device address allocation. First, the node device to be connected to the network establishes a connection with the gateway device. After the gateway device detects the existence of the node device to be connected to the network, it sends an address set allocation request to the server. , and receive the address set returned by the server based on the address set allocation request, the node device to be networked sends an address allocation request to the gateway device, and the gateway device determines the communication address of the node device to be networked in the address set of the gateway device based on the address allocation request, and communicates The address is returned to the node device to be connected to the network, thereby improving the efficiency of address allocation for the device.
在上述实施例中,蓝牙Mesh网络中的网关设备通过预先从服务器获取的地址集为待入网节点设备分配通信地址,从获取的地址集中为待入网节点设备分配地址,提高了节点设备地址的分配效率,并且还能将网关设备的能力信息发送至服务器,从而能够获取与网关设备相匹配的地址集,尽量通过一次请求获取合适数量的地址集,减少了在为节点设备分配地址的时候与服务器的通信次数,进一步地减少了设备到云端的流程消耗。In the above-mentioned embodiment, the gateway device in the Bluetooth Mesh network allocates a communication address for the node device to be connected to the network through the address set obtained from the server in advance, and assigns an address to the node device to be connected to the network from the obtained address set, which improves the distribution of the node device address efficiency, and can also send the capability information of the gateway device to the server, so that the address set that matches the gateway device can be obtained, and an appropriate number of address sets can be obtained through one request as far as possible, reducing the need for communication with the server when assigning addresses to node devices. communication times, further reducing the process consumption from the device to the cloud.
本申请实施例还提供了另一种设备地址分配方法,如图6所示,所述方法应用于服务器,所述方法包括:The embodiment of the present application also provides another device address allocation method, as shown in Figure 6, the method is applied to the server, and the method includes:
S601:接收蓝牙Mesh网络中的网关设备发送的地址集分配请求;所述蓝牙Mesh网络中包括至少一个网关设备。S601: Receive an address set allocation request sent by a gateway device in a Bluetooth Mesh network; the Bluetooth Mesh network includes at least one gateway device.
这里,服务器负责维护Mesh网络的通信地址,并且还负责在维护的Mesh网络的通信地址中为网关设备分配地址集,其中,服务器是基于网关设备发送的地址集分配请求为网关设备分配对应的地址集。Here, the server is responsible for maintaining the communication address of the Mesh network, and is also responsible for allocating an address set for the gateway device in the communication address of the maintained Mesh network, wherein the server allocates the corresponding address for the gateway device based on the address set allocation request sent by the gateway device set.
S602:在设定地址库中确定所述网关设备的地址集;所述地址集表征所述网关设备进行本地地址分配所使用的通信地址集合。S602: Determine an address set of the gateway device in a set address library; the address set represents a communication address set used by the gateway device for local address allocation.
这里,设定地址库中存储了服务器负责维护的Mesh网络的通信地址,其中,设定地址库中的通信地址可以以地址段的形式存储,也可以是单个地址。服务器基于网关设备的地址集分配请求在设定地址库中确定网关设备的地址集,其中,网关设备的地址集为网关设备进行本地地址分配所使用的通信地址集合,也就是说,网关设备可以从地址集中为待入网设备分配通信地址。在实际应用中,如果存在多个网关设备先后向服务器发送地址集分配请求,那么返回给每个网关设备的地址集是不相同的,能够保证一个地址集分配给一个网关设备,进而保证网关设备为不同待入网设备分配的通信地址是不相同的。Here, the communication address of the Mesh network that the server is responsible for maintaining is stored in the set address library, where the communication address in the set address library can be stored in the form of address segments, or can be a single address. Based on the address set allocation request of the gateway device, the server determines the address set of the gateway device in the set address library, wherein the address set of the gateway device is the communication address set used by the gateway device for local address allocation, that is, the gateway device can Allocate communication addresses for devices to be connected to the network from the address set. In practical applications, if there are multiple gateway devices that send address set allocation requests to the server successively, the address sets returned to each gateway device are different, which can ensure that an address set is assigned to a gateway device, thereby ensuring that the gateway device The communication addresses assigned to different devices to be connected to the network are different.
在一实施例中,所述地址集分配请求还携带所述网关设备的能力信息,所述在设定地址库中确定所述网关设备的地址集,包括:In an embodiment, the address set allocation request also carries capability information of the gateway device, and the determining the address set of the gateway device in the set address library includes:
根据所述网关设备的能力信息,在所述设定地址库中确定与所述网关设备的能力匹配的地址集;其中,所述网关设备的能力信息至少包括以下任一项:According to the capability information of the gateway device, an address set matching the capability of the gateway device is determined in the set address library; wherein the capability information of the gateway device includes at least any of the following:
所述网关设备的入网节点设备的最大接入量;The maximum access volume of the network access node device of the gateway device;
所述网关设备当前入网节点设备的接入量;The access volume of the current network access node device of the gateway device;
所述蓝牙Mesh网络中全部网关设备的数量。The number of all gateway devices in the Bluetooth Mesh network.
这里,服务器接收的网关设备发送的地址集分配请求中还携带有网关设备的能力信息,从而服务器能够基于网关设备的能力信息,确定与网关设备的能力匹配的地址集,能够保证分配给网关设备的地址集满足网关设备为待入网节点设备进行通信地址分配的需求,尽量减少为设备分配地址过程中与服务器的通信次数,减少了网络资源的消耗。其中,地址集分配请求中携带的网关设备的能力信息可以为网关设备的入网节点设备的最大接入量,在这种情况下,向网关设备返回的地址集中的通信地址的数量可以与网关设备的入网节点设备的最大接入量相同,示例地,当网关设备的入网节点设备的最大接入量为5,也就是说网关设备最多同时支持5个节点设备的接入,那么对应分配给网关设备的地址集中包含5个通信地址,能够满足网关设备为待入网节点设备分配通信地址的需求。在实际应用中,地址集分配请求携带的网关设备的能力信息可以为网关设备当前入网节点设备的接入量,在网络状况稳定的时候,网关设备的入网节点设备的最大接入量通常为保持不变的,因此,可以通过网关设备当前入网节点设备的接入量确定网关设备当前支持的待入网节点设备的接入量,示例地,网关设备最多同时支持5个节点设备的接入,网关设备当前已接入3个入网节点设备,也就是说,网关设备还可接入2个入网节点设备,在这种情况下,由于节点设备与网关之间的连接通常保持稳定状态,因此,向网关设备分配的地址集中至少包含2个通信地址,从而可以满足节点设备至少为两个待入网节点设备进行通信地址的分配。此外,地址集分配请求携带的网关设备的能力信息还可以为蓝牙Mesh网络中网关设备的数量,在这种情况下,可以为蓝牙Mesh网络中的不同网关设备平均分配通信地址,示例地,假设设定地址库中一共存有100个通信地址,蓝牙Mesh网络中共有5个网关设备,那么对应分配给网关设备的地址集含有20个通信地址。Here, the address set allocation request sent by the gateway device received by the server also carries the capability information of the gateway device, so that the server can determine the address set that matches the capability of the gateway device based on the capability information of the gateway device, and can ensure that the address set is allocated to the gateway device. The address set meets the needs of the gateway device to allocate communication addresses for the node devices to be connected to the network, minimizes the number of communications with the server during the process of assigning addresses to devices, and reduces the consumption of network resources. Wherein, the capability information of the gateway device carried in the address set allocation request may be the maximum number of network access node devices of the gateway device. In this case, the number of communication addresses in the address set returned to the gateway device may be equal to that of the gateway device The maximum access capacity of the network access node devices is the same. For example, when the maximum access capacity of the network access node devices of the gateway device is 5, that is to say, the gateway device supports the access of up to 5 node devices at the same time, then the corresponding allocation to the gateway The address set of the device contains 5 communication addresses, which can meet the needs of the gateway device to allocate communication addresses for the node devices to be connected to the network. In practical applications, the capability information of the gateway device carried in the address set allocation request may be the access amount of the gateway device's current network access node device. When the network condition is stable, the maximum access amount of the network access node device of the gateway device is usually maintained at Unchanged, therefore, the access volume of the node devices currently supported by the gateway device to be connected to the network can be determined by the access volume of the current network node devices of the gateway device. For example, the gateway device supports the access of up to 5 node devices at the same time. The device is currently connected to 3 network access node devices, that is to say, the gateway device can also connect to 2 network access node devices. In this case, since the connection between the node device and the gateway is usually in a stable state, the The address set allocated by the gateway device includes at least two communication addresses, so that the node device can allocate communication addresses for at least two node devices to be connected to the network. In addition, the capability information of the gateway device carried in the address set allocation request can also be the number of gateway devices in the Bluetooth Mesh network. In this case, communication addresses can be evenly allocated to different gateway devices in the Bluetooth Mesh network. For example, suppose Set a total of 100 communication addresses in the address library, and a total of 5 gateway devices in the Bluetooth Mesh network, then the corresponding address set assigned to the gateway device contains 20 communication addresses.
在一实施例中,如图7所示,所述在设定地址库中确定所述网关设备的地址集,所述方法还包括:In an embodiment, as shown in FIG. 7 , the address set of the gateway device is determined in the set address library, and the method further includes:
S701:根据所述网关设备的位置信息,确定所述网关设备所在区域中至少两个蓝牙Mesh网络中节点设备的平均数。S701: Determine the average number of node devices in at least two Bluetooth Mesh networks in the area where the gateway device is located according to the location information of the gateway device.
这里,服务器还可以获取网关设备的位置信息,从而可以统计网关设备所在的区域范围内其他网关设备所接入的节点设备的数量,进而确定网关设备所在区域中至少两个蓝牙Mesh网络中节点设备的平均数,通过至少两个蓝牙Mesh网络中节点设备的平均数,可以估计网关设备可能接入的入网节点设备的数量。Here, the server can also obtain the location information of the gateway device, so that it can count the number of node devices accessed by other gateway devices within the area where the gateway device is located, and then determine at least two node devices in the Bluetooth Mesh network in the area where the gateway device is located The average number of node devices in at least two Bluetooth Mesh networks can estimate the number of network access node devices that the gateway device may access.
S702:根据所述平均数在所述设定地址库中确定所述地址集;所述地址集中通信地址的数量与所述平均数相匹配。S702: Determine the address set in the set address library according to the average number; the number of communication addresses in the address set matches the average number.
这里,平均数可以作为预测网关设备接入的入网节点设备的数量,因此,通过平均数可以在设定地址库中确定分配给网关设备的地址集,其中,地址集中包含的通信地址的数量与平均数相匹配,可以尽量满足网关设备为待入网节点设备进行通信地址分配。Here, the average number can be used to predict the number of network access node devices accessed by the gateway device. Therefore, the average number can be used to determine the address set allocated to the gateway device in the set address library, wherein the number of communication addresses contained in the address set is the same as If the average numbers match, the gateway device can satisfy the communication address allocation for the node device to be connected to the network as far as possible.
在一实施例中,所述在设定地址库中确定所述网关设备的地址集,包括:In an embodiment, the determining the address set of the gateway device in the set address library includes:
在所述设定地址库中未分配给网关设备的至少两个地址集中,随机确定其中一个作为所述网关设备的地址集。Among the at least two address sets not assigned to the gateway device in the set address library, randomly determine one of them as the address set of the gateway device.
这里,设定地址库中存储了至少两个地址集,其中,至少两个地址集中的每个通信地址均为服务器管理的蓝牙Mesh网络的通信地址。在实际应用中,网关设备能够根据分配的地址集为待入网节点设备分配通信地址,当存在多个网关设备所分配的地址集相同的情况下,将会存在多个待入网节点设备分配的通信地址是相同的,导致节点设备的通信地址发生冲突而使节点设备无法正常运行。因此,在为网关设备分配地址集的过程中,是在设定地址库中未分配给网关设备的地址集中随机确定出网关设备的地址集,从而能够确保一个地址集分配给一个网关设备。如图8所示,图8示出了服务器为不同网关设备分配地址集的示意图,其中,设定地址库中存储有10个地址集,在这10个地址集中,地址集A与地址集B已经分配给其他网关设备,当网关设备A与网关设备B先后发送地址集分配请求的情况下,服务器会在除地址集A与地址集B之外的八个地址集中,随机确定分配给网关设备A与网关设备B的地址集,例如,分配给网关设备A的地址集为地址集C,那么分配给网关设备B地址集可以为地址集F。Here, at least two address sets are stored in the set address library, wherein each communication address in the at least two address sets is a communication address of the Bluetooth Mesh network managed by the server. In practical applications, the gateway device can assign communication addresses to the node devices to be connected to the network according to the assigned address set. The addresses are the same, which causes the communication addresses of the node devices to conflict and make the node devices unable to operate normally. Therefore, in the process of allocating the address set for the gateway device, the address set of the gateway device is randomly determined from the address sets not allocated to the gateway device in the set address library, so as to ensure that one address set is allocated to one gateway device. As shown in Figure 8, Figure 8 shows a schematic diagram of the server allocating address sets for different gateway devices, where 10 address sets are stored in the set address library, and among these 10 address sets, address set A and address set B Already assigned to other gateway devices, when gateway device A and gateway device B send address set allocation requests successively, the server will randomly determine the address set to be assigned to the gateway device in the eight address sets except address set A and address set B The address set of A and gateway device B, for example, the address set allocated to gateway device A is address set C, then the address set allocated to gateway device B may be address set F.
在一实施例中,如图9所示,在设定地址库中确定所述网关设备的地址集之前,所述方法还包括:In an embodiment, as shown in FIG. 9, before determining the address set of the gateway device in the setting address library, the method further includes:
S901:根据设定规则,将管理的蓝牙Mesh网络的通信地址划分为至少两个地址集。S901: Divide the communication addresses of the managed Bluetooth Mesh network into at least two address sets according to a set rule.
这里,服务器能够管理蓝牙Mesh网络中的多个通信地址,示例地,服务器能够管理10000个通信地址,为了方便服务器对多个通信地址的管理,在实际应用中,可以根据设定规则,将服务器管理的Mesh网络的通信地址划分至少两个地址集,其中,设定规则可以为按照一定的长度区间对管理的地址进行划分,示例地,按照1000个地址为一个区间集,则可以将服务器管理的10000个地址划分10个地址集,其中,第一个地址集为1-1000,第二个地址集为1001-2000,以此类推,第十个地址集为9001-1000。Here, the server can manage multiple communication addresses in the Bluetooth Mesh network. For example, the server can manage 10,000 communication addresses. In order to facilitate the management of multiple communication addresses by the server, in practical applications, the server can be set to The communication address of the managed Mesh network is divided into at least two address sets, wherein the setting rule can be to divide the managed addresses according to a certain length interval. For example, according to 1000 addresses as one interval set, the server management can be The 10,000 addresses are divided into 10 address sets, where the first address set is 1-1000, the second address set is 1001-2000, and so on, and the tenth address set is 9001-1000.
S902:将所述至少两个地址集存储到所述设定地址库中。S902: Store the at least two address sets in the set address library.
这里,将划分的至少两个地址集存储到设定地址库中,从而设定地址库中是以地址集的形式将服务器管理的多个通信地址进行存储,那么在根据设定地址库中确定网关设备的地址集的时候,可以直接在设定地址库中存储的至少两个地址集中选择。Here, the divided at least two address sets are stored in the set address base, so that the set address base stores a plurality of communication addresses managed by the server in the form of address sets, then it is determined according to the set address base When selecting the address set of the gateway device, it can be directly selected from at least two address sets stored in the address library.
S603:将所述网关设备的地址集返回至所述网关设备。S603: Return the address set of the gateway device to the gateway device.
这里,服务器将确定的地址集返回至网关设备,网关设备可以基于地址集中的通信地址为待入网节点设备分配通信地址。如图10所示,图10示出了服务器为网关设备分配地址集的流程图,服务器接收网关设备发送的地址集分配请求后,在设定地址库中确定分配给网关设备的地址集,将地址集返回至发出地址集分配请求的网关设备。Here, the server returns the determined address set to the gateway device, and the gateway device can assign a communication address to the node device to be connected to the network based on the communication addresses in the address set. As shown in Figure 10, Figure 10 shows a flow chart of the server assigning an address set to the gateway device. After receiving the address set allocation request sent by the gateway device, the server determines the address set allocated to the gateway device in the set address library, and assigns the address set to the gateway device. The address set is returned to the gateway device that issued the address set assignment request.
在上述实施例中,服务器接收网关设备发送的分配地址集请求以使服务器在蓝牙Mesh网络的通信地址中为网关设备分配地址集,从而能够为网关设备分配批量的地址以使网关进行本地地址分配,提高了设备地址分配的效率与成功率。In the above embodiment, the server receives the address set allocation request sent by the gateway device to enable the server to allocate an address set for the gateway device in the communication address of the Bluetooth Mesh network, so that the gateway device can be allocated a batch of addresses to enable the gateway to perform local address allocation , improving the efficiency and success rate of device address allocation.
为实现本申请实施例的方法,本申请实施例还提供了一种设备地址分配装置,如图11所示,该装置包括:In order to implement the method of the embodiment of the present application, the embodiment of the present application also provides a device address allocation device, as shown in Figure 11, the device includes:
第一确定单元1101,用于若存在待入网节点设备向所述网关设备发起地址分配请求,则在网关设备的地址集中确定所述待入网节点设备的通信地址;所述地址集表征所述网关设备进行本地地址分配所使用的通信地址集合,所述地址集由服务器向所述网关设备预先发送。The first determining
在一实施例中,所述第一确定单元1101在网关设备的地址集中确定所述待入网节点设备的通信地址时,还用于:In an embodiment, when the first determining
接收所述待入网节点设备发送的地址分配请求;receiving an address allocation request sent by the node device to be connected to the network;
基于所述地址分配请求,在所述网关设备的地址集中确定所述待入网节点设备的通信地址。Based on the address allocation request, determine the communication address of the node device to be networked in the address set of the gateway device.
在一实施例中,所述第一确定单元1101在网关设备的地址集中确定所述待入网节点设备的通信地址时,还用于:In an embodiment, when the first determining
在所述网关设备的地址集中未分配的通信地址中,随机确定其中一个作为所述待入网节点设备的通信地址。Among the unallocated communication addresses in the address set of the gateway device, randomly determine one of them as the communication address of the node device to be connected to the network.
实际应用时,第一确定单元1101可由设备地址分配装置中的处理器来实现。当然,处理器需要运行存储器中存储的程序来实现上述各程序模块的功能。In practical applications, the first determining
需要说明的是,上述图11实施例提供的设备地址分配装置在进行设备地址分配时,仅以上述各程序模块的划分进行举例说明,实际应用中,可以根据需要而将上述处理分配由不同的程序模块完成,即将装置的内部结构划分成不同的程序模块,以完成以上描述的全部或者部分处理。另外,上述实施例提供的设备地址分配装置与设备地址分配方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。It should be noted that, when the equipment address allocation device provided by the embodiment of FIG. 11 above performs equipment address allocation, it only uses the division of the above-mentioned program modules as an example for illustration. In practical applications, the above-mentioned processing can be allocated by different Completion of program modules means that the internal structure of the device is divided into different program modules to complete all or part of the processing described above. In addition, the apparatus for allocating device addresses provided by the above embodiments is based on the same idea as the embodiments of the method for allocating device addresses, and its specific implementation process is detailed in the method embodiments, and will not be repeated here.
本申请实施例还提供了另一种设备地址分配装置,如图12所示,该装置包括:The embodiment of the present application also provides another device address allocation device, as shown in Figure 12, the device includes:
第一发送单元1201,用于向服务器发送地址集分配请求;The
第一接收单元1202,用于接收所述服务器基于所述地址集分配请求返回的地址集;所述地址集表征所述网关设备进行本地地址分配所使用的通信地址集合。The
在一实施例中,所述第一发送单元1201在向服务器发送地址集分配请求时,还用于:In an embodiment, when the
向所述服务器发送携带有所述网关设备的能力信息的地址集分配请求,以使所述服务器根据所述网关设备的能力信息在设定地址库中确定与所述网关设备的能力匹配的地址集;其中,所述网关设备的能力信息至少包括以下任一项:sending an address set allocation request carrying capability information of the gateway device to the server, so that the server determines an address matching the capability of the gateway device in a set address library according to the capability information of the gateway device set; wherein, the capability information of the gateway device includes at least any of the following:
所述网关设备的入网节点设备的最大接入量;The maximum access volume of the network access node device of the gateway device;
所述网关设备当前入网节点设备的接入量;The access volume of the current network access node device of the gateway device;
所述蓝牙Mesh网络中全部网关设备的数量。The number of all gateway devices in the Bluetooth Mesh network.
在一实施例中,所述第一发送单元1201在向服务器发送地址集分配请求时,还用于:In an embodiment, when the
在存在待入网节点设备向所述网关设备发起地址分配请求的情况下,向所述服务器发送所述地址集分配请求。When there is a node device to be networked that initiates an address allocation request to the gateway device, the address set allocation request is sent to the server.
实际应用时,第一发送单元1201、第二接收单元1202可由设备地址分配装置中的处理器来实现。当然,处理器需要运行存储器中存储的程序来实现上述各程序模块的功能。In actual application, the
需要说明的是,上述图12实施例提供的设备地址分配装置在进行设备地址分配时,仅以上述各程序模块的划分进行举例说明,实际应用中,可以根据需要而将上述处理分配由不同的程序模块完成,即将装置的内部结构划分成不同的程序模块,以完成以上描述的全部或者部分处理。另外,上述实施例提供的设备地址分配装置与设备地址分配方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。It should be noted that, when the equipment address allocation device provided by the embodiment of FIG. 12 above performs equipment address allocation, it only uses the division of the above-mentioned program modules as an example for illustration. In practical applications, the above-mentioned processing can be allocated by different Completion of program modules means that the internal structure of the device is divided into different program modules to complete all or part of the processing described above. In addition, the apparatus for allocating device addresses provided by the above embodiments is based on the same idea as the embodiments of the method for allocating device addresses, and its specific implementation process is detailed in the method embodiments, and will not be repeated here.
本申请实施例还提供了另一种设备地址分配装置,如图13所示,该装置包括:The embodiment of the present application also provides another device address allocation device, as shown in Figure 13, the device includes:
第二接收单元1301,用于接收蓝牙Mesh网络中的网关设备发送的地址集分配请求;所述蓝牙Mesh网络中包括至少一个网关设备;The
第二确定单元1302,用于在设定地址库中确定所述网关设备的地址集;所述地址集表征所述网关设备进行本地地址分配所使用的通信地址集合;The second determining
第二发送单元1303,用于将所述网关设备的地址集返回至所述网关设备。The second sending unit 1303 is configured to return the address set of the gateway device to the gateway device.
在一实施例中,所述地址集分配请求还携带所述网关设备的能力信息,所述第二确定单元1302在设定地址库中确定所述网关设备的地址集时,还用于:In an embodiment, the address set allocation request also carries capability information of the gateway device, and the
根据所述网关设备的能力信息,在所述设定地址库中确定与所述网关设备的能力匹配的地址集;其中,所述网关设备的能力信息至少包括以下任一项:According to the capability information of the gateway device, an address set matching the capability of the gateway device is determined in the set address library; wherein the capability information of the gateway device includes at least any of the following:
所述网关设备的入网节点设备的最大接入量;The maximum access volume of the network access node device of the gateway device;
所述网关设备当前入网节点设备的接入量;The access volume of the current network access node device of the gateway device;
所述蓝牙Mesh网络中全部网关设备的数量。The number of all gateway devices in the Bluetooth Mesh network.
在一实施例中,所述第二确定单元1302在设定地址库中确定所述网关设备的地址集时,还用于:In an embodiment, when the
根据所述网关设备的位置信息,确定所述网关设备所在区域中至少两个蓝牙Mesh网络中节点设备的平均数;According to the location information of the gateway device, determine the average number of node devices in at least two Bluetooth Mesh networks in the area where the gateway device is located;
根据所述平均数在所述设定地址库中确定所述地址集;所述地址集中通信地址的数量与所述平均数相匹配。The address set is determined in the set address library according to the average number; the number of communication addresses in the address set matches the average number.
在一实施例中,所述第二确定单元1302在设定地址库中确定所述网关设备的地址集时,还用于:In an embodiment, when the
在所述设定地址库中未分配给网关设备的至少两个地址集中,随机确定其中一个作为所述网关设备的地址集。Among the at least two address sets not assigned to the gateway device in the set address library, randomly determine one of them as the address set of the gateway device.
在一实施例中,所述第二确定单元1302在设定地址库中确定所述网关设备的地址集之前,所述装置还用于:In an embodiment, before the
根据设定规则,将管理的蓝牙Mesh网络的通信地址划分为至少两个地址集;Divide the communication addresses of the managed Bluetooth Mesh network into at least two address sets according to the set rules;
将所述至少两个地址集存储到所述设定地址库中。storing the at least two address sets in the set address library.
实际应用时,第二接收单元1301、第二确定单元1302、第二发送单元1303可由设备地址分配装置中的处理器来实现。当然,处理器需要运行存储器中存储的程序来实现上述各程序模块的功能。In actual application, the
需要说明的是,上述图13实施例提供的设备地址分配装置在进行设备地址分配时,仅以上述各程序模块的划分进行举例说明,实际应用中,可以根据需要而将上述处理分配由不同的程序模块完成,即将装置的内部结构划分成不同的程序模块,以完成以上描述的全部或者部分处理。另外,上述实施例提供的设备地址分配装置与设备地址分配方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。It should be noted that, when the equipment address allocation device provided by the embodiment of FIG. 13 above performs equipment address allocation, it only uses the division of the above-mentioned program modules as an example. In practical applications, the above-mentioned processing can be allocated by different Completion of program modules means that the internal structure of the device is divided into different program modules to complete all or part of the processing described above. In addition, the apparatus for allocating device addresses provided by the above embodiments is based on the same idea as the embodiments of the method for allocating device addresses, and its specific implementation process is detailed in the method embodiments, and will not be repeated here.
基于上述程序模块的硬件实现,且为了实现本申请实施例的方法,本申请实施例还提供了一种电子设备,图14为本申请实施例电子设备的硬件组成结构示意图,如图14所示,电子设备包括:Based on the hardware implementation of the above program modules, and in order to implement the method of the embodiment of the present application, the embodiment of the present application also provides an electronic device. FIG. 14 is a schematic diagram of the hardware composition structure of the electronic device of the embodiment of the present application, as shown in FIG. 14 , the electronic equipment includes:
通信接口1,能够与其它设备比如网络设备等进行信息交互;
处理器2,与通信接口1连接,以实现与其它设备进行信息交互,用于运行计算机程序时,执行上述一个或多个技术方案提供的设备地址分配方法。而所述计算机程序存储在存储器3上。The
当然,实际应用时,电子设备中的各个组件通过总线系统4耦合在一起。可理解,总线系统4用于实现这些组件之间的连接通信。总线系统4除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图14中将各种总线都标为总线系统4。Of course, in actual application, various components in the electronic device are coupled together through the
本申请实施例中的存储器3用于存储各种类型的数据以支持电子设备的操作。这些数据的示例包括:用于在电子设备上操作的任何计算机程序。The
可以理解,存储器3可以是易失性存储器或非易失性存储器,也可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(ROM,Read Only Memory)、可编程只读存储器(PROM,Programmable Read-Only Memory)、可擦除可编程只读存储器(EPROM,Erasable Programmable Read-Only Memory)、电可擦除可编程只读存储器(EEPROM,Electrically Erasable Programmable Read-Only Memory)、磁性随机存取存储器(FRAM,ferromagnetic random access memory)、快闪存储器(Flash Memory)、磁表面存储器、光盘、或只读光盘(CD-ROM,Compact Disc Read-Only Memory);磁表面存储器可以是磁盘存储器或磁带存储器。易失性存储器可以是随机存取存储器(RAM,Random AccessMemory),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(SRAM,Static Random Access Memory)、同步静态随机存取存储器(SSRAM,Synchronous Static Random Access Memory)、动态随机存取存储器(DRAM,Dynamic Random Access Memory)、同步动态随机存取存储器(SDRAM,SynchronousDynamic Random Access Memory)、双倍数据速率同步动态随机存取存储器(DDRSDRAM,Double Data Rate Synchronous Dynamic Random Access Memory)、增强型同步动态随机存取存储器(ESDRAM,Enhanced Synchronous Dynamic Random Access Memory)、同步连接动态随机存取存储器(SLDRAM,SyncLink Dynamic Random Access Memory)、直接内存总线随机存取存储器(DRRAM,Direct Rambus Random Access Memory)。本申请实施例描述的存储器3旨在包括但不限于这些和任意其它适合类型的存储器。It can be understood that the
上述本申请实施例揭示的方法可以应用于处理器2中,或者由处理器2实现。处理器2可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过处理器2中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器2可以是通用处理器、DSP,或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。处理器2可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者任何常规的处理器等。结合本申请实施例所公开的方法的步骤,可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于存储介质中,该存储介质位于存储器3,处理器2读取存储器3中的程序,结合其硬件完成前述方法的步骤。The methods disclosed in the foregoing embodiments of the present application may be applied to the
处理器2执行所述程序时实现本申请实施例的各个方法中的相应流程,为了简洁,在此不再赘述。When the
在示例性实施例中,本申请实施例还提供了一种存储介质,即计算机存储介质,具体为计算机可读存储介质,例如包括存储计算机程序的存储器3,上述计算机程序可由处理器2执行,以完成前述方法所述步骤。计算机可读存储介质可以是FRAM、ROM、PROM、EPROM、EEPROM、Flash Memory、磁表面存储器、光盘、或CD-ROM等存储器。In an exemplary embodiment, the embodiment of the present application also provides a storage medium, that is, a computer storage medium, specifically a computer-readable storage medium, for example, including a
在本申请所提供的几个实施例中,应该理解到,所揭露的装置、终端和方法,可以通过其它的方式实现。以上所描述的设备实施例仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,如:多个单元或组件可以结合,或可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的各组成部分相互之间的耦合、或直接耦合、或通信连接可以是通过一些接口,设备或单元的间接耦合或通信连接,可以是电性的、机械的或其它形式的。In the several embodiments provided in this application, it should be understood that the disclosed device, terminal and method may be implemented in other ways. The device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods, such as: multiple units or components can be combined, or May be integrated into another system, or some features may be ignored, or not implemented. In addition, the coupling, or direct coupling, or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be electrical, mechanical or other forms of.
上述作为分离部件说明的单元可以是、或也可以不是物理上分开的,作为单元显示的部件可以是、或也可以不是物理单元,即可以位于一个地方,也可以分布到多个网络单元上;可以根据实际的需要选择其中的部分或全部单元来实现本实施例方案的目的。The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units; Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本申请各实施例中的各功能单元可以全部集成在一个处理单元中,也可以是各单元分别单独作为一个单元,也可以两个或两个以上单元集成在一个单元中;上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application can be integrated into one processing unit, or each unit can be used as a single unit, or two or more units can be integrated into one unit; the above-mentioned integration The unit can be realized in the form of hardware or in the form of hardware plus software functional unit.
本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于一计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:移动存储设备、ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。Those of ordinary skill in the art can understand that all or part of the steps for realizing the above-mentioned method embodiments can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the It includes the steps of the above method embodiments; and the aforementioned storage medium includes: various media that can store program codes such as removable storage devices, ROM, RAM, magnetic disks or optical disks.
或者,本申请上述集成的单元如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台电子设备(可以是个人计算机、服务器、或者网络设备等)执行本申请各个实施例所述方法的全部或部分。而前述的存储介质包括:移动存储设备、ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。Alternatively, if the above-mentioned integrated units of the present application are realized in the form of software function modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for Make an electronic device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: various media capable of storing program codes such as removable storage devices, ROM, RAM, magnetic disks or optical disks.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above is only a specific implementation of the application, but the scope of protection of the application is not limited thereto. Anyone familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the application. Should be covered within the protection scope of this application. Therefore, the protection scope of the present application should be determined by the protection scope of the claims.
Claims (16)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110784318.3A CN115604688A (en) | 2021-07-12 | 2021-07-12 | Device address allocation method, device, electronic device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110784318.3A CN115604688A (en) | 2021-07-12 | 2021-07-12 | Device address allocation method, device, electronic device and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115604688A true CN115604688A (en) | 2023-01-13 |
Family
ID=84841658
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110784318.3A Pending CN115604688A (en) | 2021-07-12 | 2021-07-12 | Device address allocation method, device, electronic device and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115604688A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101536471A (en) * | 2006-12-05 | 2009-09-16 | 株式会社东芝 | Assisted proactive ip address acquisition |
CN109120729A (en) * | 2017-06-23 | 2019-01-01 | 中国电信股份有限公司 | address allocation management method, 6LoWPAN gateway and system |
CN111132090A (en) * | 2019-12-20 | 2020-05-08 | 中国联合网络通信集团有限公司 | A method and device for accessing the Internet of Things |
CN111556489A (en) * | 2020-04-30 | 2020-08-18 | 杭州涂鸦信息技术有限公司 | Communication address allocation method, device, equipment and medium based on Sub-G network |
CN111683159A (en) * | 2019-03-11 | 2020-09-18 | 阿里巴巴集团控股有限公司 | IP address allocation method, device, system and storage medium |
-
2021
- 2021-07-12 CN CN202110784318.3A patent/CN115604688A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101536471A (en) * | 2006-12-05 | 2009-09-16 | 株式会社东芝 | Assisted proactive ip address acquisition |
CN109120729A (en) * | 2017-06-23 | 2019-01-01 | 中国电信股份有限公司 | address allocation management method, 6LoWPAN gateway and system |
CN111683159A (en) * | 2019-03-11 | 2020-09-18 | 阿里巴巴集团控股有限公司 | IP address allocation method, device, system and storage medium |
CN111132090A (en) * | 2019-12-20 | 2020-05-08 | 中国联合网络通信集团有限公司 | A method and device for accessing the Internet of Things |
CN111556489A (en) * | 2020-04-30 | 2020-08-18 | 杭州涂鸦信息技术有限公司 | Communication address allocation method, device, equipment and medium based on Sub-G network |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10469252B2 (en) | Technologies for efficiently managing allocation of memory in a shared memory pool | |
CN109379448B (en) | File distributed deployment method and device, electronic equipment and storage medium | |
CN101853215B (en) | A memory allocation method and device | |
CN113127177B (en) | Processing device and distributed processing system | |
US7002956B2 (en) | Network addressing method and system for localizing access to network resources in a computer network | |
CN107969153A (en) | A kind of resource allocation methods, device and NUMA system | |
CN116431530A (en) | CXL memory module, memory processing method and computer system | |
WO2014183417A1 (en) | Method, device, and system for memory management | |
TW202429295A (en) | Apparatus and method for sanitizing a shared memory device or a memory expander | |
CN115964319A (en) | Data processing method for remote direct memory access and related products | |
CN106155910B (en) | Method, device and system for realizing memory access | |
CN117555687A (en) | Memory expansion method, device, server system, electronic equipment and storage medium | |
CN110178119B (en) | Method, device and storage system for processing service requests | |
CN114710467A (en) | IP address storage method, device and hardware gateway | |
CN116069689A (en) | Page table access method, system, electronic component and page table configuration method | |
CN112099728A (en) | Method and device for executing write operation and read operation | |
CN117648264A (en) | Network card equipment and data transmission system | |
CN115729849B (en) | Memory management method and computing device | |
CN114556309A (en) | Memory space allocation method and device and storage medium | |
US20110252174A1 (en) | Hierarchical to physical memory mapped input/output translation | |
US7702879B2 (en) | Assigning alias addresses to base addresses | |
CN115604688A (en) | Device address allocation method, device, electronic device and storage medium | |
CN112395220A (en) | Processing method, device and system of shared storage controller and storage controller | |
CN114253733B (en) | A memory management method, device, computer equipment and storage medium | |
CN117311729A (en) | System deployment method, device, equipment and machine-readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |