CN111971984B - 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
CN111971984B
CN111971984B CN201880091915.4A CN201880091915A CN111971984B CN 111971984 B CN111971984 B CN 111971984B CN 201880091915 A CN201880091915 A CN 201880091915A CN 111971984 B CN111971984 B CN 111971984B
Authority
CN
China
Prior art keywords
node
path
type
root node
current
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201880091915.4A
Other languages
Chinese (zh)
Other versions
CN111971984A (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

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 communication method, electronic equipment, a network and a storage medium, wherein the method comprises the following steps: scanning equipment nodes in 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 the root node through equipment nodes in the communication range; the second type of path is a path that communicates with each device node within the communication range. By generating a first type path which can be communicated with the root node and a second type path which can be communicated with all equipment nodes in a communication range in the current node, the paths which need to be stored in a routing table are simplified, convenience is provided for the selection of the paths when the current node communicates 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 communicate with other partial equipment nodes through the second type path to form a local Mesh network.

Description

Low-power consumption Bluetooth communication method, electronic device, network and storage medium
Technical Field
The present invention relates to bluetooth networking technology, and in particular, to a bluetooth low energy communication method, an electronic device, a network, and a storage medium.
Background
Bluetooth low energy (Bluetooth Low Energy, BLE) is a new Bluetooth 4.0 specification that Bluetooth SIG introduced on 7 months 2010, 7. The most important characteristic is extremely low power consumption and short distance. Traditional bluetooth networking is implemented in the form of piconets (piconets), where there is one master device in each Piconet and the other is a slave device, i.e., one master device may communicate with 1 or no more than 7 bluetooth devices within bluetooth communication range.
The Mesh working group of bluetooth 7 in 2017 proposes a Mesh network technology based on BLE, the Mesh working group is a Mesh network technology based on a streaming protocol, and for low-power consumption nodes, in the Mesh network topology structure proposed by the Mesh working group, the Mesh working group can only communicate with surrounding friend nodes, and more node roles are distributed in the use of the whole network.
The existing Bluetooth equipment networking generally adopts a tree networking method, but how to generate and rapidly select paths between common equipment nodes and root nodes so as to improve the response speed of the Bluetooth network and ensure the success rate of message transceiving is still a technical problem 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 paths which need 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 invention adopts the following technical scheme:
a bluetooth low energy communication method comprising the steps of:
scanning equipment nodes in 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 path is a path communicated with a root node through equipment nodes in the communication range; the second type of path is a path communicated with each equipment node in the communication range.
In one embodiment, after generating the first type of path and the second type of path according to the routing information of the device node in the communication range, the method further includes:
and if the communication between the first type path and the root node fails, sending information to the corresponding equipment nodes in the communication range through the second type path so as to enable the equipment nodes to forward the information.
In one embodiment, the communication failure with the root node through the first type of path includes: the root node fails or fails.
In one embodiment, the low-power consumption bluetooth communication method further includes: and if the root node fails or fails, sending a root node disconnection notification to the user terminal in the communication range.
In one embodiment, after the scanning for the device nodes within the communication range, the method further includes:
and obtaining the routing information of the equipment nodes from the equipment nodes in the communication range, wherein the routing information comprises the hop value of the corresponding equipment nodes.
In one embodiment, the step of generating the first type of path and the second type of path according to the routing information of the device node in the communication range includes:
generating a first type path according to route information of a relay equipment node, wherein the relay equipment node is one equipment node with a hop count value not greater than that of other equipment nodes in a communication range;
and generating a second type path according to the information of each equipment node in the communication range.
In one embodiment, after generating the first type of path and the second type of path according to the routing information of the device node in the communication range, the method further includes:
Sending an access notification to the root node according to the first type of path;
and if the authorization instruction of the root node is acquired, storing the first type path and the second type path.
In one embodiment, after generating the first type of path and the second type of path according to the routing information of the device node in the communication range, the method further includes:
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 path, establishing communication between the user terminal and the target node through the second type path.
In one embodiment, after the obtaining the information of the target node from the user terminal within the communication range, the method further includes:
and if the target node is not located in the second type path, transmitting information of the target node to the root node through a first path so as to establish communication between the user terminal and the target node through the root node.
In one embodiment, after the information of the target node is obtained from the user terminal within the communication range, the method further includes the following steps:
if the communication between the user terminal and the target node established through the second type path fails, 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.
In one embodiment, after generating the first type of path and the second type of path according to the routing information of the device node in the communication range, the method further includes:
synchronizing the first type of path to a root node.
In one embodiment, if there are multiple first-type paths generated according to the routing information of the device node in the communication range, the steps are further included after the first-type paths and the second-type paths are generated according to the routing information of the device node in the communication range:
one first type path is marked as a current path, and the rest first type paths are marked as standby paths.
In one embodiment, the step of marking one first type path as a current path and marking the remaining first type paths as standby paths includes:
and marking one first type path as a current path according to a marking instruction obtained from the root node, and marking the rest first type paths as standby paths.
In one embodiment, the root node generates the marking instruction according to the electric quantity parameter and/or the use frequency of the corresponding equipment node of each first type path.
In one embodiment, the method comprises the step that when the current node fails to communicate with the root node through the current path, the current node communicates with the root node through the standby path.
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 implementing the steps of the bluetooth low energy communication method of any one of the preceding claims when the program is executed by the processor.
A low-power Bluetooth network comprises a root node and at least one electronic device.
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 communication method as described in any of the above.
Compared with the prior art, the embodiment of the invention has the beneficial effects that: by generating a first type path which can be communicated with the root node and a second type path which can be communicated with all equipment nodes in a communication range in the current node, the paths which need to be stored in a routing table are simplified, convenience is provided for the selection of the paths when the current node communicates 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 communicate with other partial equipment nodes through the second type path to form a local Mesh network.
Drawings
In order to more clearly illustrate the technical solutions of embodiments or conventional techniques of the present application, the drawings required for the descriptions of the embodiments or conventional techniques will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person of ordinary skill in the art.
Fig. 1 is a schematic diagram of a bluetooth network;
fig. 2 is a flow chart of a bluetooth low energy communication method according to an embodiment of the invention;
FIG. 3 is a flow chart illustrating the generation of a first type of path and a second type of path according to routing information of a device node in a communication range in an embodiment;
fig. 4 is a flow chart of a bluetooth low energy communication method according to a second embodiment of the invention;
fig. 5 is a schematic structural diagram of an electronic device according to a third embodiment of the present invention.
Detailed Description
In order to facilitate an understanding of the present application, a more complete description of the present application will now be provided with reference to the relevant figures. Examples of the present application are given in the accompanying drawings. This application may, however, be embodied in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein in the description of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application.
It will be understood that the terms "first," "second," and the like, as used herein, may be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish one element from another element.
Spatially relative terms, such as "under", "below", "beneath", "under", "above", "over" and the like, may be used herein to describe one element or feature's relationship to another element or feature as illustrated in the figures. It will be understood that the spatially relative terms are intended to encompass different orientations of the device in use and operation in addition to the orientation depicted in the figures. For example, if the device in the figures is turned over, elements or features described as "under" or "beneath" other elements would then be oriented "on" the other elements or features. Thus, the exemplary terms "below" and "under" may include both an upper and a lower orientation. Furthermore, the device may also include an additional orientation (e.g., rotated 90 degrees or other orientations) and the spatial descriptors used herein interpreted accordingly.
It will be understood that when an element is referred to as being "connected" to another element, it can be directly connected to the other element or be connected to the other element through intervening elements. Further, "connection" in the following embodiments should be understood as "electrical connection", "communication connection", and the like if there is transmission of electrical signals or data between objects to be connected.
As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," and/or the like, specify the presence of stated features, integers, steps, operations, elements, components, or groups thereof, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, or groups thereof. Also, the term "and/or" as used in this specification includes any and all combinations of the associated listed items. Fig. 1 is a schematic diagram of a bluetooth network, which is a Mesh network topology. The Mesh network composed of the low-power-consumption Bluetooth devices, namely BLE devices, does not need to be particularly preconfigured when the BLE device nodes join the Mesh network, and all the BLE devices can serve as relay devices in the Mesh network to forward messages so as to expand the communication range of 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 ordinary device nodes; each device node is distinguished by a unique physical address or other identification information. Communication between device nodes is based on a GATT service defined by a protocol, and the service can adopt two or more characteristics to transmit and receive data 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 routing changes caused by the device node joining the network, leaving the network and the device node movement. In fig. 1, a dashed circle indicates a BLE communication range of the device node a, and a user mobile terminal of the communication range, such as a mobile phone, a tablet or a computer, may communicate with the device node a, or may 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 low-power bluetooth device that is not sensitive to power consumption, such as a BLE device powered by AC power, which may be referred to as a first type of BLE device; other device nodes are typically bluetooth low energy devices that are sensitive to power consumption, such as BLE devices that employ a battery, referred to as BLE devices of the second type.
The first type of 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 network communication functions, such as Wi-Fi or ethernet; the second type of BLE device node is typically used to implement a single BLE communication function.
Example 1
Fig. 2 is a flow chart of a bluetooth low energy communication method according to an embodiment.
As shown in fig. 2, in one embodiment, a bluetooth low energy communication method is provided, including the steps of:
in step S110, the current node scans for device nodes within communication range.
All the equipment nodes in the Mesh network are in a broadcast state, and the broadcast period can be determined according to the information such as the frequency of use, the use time period, the battery power and the like of the equipment nodes in the routing table. All equipment nodes in the network can forward the data information in the network for the relay equipment so as to enlarge the application range of the low-power consumption Bluetooth.
As shown in fig. 1, taking the device node a as the current node, it is a device node that needs to access the bluetooth network. The dashed circle is the BLE communication range of the current node a, and such a device node may have a power switch or a mechanism similar to the power switch, which may be used to trigger the network access procedure of the current node a.
When a user starts working by powering on the current node A through the power switch of the current node A or a mechanism similar to the power switch, the current node A can check the routing table information of the current node A, and if the routing table information in the current node A is empty at the moment, the equipment node A scans and broadcasts in a certain time. In this embodiment, the current node a may scan to surrounding device node B and device node E.
In one embodiment, if no other device node exists in the current node scanning communication range, the current node is switched to a broadcast state, and the broadcast information includes a network label, a device type, a battery power, a hop value, and the like. The network labels are used for identifying and distinguishing Mesh networks consisting of first-type BLE equipment nodes; 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 identification is used for identifying the battery power condition of the second-class BLE equipment node and whether the battery power condition is lower than a preset usable threshold value, if the second-class BLE equipment node detects that the battery power of the second-class BLE equipment node is lower than the usable threshold value of the battery power, a flag bit of the battery power identification is set to 1, otherwise, the flag bit of the battery power identification is set to 0; the hop value can be used for distinguishing whether the equipment node is a network access equipment node or a non-network access equipment node, if the hop value is a negative number, the equipment node is the non-network access equipment node, namely a node which cannot communicate with the root node, when the user terminal is positioned in the communication range of the current node A, the current node A can be judged to be unsuccessfully added into the Bluetooth network according to the broadcast information of the current node A, and the equipment node is an isolated equipment node.
In one embodiment, after the current node scans for device nodes within communication range, route information is obtained from device nodes within the communication range.
The device node B and the device node E that have entered the network are always in a broadcast state, so that the device node a can acquire their respective routing information from the device node B and the device node E.
In one embodiment, the broadcast information of the device node includes its own hop value, and thus the routing information includes the hop value of the corresponding device node.
The hop value can be used for distinguishing whether the equipment node is a network access equipment node or a non-network access equipment node, and for the network access equipment node, the position of the Mesh network where the equipment node is located, namely the times of sending and forwarding when the equipment node is communicated 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 to be 0, the hop values of the device nodes B, C and D are 1, the hop values of the device nodes A, E, F, G, H and I are 2, and the hop values of the device nodes K and J are 3; for a device node that is not networked, its hop value may be labeled-1.
In one embodiment, if all other device nodes in the current node scanning communication range are non-network-connected device nodes, i.e. nodes which cannot communicate with the root node, the broadcast state is switched. When the user terminal is located in the communication range of the current node A, the current node A can be judged to be an isolated equipment node according to the broadcasting information of the current node A, and the current node A is not successfully added into the Bluetooth network.
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 and acquires the route information of the corresponding equipment nodes. The routing information may indicate whether the corresponding device node may be connected to the root node, 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-connected device, the hop count values are 1 and 2, respectively; information indicating that the device nodes B and E contain the root node R in the routing table so that the current node a can establish a connection with the root node R through the device nodes B and E.
In other embodiments, if the hop count value of one or some device nodes in the current node a communication range is positive, for example, the hop count values of device nodes B and E are 1 and 2, respectively, the routing tables of device nodes B and E include information of the root node R; the current node a may establish different connections 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 that the current node communicates with the root node through the equipment nodes in the communication range. Thus, both paths can be used as the first type of path.
In one embodiment, the device node whose hop value is not greater than the hop value of other device nodes in the communication range is set as a relay device node, that is, one or more device nodes with the smallest hop value in the current node communication range are relay device nodes. Thus, in this embodiment, the device node B is a relay device node.
As shown in fig. 3, in one embodiment, step S120, the current node generates a first type path and a second type path according to the routing information of the device nodes in the communication range, including the following steps:
step S121, a first type path is generated according to the routing information of the relay device node.
If the current node is not greater than the hop count value of the other equipment nodes in the communication range according to the hop count value of a certain equipment node 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, and is 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 value is preferentially selected as the relay node between the current node a and the root node R, i.e. a shorter path is selected as the first-class path a-B-R. The first type of path generated by the current node a includes a-B-R, but does not include a-E-B-R.
Step S122, a second type path is generated according to the routing information of each equipment node in the communication range.
And the current node generates a second type path according to the routing information, such as physical address or identity identification information, of each equipment node in the communication range. The second type of path is a path that the current node communicates 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, 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, I-H-D-R, and the second type of path includes I-D, I-H and I-J.
After step S120 in one embodiment, the method further includes the following steps:
the first step, the current node sends an access notification to the root node according to the first type path; the root node obtains an access notification from the current node.
In this embodiment, the current node may access the bluetooth network using the root node as the main manager with the approval of the root node. Thus, after the current node generates the first type path, an access notification needs to be sent to the root node as well. Specifically, the current node sends an access notification to the root node via a first type of path, such as a-B-R.
After the current node generates the first type path, the current node is informed to the root node through the first type path and is added into the Mesh network of the root node. If the root node correctly receives the notification of the current node, an acknowledgement character ACK (Acknowledgment) is sent to the current node, and if the access notification of the current node is not correctly received, NAK (Negative Acknowledgment) is sent to the current node to indicate a negative acknowledgement or a non-acknowledgement. If the current node receives NAK or does not receive the response of the root node after the preset time, the current node fails to access the network, and the current node becomes an isolated node which is not accessed to the network. If the current node receives the acknowledgement character ACK, it does this to complete the step of informing the network, and then sends a notification to the root node via a first type of path, e.g., a-B-R.
In one embodiment, the current node switches to the broadcast state if it receives a NAK or no response from the root node is received over a predetermined time. When the user terminal is located in the communication range of the current node A, the current node A can be judged to be an isolated equipment node according to the broadcasting information of the current node A, and the current node A is not successfully added into the Bluetooth network.
If the root node agrees to the access notification of the current node, generating a path of the root node corresponding to the first type path of the current node according to the path of the current node for sending the access notification; 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, after the current node generates the first type path according to the routing information of the device nodes in the communication range in step S120, the current node synchronizes the first type path to the root node device.
And step two, if the current node acquires the authorization instruction of the root node, the first-type path and the second-type path are saved.
If the root node agrees to perform network authorization on the current node, namely the new equipment node to be accessed to the network, namely agrees to join the current node A into the network, an authorization instruction is sent to the current node according to the generated path. After the current node acquires the authorization instruction of the root node, the first type path and the second type path are stored.
As a preferred embodiment, after the root node performs network authorization on the current node, the current node also needs to successfully confirm joining the network, and then adds a path generated according to the first type path of the current node sending the access notification, such as R-B-a, into the own routing table information.
If the root node obtains the access notification from the current node, the current node is not authorized by the network, namely the current node is not authorized to join the network, the current node fails to access the network, and the equipment node becomes an isolated node which is not accessed to the network.
The current node acquires an authorization instruction from the root node, successfully confirms joining in the Bluetooth network, and stores the first type of path, such as A-B-R, and the second type of paths A-E and A-B in a routing table of the current node.
In one embodiment, step S120 further includes the following steps 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:
if the current node fails to communicate with the root node through the first type path, information is sent 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 failure, the root node loses the management capability of other equipment nodes in the whole network, namely, all the equipment nodes cannot communicate with each other through the root node, and the current node communicates with the root node through a first type path and is in a failure state. The current node also stores a second type path, so that the current node and other partial equipment nodes can still form a local Mesh network for communication through the second type path.
As shown in fig. 1, when the root node R is operating normally, the device node a sends information to the root node via its first type path a-B-R, and the root node R then sends the information to the user terminal. When the root node R fails or fails, the equipment node A firstly sends corresponding information to the equipment node B through the second type path A-B, then the equipment node B sends corresponding information to the equipment node C through the second type path B-C, then the equipment node C sends corresponding information to the equipment node D through the second type path C-D, and finally the equipment node D sends the information to the user terminals in the communication range.
In this embodiment, if the root node fails or fails, when the current node communicates with the root node through the first type path, the device node with 1 hop count in the first type path fails to send information to the root node, and the device node with 1 hop count feeds back the root node disconnection to the current node. And then the current node sends a root node disconnection notification to the user terminals within the communication range of the current node so that the user terminals prompt related personnel to make processing.
The low-power consumption Bluetooth communication method provided by the embodiment of the invention not only simplifies the path needing to be stored in the routing table, but also provides convenience for the selection of the path when the current node communicates with the root node or other equipment nodes by generating the first type path which can be communicated with the root node and the second type path which is communicated with each equipment node in the communication range in the current node, thereby improving the pertinence of path selection and reducing the pressure of the root node; and when the root node fails, the current node can still communicate with other partial equipment nodes through the second type path to form a local Mesh network.
Example two
The bluetooth low energy communication method as shown in fig. 4 comprises the following steps:
in step S210, the current node scans for device nodes within 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 steps S110 and S120 in the first embodiment, and are not described again.
In this embodiment, the current node refers to a device node that communicates with a user terminal, for example, the user terminal establishes a connection with a device node at a location, and communicates with a root node or other corresponding device nodes through routing information of the device node, that is, a first type path or a second type path, where the device node is the current node. The user terminal device may be a mobile phone, a tablet, a computer, or the like with BLE communication function.
Step S220 further includes the following steps 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:
step S230, the current node acquires the 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 to the nearby device node a, i.e. the current node a. And then the user terminal sends a message which needs to be communicated with the equipment 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 communicates directly with the user terminal. If not, the following steps are performed:
step S250, if the target node is located in the valid second class path, the current node establishes communication between the user terminal and the target node through the second class path.
After the current node A acquires the information of the target node D, whether a second type path reaching the target node D exists in the routing table or not is checked. If the routing table of the current node A has the second type path A-D, the current node A sends the information to be sent to the target node D through the second type path so as to establish the 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 is judged through the second type path, if yes, the communication between the user terminal and the target node is established preferentially through the second path, the path selection speed is higher, and the path is shorter.
In one embodiment, if the current node fails to establish 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 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 via the second class path may be caused by the current node or the target node being moved. Because the device node will re-perform the network access flow after moving, the routing information is updated, such as generating new first-type paths and second-type paths. The target node is not within communication range of the current node at this time, but may establish communication with the root node via a first type of path.
In one embodiment, step S220 further includes the following steps 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:
step S260, the current node sends 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.
I.e. 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 transmits information to be transmitted to a root node R through a first type path A-B-R, and communication between the current node and the root node R is established; after each device node generates a 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 device node, and the corresponding path such as R-B-A, R-D is stored in the routing table of the root node. After the root node R obtains the user terminal from the current node A to communicate with the target node D through the root node R, the corresponding information obtained from the current node A is sent to the target node D through a path R-D; the current node a thus far establishes a communication between the user terminal and the target node D via said root node R.
The invention provides a low-power consumption Bluetooth communication method, which comprises the steps of generating a first type path which can be communicated with a root node and a second type path which is communicated with each equipment node in a communication range in a current node; when a target node is located in an effective second type path, establishing communication between the user terminal and the target node through the second type path, wherein the path selection speed is faster, and the path is shorter; when the second type path fails or the target node is not located in the second type path, the current node firstly sends information to be sent to the root node through the first type path, and then the root node sends corresponding information to the target node so as to establish communication between the user terminal and the target node through the root node. Therefore, convenience is provided for the selection of the path when the current node communicates with the root node or other equipment nodes, the pertinence of the 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 paths of the first type according to the routing information of the device nodes in the communication range.
As shown in fig. 1, with a device node K as a current node, in a flow of joining the device node K to a network, the device node K may obtain corresponding routing information from device nodes F and G within a communication range thereof, including routing tables of the device nodes F and G about R, which are F-C-R and G-C-R, respectively; and hop values for device nodes F and G are both 2. Therefore, the first type of path generated and stored by the current node K is two, namely, two paths reaching the root node R can be established in the routing table, namely, K-F-C-R and K-G-C-R.
In one embodiment, 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 steps of:
the current node marks one first type path as a current path and marks the rest first type paths as standby paths.
In one embodiment, the current node communicates with the root node via the alternate path when communication with the root node via the current path fails.
More than one path of the first type of the current node K is provided, so that when the current node K communicates with the root node R, one path, namely the current path, can be selected to communicate with the root node R; and the rest first type paths are used as standby paths, when the current path fails, and the like, the communication between the current node K and the root node R is established through the standby paths, so that the success of the receiving and transmitting of the messages can be ensured.
In one embodiment, how to allocate the first type of paths as the current path or the standby path is decided by the root node R, and the step of marking one first type of paths as the current path and marking the rest of the first type of paths as the standby path is specifically as follows: the current node marks one first type path as a current path according to the marking instruction obtained from the root node, and marks the rest first type paths as standby paths.
In the low-power consumption Bluetooth communication method provided by the embodiment of the invention, when a plurality of first-type paths exist between the current node and the root node, one first-type path is marked as the current path, and the rest first-type paths are standby paths; thus, when the current node communicates with the root node, it preferentially communicates with the current node through the current path; when the current path fails, the communication between the root node and the current node is established through the standby path, so that the success rate of receiving and transmitting the message can be ensured.
After the current node generates the first type path according to the routing information of the device nodes in the communication range, the current node synchronizes the first type path to the root device node, so that the root node also has a plurality of paths corresponding to each first type path, such as R-C-F-K and R-C-G-K, which correspond to the first type paths K-F-C-R and K-G-C-R respectively.
In one embodiment, the marking instruction is specifically generated by the root node according to the electric quantity parameters and/or the use frequency of the corresponding device nodes of each first-type path.
The electric quantity parameter of the equipment node can reflect the residual electric quantity of the battery in the equipment node, and the use frequency of the equipment node can reflect the frequency of the node equipment serving as a relay node for forwarding data 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 type path, so that the use frequency of a plurality of first type paths can be balanced, the battery use electric quantity of the corresponding equipment nodes can be balanced, the service life of the whole network is prolonged, and the robustness of the whole network is improved.
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 standby path are selected by the electric quantity parameters and/or the frequency of use of the two device nodes.
In one embodiment, the broadcast information of the bluetooth low energy device node includes its battery power identification, i.e., a power parameter. In this embodiment, the power parameter is specifically a Battery power Level (BL), for example, the Battery power Level is 4, which may indicate that about 80% of the power remains in the device node; for example, a battery level of 0 may indicate that less than 10% of the power remains at the device node.
For the two first-type paths, one path can be selected as a current path according to the battery power level of the equipment node F and the equipment node G, and the other path can be used as a standby path.
In the case that the BL >0 of the two relay device nodes F and G, 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 remaining paths may be used as the standby paths.
If BL of the equipment node F is larger than BL of the equipment node G, the root node R selects a first type path passing through the equipment node F as a current path and selects the first type 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. Otherwise, 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 K-F-C-R as the standby path.
The frequency of use of the equipment node can reflect the frequency of the node equipment as a relay node for forwarding data in the Bluetooth network; the frequency of use can be counted by each device node, then called by the root node, and also counted by the root node.
If BL >0 of the two relay device nodes F and G and BL of the device node F and BL of the device node G are the same, the corresponding first type path can be further marked as the current path through the use frequency of the corresponding device node.
In one embodiment, a current path passing through a relay node with low frequency of use is selected as a root node R and a current node K; if the frequency of use of the equipment node F is 10 times and the frequency of use of the equipment node G is 25 times, the K-F-C-R is marked as a current path, and the K-G-C-R is marked as a standby path.
After the root node R marks the current path and the standby path, a marking instruction is sent to the current node K; so that the current node marks the first type path corresponding to the marking instruction as the current path and marks other first type paths as standby paths.
Therefore, when the use frequency of a certain equipment node is high, the use of the first type path with the equipment node is reduced, the frequency of occupying the equipment node is reduced, and the service life of the equipment node is prolonged.
From the above description of embodiments, it will be apparent to those skilled in the art that the present invention may be implemented in software plus a necessary general hardware platform. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the embodiments or some parts of the embodiments of the present invention, 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 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
As shown in fig. 5, in one embodiment, an electronic device is provided that includes a memory 200, a processor 300, and a computer program stored in the memory 200, the computer program configured to be executed by the processor 300, the processor 300 implementing the steps of any of the bluetooth low energy communication methods described above.
The electronic device in this embodiment and the method in the foregoing embodiment are based on two aspects under the same inventive concept, and the detailed description of the implementation process of the method has been described above, so 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 brevity of description, the 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. a bluetooth low energy network comprising a root node and at least one such electronic device. The electronic device may implement the aforementioned 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 may be understood according to the description of the foregoing embodiments, which are not repeated herein for brevity of description.
According to the electronic equipment and the low-power consumption Bluetooth network provided by the embodiment of the invention, the first type path which can be communicated with the root node and/or the second type path which can be 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 communicates 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 communicate with other partial equipment nodes through the second type path to form a local Mesh network.
In the description of the present specification, reference to the terms "some embodiments," "other embodiments," "desired embodiments," and the like, means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, schematic descriptions of the above terms do not necessarily refer to the same embodiment or example.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples merely represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the invention. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application is to be determined by the claims appended hereto.

Claims (15)

1. The low-power consumption Bluetooth communication method is characterized by comprising the following steps of:
the current node scans equipment nodes in a communication range;
obtaining routing information of the equipment nodes from the equipment nodes in the communication range, wherein the routing information comprises hop values of the corresponding equipment nodes, and the hop values are the times of sending and forwarding when the equipment nodes communicate with a root node;
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 step of generating the first type path and the second type path according to the routing information of the equipment nodes in the communication range comprises the following steps:
generating a first type path according to the route information of a relay equipment node, wherein the relay equipment node is one equipment node with a hop count value not greater than that of other equipment nodes in a communication range;
Generating a second type path according to the information of each equipment node in the communication range;
the first type path is a path that a current node is communicated with a root node through equipment nodes in the communication range; the second type path is a path in which the current node is communicated with all equipment nodes in the communication range;
if the root node works normally, information is sent to the root node through the first type path;
and if the communication between the first type path and the root node fails, sending information to the corresponding equipment nodes in the communication range through the second type path so as to enable the equipment nodes to forward the information.
2. The bluetooth low energy communication method according to claim 1, wherein: the communication failure with the root node through the first type path includes: the root node fails or fails.
3. The bluetooth low energy communication method according to claim 2, further comprising: and if the root node fails or fails, sending a root node disconnection notification to the user terminal in the communication range.
4. The bluetooth low energy communication method according to claim 1, 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 instruction of the root node is acquired, storing the first type path and the second type path.
5. The bluetooth low energy communication method according to claim 1, wherein: the method further comprises the steps of:
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 path, establishing communication between the user terminal and the target node through the second type path.
6. The bluetooth low energy communication method according to claim 5, wherein: the method further comprises the following steps of:
and if the target node is not located in the second type path, transmitting information of the target node to the root node through a first path so as to establish communication between the user terminal and the target node through the root node.
7. The bluetooth low energy communication method according to claim 6, wherein: the method further comprises the following steps of:
If the communication between the user terminal and the target node established through the second type path fails, 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.
8. The bluetooth low energy communication method according to claim 1, wherein: after generating 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 comprises the following steps:
synchronizing the first type of path to a root node.
9. The bluetooth low energy communication method according to claim 1, wherein: if there are multiple first-type paths generated according to the routing information of the device nodes in the communication range, the steps are further included 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:
one first type path is marked as a current path, and the rest first type paths are marked as standby paths.
10. The bluetooth low energy communication method according to claim 9, wherein: the step of marking one first type path as a current path and marking the rest first type paths as standby paths comprises the following steps:
And marking one first type path as a current path according to a marking instruction obtained from the root node, and marking the rest first type paths as standby paths.
11. The bluetooth low energy communication method according to claim 10, wherein: the root node generates the marking instruction according to the electric quantity parameters and/or the using frequency of the corresponding equipment nodes of each first type of paths.
12. The bluetooth low energy communication method according to claim 9, wherein: comprising the following steps: when the current node fails to communicate with the root node through the current path, the current node communicates with the root node through the standby path.
13. 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 executing the program to carry out the steps of the bluetooth low energy communication method according to any one of claims 1-12.
14. The low-power consumption Bluetooth network is characterized in that: comprising a root node and at least one electronic device as claimed in claim 13.
15. A storage medium storing a computer program, characterized in that: the computer program implementing the steps of the bluetooth low energy communication method according to any one of claims 1 to 12 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 CN111971984A (en) 2020-11-20
CN111971984B true 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)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112822643B (en) * 2021-01-14 2021-11-30 深圳市芯中芯科技有限公司 Bluetooth device multi-connection networking method and system based on BLE broadcasting
CN115278626A (en) * 2022-07-26 2022-11-01 哲库科技(上海)有限公司 Method, device, equipment, system and storage medium for transmitting Bluetooth multimedia packet
CN117792981B (en) * 2024-02-28 2024-06-07 山东云海国创云计算装备产业创新中心有限公司 Routing method, routing device, routing equipment, routing management equipment and routing network

Citations (4)

* 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
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
CN108156231A (en) * 2017-12-21 2018-06-12 北京摩拜科技有限公司 The fault car and method of server communication, vehicle and server

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9654906B2 (en) * 2014-06-12 2017-05-16 Samsung Electronics Co., Ltd Method for processing data based on bluetooth protocol and electronic device thereof
US9900827B2 (en) * 2015-12-10 2018-02-20 Lg Electronics Inc. Method and apparatus for transmitting and receiving data in wireless communication system
WO2018081583A1 (en) * 2016-10-27 2018-05-03 Infinitekey, Inc. System and method for authenticating and authorizing devices
CN107592605A (en) * 2017-09-14 2018-01-16 上海肖克利信息科技股份有限公司 Ad hoc network method and system based on low-power consumption bluetooth

Patent Citations (4)

* 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
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

Also Published As

Publication number Publication date
WO2019237264A1 (en) 2019-12-19
CN111971984A (en) 2020-11-20

Similar Documents

Publication Publication Date Title
CN102652424B (en) Adopt based on the dynamic declaration of operating condition and effective service declaration in the cycle of discovery in peer-to-peer networked environment and find
EP2793528B1 (en) Method for transmitting data between terminals and terminal
EP2304979B1 (en) Multi-rate peer discovery methods and apparatus
CN111971984B (en) Low-power consumption Bluetooth communication method, electronic device, network and storage medium
US11012356B2 (en) Method of forwarding a received message in a mesh network comprising a plurality of communicatively interconnected mesh nodes as well as a corresponding mesh node
CN110167043B (en) Equipment control method and device, Internet of things system, electronic equipment and storage medium
CN108881354B (en) Push information storage method and device, server and computer storage medium
US10171986B2 (en) Radio relay device and system with waiting time optimization
KR20070006365A (en) Messenger notification system and method using synchronization server
US20140181201A1 (en) Apparatus and method for managing local wireless network group
CN111886843B (en) Low power consumption Bluetooth network maintenance method, electronic device, bluetooth network and medium
US20170171698A1 (en) Near Field Discovery Method, User Equipment, and Storage Medium
CN112075102B (en) Bluetooth low energy networking method, electronic equipment, network and storage medium
CN111884875A (en) Offline device determination method and device
EP2472793A1 (en) Method, device and system for transmitting e1 bidirectional looped network data
CN114786241A (en) Network selection method, related device, network equipment and storage medium
CN108684021A (en) A kind of Bluetooth Low Energy communication means and device
CN106304241B (en) Data transmission method, repeater and gateway
CN105119759B (en) A method of realizing key configuration for specific networking
CN103138953A (en) Method and system of massively texting multimedia information
CN112738922B (en) Data processing method and device, storage medium and electronic device
CN114915920B (en) Message transmission method, device, robot and storage medium
CN113259922B (en) Communication method, system, equipment and storage medium for emergency service forwarding
WO2024053528A1 (en) Sidelink communication device, control method, program, and sidelink communication system
JP2004007078A (en) Radio communication system, radio management device, accommodation device selection method and program

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