CN112075102A - Low-power Bluetooth networking method, electronic equipment, network and storage medium - Google Patents

Low-power Bluetooth networking method, electronic equipment, network and storage medium Download PDF

Info

Publication number
CN112075102A
CN112075102A CN201880091377.9A CN201880091377A CN112075102A CN 112075102 A CN112075102 A CN 112075102A CN 201880091377 A CN201880091377 A CN 201880091377A CN 112075102 A CN112075102 A CN 112075102A
Authority
CN
China
Prior art keywords
path
node
current
downlink path
standby
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.)
Granted
Application number
CN201880091377.9A
Other languages
Chinese (zh)
Other versions
CN112075102B (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.)
Wocao Technology Shenzhen Co ltd
Original Assignee
Wocao Technology Shenzhen 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 Wocao Technology Shenzhen Co ltd filed Critical Wocao Technology Shenzhen Co ltd
Publication of CN112075102A publication Critical patent/CN112075102A/en
Application granted granted Critical
Publication of CN112075102B publication Critical patent/CN112075102B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W40/00Communication routing or communication path finding
    • H04W40/24Connectivity information management, e.g. connectivity discovery or connectivity update
    • 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)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a low-power-consumption Bluetooth networking method, electronic equipment, a network and a storage medium, wherein the method comprises the steps that a current node scans equipment nodes in a communication range; the current node acquires routing information from equipment nodes in a communication range; the current node generates a first path according to the routing information of the equipment node, wherein the first path is specifically a path from the current node to a root node through the corresponding equipment node; when the number of the first paths is more than one, the current node marks one first path as the current uplink path, and marks the rest first paths as standby uplink paths. When a plurality of paths exist between the current node and the root node, one path is marked as the current path, and the rest paths are standby paths, so that when the current node is communicated with the root node, the root node is communicated with the current node through the current path, and when the current path has a fault and the like, the communication between the root node and the current node is established through the standby paths, and the success rate of receiving and sending messages can be ensured.

Description

Low-power Bluetooth networking method, electronic equipment, network and storage medium Technical Field
The present invention relates to bluetooth networking technologies, and in particular, to a bluetooth low energy networking method, an electronic device, a network, and a storage medium.
Background
The Mesh working group of bluetooth in 7 months in 2017 provides a networking specification based on BLE, the specification is a Mesh network technology based on a Flooding protocol, low-power-consumption nodes can only communicate with surrounding friend nodes in a Mesh network topology structure provided by the specification, more node roles are allocated in the use of the whole network, and the Mesh working group is not suitable for a low-power-consumption bluetooth device network which is powered by a battery.
The existing bluetooth device networking usually adopts a tree networking method, but how to establish a path between a device node and a root node when the device node accesses the network still needs to solve the technical problem of ensuring the receiving and sending success rate of the message.
Disclosure of Invention
In order to overcome the defects of the prior art, the invention aims to provide a low-power Bluetooth networking method which is used for a current node; providing a low-power Bluetooth networking method for a root node; providing an electronic device which can be used as a current node; providing an electronic device, which can be used as a root node; providing a low power consumption Bluetooth network and a storage medium, and storing a computer program; when the current node communicates with the root node, the root node communicates with the current node through the current path, and when the current path fails and the like, the communication between the root node and the current node is established through the standby path, so that the success rate of receiving and sending messages can be ensured.
The purpose of the invention is realized by adopting the following technical scheme:
the Bluetooth low energy networking method is used for a current node, and comprises the following steps:
scanning device nodes within a communication range;
acquiring routing information from the equipment nodes within the communication range;
generating a first path according to the routing information of the equipment node, wherein the first path is specifically a path from the current node to a root node through the corresponding equipment node;
and when the number of the first paths is more than one, marking one first path as a current uplink path, and marking the rest first paths as standby uplink paths.
The low-power Bluetooth networking method is used for a root node and comprises the following steps:
acquiring an access notification from a current node, wherein the access notification is sent by the current node according to a first path;
generating a second path according to the path of the access notification sent by the current node; the second path is specifically a path from the root node to the current node through the corresponding equipment node;
and marking one second path as the current downlink path, and the rest second paths as standby downlink paths.
An electronic device comprising a memory, a processor, and a program stored in the memory, the program configured to be executed by the processor, the processor when executing the program implementing the aforementioned steps of the bluetooth low energy networking method applied to a current node.
An electronic device comprising a memory, a processor, and a program stored in the memory, the program configured to be executed by the processor, the processor when executing the program implementing the aforementioned steps of the bluetooth low energy networking method applied to a root node.
The low-power Bluetooth network comprises at least one electronic device applying the root node low-power Bluetooth networking method and at least one electronic device applying the current node low-power Bluetooth networking method.
A storage medium storing a computer program, characterized in that: the computer program when executed by a processor implements: the steps of the bluetooth low energy networking method applied to the root node and/or the current node are described above.
Compared with the prior art, the embodiment of the invention has the beneficial effects that: when a plurality of paths exist between the current node and the root node, one path is marked as the current path, and the rest paths are standby paths, so that when the current node is communicated with the root node, the root node is communicated with the current node through the current path, and when the current path has a fault and the like, the communication between the root node and the current node is established through the standby paths, and the success rate of receiving and sending messages can be ensured.
Drawings
FIG. 1 is a schematic diagram of a Bluetooth network;
fig. 2 is a schematic flowchart of a bluetooth low energy networking method according to an embodiment of the present invention;
FIG. 3 is a schematic view of a process for a current node joining a Bluetooth network;
fig. 4 is a schematic flow chart of the management of the current downlink path and the standby downlink path by the root node;
FIG. 5 is a schematic flow chart of a root node marking a current downlink path;
fig. 6 is a schematic structural diagram of the current node or the root node in fig. 2.
Detailed Description
The present invention will be further described with reference to the accompanying drawings and the detailed description, and it should be noted that any combination of the embodiments or technical features described below can be used to form a new embodiment without conflict.
Fig. 1 is a schematic structural diagram of a bluetooth network, which is a Mesh network topology structure. The Mesh network formed by the low-power consumption Bluetooth devices, namely the BLE devices, does not need to be specially pre-configured when the BLE device nodes join the Mesh network, and all the BLE devices can serve as relay devices to forward messages in the Mesh network so as to enlarge the communication range of the BLE.
In fig. 1, the device node R is a root node, and the device nodes A, B, C, D, E, F, G, H, I, J and K are normal device nodes; the device nodes are distinguished by unique physical addresses or other identification information. The communication between the device nodes is based on a protocol-defined GATT service that may employ two or more features for data transceiving between two device nodes. The root node R is used to manage and optimize the routing table of the entire Mesh network and to maintain the routing changes caused by the device nodes joining the network, leaving the network and moving the device nodes. In fig. 1, a dashed circle represents a BLE communication range of the device node a, and a user mobile terminal in the communication range, such as a mobile phone, a tablet, or a computer, may communicate with the device node a, and may also communicate with other common device nodes or root nodes R in the bluetooth low energy network through the device node a.
As a preferred embodiment, the root node R is a non-power-consumption-sensitive low-power-consumption bluetooth device, for example, a BLE device powered by an AC power supply, which may be referred to as a first type BLE device; other common device nodes are typically power consumption sensitive bluetooth low energy devices, such as battery powered BLE devices, referred to as BLE devices of the second type.
The first type BLE device may be a device having only a single BLE communication function, or may be a device having both a BLE function and other external networks, such as Wi-Fi or Enternet, etc., network communication functions; a BLE device node of the second type is typically used to implement a single BLE communication function.
Example one
As shown in fig. 2, which is a schematic flow chart of the bluetooth low energy networking method, the bluetooth low energy networking method includes the following steps:
and step S110, the current node scans the equipment nodes in the communication range.
All the device nodes in the Mesh network are in a broadcast state, and the broadcast period can be determined according to the information of the use frequency, the use time period, the remaining battery power and the like of the device nodes in the routing table. All the device nodes in the network can forward data information in the network for the relay device, so that the application range of the low-power Bluetooth is expanded.
As shown in fig. 1, the device node a is taken as the current node, and is a device node that needs to access the bluetooth network. The dotted circle is the BLE communication range of the current node a, and such device node may have a power switch or a mechanism similar to a power switch, which may be used to trigger the network access process of the new device node a, i.e., the current node a.
When a user powers on the current node A through the power switch of the current node A or a mechanism similar to the power switch to start working, the current node A checks the routing table information of the current node A, and if the routing table information in the current node A is empty, the equipment node A performs scanning and broadcasting within a certain time. In this embodiment, the current node a may scan to the surrounding device nodes B and E.
As a preferred embodiment, if no other device node exists in the scanning communication range of the current node, the current node switches to a broadcast state, and the broadcast information includes a network label, a device type, a battery level, a hop value, and the like. The network reference numbers are used for identifying and distinguishing a Mesh network formed by the BLE device nodes of the first type; the device type is used for identifying and distinguishing the device type of the device node, 0 represents a first type BLE device node, and 1 represents a second type BLE device node; the battery power identifier is used for identifying the battery power condition of the second type BLE device node and whether the battery power condition is lower than a preset usable threshold value, if the second type BLE device node detects that the battery power of the second type BLE device node is lower than the usable threshold value of the battery power, the flag position of the broadcast packet is set to be 1, otherwise, the flag position of the broadcast packet is set to be 0; the hop value can be used to distinguish whether the device node is a network-accessing device node or a non-network-accessing device node, and if the hop value is a negative number, it indicates that the device node is a non-network-accessing device node, that is, a node that cannot communicate with the root node. When the user terminal is located in the communication range of the current node A, acquiring the broadcast information of the current node A; and judging that the current node A is not successfully added into the Bluetooth network managed by the corresponding root node according to the broadcast information and is an isolated equipment node.
And step S120, the current node acquires the routing information from the equipment nodes in the communication range.
The device node B and the device node E that have already been networked are always in a broadcast state, and therefore the device node a can acquire their respective routing information from the device node B and the device node E. In a preferred embodiment, the broadcast packet of the device node includes its own hop count value.
The hop value can be used to distinguish whether the device node is a network-accessing device node or a non-network-accessing device node, and for the network-accessing device node, the position of the Mesh network where the device node is located, that is, the number of times of transmission and forwarding required when communicating with the root node, can be distinguished. Taking the Mesh network shown in fig. 1 as an example, if the hop value of the root node R is defined as 0, the hop values of the device nodes B, C and D are 1, the hop values of the device nodes A, E, F, F, G, H and I are 2, and the hop values of the device nodes K and J are 3; for an equipment node that is not networked, its hop count value may be marked as-1.
In a preferred embodiment, if all the other device nodes in the current node scanning communication range are non-network-accessing device nodes, that is, nodes that cannot communicate with the root node, the node is switched to the broadcast state. When the user terminal is located in the communication range of the current node A, the fact that the current node A is not successfully added into the Bluetooth network can be judged according to the broadcast information of the current node A, and the current node A is an isolated equipment node.
Step S130, the current node generates a first path according to the routing information of the equipment node, wherein the first path is specifically a path from the current node to a root node through the corresponding equipment node.
The current node A scans other equipment nodes in the communication range of the current node A and acquires the routing information of the corresponding equipment nodes. The routing information may indicate whether the corresponding device node may be communicated with the root node, and if so, the hop count value is a non-negative number; the routing information may also represent a distance between the respective device node and the root node. In this embodiment, in the routing information of the nodes B and E of the network access device, the hop values are 1 and 2, respectively; indicating that the routing tables of the device nodes B and E contain the information of the root node R, so that the current node a can establish a connection with the root node through the device nodes B and E.
As a preferred embodiment, the step S130 of generating, by the current node, the first path according to the routing information of the device node specifically includes the following steps:
and if the hop count value of the equipment node meets the access condition, the current node generates a first path according to the routing information of the equipment node.
In a preferred embodiment, if the hop count value of the node device in the communication range of the current node a is a positive number, it indicates that the device node B and the E routing table contain information of the root node R, and the current node a may establish a connection with the root node through such device nodes, such as the device nodes B and E, that is, may generate the first path, such as a-B-R and a-E-B-R, according to the routing information of such device nodes.
As a preferred embodiment, the hop count value of the device node satisfies an access condition, which specifically is: and the hop count value of the equipment node is not more than the hop count values of other equipment nodes in the communication range.
Selecting the node equipment with the minimum hop value in the communication range of the current node A as a relay node of the current node A and the root node R; and generating a first path according to the routing information of the relay node. As previously described, two paths, such as A-B-R, and A-E-B-R, may be generated that may be communicated to root node R based on routing information for device nodes B and E; the node device with the smallest hop number value is preferentially selected as the relay node of the current node A and the root node R, namely, the shorter path is selected as the first path A-B-R.
As a preferred embodiment, as shown in fig. 3, step S130, after the current node generates a first path according to the routing information of the device node, where the first path is specifically a path from the current node to the root node through the corresponding device node, the method further includes the following steps:
step S101, if the current node generates the first path, an access notification is sent to the root node according to the first path, and the root node acquires the access notification from the current node.
In this embodiment, the current node a needs to be granted access to the bluetooth network by the root node R. Therefore, after the first path is generated, an access notification needs to be sent to the root node. Specifically, an access notification is sent to the root node via the first path, e.g., a-B-R.
After the current node A generates the first path, the current node A is informed to the root node R through the first path to be added into the Mesh network of the root node R. If the root node R correctly receives the notice of the current node A, an acknowledgement character ACK (acknowledgement) is sent to the current node A, and if the access notice of the current node A is not correctly received, NAK (negative acknowledgement) is sent to the current node A to indicate negative acknowledgement or non-acknowledgement. If the current node A receives NAK or does not receive the response of the root node R after a preset time, the current node A fails to access the network, and the current node A becomes an isolated node which does not access the network. If the current node A receives the acknowledgement character ACK, the step of notifying the network is successfully completed, and then an access notification is sent to the root node via the first path, e.g., A-B-R.
As a preferred embodiment, if the current node a receives a NAK or does not receive a response from the root node R after a predetermined time, it switches to the broadcast state. When the user terminal is located in the communication range of the current node A, the fact that the current node A is not successfully added into the Bluetooth network can be judged according to the broadcast information of the current node A, and the current node A is an isolated equipment node.
Step S102, if the root node agrees to the access notification of the current node, generating a second path according to the path of the access notification sent by the current node; the second path is specifically a path from the root node to the current node through the corresponding device node.
After acquiring the access notification from the current node A, the root node R may generate a second path according to the path through which the current node A sends the access notification; if the path of the access notification sent by the current node a is the first path a-B-R, the second path generated by the root node is R-B-a, and passes through the corresponding device node B in the first path.
And step S103, the root node sends an authorization instruction to the current node according to the second path.
And if the current node A is subjected to network authorization, namely the current node A is allowed to be added into the network, an authorization instruction is sent to the current node A according to the second path.
As a preferred embodiment, after the root node R performs network authorization on the current node a, it needs to also successfully confirm that the current node a joins the network, and then generates a second path according to the path of the current node sending the access notification, that is, adds the second path R-B-a to its own routing table information.
If the root node R does not perform network authorization on the current node A after acquiring the access notification from the current node A, that is, the current node A is not authorized to be added into the network, the current node A fails to access the network, and the current node A becomes an isolated node which does not access the network.
And step S104, if the current node acquires the authorization of the root node, storing the first path.
And the current node A acquires authorization from the root node R and successfully confirms to join the Bluetooth network, and the first path, such as A-B-R, is stored in a routing table of the current node A.
In another embodiment, as shown in fig. 1, in a process of joining a device from an un-networked device to a network, the device node K may obtain corresponding routing information from device nodes F and G within a communication range of the device node K, which includes routing tables of the device nodes F and G about R, that are F-C-R and G-C-R, respectively, with the device node K as a current node; and the hop count values of device nodes F and G are both 2. As described above, the first two paths generated and stored by the current node K are two, that is, two paths to the root node R can be established in the routing table, which are K-F-C-R and K-G-C-R, respectively. Correspondingly, the second path generated and stored in the root node R is also two, R-C-F-K and R-C-G-K.
As a preferred embodiment, if the root node determines in step S101 that there is more than one path through which the current node sends the access notification, the root node generates a second path according to the path through which the current node sends the access notification, specifically: the root node generates corresponding second paths according to the paths of the access notification sent by the current node; the number of the second paths is more than one.
The first path generated and stored by the current node K is two paths respectively K-F-C-R and K-G-C-R, and the current node sends an access notification with more than one path, so that the root node R generates a second path R-C-F-K according to the first path K-F-C-R and passes through the corresponding equipment nodes C and F; a second path R-C-G-K is generated from the first path K-G-C-R, passing through respective device nodes C and G.
Step S140, when the number of the first paths is more than one, the current node marks one first path as the current uplink path, and marks the remaining first paths as the standby uplink paths.
As a preferred embodiment, if the current node fails to communicate with the root node through the current uplink path, the current node communicates with the root node through the standby uplink path.
The number of the first paths of the current node K is more than one, so that when the current node K communicates with the root node R, one path can be selected to communicate with the root node R, namely the current uplink path; and the rest first paths are used as standby uplink paths, and when the current uplink path fails and other conditions occur, the communication between the current node K and the root node R is established through the standby uplink paths, so that the successful receiving and sending of the message can be ensured.
As a preferred embodiment, how to allocate the first path as the current uplink path or the standby uplink path is determined by the root node R, that is, the step S140 marks that one first path is the current uplink path, and specifically includes: and marking the corresponding first path as the current uplink path according to the marking instruction acquired from the root node.
According to the low-power-consumption Bluetooth networking method provided by the embodiment of the invention, when a plurality of paths exist between the current node and the root node, one path is marked as the current path, and the rest paths are standby paths, so that when the current node is communicated with the root node, the root node is communicated with the current node through the current path, and when the current path has a fault and the like, the communication between the root node and the current node is established through the standby paths, so that the receiving and sending success rate of the message can be ensured.
As shown in fig. 4, in this embodiment, if the root node agrees with the access notification of the current node, after generating a second path according to the path through which the current node sends the access notification, the step S102 further includes the following steps:
step S141, the root node marks one second path as the current downlink path, and the remaining second paths are standby downlink paths.
As a preferred embodiment, after the step S141 of marking one second path as the current downlink path by the root node, and the remaining second paths as the standby downlink paths, the method further includes the following steps: and if the communication between the root node and the current node through the current downlink path fails, communicating with the current node through the standby downlink path.
More than one second path of the root node R is provided, so that when the current node A is communicated, one path can be selected to be communicated with the current node A, namely the current downlink path; and the rest second paths are used as standby downlink paths, and the communication between the root node R and the current node A is established when the current downlink path has faults and the like, so that the successful receiving and sending of the message can be ensured.
As a preferred embodiment, in step S141, the root node marks a second path as the current downlink path, specifically: and the root node marks the corresponding second path as the current downlink path according to the electric quantity parameter and/or the use frequency of the corresponding equipment node in each second path. Therefore, the marking instruction sent by the root node to the current node is also generated by the root node according to the electric quantity parameter and/or the use frequency of the equipment node corresponding to each first path.
The power parameter of the device node may reflect the remaining power of the battery in the device node, and the frequency of use of the device node may reflect the frequency of forwarding data by the node device as a relay node in the bluetooth network. The current downlink path and the standby downlink path are selected according to the electric quantity parameters and/or the use frequency of the corresponding equipment nodes in each second path, so that the use frequency of the second paths can be balanced, the battery use electric quantity of the corresponding equipment nodes is balanced, the service life of the whole network is prolonged, and the robustness of the whole network is improved.
For example, in the second path R-C-F-K and the second path R-C-G-K in fig. 1, the device node F and the device node G are corresponding device nodes, and the current downlink path and the standby downlink path are selected according to the power parameters and/or the frequency of use of the two device nodes.
As a preferred embodiment, as shown in fig. 5, marking a corresponding second path as a current downlink path according to an electric quantity parameter and/or a usage frequency of a corresponding device node in each second path specifically includes the following steps:
step S1411, the root node acquires an electric quantity parameter of a corresponding device node in each second path.
In a preferred embodiment, the broadcast packet data information of the node of the bluetooth low energy device includes its battery level identifier, i.e. a power level parameter. In this embodiment, the electric quantity parameter is specifically a Battery electric quantity Level (BL), and if the Battery electric quantity Level is 4, it may indicate that about 80% of electric quantity remains in the device node; a battery power level of 0 may indicate that less than 10% of the power remains at the device node.
In step S1412, the root node marks the second path with the optimal power parameter of the corresponding device node as the current downlink path.
Two second paths, R-C-F-K and R-C-G-K, are owned from the root node R to the device node K, and similarly, two first paths are owned from the device node K to the root node R. For the selection of the two second paths, one path can be selected as the current downlink path according to the battery power levels of the device node F and the device node G, and the other path can be selected as the standby downlink path.
Under the condition that the BL of two relay device nodes F and G is >0, if the BL of the device node F and the BL of the device node G are the same, any one of the paths may be selected as the current downlink path, and the remaining one may be used as the standby downlink path.
If the BL of the equipment node F is larger than the BL of the equipment node G, the root node R selects a second path passing through the equipment node F as a current downlink path, and selects the second path passing through the equipment node G as a standby downlink path; namely, R-C-F-K is selected as the current downlink path, and R-C-G-K is selected as the standby downlink path. On the contrary, if the BL of the device node F is smaller than the BL of the device node G, the root node R selects R-C-G-K as the current downlink path, and selects R-C-F-K as the standby downlink path.
As a preferred embodiment, after the step S1411, the step S further includes, after acquiring the electric quantity parameter of the corresponding device node in each second path, the following steps:
step S1413, if the electric quantity parameters of the corresponding device nodes in each second path are the same, the root node acquires the usage frequency of the corresponding device nodes in each second path.
If the BL of the two relay device nodes F and G is greater than 0 and the BL of the device node F is the same as that of the device node G, the corresponding second path may be further marked as the current downlink path according to the usage frequency of the corresponding device node.
The use frequency of the equipment node can reflect the frequency of the data forwarding of the node equipment as a relay node in the Bluetooth network; the usage frequency can be counted by each equipment node and then called by the root node, and can also be counted by the root node. If the frequency of using a certain equipment node is higher, the use of the second path can be reduced, so that the frequency of occupying the equipment node by the path is reduced, and the service life of the equipment node is prolonged.
Step S1414, the root node marks the second path with the lowest frequency used by the corresponding device node as the current downlink path.
And selecting a second path passing through the relay equipment node with lower use frequency as the current downlink paths of the root node R and the current node K. And if the use frequency of the equipment node F is 10 times and the use frequency of the equipment node G is 25 times, marking R-C-F-K as the current downlink path, and selecting R-C-G-K as the standby downlink path.
Step S142, the root node sends a marking instruction to the current node according to the current downlink path, so that the current node marks the current uplink path and the standby uplink path.
After marking the current downlink path and the standby downlink path, the root node R sends a marking instruction to the current node K; so that the current node marks the first path corresponding to the current downlink path as the current uplink path and marks the first path corresponding to the standby downlink path as the standby uplink path.
In a preferred embodiment, if the second path R-C-F-K is the current downlink path and the second path R-C-G-K is the standby downlink path, the marking instruction may be an instruction indicating to mark K-F-C-R as the current uplink path and the other first path as the standby uplink path.
As a preferred implementation manner, in this embodiment, after the step S1413 obtaining the usage frequency of the corresponding device node in each second path, the method further includes the following steps:
step S1415, if the electric quantity parameters of the corresponding device nodes in each second path are the same and the frequency of use of the corresponding device nodes in each second path is the same, marking one second path as the current downlink path randomly or according to a preset rule. The preset rule may be to mark the first second path as the current downlink path.
If more than one path exists between the root node R and the current node K and the paths have the same hop count, the root node R selects one route table path as the current downlink path and the rest as standby downlink paths according to the battery power level and the use frequency of the relay equipment nodes passing through the root node R and the current node K; and respectively setting the corresponding first path in the current node K as a current uplink path and a standby uplink path. And if the battery power levels of the corresponding relay equipment nodes are not all zero, selecting a path passing through the relay equipment node with a higher battery power level as a current downlink path from the root node R to the equipment node K. If the battery power levels of the corresponding relay equipment nodes are equal, selecting a path passing through the relay equipment node with the lowest use frequency as a current downlink path from the root node R to the equipment node K; and selecting a path passing through a relay equipment node with lower use frequency as a standby downlink path from the root node R to the equipment node K. And if the battery power levels of the corresponding relay equipment nodes in the second paths are the same and the use frequencies are the same, selecting the current downlink path and the standby downlink path from the root node R to the equipment node K randomly or according to a preset rule.
As a further improvement of the embodiment of the present invention, when the device node K sends information to the root node R, it is detected whether there is a flag indicating a current uplink path and a standby uplink path, if there is a flag indicating a current uplink path and a standby uplink path, communication is performed via the current uplink path, then the frequency of use of the current uplink path is increased by one, and the frequency of use of the corresponding current downlink path in the root node R is synchronously increased by one; when the root node R sends information to the equipment node K, whether a current downlink path and a standby downlink path are marked or not is detected, if yes, communication is carried out through the current downlink path, then the using frequency of the current downlink path is increased by one, and the using frequency of the corresponding current uplink path in the equipment node K is synchronously increased by one; so as to keep the synchronous accumulation of the use frequency of the current uplink path and the current downlink path, namely the use frequency of the current path.
In the embodiment of the invention, each path can be set as the current path in turn according to the actual use condition, so that the standby uplink path and the standby downlink path are the current uplink path and the current downlink path in certain time intervals, and synchronous accumulation of the use frequency is also executed, namely the use frequency of the standby path is equal to the use frequency of the standby downlink path.
In the embodiment of the present invention, the root node R and the device node K dynamically optimize the frequency of the current path and the frequency of the backup path according to the frequency of the current path and the frequency of the backup path, and the remaining battery power levels of the relay device nodes, such as the device nodes G and F. Therefore, in this embodiment, the bluetooth low energy networking method further includes the following steps:
after the preset time length or when the switching condition is achieved, the root node marks the current downlink path as a new standby downlink path and marks the corresponding standby downlink path as the current downlink path; and synchronously changing the marks of the corresponding standby uplink path and the current uplink path of the current node.
The current downlink path and the standby downlink path are switched by timing switching or switching when the conditions are met, namely, the second paths are used in turn, so that the use frequency of the current downlink path, the standby downlink path and the corresponding current uplink path and standby uplink path is dynamically optimized, the electric quantity of equipment nodes in the second paths is balanced, and the endurance of related equipment nodes is prolonged.
As a preferred embodiment, when the switching condition is met, marking the current downlink path as a new standby downlink path and marking the corresponding standby downlink path as the current downlink path specifically includes the following steps:
step S143, the root node marks the current downlink path as a new standby downlink path and marks the corresponding standby downlink path as the current downlink path according to the usage frequency of the current downlink path and the standby downlink path and/or the power parameter of the corresponding device node in the current downlink path and the standby downlink path.
Along with the operation of the Bluetooth network, the electric quantity of equipment nodes in each path can be changed; if the electric quantity parameter difference of the corresponding equipment node in the current downlink path is equal to the electric quantity parameter of the corresponding equipment node in the standby downlink path, the current downlink path and the standby downlink path need to be marked again; marking the second path with the optimal electric quantity parameter of the corresponding equipment node as the current downlink path; the use frequency of the current downlink path, the standby downlink path and the corresponding current uplink path and standby uplink path is dynamically optimized.
As a preferred embodiment, step S143 further includes the following steps:
step S1431, synchronizing the frequency of use of the current downlink path with the current node.
And when the communication between the root node R and the current node K is successful once, the use frequency of the current downlink path and the corresponding current uplink path is increased by 1, and the use frequency is synchronously recorded by the root node R and the equipment node K.
Step S1432, if the marks of the power parameters of the corresponding device nodes in the current downlink path and the standby downlink path are the same, and the difference between the frequency of the current node and the frequency of the root node using the current downlink path minus the frequency of the root node using the corresponding standby downlink path is greater than a preset threshold, then mark the current downlink path as a new standby downlink path, and mark the corresponding standby downlink path as the current downlink path.
If the frequency of use of the current downlink path, that is, the current path, exceeds the frequency of use of the standby downlink path, that is, the frequency of use of the standby path, by a preset threshold number of times, for example, 100 times, although the levels of remaining battery power of the relay device nodes G and F are equal at this time, in order to balance the frequency of use of the current downlink path and the standby downlink path, it is necessary to change the current path into a new standby path, change a corresponding standby path into a new current path, that is, mark the current downlink path as a new standby downlink path, and mark the corresponding standby downlink path as the current downlink path.
Step S1433, sending a new marking instruction to the current node, so that the current node re-marks the current uplink path and the standby uplink path, and sending the information through the current uplink path when the current node sends the information to the root node.
The positions of the current path and the standby path are changed, a new current path is selected for communication through communication between the root node R and the current node K, the use frequency of the new current path is increased by 1 every time the communication is successful, and the root node R and the current node K simultaneously record the current path, namely the use frequency of the new current downlink path.
As a preferred embodiment, step S143 further includes the following steps:
step S1434, if the electric quantity parameter flags of the corresponding device nodes in the current downlink path and the standby downlink path are the same, and the frequency of the current node communicating with the root node using the current downlink path is equal to the frequency of the current node communicating using the corresponding standby downlink path, clearing the frequency of the current downlink path and the standby downlink path.
The electric quantity parameter marks of corresponding equipment nodes in the current downlink path and the standby downlink path are the same, and when the frequency of the current node and the frequency of the root node communicating by using the current downlink path are equal to the frequency of the current node communicating by using the corresponding standby downlink path, the conditions of the current downlink path and the standby downlink path are the same, and the counted use frequency can be cleared; and synchronously resetting the use frequency of the current uplink path and the standby uplink path counted by the current node side, thereby facilitating the dynamic optimization of the marks of the subsequent current downlink path and the standby downlink path.
As a preferred embodiment, after the step S1411, the step S further includes, after acquiring the electric quantity parameter of the corresponding device node in each second path, the following steps:
and step S150, if the electric quantity parameter of the equipment node is lower than a preset threshold value, sending a low electric quantity notification to a user terminal connected with the root node or the equipment node.
Because the root node R can acquire the power parameters of each device node in the bluetooth network, and the root node can communicate with the user terminal through an external network, such as Wi-Fi or internet, and the like, and the user terminal can also establish bluetooth connection with each device node, when the power parameters of a device node are lower than a preset threshold, a low power notification is sent to the user terminal through the root node or the device node to prompt the user to change the battery of the relevant device node.
From the above description of the embodiments, it is clear to those skilled in the art that the present invention can be implemented by software plus necessary general hardware platform. With such an understanding, the technical solutions of the present invention may be embodied in the form of a software product, which may be stored in a storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods according to the embodiments or some parts of the embodiments, such as:
a storage medium storing a computer program which, when executed by a processor, implements the aforementioned steps of the bluetooth low energy networking method applied to a root node and/or a current node.
The invention is operational with numerous general purpose or special purpose computing system environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet-type devices, multiprocessor systems, microprocessor-based systems, set top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like, as in embodiment two.
Example two
The electronic device as shown in fig. 6 comprises a memory 200, a processor 300 and a program stored in the memory 200, the program being configured to be executed by the processor 300, the processor 300 when executing the program implementing the steps of the bluetooth low energy networking method as described above as applied to the root node and/or the current node.
The electronic device can be used as a root node or a current node in a bluetooth network, so that the bluetooth low energy networking method is applied to the bluetooth network. Therefore, the embodiment of the present invention further provides a bluetooth low energy network, which includes at least one root node, that is, an electronic device to which the bluetooth low energy networking method of the root node is applied; and at least one current node, namely the electronic equipment applying the low-power Bluetooth networking method of the current node.
The electronic device and the bluetooth low energy network in this embodiment are based on two aspects of the same inventive concept, and the method implementation process has been described in detail in the foregoing, so that those skilled in the art can clearly understand the structure and implementation process of the electronic device and the bluetooth low energy network in this embodiment according to the foregoing description, and for the sake of brevity of the description, details are not repeated here.
According to the electronic equipment and the low-power-consumption Bluetooth network provided by the embodiment of the invention, when a plurality of paths exist between the current node and the root node, one path is marked as the current path, and the rest paths are standby paths, so that when the current node is communicated with the root node, the root node is communicated with the current node through the current path, and when the current path has a fault and the like, the communication between the root node and the current node is established through the standby paths, so that the receiving and sending success rate of the message can be ensured.
The above embodiments are only preferred embodiments of the present invention, and the protection scope of the present invention is not limited thereby, and any insubstantial changes and substitutions made by those skilled in the art based on the present invention are within the protection scope of the present invention.

Claims (23)

  1. The low-power-consumption Bluetooth networking method is characterized by comprising the following steps: the method comprises the following steps:
    scanning device nodes within a communication range;
    acquiring routing information from the equipment nodes within the communication range;
    generating a first path according to the routing information of the equipment node, wherein the first path is specifically a path from the current node to a root node through the corresponding equipment node;
    and when the number of the first paths is more than one, marking one first path as a current uplink path, and marking the rest first paths as standby uplink paths.
  2. The bluetooth low energy networking method of claim 1, wherein: when the number of the first paths is more than one, marking one first path as a current uplink path, and before marking the rest first paths as standby uplink paths, the method further comprises the following steps:
    if the first path is generated, sending an access notification to the root node according to the first path;
    and if the authorization of the root node is obtained, the first path is stored.
  3. The bluetooth low energy networking method of claim 1, wherein: the routing information comprises hop values of corresponding equipment nodes;
    the generating of the first path according to the routing information of the device node specifically includes the following steps:
    and if the hop count value of the equipment node meets the access condition, generating a first path according to the routing information of the equipment node.
  4. The bluetooth low energy networking method of claim 3, wherein: the hop count value of the device node satisfies access conditions, which specifically include:
    and the hop count value of the equipment node is not more than the hop count values of other equipment nodes in the communication range.
  5. The bluetooth low energy networking method of claim 1, wherein: the marking of one first path as the current uplink path specifically includes:
    and marking the corresponding first path as the current uplink path according to the marking instruction acquired from the root node.
  6. The bluetooth low energy networking method of claim 5, wherein: the marking instruction is specifically generated by the root node according to the electric quantity parameter and/or the use frequency of the equipment node corresponding to each first path.
  7. The bluetooth low energy networking method of claim 1, wherein: the marking of one first path as the current uplink path and marking of the rest first paths as the standby uplink paths further comprises the following steps:
    and if the communication with the root node through the current uplink path fails, communicating with the root node through the standby uplink path.
  8. The low-power-consumption Bluetooth networking method is characterized by comprising the following steps: the method comprises the following steps:
    acquiring an access notification from a current node, wherein the access notification is sent by the current node according to a first path;
    generating a second path according to the path of the access notification sent by the current node; the second path is specifically a path from the root node to the current node through the corresponding equipment node;
    and marking one second path as the current downlink path, and the rest second paths as standby downlink paths.
  9. The bluetooth low energy networking method of claim 8, wherein: after one second path is marked as the current downlink path and the other second paths are standby downlink paths, the method further comprises the following steps:
    and if the communication with the current node through the current downlink path fails, communicating with the current node through the standby downlink path.
  10. The bluetooth low energy networking method of claim 8, wherein: after one second path is marked as the current downlink path and the other second paths are standby downlink paths, the method further comprises the following steps: after the preset time length or when the switching condition is achieved, marking the current downlink path as a new standby downlink path and marking the corresponding standby downlink path as the current downlink path.
  11. The bluetooth low energy networking method of claim 8, wherein: after one second path is marked as the current downlink path and the other second paths are standby downlink paths, the method further comprises the following steps:
    and sending a marking instruction to the current node according to the current downlink path so that the current node marks the current uplink path and the standby uplink path.
  12. The bluetooth low energy networking method of claim 11, wherein: the generating of the second path according to the path through which the current node sends the access notification specifically includes the following steps:
    if the access notification of the current node is agreed, generating a second path according to the path of the access notification sent by the current node;
    and sending an authorization instruction to the current node according to the second path.
  13. The bluetooth low energy networking method of claim 8, wherein: the marking of one second path as the current downlink path specifically includes:
    and marking the corresponding second path as the current downlink path according to the electric quantity parameter and/or the use frequency of the corresponding equipment node in each second path.
  14. The bluetooth low energy networking method of claim 13, wherein: the marking, according to the electric quantity parameter and/or the usage frequency of the corresponding device node in each second path, that the corresponding second path is the current downlink path specifically includes the following steps:
    acquiring electric quantity parameters of corresponding equipment nodes in each second path;
    and marking the second path with the optimal electric quantity parameter of the corresponding equipment node as the current downlink path.
  15. The bluetooth low energy networking method of claim 14, wherein: after the electric quantity parameters of the corresponding equipment nodes in each second path are obtained, the method further comprises the following steps:
    if the electric quantity parameters of the corresponding equipment nodes in each second path are the same, acquiring the use frequency of the corresponding equipment nodes in each second path;
    and marking the second path with the lowest frequency used by the corresponding equipment node as the current downlink path.
  16. The bluetooth low energy networking method of claim 10, wherein: when the switching condition is met, marking the current downlink path as a new standby downlink path and marking the corresponding standby downlink path as the current downlink path, specifically comprising the following steps:
    and marking the current downlink path as a new standby downlink path and marking the corresponding standby downlink path as the current downlink path according to the use frequency of the current downlink path and the standby downlink path and/or the electric quantity parameters of the corresponding equipment nodes in the current downlink path and the standby downlink path.
  17. The bluetooth low energy networking method of claim 16, wherein: the marking that the current downlink path is a new standby downlink path according to the use frequency of the current downlink path and the standby downlink path and/or the electric quantity parameters of the corresponding device nodes in the current downlink path and the standby downlink path specifically includes the following steps:
    synchronizing the use frequency of the current downlink path with the current node;
    if the electric quantity parameter marks of the corresponding equipment nodes in the current downlink path and the standby downlink path are the same, and the difference between the frequency of the current node and the frequency of the root node which utilize the current downlink path to communicate minus the frequency of the corresponding standby downlink path to communicate is larger than a preset threshold value, marking the current downlink path as a new standby downlink path and marking the corresponding standby downlink path as the current downlink path;
    and sending a new marking instruction to the current node.
  18. The bluetooth low energy networking method of claim 17, wherein: marking the current downlink path as a new standby downlink path and marking the corresponding standby downlink path as the current downlink path according to the use frequency of the current downlink path and the standby downlink path and/or the electric quantity parameters of the corresponding equipment nodes in the current downlink path and the standby downlink path, and specifically comprising the following steps:
    and if the electric quantity parameter marks of the corresponding equipment nodes in the current downlink path and the standby downlink path are the same, and the frequency of the current node and the frequency of the root node communicating by using the current downlink path are equal to the frequency of the current node communicating by using the corresponding standby downlink path, clearing the use frequency of the current downlink path and the standby downlink path.
  19. The bluetooth low energy networking method of claim 14, wherein: after the electric quantity parameters of the corresponding equipment nodes in each second path are obtained, the method further comprises the following steps:
    and if the electric quantity parameter of the equipment node is lower than a preset threshold value, sending a low-electric-quantity notification to a user terminal connected with the root node or the equipment node.
  20. An electronic device, characterized in that: comprising a memory, a processor and a program stored in the memory, the program being configured to be executed by the processor, the processor when executing the program implementing the steps of the bluetooth low energy networking method according to any of the claims 1-7.
  21. An electronic device, characterized in that: comprising a memory, a processor and a program stored in the memory, the program being configured to be executed by the processor, the processor when executing the program implementing the steps of the bluetooth low energy networking method according to any of the claims 8-19.
  22. Low-power consumption bluetooth network, its characterized in that: comprising at least one electronic device according to claim 20 and at least one electronic device according to claim 21.
  23. A storage medium storing a computer program, characterized in that: the computer program when executed by a processor implements:
    a step of the bluetooth low energy networking method according to any of claims 1-7; or
    The steps of the bluetooth low energy networking method of any one of claims 8-19.
CN201880091377.9A 2018-06-13 2018-06-13 Bluetooth low energy networking method, electronic equipment, network and storage medium Active CN112075102B (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/090931 WO2019237262A1 (en) 2018-06-13 2018-06-13 Low-power bluetooth networking method, electronic device, network, and storage medium

Publications (2)

Publication Number Publication Date
CN112075102A true CN112075102A (en) 2020-12-11
CN112075102B CN112075102B (en) 2024-04-09

Family

ID=68842330

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201880091377.9A Active CN112075102B (en) 2018-06-13 2018-06-13 Bluetooth low energy networking method, electronic equipment, network and storage medium

Country Status (2)

Country Link
CN (1) CN112075102B (en)
WO (1) WO2019237262A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112822643A (en) * 2021-01-14 2021-05-18 深圳市芯中芯科技有限公司 Bluetooth device multi-connection networking method and system based on BLE broadcasting

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113950120A (en) * 2021-10-14 2022-01-18 成都康特电子科技股份有限公司 Equipment networking method and device, terminal equipment and readable storage medium
CN115529577A (en) * 2022-07-08 2022-12-27 青岛海尔智能家电科技有限公司 Method, device, equipment and storage medium for data transmission in Bluetooth network

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1453963A (en) * 2002-04-25 2003-11-05 三星电子株式会社 Method of bluetooth routing according to request and network formation and communication method of bluetooth group network
CN102056263A (en) * 2011-01-31 2011-05-11 中控科技集团有限公司 routing method and device as well as sensor equipment based on wireless sensor tree network
CN103179635A (en) * 2013-01-11 2013-06-26 南京邮电大学 Bluetooth based networking and communication methods for Anddroid mobile equipment
CN105792312A (en) * 2016-03-02 2016-07-20 山东航天电子技术研究所 Ad-hoc network routing method based on combination of active and passive ways
CN105915451A (en) * 2016-05-19 2016-08-31 东华大学 Multi-sink deployment and fault tolerance method for wireless sensor network
CN106685822A (en) * 2015-11-11 2017-05-17 富士通株式会社 Route determination method and device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100364368B1 (en) * 2000-10-18 2002-12-12 엘지전자 주식회사 Private Network Using Bluetooth and Communication Method Using the Network
CN101217490A (en) * 2008-01-09 2008-07-09 西南科技大学 A Bluetooth wireless transducer network organizing and routing method
CN102064860A (en) * 2011-01-06 2011-05-18 西安电子科技大学 Information acquisition system based on Bluetooth Ad Hoc network
CN105279940A (en) * 2015-12-01 2016-01-27 广州碧德电子科技有限公司 Monitoring network networking method based on low-power Bluetooth

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1453963A (en) * 2002-04-25 2003-11-05 三星电子株式会社 Method of bluetooth routing according to request and network formation and communication method of bluetooth group network
CN102056263A (en) * 2011-01-31 2011-05-11 中控科技集团有限公司 routing method and device as well as sensor equipment based on wireless sensor tree network
CN103179635A (en) * 2013-01-11 2013-06-26 南京邮电大学 Bluetooth based networking and communication methods for Anddroid mobile equipment
CN106685822A (en) * 2015-11-11 2017-05-17 富士通株式会社 Route determination method and device
CN105792312A (en) * 2016-03-02 2016-07-20 山东航天电子技术研究所 Ad-hoc network routing method based on combination of active and passive ways
CN105915451A (en) * 2016-05-19 2016-08-31 东华大学 Multi-sink deployment and fault tolerance method for wireless sensor network

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112822643A (en) * 2021-01-14 2021-05-18 深圳市芯中芯科技有限公司 Bluetooth device multi-connection networking method and system based on BLE broadcasting
CN112822643B (en) * 2021-01-14 2021-11-30 深圳市芯中芯科技有限公司 Bluetooth device multi-connection networking method and system based on BLE broadcasting

Also Published As

Publication number Publication date
CN112075102B (en) 2024-04-09
WO2019237262A1 (en) 2019-12-19

Similar Documents

Publication Publication Date Title
US8503309B2 (en) Dynamic expelling of child nodes in directed acyclic graphs in a computer network
US9698864B2 (en) Dynamic assignment of frequency hopping sequences in a communication network
US8472348B2 (en) Rapid network formation for low-power and lossy networks
CN100450053C (en) Apparatus and method for detecting duplicate IP addresses in mobile ad hoc network environment
US10218619B2 (en) Proactive broadcast capacity adjustment for fast network joins
EP3172860B1 (en) Fast network formation after network power restoration
CN111464358B (en) Message reporting method and device
US20100115083A1 (en) network selection mechanism
US20120230370A1 (en) Efficient Transmission of Large Messages in Wireless Networks
CN112075102A (en) Low-power Bluetooth networking method, electronic equipment, network and storage medium
CN111886843B (en) Low power consumption Bluetooth network maintenance method, electronic device, bluetooth network and medium
JP5431584B2 (en) COMMUNICATION DEVICE, COMMUNICATION METHOD, AND COMPUTER PROGRAM
WO2018086305A1 (en) Method and apparatus for determining network center node, and device node
CN111884875A (en) Offline device determination method and device
CN111971984B (en) Low-power consumption Bluetooth communication method, electronic device, network and storage medium
CN111148176A (en) Routing method and device of wireless ad hoc network
CN109194521B (en) Flow forwarding method and equipment
US20100238939A1 (en) Intermediate node device, method of controlling intermediate node device, and network system
EP2958270B1 (en) Direct-link quality monitoring method, communications device, and system
JP5287842B2 (en) Server device, client device, and communication system
CN110635927B (en) Node switching method, network node and network system
JP2006050224A (en) Wireless communication system
JP2008109614A (en) Communication method and radio communication terminal
CN112166620B (en) Communication method of wireless device, and computer-readable storage medium
JP5137806B2 (en) Communication control method and communication apparatus

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