CN111479227B - BLE Mesh node state synchronization method - Google Patents
BLE Mesh node state synchronization method Download PDFInfo
- Publication number
- CN111479227B CN111479227B CN202010403168.2A CN202010403168A CN111479227B CN 111479227 B CN111479227 B CN 111479227B CN 202010403168 A CN202010403168 A CN 202010403168A CN 111479227 B CN111479227 B CN 111479227B
- Authority
- CN
- China
- Prior art keywords
- node
- network
- state information
- state
- access port
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/06—Selective distribution of broadcast services, e.g. multimedia broadcast multicast service [MBMS]; Services to user groups; One-way selective calling services
-
- 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
- H04W56/00—Synchronisation arrangements
- H04W56/001—Synchronization between nodes
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Multimedia (AREA)
- Telephonic Communication Services (AREA)
Abstract
The invention relates to a BLE Mesh node state synchronization method, which comprises the following steps: s1: the distribution network person distributes a different short address for the node; s2: the access port starts to read the broadcast information of the state information of each node in the network at a rated time interval; s3: after receiving the broadcast information, the node reports the state information corresponding to the node to the access port within a rated reporting time period; s4: the access port judges whether the state information of all the nodes is received, if so, the access port enters S6; otherwise, the distribution network person waits for the rated time interval TnThen, recording the short address of the node corresponding to the unreceived state information and the synchronization failure times of the node, and entering S5; s5: judging whether the synchronization failure times of the node are larger than a time threshold value, if so, setting the state of the node as an offline state, and entering S6; otherwise, returning to S2; s6: the access port updates the state information of all nodes. The invention can quickly synchronize the state information of all nodes in the network and has high real-time performance.
Description
Technical Field
The invention relates to the field of smart home, in particular to a BLE Mesh node state synchronization method.
Background
At present based on BLE MESH's intelligent lamps and lanterns control entry is more and more, for example cell-phone APP control, Alexa speech control, sensor control etc. therefore the more prominent of the asynchronous problem of lamps and lanterns state between different equipment, for example when lamps and lanterns become the bright light state from the state of turning out the light, the high in the clouds needs certain time can come the information synchronization of different equipment or the synchronous failure of crisp.
The state synchronization is to store the state information of all devices in the network to different terminals, such as a cloud and an APP. When the state information of a node stored in a certain terminal is inconsistent with the actual state information of the node, the control failure of the node may be caused, and even the serious consequence of equipment off-network may be caused. To solve the above problems, there are two conventional methods today: (1) the BLE Mesh network is provided with a special device (such as a gateway) for reading the state information of each node in a timed and rotating manner. The method has low synchronization efficiency and takes longer time. (2) When the node state is changed, the node actively reports the state information to the cloud. However, if a plurality of nodes report their own state information at the same time, it is easy to cause channel blockage and cause state synchronization failure. Therefore, although the above two methods can also achieve synchronization of state information between devices, they are inefficient, and as the number of network nodes increases, the time required for the network to synchronize state information of all nodes also increases proportionally, and the probability of synchronization failure also increases proportionally. The method is only suitable for networks with small number of network nodes or low requirement on timeliness, and has obvious limitation.
Disclosure of Invention
In order to solve the above problems, the present invention provides a method for synchronizing BLE Mesh node states. The specific scheme is as follows:
a BLE Mesh node state synchronization method comprises the following steps:
s1: when a distributor distributes a network to BLE MESH equipment, a node corresponding to each equipment in the network is distributed with a different short address according to the UUID of each equipment in the network;
s2: the access port starts to read the broadcast information of the state information of each node in the network at a rated time interval;
s3: after receiving the broadcast information, the node reports the state information corresponding to the node to the access port within a rated reporting time period;
s4: the access port judges whether the state information of all the nodes is received, if so, the access port enters S6; otherwise, the distribution network person waits for the rated time interval TnThen, recording the short address of the node corresponding to the unreceived state information and the synchronization failure times of the node, and entering S5;
s5: judging whether the synchronization failure times of the node are larger than a time threshold value, if so, setting the state of the node as an offline state, and entering S6; otherwise, returning to S2;
s6: and the access port updates the state information of all the nodes into the storage addresses of all the access ports corresponding to the network.
Further, the method can be used for preparing a novel materialOf a nominal time interval TnThe calculation formula of (2) is as follows: t isn=n0T, wherein n0For the total number of nodes contained in the network, T is the time required for each node to reply to the broadcast message.
Further, the nominal reporting time period t of the Nth nodenSatisfies the following conditions:
(N-1)*T<tn<N*T
where T is the time required for each node to reply to the broadcast message.
By adopting the technical scheme, the state information of all the nodes in the network can be quickly synchronized, the accuracy is high, the method is not limited by the number of the network nodes, and the real-time performance is high.
Drawings
FIG. 1 is a flow chart of an embodiment of the present invention.
Detailed Description
The invention is further illustrated by the accompanying drawings. The accompanying drawings, which are incorporated in and constitute a part of this disclosure, illustrate embodiments of the invention and, together with the description, serve to explain the principles of the embodiments. Those skilled in the art will appreciate still other possible embodiments and advantages of the present invention with reference to these figures.
The invention will now be further described with reference to the accompanying drawings and detailed description.
An embodiment of the present invention provides a BLE Mesh node state synchronization method, as shown in fig. 1, the method includes the following steps:
s1: when a network distributor distributes a network to BLE MESH equipment, a node corresponding to each piece of equipment in the network is distributed with a different short address according to a UUID (Universal Unique Identifier) of the equipment.
The network distribution person is one of the access ports of the BLE MESH equipment, the BLE MESH equipment in the embodiment is a lamp, the access ports of the BLE MESH equipment comprise a mobile phone APP control port, an Alexa voice control port and a local gateway control port, and the network distribution person is the mobile phone APP control port.
S2: access portAt a nominal time interval TnAnd initiating the broadcast information of the BLE MESH equipment state information.
In this embodiment, T is setn=n0T; wherein n is0For the total number of nodes contained in the network, T is the time required for each node to reply to the broadcast message.
S3: after receiving the broadcast information, the node reports the state information corresponding to the node to the access port within a rated reporting time period.
In this embodiment, a nominal reporting time period t of the nth node is setnComprises the following steps:
(N-1)*T<tn<N*T
s4: the access port judges whether the state information of all the nodes is received, if so, the access port enters S6; otherwise, the distribution network person waits for the rated time interval TnThen, the short address of the node corresponding to the status information that has not been received and the number of times of synchronization failures of the node are recorded, and the process proceeds to S5.
Waiting for a nominal time interval TnIn order to ensure that all nodes report.
S5: judging whether the synchronization failure times of the node are larger than a time threshold value, if so, setting the state of the node as an offline state, and entering S6; otherwise, return to S2.
The number threshold can be set by the skilled person empirically, in this example set to 3.
S6: and the access port updates the state information of all the nodes into the storage addresses of all the access ports corresponding to the network.
The BLE Mesh node state synchronization method provided by the embodiment of the invention can quickly synchronize the state information of all nodes in the network, has high accuracy, is not limited by the number of network nodes, and has high instantaneity.
While the invention has been particularly shown and described with reference to a preferred embodiment, it will be understood by those skilled in the art that various changes in form and detail may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.
Claims (2)
1. A BLE Mesh node state synchronization method is characterized by comprising the following steps:
s1: when a distributor distributes a network to BLE MESH equipment, a node corresponding to each equipment in the network is distributed with a different short address according to the UUID of each equipment in the network;
s2: the access ports are arranged at a nominal time interval TnInitiating broadcast information for reading state information of each node in the network;
s3: after receiving the broadcast information, the node reports the state information corresponding to the node to the access port in the rated reporting time period, and the rated reporting time period t of the Nth nodenSatisfies the following conditions:
(N-1)*T<tn<N*T
wherein, T is the time required by each node to reply the broadcast information;
s4: the access port judges whether the state information of all the nodes is received, if so, the access port enters S6; otherwise, the distribution network person waits for the rated time interval TnThen, recording the short address of the node corresponding to the unreceived state information and the synchronization failure times of the node, and entering S5;
s5: judging whether the synchronization failure times of the node are larger than a time threshold value, if so, setting the state of the node as an offline state, and entering S6; otherwise, returning to S2;
s6: and the access port updates the state information of all the nodes into the storage addresses of all the access ports corresponding to the network.
2. The BLE Mesh node state synchronization method of claim 1, wherein: nominal time interval TnThe calculation formula of (2) is as follows: t isn=n0T, wherein n0For the total number of nodes contained in the network, T is the time required for each node to reply to the broadcast message.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010403168.2A CN111479227B (en) | 2020-05-13 | 2020-05-13 | BLE Mesh node state synchronization method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010403168.2A CN111479227B (en) | 2020-05-13 | 2020-05-13 | BLE Mesh node state synchronization method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111479227A CN111479227A (en) | 2020-07-31 |
CN111479227B true CN111479227B (en) | 2022-02-01 |
Family
ID=71757367
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010403168.2A Active CN111479227B (en) | 2020-05-13 | 2020-05-13 | BLE Mesh node state synchronization method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111479227B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103052032A (en) * | 2012-12-25 | 2013-04-17 | 上海桑锐电子科技有限公司 | Methods for networking and data communicating of broadcast wireless network |
CN106375979A (en) * | 2016-05-30 | 2017-02-01 | 深圳市美贝壳科技有限公司 | Method for finding states of intelligent devices in LAN rapidly |
CN108173966A (en) * | 2018-01-23 | 2018-06-15 | 南京邮电大学 | BLEMesh automatic network-building methods based on user collaboration |
CN109168150A (en) * | 2018-08-24 | 2019-01-08 | 欧普照明股份有限公司 | A kind of bluetooth rapid networking method |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105515853B (en) * | 2015-12-03 | 2019-01-11 | 泰凌微电子(上海)有限公司 | The node and its state updating method of wireless network |
CN107205210B (en) * | 2017-05-18 | 2023-06-09 | 欧普照明股份有限公司 | Method, device, system and computer program for configuring wireless network node |
CN110324790B (en) * | 2019-07-03 | 2022-04-19 | 浙江大华技术股份有限公司 | Network connection method, node device, network system and storage medium |
CN111147352A (en) * | 2019-12-23 | 2020-05-12 | 杭州米络星科技(集团)有限公司 | Distributed data synchronization method |
-
2020
- 2020-05-13 CN CN202010403168.2A patent/CN111479227B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103052032A (en) * | 2012-12-25 | 2013-04-17 | 上海桑锐电子科技有限公司 | Methods for networking and data communicating of broadcast wireless network |
CN106375979A (en) * | 2016-05-30 | 2017-02-01 | 深圳市美贝壳科技有限公司 | Method for finding states of intelligent devices in LAN rapidly |
CN108173966A (en) * | 2018-01-23 | 2018-06-15 | 南京邮电大学 | BLEMesh automatic network-building methods based on user collaboration |
CN109168150A (en) * | 2018-08-24 | 2019-01-08 | 欧普照明股份有限公司 | A kind of bluetooth rapid networking method |
Also Published As
Publication number | Publication date |
---|---|
CN111479227A (en) | 2020-07-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN100450053C (en) | Apparatus and method for detecting duplicate IP addresses in mobile ad hoc network environment | |
CN101820435B (en) | Synchronization method and device for MAC (Media Access Control) address table information of distributed network processing system | |
CN106453657A (en) | Status information update method and device of smart home equipment | |
CN113453213B (en) | Authentication data synchronization method and device | |
CN107404509B (en) | Distributed service configuration system and information management method | |
CN112205015B (en) | Method, apparatus and computer readable medium for policy distribution | |
US10594598B2 (en) | Path setup in a mesh network | |
CN101304330A (en) | Resource allocation method, server, network equipment and network system | |
CN102035638A (en) | Clock source selection processing method, device and system | |
WO2015096443A1 (en) | Wireless local area network connection processing method and apparatus | |
CN103096258A (en) | Delayed connect-in method, base station and terminal in broadband trunking communication system | |
CN102137432A (en) | Method, device and system for terminal to access network | |
CN111479227B (en) | BLE Mesh node state synchronization method | |
CN108599984B (en) | Method for sharing port state, access equipment and system for supporting dual-homing protection | |
US20120100862A1 (en) | Method for resolving data conflicts and mobile terminal | |
CN106535112B (en) | Method, device and system for realizing terminal access | |
CN114422427B (en) | Flow balancing method and device, electronic equipment and storage medium | |
CN105141687A (en) | Message producing method | |
CN107819684B (en) | Synchronous processing method and device | |
CN106792602B (en) | Call waiting processing method and terminal | |
CN112888029B (en) | Communication method, computer equipment and computer readable storage medium | |
CN104780275A (en) | Cloud management method and system for fixed-line telephones | |
CN110474781B (en) | Method and device for forwarding multicast data | |
CN101854718A (en) | Paging method, device and base station of cluster communication | |
CN107295697B (en) | Wireless network system with regional communication and communication method thereof |
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 | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20210323 Address after: No.88 HouXiang Road, Haicang District, Xiamen City, Fujian Province Applicant after: XIAMEN YANKON ENERGETIC LIGHTING Co.,Ltd. Address before: 8-9 / F, scientific research building, 88 HouXiang Road, Haicang District, Xiamen City, Fujian Province, 361000 Applicant before: Xiamen sunshine IOT Technology Co.,Ltd. |
|
TA01 | Transfer of patent application right | ||
GR01 | Patent grant | ||
GR01 | Patent grant |