CN111971984A - Low power consumption Bluetooth communication method, electronic device, network and storage medium - Google Patents

Low power consumption Bluetooth communication method, electronic device, network and storage medium Download PDF

Info

Publication number
CN111971984A
CN111971984A CN201880091915.4A CN201880091915A CN111971984A CN 111971984 A CN111971984 A CN 111971984A CN 201880091915 A CN201880091915 A CN 201880091915A CN 111971984 A CN111971984 A CN 111971984A
Authority
CN
China
Prior art keywords
path
node
type
communication range
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.)
Granted
Application number
CN201880091915.4A
Other languages
Chinese (zh)
Other versions
CN111971984B (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 CN111971984A publication Critical patent/CN111971984A/en
Application granted granted Critical
Publication of CN111971984B publication Critical patent/CN111971984B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • 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

Abstract

The invention discloses a low-power-consumption Bluetooth communication method, electronic equipment, a network and a storage medium, wherein the method comprises the following steps: scanning device nodes within a communication range; generating a first type path and a second type path according to the routing information of the equipment nodes in the communication range; the first type of path is a path which is communicated with the root node through the relay equipment node in the communication range; the second type of path is a path communicating with each device node within the communication range. By generating a first type of path which can be communicated with the root node and/or a second type of path which is communicated with each equipment node in a communication range in the current node, the path which needs to be stored in a routing table is simplified, convenience is provided for the selection of the path when the current node is communicated with the root node or other equipment nodes, the pertinence of path selection is improved, and the pressure of the root node is reduced; and when the root node fails, the current node can still form a local Mesh network with other partial equipment nodes through a second type path for communication.

Description

Low power consumption Bluetooth communication method, electronic device, network and storage medium Technical Field
The present invention relates to bluetooth networking technologies, and in particular, to a bluetooth low energy communication method, an electronic device, a network, and a storage medium.
Background
Bluetooth Low Energy (BLE) is a new Bluetooth 4.0 specification that was introduced by Bluetooth SIG on 7/2010. The most important characteristics are very low power consumption and short distance. The traditional bluetooth networking connection method adopts the form of piconets (piconets), each Piconet has only one master device, and the others are all slave devices, that is, one master device can communicate with 1 or no more than 7 bluetooth devices within the bluetooth communication range.
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, for low-power-consumption nodes in a Mesh network topology structure provided by the specification, the low-power-consumption nodes can only communicate with friend nodes existing around, and more node roles are allocated in the use of the whole network.
The existing bluetooth device networking usually adopts a tree networking method, but how to generate and quickly select a path between a common device node and a root node so as to improve the reaction speed of the bluetooth network and ensure the receiving and sending success rate of messages still needs to be solved.
Disclosure of Invention
In order to overcome the defects of the prior art, the invention aims to provide a low-power-consumption Bluetooth communication method, electronic equipment, a network and a storage medium, so that the paths needing to be stored in a routing table are simplified, the pertinence of path selection is improved, and the pressure of a root node is reduced.
The purpose of the invention is realized by adopting the following technical scheme:
the low-power consumption Bluetooth communication method comprises the following steps:
scanning device nodes within a communication range;
generating a first type path and a second type path according to the routing information of the equipment nodes in the communication range;
the first type of path is a path communicated with a root node through a relay device node in the communication range;
the second type of path is a path communicating with each device node within the communication range.
Further, after the first type path and the second type path are generated according to the routing information of the device node in the communication range, the method further comprises the following steps:
and if the communication with the root node through the first type of path fails, sending information to a corresponding equipment node in a communication range through the second type of path so that the equipment node forwards the information.
Further, the failure of communication with the root node through the first type of path specifically includes: the root node has a power outage or failure.
Further, the bluetooth low energy communication method further includes the steps of: and if the root node has power failure or faults, sending a root node offline notification to the user terminal in the communication range.
Further, after scanning the device nodes within the communication range, the method further includes the following steps:
and acquiring routing information from the equipment nodes in the communication range, wherein the routing information comprises hop values of the corresponding equipment nodes.
Further, the hop count value of the relay device node is not greater than the hop count value of each device node in the communication range.
Further, the generating a first type path and a second type path according to the routing information of the device node in the communication range specifically includes the following steps:
if the hop count value of the equipment node is not greater than the hop count values of other equipment nodes in the communication range, generating a first type of path according to the routing information of the equipment node; and
and generating a second type of path according to the information of each equipment node in the communication range.
Further, after the first type path and the second type path are generated according to the routing information of the device node in the communication range, the method further comprises the following steps:
sending an access notification to the root node according to the first type of path;
and if the authorization of the root node is obtained, storing the first-class path and the second-class path.
Further, after the first type path and the second type path are generated according to the routing information of the device node in the communication range, the method further comprises the following steps:
acquiring information of a target node from a user terminal in the communication range;
and if the target node is positioned in the second type of path, establishing the communication between the user terminal and the target node through the second type of path.
Further, after the information of the target node is acquired from the user terminal within the communication range, the method further includes the following steps:
and if the target node is not located in the second type of path, sending the information of the target node to the root node through the first path so as to establish the communication between the user terminal and the target node through the root node.
Further, after the information of the target node is acquired from the user terminal within the communication range, the method further includes the following steps:
and if the communication between the user terminal and the target node is established through the second type of path fails, sending the information of the target node to the root node through the first path so as to establish the communication between the user terminal and the target node through the root node.
Further, after the first type path and the second type path are generated according to the routing information of the device node in the communication range, the method further comprises the following steps:
synchronizing the first type of path to a root node.
Further, if there are a plurality of first-type paths generated according to the routing information of the device nodes in the communication range, after the first-type paths and the second-type paths are generated according to the routing information of the device nodes in the communication range, the method further includes the following steps:
one first-class path is marked as a current path, and the rest first-class paths are marked as standby paths.
Further, the marking of one first-class path as a current path and the marking of the remaining first-class paths as standby paths specifically includes:
and marking one first-class path as a current path and marking the rest first-class paths as standby paths according to the marking instruction acquired from the root node.
Further, the marking instruction is specifically generated by the root node according to the electric quantity parameter and/or the use frequency of the corresponding device node of each first-class path.
An electronic device 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 communication method as described above.
A low power Bluetooth network comprises a root node and at least one electronic device as described above.
A storage medium storing a computer program, characterized in that: the computer program realizes the steps of the bluetooth low energy communication method described above when being executed by a processor.
Compared with the prior art, the embodiment of the invention has the beneficial effects that: by generating a first type of path which can be communicated with the root node and/or a second type of path which is communicated with each equipment node in a communication range in the current node, the path which needs to be stored in a routing table is simplified, convenience is provided for the selection of the path when the current node is communicated with the root node or other equipment nodes, the pertinence of path selection is improved, and the pressure of the root node is reduced; and when the root node fails, the current node can still form a local Mesh network with other partial equipment nodes through a second type path for communication.
Drawings
FIG. 1 is a schematic diagram of a Bluetooth network;
fig. 2 is a flowchart illustrating a bluetooth low energy communication method according to a first embodiment of the present invention;
fig. 3 is a flowchart illustrating a bluetooth low energy communication method according to a second embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to a third embodiment of the present invention.
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 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; the other device nodes are generally power consumption sensitive bluetooth low energy devices, such as battery powered BLE devices, which are 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
Fig. 2 is a flowchart illustrating a bluetooth low energy communication method.
The low-power Bluetooth communication method comprises 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 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 nodes 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 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, 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.
In a preferred embodiment, after the current node scans the device nodes in the communication range, the current node acquires the routing information from the device 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.
As a preferred embodiment, the broadcast packet of the device node includes its own hop count value, and therefore, the routing information includes the hop count value of the corresponding device node.
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.
And step S120, the current node generates a first type path and a second type path according to the routing information of the equipment nodes in the communication range.
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, if the hop count value of a certain or some device nodes in the communication range of the current node a is a positive number, for example, the hop count values of the device nodes B and E are 1 and 2, respectively, it indicates that the device nodes B and E include information of the root node R in the routing table; the current node a may establish a connection with the root node through such device nodes, e.g., device nodes B and E, i.e., may generate two paths, e.g., a-B-R and a-E-B-R, based on the routing information of such device nodes.
The first type of path is a path through which the current node communicates with the root node through the relay device node within the communication range. Thus, both paths may be the first type of path.
As a preferred embodiment, the hop count value of the relay device node is not greater than the hop count value of each device node in the communication range, that is, one or more device nodes with the smallest hop count value in the communication range of the current node are relay device nodes. Therefore, in this embodiment, the device node B is a relay device node.
As a preferred embodiment, step S120, the current node generates a first type path and a second type path according to the routing information of the device node in the communication range, which specifically includes the following steps:
step S121, if the hop count value of the current node according to the equipment node in the communication range is not larger than the hop count values of the other equipment nodes in the communication range, the current node generates a first type path according to the equipment node.
And if the hop count value of the current node according to a certain equipment node in the communication range is not larger than the hop count values of other equipment nodes in the communication range, the equipment node is the equipment node with the smallest hop count value in the communication range of the current node, namely the relay equipment node. The current node generates a first type path according to the equipment node, and specifically, the current node generates the first type path according to the routing information of the relay equipment node.
In this embodiment, the device node with the smallest hop count value is preferentially selected as the relay node between the current node a and the root node R, that is, a shorter path is selected as the first-type path a-B-R. The first type of path generated by current node a includes a-B-R and does not include a-E-B-R.
And step S122, the current node generates a second type of path according to the information of each equipment node in the communication range, such as the physical address or the identity identification information. The second type of path is a path through which the current node is communicated with each equipment node in the communication range. In this embodiment, the second type of path generated by the current node A includes A-E, and A-B.
Taking the device node I as the current node as an example, if there is a device node D, H, J in the communication range, the first type of path generated by the device node I includes I-D-R, and the second type of path includes I-D, I-H and I-J.
As a preferred embodiment, after the step S121 generates the first type path, the method further includes the following steps:
step S123, the current node sends an access notice to the root node according to the first type of path; and the root node acquires the access notification from the current node.
In this embodiment, the current node needs to be granted by the root node to access the bluetooth network whose main manager is the root node. Therefore, after the current node generates the first type path, an access notification needs to be sent to the root node. Specifically, the current node sends an access notification to the root node through a first type of path, such as a-B-R.
After the current node generates the first type path, the current node is firstly informed to the root node through the first type path to join the Mesh network of the root node. If the root node correctly receives the notice of the current node, an acknowledgement character ACK (acknowledgement) is sent to the current node, and if the access notice of the current node is not correctly received, a NAK (negative acknowledgement) is sent to the current node to indicate negative acknowledgement or non-acknowledgement. If the current node receives NAK or does not receive the response of the root node after a preset time, the current node fails to access the network, and the current node becomes an isolated node which does not access the network. If the current node 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 through a first type path, such as A-B-R.
As a preferred embodiment, if the current node receives NAK or does not receive a response from the root node 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.
If the root node agrees with the access notification of the current node, generating a path corresponding to a first type path of the root node end and the current node according to the path of the access notification sent by the current node; if the current node A sends an access notice to the root node through a first type path A-B-R, the root node generates a path R-B-A corresponding to the first type path; the path is specifically a path from the root node to the current node through the corresponding device node.
Therefore, in step S120, after the current node generates the first type path according to the routing information of the device node in the communication range, the current node synchronizes the first type path to the root node.
Step S124, if the current node obtains the authorization of the root node, saving the first type path and the second type path.
And if the root node agrees to carry out network authorization on the current node, namely the new equipment node to be accessed into the network, namely agrees to add the current node A into the network, sending an authorization instruction to the current node according to the generated path. And after the current node acquires the authorization of the root node, storing the first-class path and the second-class path.
As a preferred embodiment, after the root node performs network authorization on the current node, it needs to also successfully confirm to join the current node into the network, and adds a path, such as R-B-a, generated according to the first type of path for which the current node sends an access notification to its own routing table information.
If the root node does not perform network authorization on the current node after acquiring the access notification from the current node, that is, the current node is not authorized to be added into the network, the network access of the current node fails, and the equipment node becomes an isolated node which is not accessed into the network.
And when the current node acquires authorization from the root node and successfully confirms to join the Bluetooth network, the first type of path, such as A-B-R, and the second type of paths A-E and A-B are saved in a routing table of the current node.
As a preferred embodiment, after the current node generates the first type path and the second type path according to the routing information of the device node in the communication range in step S120, the method further includes the following steps:
and if the communication between the current node and the root node through the first type path fails, sending information to the corresponding equipment node through the second type path so that the equipment node forwards the information.
When the root node stops working due to power failure or fault, the root node loses the management capability of other device nodes in the whole network, that is, the device nodes cannot communicate with each other through the root node, and the current node also fails to communicate with the root node through the first type of path. And the current node also stores a second type of path, so that the current node and other partial equipment nodes can still form a local Mesh network through the second type of path for communication.
As shown in fig. 1, when the root node R is operating normally, the device node a sends information to the root node through its first path a-B-R, and the root node R then sends the information to the user terminal. When the root node R is powered off or fails, the device node a first sends corresponding information to the device node B through the second-type path a-B, then the device node B sends corresponding information to the device node C through the second-type path B-C, then the device node C sends corresponding information to the device node D through the second-type path C-D, and finally the device node D sends the information to the user terminal within the communication range.
In this embodiment, if the root node has a power failure or a fault, when the current node communicates with the root node through the first-class path, the device node with the hop count of 1 in the first-class path fails to send information to the root node, and the device node with the hop count of 1 feeds back that the root node is disconnected to the current node. And then the current node sends a root node drop notification to the user terminal in the communication range of the current node so that the user terminal prompts related personnel to process.
According to the low-power-consumption Bluetooth communication method provided by the embodiment of the invention, the first type of path which can be communicated with the root node and/or the second type of path which is communicated with each equipment node in the communication range are generated in the current node, so that the paths which need to be stored in the routing table are simplified, convenience is provided for the selection of the paths when the current node is communicated with the root node or other equipment nodes, the pertinence of path selection is improved, and the pressure of the root node is reduced; and when the root node fails, the current node can still form a local Mesh network with other partial equipment nodes through a second type path for communication.
Example two
The bluetooth low energy communication method as shown in fig. 3 includes the following steps:
and step S210, the current node scans the equipment nodes in the communication range.
Step S220, the current node generates a first type path and a second type path according to the routing information of the equipment nodes in the communication range.
Steps S210 and S220 correspond to S110 and S120 in the first embodiment, respectively, and are not described again.
In this embodiment, the current node refers to a device node that communicates with the user terminal, for example, the user terminal establishes a connection with a device node at a certain location, and the device node is the current node through the routing information of the device node, that is, the first type path or the second type path, to communicate with the root node or other corresponding device nodes. The user terminal device can be a mobile phone, a tablet, a computer and the like with a BLE communication function.
Step S220, after the current node generates the first type path and the second type path according to the routing information of the device node in the communication range, the method further includes the following steps:
step S230, the current node acquires information of the target node from the user terminal in the communication range.
As shown in fig. 1, there is a user terminal in the bluetooth communication range of the current node a, and when the user terminal needs to establish communication with the device node D, the user terminal scans the device node a nearby, that is, the current node a. Then the user terminal sends the message which needs to communicate with the device node D, namely the target node D, to the current node A, and the current node A can know the information of the target node D.
Step S240, if the target node of the user terminal is the current node, the current node directly communicates with the user terminal. If not, executing the following steps:
step S250, if the target node is located in the second type path, the current node establishes communication between the user terminal and the target node through the second type path.
After the current node A acquires the information of the target node D, whether a second type of path reaching the target node D exists in a routing table of the current node A is checked. If the routing table of the current node A has a second type of path A-D, the current node A sends information to be sent to a target node D through the second type of path to establish communication between the user terminal and the target node, namely the path: user terminals-a-D.
After the current node acquires the information of the target node from the user terminal, whether the target node is located in the communication range of the current node is judged through the second path, if yes, communication between the user terminal and the target node is established through the second path preferentially, and the path selection speed is higher and the path is shorter.
As a preferred embodiment, if the current node fails to establish the communication between the user terminal and the target node through the second-type path, the information of the target node is sent to the root node through the first path, so as to establish the communication between the user terminal and the target node through the root node.
The failure of the current node to establish the communication between the user terminal and the target node through the second type path may be caused by the current node or the target node being moved. The device node will perform the network access process again after moving, and update the routing information, for example, generate a new first-type path and a new second-type path. The target node is not within communication range of the current node at this time, but may establish communication with the root node through the first-type path.
As a preferred embodiment, after the current node generates the first-type path and the second-type path according to the routing information of the device node in the communication range in step S220, the method further includes the following steps:
step S260, if the target node is not located in the second type path of the current node, the current node sends the information of the target node to the root node through the first path, so as to establish communication between the user terminal and the target node through the root node.
That is, when the target node is located in the second-type path, but the current node fails to establish the communication between the user terminal and the target node through the second-type path, or the target node is not located in the second-type path, the current node establishes the communication between the user terminal and the target node through the root node.
The current node firstly sends information to be sent to a root node R through a first type path A-B-R of the current node, and communication between the current node and the root node R is established; after each device node generates the first type path according to the routing information of the device nodes in the communication range, the generated first type path is synchronized to the root node, and the corresponding path, such as R-B-A, R-D, is stored in the routing table of the root node. After acquiring that a user terminal needs to communicate with a target node D through a root node R from a current node A, the root node R sends corresponding information acquired from the current node A to the target node D through a path R-D; so far, the current node A establishes communication between the user terminal and the target node D through the root node R.
The low-power-consumption Bluetooth communication method provided by the invention generates a first type of path which can be communicated with a root node and/or a second type of path which is communicated with each equipment node in a communication range in a current node; when the target node is positioned in the second type path, the communication between the user terminal and the target node is established through the second type path, the path selection speed is higher, and the path is shorter; when the second type path is failed or the target node is not located in the second type path, the current node firstly sends the information to be sent to the root node through the first type path, and then the root node sends the corresponding information to the target node so as to establish the communication between the user terminal and the target node through the root node. Therefore, convenience is provided for path selection when communication is carried out between the current node and the root node or other equipment nodes, the pertinence of path selection is improved, and the pressure of the root node is reduced.
In one embodiment, in step S220, the current node generates a plurality of first-type paths according to the routing information of the device nodes in the communication range.
As shown in fig. 1, in a process of adding an equipment node K to a network, the equipment node K may obtain corresponding routing information from equipment nodes F and G within a communication range of the equipment node K, where the routing information includes routing tables of the equipment nodes F and G with respect to R, and the routing tables are F-C-R and G-C-R, respectively; and the hop count values of device nodes F and G are both 2. Therefore, the first type of 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 of the current node K, which are K-F-C-R and K-G-C-R, respectively.
As a further improvement of the embodiment of the present invention, if the current node generates a plurality of first-type paths according to the routing information of the device nodes in the communication range in step S220, the bluetooth low energy communication method further includes the following steps:
step S270, marking one first-class path as a current path and marking the rest first-class paths as standby paths by the current node.
As a preferred embodiment, if the current node fails to communicate with the root node through the current path, the current node communicates with the root node through the backup path.
The first type of path 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 path; and the rest first-class paths are used as standby paths, and the communication between the current node K and the root node R is established when the current path has faults and the like, so that the successful receiving and sending of the message can be ensured.
As a preferred embodiment, how to allocate the first-type path as the current path or the standby path is determined by the root node R, in step S270, the current node marks one first-type path as the current path, and marks the remaining first-type paths as the standby paths, specifically: and marking one first-class path as a current path and marking the rest first-class paths as standby paths by the current node according to the marking instruction acquired from the root node.
According to the low-power-consumption Bluetooth communication method provided by the embodiment of the invention, when a plurality of first-class paths exist between the current node and the root node, one first-class path is marked as the current path, and the rest first-class paths are marked as standby paths; therefore, when the current node communicates with the root node, the current node is preferentially communicated with the current node through the current path; 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 path, so that the receiving and sending success rate of the message can be ensured.
After the current node generates the first type of path according to the routing information of the device node in the communication range, the current node synchronizes the first type of path to the root node, so that the root node also has a plurality of paths corresponding to the first type of paths, such as R-C-F-K and R-C-G-K, which correspond to the first type of paths K-F-C-R and K-G-C-R, respectively.
As a preferred embodiment, the marking instruction is specifically generated by the root node according to the electric quantity parameter and/or the usage frequency of the device node corresponding to each first-type 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 path and the standby path are selected according to the electric quantity parameters and/or the use frequency of the corresponding equipment nodes in each first-class path, so that the use frequency of a plurality of first-class 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 two first-type paths K-F-C-R and K-G-C-R of the device node K in fig. 1, the device node F and the device node G are corresponding device nodes, and the current path and the backup path are selected according to the power parameters and/or the frequency of use of the two device nodes.
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; if the battery power level is 0, it may indicate that less than 10% of the power of the device node remains.
For the two first-class paths, one path can be selected as a current path and the other path can be selected as a standby path according to the battery power levels of the equipment node F and the equipment node G.
When the BL of the two relay device nodes F and G >0, if the BL of the device node F and the BL of the device node G are the same, any one of the first-type paths may be selected as the current path, and the rest may be selected as the standby 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 first type of path passing through the equipment node F as a current path and selects the first type of path passing through the equipment node G as a standby path; namely, K-F-C-R is selected as the current path, and K-G-C-R is selected as the standby 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 K-G-C-R as the current path, and selects K-F-C-R as the standby path.
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 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 first-class path may be further marked as the current path according to the usage frequency of the corresponding device node.
As a preferred embodiment, selecting a first type of path passing through a relay device node with a lower use frequency as a current path of a root node R and a current node K; if the frequency of use of the device node F is 10 times and the frequency of use of the device node G is 25 times, marking K-F-C-R as the current path and K-G-C-R as the standby path.
After marking the current path and the standby path, the root node R sends a marking instruction to the current node K; so that the current node marks the corresponding first-type path as the current path and marks other first-type paths as the standby paths.
Therefore, if the use frequency of a certain equipment node is higher, the use of the first type of path can be reduced, so that the frequency of the path occupying the equipment node is reduced, and the service life of the equipment node is prolonged.
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 steps of the aforementioned bluetooth low energy communication method.
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 example three.
EXAMPLE III
The electronic device as shown in fig. 4 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 implementing the steps of the above-mentioned bluetooth low energy communication method when executing the program.
The electronic device in this embodiment and the method in the foregoing 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 in this embodiment according to the foregoing description, and for the sake of brevity of the description, details are not repeated here.
The electronic device in this embodiment may be applied to a bluetooth low energy network as shown in fig. 1, i.e. the bluetooth low energy network comprises a root node and at least one of the electronic devices. The electronic device can implement the bluetooth low energy communication method when operating in the bluetooth low energy network, and the structure and implementation process of the bluetooth low energy network can be understood according to the description of the foregoing embodiments, 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, the first type of path which can be communicated with the root node and/or the second type of path which is communicated with each equipment node in the communication range are generated in the current node, so that the path which needs to be stored in the routing table is simplified, convenience is provided for the selection of the path when the current node is communicated with the root node or other equipment nodes, the pertinence of path selection is improved, and the pressure of the root node is reduced; and when the root node fails, the current node can still form a local Mesh network with other partial equipment nodes through a second type path for communication.
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 (18)

  1. The low-power consumption Bluetooth communication method is characterized by comprising the following steps: the method comprises the following steps:
    scanning device nodes within a communication range;
    generating a first type path and a second type path according to the routing information of the equipment nodes in the communication range;
    the first type of path is a path communicated with a root node through a relay device node in the communication range;
    the second type of path is a path communicating with each device node within the communication range.
  2. The bluetooth low energy communication method according to claim 1, characterized in that: after the first type path and the second type path are generated according to the routing information of the equipment nodes in the communication range, the method further comprises the following steps:
    and if the communication with the root node through the first type of path fails, sending information to a corresponding equipment node in a communication range through the second type of path so that the equipment node forwards the information.
  3. The bluetooth low energy communication method according to claim 2, characterized in that: the failure of communication with the root node through the first-class path specifically includes: the root node has a power outage or failure.
  4. The bluetooth low energy communication method according to claim 3, characterized in that: further comprising the steps of: and if the root node has power failure or faults, sending a root node offline notification to the user terminal in the communication range.
  5. The bluetooth low energy communication method according to claim 1, characterized in that: after scanning the device nodes within the communication range, the method further comprises the following steps:
    and acquiring routing information from the equipment nodes in the communication range, wherein the routing information comprises hop values of the corresponding equipment nodes.
  6. The bluetooth low energy communication method according to claim 5, wherein: and the hop count value of the relay equipment node is not more than the hop count value of each equipment node in the communication range.
  7. The bluetooth low energy communication method according to claim 6, characterized in that: the method for generating the first-class path and the second-class path according to the routing information of the device nodes in the communication range specifically comprises the following steps:
    if the hop count value of the equipment node is not greater than the hop count values of other equipment nodes in the communication range, generating a first type of path according to the routing information of the equipment node; and
    and generating a second type of path according to the information of each equipment node in the communication range.
  8. The bluetooth low energy communication method according to claim 7, wherein: after the first type path and the second type path are generated according to the routing information of the equipment nodes in the communication range, the method further comprises the following steps:
    sending an access notification to the root node according to the first type of path;
    and if the authorization of the root node is obtained, storing the first-class path and the second-class path.
  9. The bluetooth low energy communication method according to claim 1, characterized in that: after the first type path and the second type path are generated according to the routing information of the equipment nodes in the communication range, the method further comprises the following steps:
    acquiring information of a target node from a user terminal in the communication range;
    and if the target node is positioned in the second type of path, establishing the communication between the user terminal and the target node through the second type of path.
  10. The bluetooth low energy communication method according to claim 9, wherein: after the information of the target node is obtained from the user terminal in the communication range, the method further comprises the following steps:
    and if the target node is not located in the second type of path, sending the information of the target node to the root node through the first path so as to establish the communication between the user terminal and the target node through the root node.
  11. The bluetooth low energy communication method according to claim 10, wherein: after the information of the target node is obtained from the user terminal in the communication range, the method further comprises the following steps:
    and if the communication between the user terminal and the target node is established through the second type of path fails, sending the information of the target node to the root node through the first path so as to establish the communication between the user terminal and the target node through the root node.
  12. The bluetooth low energy communication method according to claim 11, characterized in that: after the first type path and the second type path are generated according to the routing information of the equipment nodes in the communication range, the method further comprises the following steps:
    synchronizing the first type of path to a root node.
  13. The bluetooth low energy communication method according to claim 12, wherein: if there are multiple first-class paths generated according to the routing information of the device nodes in the communication range, after the first-class paths and the second-class paths are generated according to the routing information of the device nodes in the communication range, the method further comprises the following steps:
    one first-class path is marked as a current path, and the rest first-class paths are marked as standby paths.
  14. The bluetooth low energy communication method according to claim 13, wherein: the marking of one first-class path as a current path and the marking of the other first-class paths as standby paths specifically comprises the following steps:
    and marking one first-class path as a current path and marking the rest first-class paths as standby paths according to the marking instruction acquired from the root node.
  15. The bluetooth low energy communication method according to claim 14, wherein: the marking instruction is specifically generated by the root node according to the electric quantity parameter and/or the use frequency of the corresponding equipment node of each first-class path.
  16. 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 communication method according to any of the claims 1-15.
  17. Low-power consumption bluetooth network, its characterized in that: comprising a root node and at least one electronic device as claimed in claim 16.
  18. A storage medium storing a computer program, characterized in that: the computer program realizes the steps of the bluetooth low energy communication method according to any one of claims 1-15 when executed by a processor.
CN201880091915.4A 2018-06-13 2018-06-13 Low-power consumption Bluetooth communication method, electronic device, network and storage medium Active CN111971984B (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/090933 WO2019237264A1 (en) 2018-06-13 2018-06-13 Low power bluetooth communication method, electronic equipment, network and storage medium

Publications (2)

Publication Number Publication Date
CN111971984A true CN111971984A (en) 2020-11-20
CN111971984B CN111971984B (en) 2023-06-27

Family

ID=68842400

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201880091915.4A Active CN111971984B (en) 2018-06-13 2018-06-13 Low-power consumption Bluetooth communication method, electronic device, network and storage medium

Country Status (2)

Country Link
CN (1) CN111971984B (en)
WO (1) WO2019237264A1 (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 (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115278626A (en) * 2022-07-26 2022-11-01 哲库科技(上海)有限公司 Method, device, equipment, system and storage medium for transmitting Bluetooth multimedia packet

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103179635A (en) * 2013-01-11 2013-06-26 南京邮电大学 Bluetooth based networking and communication methods for Anddroid mobile equipment
US20150365999A1 (en) * 2014-06-12 2015-12-17 Samsung Electronics Co., Ltd. Method for processing data based on bluetooth protocol and electronic device thereof
CN106550321A (en) * 2017-01-10 2017-03-29 湖南科技职业学院 A kind of construction method of the mobile ad hoc network based on Hybrid communication model
CN106604212A (en) * 2016-12-21 2017-04-26 深圳市北电仪表有限公司 Mesh networking method based on BLE attribute and GATT
US20170171798A1 (en) * 2015-12-10 2017-06-15 Lg Electronics Inc. Method and apparatus for transmitting and receiving data in wireless communication system
US20180123804A1 (en) * 2016-10-27 2018-05-03 Infinitekey, Inc. System and method for authenticating and authorizing devices
CN108156231A (en) * 2017-12-21 2018-06-12 北京摩拜科技有限公司 The fault car and method of server communication, vehicle and server

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107592605A (en) * 2017-09-14 2018-01-16 上海肖克利信息科技股份有限公司 Ad hoc network method and system based on low-power consumption bluetooth

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103179635A (en) * 2013-01-11 2013-06-26 南京邮电大学 Bluetooth based networking and communication methods for Anddroid mobile equipment
US20150365999A1 (en) * 2014-06-12 2015-12-17 Samsung Electronics Co., Ltd. Method for processing data based on bluetooth protocol and electronic device thereof
US20170171798A1 (en) * 2015-12-10 2017-06-15 Lg Electronics Inc. Method and apparatus for transmitting and receiving data in wireless communication system
US20180123804A1 (en) * 2016-10-27 2018-05-03 Infinitekey, Inc. System and method for authenticating and authorizing devices
CN106604212A (en) * 2016-12-21 2017-04-26 深圳市北电仪表有限公司 Mesh networking method based on BLE attribute and GATT
CN106550321A (en) * 2017-01-10 2017-03-29 湖南科技职业学院 A kind of construction method of the mobile ad hoc network based on Hybrid communication model
CN108156231A (en) * 2017-12-21 2018-06-12 北京摩拜科技有限公司 The fault car and method of server communication, vehicle and server

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

Also Published As

Publication number Publication date
CN111971984B (en) 2023-06-27
WO2019237264A1 (en) 2019-12-19

Similar Documents

Publication Publication Date Title
CN100450053C (en) Apparatus and method for detecting duplicate IP addresses in mobile ad hoc network environment
EP2793528B1 (en) Method for transmitting data between terminals and terminal
EP2304979B1 (en) Multi-rate peer discovery methods and apparatus
US10218619B2 (en) Proactive broadcast capacity adjustment for fast network joins
CN101690041B (en) Apparatus and method of generating and maintaining orthogonal connection identifications (cids) for wireless networks
KR101829096B1 (en) Selection of synchronization stations in a peer-to-peer network environment
CN111886843B (en) Low power consumption Bluetooth network maintenance method, electronic device, bluetooth network and medium
JP2010533438A (en) Apparatus and method for generating and maintaining mutually independent connection identification information (CID) for a wireless network
JP2010533435A (en) Apparatus and method for generating and maintaining mutually independent connection identification information (CID) for a wireless network
US10292060B2 (en) Autonomous, power-dictated message routing for multi-hop mesh network outage communications
US20170245132A1 (en) Radio communication system, radio communication device, and radio relay device
CN107852589A (en) The instruction on the scene of neighborhood aware network data link
CN110875857B (en) Method, device and system for reporting disconnected network state
CN109150659B (en) Processor and BFD message transmission method
CN111971984A (en) Low power consumption Bluetooth communication method, electronic device, network and storage medium
CN111884875A (en) Offline device determination method and device
CN111148176A (en) Routing method and device of wireless ad hoc network
CN112075102B (en) Bluetooth low energy networking method, electronic equipment, network and storage medium
CN109194521B (en) Flow forwarding method and equipment
CN114786241A (en) Network selection method, related device, network equipment and storage medium
CN106535299B (en) Correlation method and device
CN106304241B (en) Data transmission method, repeater and gateway
CN111869246B (en) Message transmission method, BLE equipment and BLE chip
CN112738922B (en) Data processing method and device, storage medium and electronic device
CN108173910B (en) Method and system for managing application

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