WO2021146879A1 - 消息传输的方法、ble设备和ble芯片 - Google Patents

消息传输的方法、ble设备和ble芯片 Download PDF

Info

Publication number
WO2021146879A1
WO2021146879A1 PCT/CN2020/073361 CN2020073361W WO2021146879A1 WO 2021146879 A1 WO2021146879 A1 WO 2021146879A1 CN 2020073361 W CN2020073361 W CN 2020073361W WO 2021146879 A1 WO2021146879 A1 WO 2021146879A1
Authority
WO
WIPO (PCT)
Prior art keywords
ttl
node
message
reliable
detection
Prior art date
Application number
PCT/CN2020/073361
Other languages
English (en)
French (fr)
Inventor
蒲川
Original Assignee
深圳市汇顶科技股份有限公司
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 深圳市汇顶科技股份有限公司 filed Critical 深圳市汇顶科技股份有限公司
Priority to CN202080001628.7A priority Critical patent/CN111869246B/zh
Priority to PCT/CN2020/073361 priority patent/WO2021146879A1/zh
Publication of WO2021146879A1 publication Critical patent/WO2021146879A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/02Arrangements for optimising operational condition
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/02Power saving arrangements
    • H04W52/0209Power saving arrangements in terminal devices
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W84/00Network topologies
    • H04W84/18Self-organising networks, e.g. ad-hoc networks or sensor networks
    • 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

Definitions

  • the embodiments of the present application relate to the field of information technology, and more specifically, to a method for message transmission, a BLE device, and a BLE chip.
  • the nodes in the network will unconditionally relay the messages in the network, even if the nodes actually only need to forward them once to receive them.
  • the message still needs to be continuously transmitted on the current network or forwarded multiple times before it dissipates, which results in redundant message forwarding times, which increases node power consumption and network broadcast storms.
  • the embodiments of the present application provide a method for message transmission, a BLE device, and a BLE chip, which can reduce the number of message forwarding in the MESH network.
  • a method for message transmission is provided.
  • the method is applied to a MESH network of Bluetooth Low Energy BLE, the MESH network includes a plurality of nodes, and the method includes: A node sends at least one detection message, the detection message carries a time-to-live TTL, and the TTL in the detection message decreases with the number of times the detection message is forwarded; the first node receives the first node from the MESH network At least one response message from the second node, the response message is sent by the second node when the TTL in the received detection message is zero; the first node determines the The preferred TTL of the message transmitted between the first node and the second node; the first node sends a message to the second node according to the preferred TTL.
  • the first node in the MESH network sends a detection message carrying TTL, and the TTL in the detection message decreases with the number of times the detection message is forwarded, and the second node in the MESH network receives the If the TTL is zero, the second node sends a response message to the first node.
  • the first node may determine the first node and the first node according to the response message.
  • the preferred TTL for message transmission between the two nodes.
  • the first node sends a message to the second node according to the preferred TTL, which can avoid unnecessary message forwarding times.
  • the at least one detection message includes at least one detection message of at least one TTL sent by the first node in at least one time period, wherein the same time in the at least one time period The TTL in the detection messages sent within the same period is the same, and the TTL in the detection messages sent in different time periods is different, and the at least one response message includes the information received from the first node during the at least one time period.
  • the response message of the second node; the first node determining the preferred TTL of the message transmission between the first node and the second node according to the at least one response message includes: the first node according to the The response message received from the second node within the same time period determines whether the TTL in the detection message sent within the same time period is a reliable TTL; the first node determines the preferred TTL according to at least one reliable TTL TTL.
  • the first node determines the reliable TTL of the message transmitted between the first node and the second node according to the response message, and then determine the preferred TTL according to the reliable TTL.
  • the first node according to the Preferably, TTL sends a message to the second node, which can not only avoid unnecessary times of message forwarding, but also improve the reliability of the message received by the second node.
  • the detection messages sent in the same time period include multiple detection messages of the same TTL that are repeatedly sent by the first node in the same time period;
  • the response message received from the second node in the same time period, determining whether the TTL in the detection message sent in the same time period is a reliable TTL includes: if the first node is in the same time period The difference between the number of received response messages from the second node within the time period and the number of repeated transmissions of the same TTL detection message within the same time period is within a threshold range, and the same time is determined The TTL in the detection message sent within the period is a reliable TTL; or, if the first node receives the response message from the second node within the preset time within the same period of time, the number of If the difference in the number of times the detection messages of the same TTL are repeatedly sent in the same time period is within a threshold range, it is determined that the TTL of the detection messages sent in the same time period is a reliable TTL.
  • the at least one detection message includes at least one detection message of at least one TTL sent by the first node in at least one time period, wherein the same time in the at least one time period
  • the TTLs in the detection messages sent in different time periods are different, and the TTLs in the detection messages sent in different time periods are the same
  • the at least one response message includes the information received from the first node during the at least one time period.
  • the response message of the second node, the at least one response message includes the TTL in the corresponding detection message sent by the first node; the first node determines the relationship between the first node and the first node according to the at least one response message.
  • the preferred TTL of the message transmitted between the second nodes includes: the first node determines the detections sent in the same time period according to the response messages received from the second node in the different time periods Whether the TTL in the message is a reliable TTL; the first node determines the preferred TTL according to at least one reliable TTL.
  • the first node determines whether the TTL in the detection message sent in the same time period is based on the response message received from the second node in the different time period.
  • Reliable TTL includes: if the number of response messages from the second node received by the first node in the different time period and the detection message of the same TTL sent in the different time period If the difference in the number of times is within a threshold range, the TTL in the detection message sent within the same time period is determined to be the reliable TTL; or, if the first node is within the preset time within the different time period The difference between the number of received response messages from the second node and the number of detection messages of the same TTL sent in the different time periods is within a threshold range, and it is determined that the number of response messages sent in the same time period The TTL in the detection message is the reliable TTL.
  • the first node determining the preferred TTL according to at least one reliable TTL includes: when the at least one reliable TTL is a plurality of reliable TTLs, the first node according to the The plurality of reliable TTLs determine two minimum reliable TTLs, and the larger reliable TTL of the two minimum reliable TTLs is determined as the preferred TTL.
  • the first node determining the preferred TTL according to at least one reliable TTL includes: when the at least one reliable TTL is a plurality of reliable TTLs, the first node The smallest reliable TTL among the plurality of reliable TTLs is determined as the preferred TTL.
  • the first node determining the preferred TTL according to at least one reliable TTL includes: when the at least one reliable TTL is a reliable TTL, the first node will A reliable TTL is determined as the preferred TTL.
  • the TTL in the detection messages sent in the different time periods is sequentially increased by one.
  • the method further includes: the first node receiving an instruction sent by a distribution network terminal, where the instruction is used to instruct the first node to send the at least one detection message.
  • the method further includes: after the first node determines the preferred TTL for message transmission with each other node in the MESH network, sending to the distribution network end The detection completion message corresponding to the instruction.
  • a method for message transmission is provided.
  • the method is applied to a MESH network of Bluetooth Low Energy BLE.
  • the MESH network includes multiple nodes, and the method includes: The second node receives a detection message from the first node in the MESH network, and the detection message carries a time-to-live TTL; the second node determines the TTL in the detection message; if the TTL is zero, the The second node sends a response message to the first node, where the response message is used by the first node to determine the preferred TTL for message transmission between the first node and the second node; if the TTL is not Zero, the second node decrements the TTL by one, and forwards the detection message.
  • a low-power Bluetooth BLE device is provided.
  • the BLE device is a first node in a BLE MESH network.
  • the MESH network includes multiple nodes.
  • the BLE device includes: a transceiver unit, To send at least one detection message, the detection message carries a time-to-live TTL, and the TTL in the detection message decreases with the number of times the detection message is forwarded; the transceiver unit is also used to receive data from the MESH network At least one response message of the second node of the second node, the response message is sent by the second node when the TTL in the received detection message is zero; the processing unit is configured to determine according to the at least one response message The preferred TTL of the message transmitted between the first node and the second node; the transceiver unit is further configured to send a message to the second node according to the preferred TTL.
  • the at least one detection message includes at least one detection message of at least one TTL sent by the transceiver unit in at least one time period, wherein the same time period in the at least one time period
  • the TTL in the detection message sent within the same time period is the same, and the TTL in the detection message sent in different time periods is different
  • the at least one response message includes the second response message received by the transceiver unit within the at least one time period.
  • the response message of the node; the processing unit is specifically configured to: according to the response message received from the second node during the same time period, determine whether the TTL in the detection message sent during the same time period is Reliable TTL; the preferred TTL is determined according to at least one reliable TTL.
  • the detection message sent in the same time period includes multiple detection messages of the same TTL repeatedly sent by the transceiver unit in the same time period; the processing unit is specifically configured to: If the difference between the number of response messages from the second node received by the transceiver unit in the same time period and the number of repeated transmissions of the same TTL detection message in the same time period is between Within the threshold range, it is determined that the TTL in the detection message sent within the same time period is a reliable TTL; or, if the transceiver unit receives the data from the second node within the preset time within the same time period The difference between the number of response messages and the number of repeated transmissions of the same TTL detection message within the same time period is within a threshold range, and it is determined that the TTL in the detection message sent during the same time period is a reliable TTL .
  • the at least one detection message includes at least one detection message of at least one TTL sent by the transceiver unit in at least one time period, wherein the same time period in the at least one time period The TTL in the detection messages sent within the time period is different, and the TTL in the detection messages sent in different time periods is the same, and the at least one response message includes the second time period received by the transceiver unit during the at least one time period.
  • the response message of the node includes the TTL in the corresponding detection message sent by the transceiver unit; the processing unit is specifically configured to: according to the data received in the different time periods from the first The response message of the two nodes determines whether the TTL in the detection message sent within the same time period is a reliable TTL; and the preferred TTL is determined according to at least one reliable TTL.
  • the processing unit is specifically configured to: if the number of response messages from the second node received by the transceiving unit in the different time period is different from that in the different time period If the difference between the number of detection messages of the same TTL sent within the threshold is within the threshold range, it is determined that the TTL in the detection messages sent within the same time period is the reliable TTL; or, if the transceiver unit is in the The difference between the number of response messages received from the second node within the preset time in different time periods and the number of detection messages of the same TTL sent in the different time periods is within a threshold range, It is determined that the TTL in the detection message sent within the same time period is the reliable TTL.
  • the processing unit is specifically configured to: in a case where the at least one reliable TTL is multiple reliable TTLs, the processing unit determines the two smallest reliable TTLs according to the multiple reliable TTLs. TTL, and determine the larger reliable TTL of the two smallest reliable TTLs as the preferred TTL.
  • the processing unit is specifically configured to: when the at least one reliable TTL is a plurality of reliable TTLs, the processing unit calculates the smallest reliable TTL among the plurality of reliable TTLs. Determined as the preferred TTL.
  • the processing unit is specifically configured to: in a case where the at least one reliable TTL is a reliable TTL, the processing unit determines the one reliable TTL as the preferred TTL.
  • the TTLs in the detection messages sent in the different time periods are sequentially increased by one.
  • the transceiver unit is further configured to: receive an instruction sent by a distribution network terminal, where the instruction is used to instruct the transceiver unit to send the at least one detection message.
  • the transceiving unit is further configured to: after the processing unit determines the preferred TTL for message transmission between the first node and each other node in the MESH network, to The distribution network terminal sends a detection completion message corresponding to the instruction.
  • a low-power Bluetooth BLE device is provided, the BLE device is a second node in a BLE MESH network, the MESH network includes multiple nodes, and the BLE device includes: a transceiver unit, For receiving a detection message from the first node in the MESH network, the detection message carries a time-to-live TTL; a processing unit for determining the TTL in the detection message; if the TTL is zero, the processing The unit controls the transceiver unit to send a response message to the first node, where the response message is used by the first node to determine the preferred TTL of the message transmitted between the first node and the second node; if the If the TTL is not zero, the processing unit reduces the TTL by one, and controls the transceiver unit to forward the detection message.
  • a transceiver unit For receiving a detection message from the first node in the MESH network, the detection message carries a time-to-live TTL; a processing unit for determining the TTL in the
  • a low-power Bluetooth BLE chip including: a memory for storing executable instructions; a processor for calling and running the executable instructions in the memory to execute the first aspect Or a method in any possible implementation of the first aspect.
  • a Bluetooth low energy BLE chip including: a memory for storing executable instructions; a processor for calling and running the executable instructions in the memory to execute the second aspect Or a method in any possible implementation of the second aspect.
  • FIG. 1 is a schematic diagram of the MESH network.
  • Fig. 2 is a flow interaction diagram of a method for message transmission according to an embodiment of the application.
  • FIG. 3 shows that when the TTL is 0, the node participates in the transmission of the message.
  • FIG. 4 shows that when the TTL is 1, the node participates in the transmission of the message.
  • FIG. 5 shows that when the TTL is 2, the node participates in the transmission of the message.
  • Fig. 6 is a schematic block diagram of a BLE device according to an embodiment of the application.
  • FIG. 7 is a schematic block diagram of another BLE device according to an embodiment of the application.
  • FIG. 8 is a schematic structural diagram of a BLE chip according to an embodiment of the present application.
  • FIG. 1 is a schematic diagram of a possible MESH network.
  • the MESH network can be considered as a wireless communication system based on the network topology.
  • the MESH network includes multiple devices, and each device can be called a node.
  • Each node can carry out message transmission.
  • the message can be forwarded between various nodes, so that the message can be transmitted to a greater distance. In practical applications, these nodes can be distributed in manufacturing plants, office buildings, shopping centers, business parks, homes, and other environments.
  • the MESH network can include any number of nodes. In FIG. 1, only nodes A to H, and node Z are taken as examples.
  • messages are transmitted based on advertising. After each node receives a message sent by another node, it forwards the message, thereby forwarding the message to other nearby nodes.
  • the message sent by node A to node Z can be forwarded to node Z at least once.
  • node B receives the message sent by node A, it can forward the message to node F and node C; after node H receives the message, it can forward the message to node C, node G, node D, and node respectively E; After node G receives the message, it can forward the message to node H and node D; when node F, node C, node E, and node D receive the message, it can further forward the message to nearby nodes, and finally make the message Reach node Z.
  • node A when node A sends a message to node Z, it can be transmitted to node Z through node B and node F, that is, the message can be transmitted from node A to node Z through two forwardings; it can also be transmitted to node G, node D, and node E.
  • Node Z that is, the message can also be transmitted from node A to node Z through three forwardings; it can also be transmitted to node Z through node H, node G, node D, and node E, that is, the message can also be transmitted from node A through four forwardings To node Z.
  • node Z may still forward the message, and the transmission will stop until the maximum number of forwarding times is reached. For another example, if a message is transmitted between node A and node B, even if the message can be received without forwarding, the message still needs to be transmitted on the MESH network or reaches the maximum number of forwarding times before it will dissipate, resulting in excessive number of message forwarding, so Node power consumption increases, and network broadcast storms increase.
  • the embodiment of the present application proposes a message transmission method, which can effectively reduce the number of message forwarding in the MESH network.
  • FIG. 2 shows a flow interaction diagram of a method 200 for message transmission according to an embodiment of the present application.
  • the method is applied to a MESH network of Bluetooth Low Energy BLE.
  • the MESH network includes multiple nodes, and each node can be the following first node, any node other than the first node Both can be the second node.
  • the first node in the MESH network sends at least one detection message, the detection message carries a time-to-live TTL, and the TTL in the detection message decreases with the number of times the detection message is forwarded.
  • the message carries a time to live (Time To Live, TTL), and the TTL indicates the time for which the message can survive in the network.
  • TTL Time To Live
  • the value of TTL may be the number of times the message needs to be forwarded.
  • the TTL in the detection message sent by the first node is 2, which means that it needs to be forwarded twice. After the detection message is forwarded once, the TTL becomes 1, and after the detection message is forwarded twice, the TTL is 0.
  • the destination address in the detection message sent by the first node may be the address of the second node, or the group address of all nodes in the MESH network.
  • the second node in the MESH network receives a detection message from the first node in the MESH network, and determines the TTL in the detection message. If the TTL is zero, perform step 230; if the TTL is not zero, the second node decrements the TTL by one, and forwards the detection message.
  • the second node sends a response message to the first node.
  • the response message may be forwarded to the first node.
  • the first node receives at least one response message from the second node in the MESH network, and determines a preference for message transmission between the first node and the second node according to the at least one response message TTL.
  • the second node sends a response message when the TTL in the received detection message is zero. Based on the response message, the first node can determine the preferred TTL between the first node and the second node, that is, the optimal number of hops/number of forwarding .
  • the first node can send multiple detection messages with different TTLs in multiple time periods.
  • the at least one detection message may include at least one detection message of at least one TTL sent by the first node within at least one time period, where the at least one detection message sent during the same time period in the at least one time period The TTL of the detection message is the same, and the TTL of the detection message sent in different time periods is different.
  • the at least one response message includes the response message from the second node received by the first node within the at least one time period.
  • the TTL in the detection messages sent in the different time periods may be sequentially increased by one.
  • the first node can send a detection message with a TTL of 0 in the first time period, a detection message with a TTL of 1 in the second time period, and a detection message with a TTL of 2 in the third time period. analogy.
  • the TTL in the detection messages sent in the different time periods may also be sequentially decreased by one or changed in other predetermined order, which is not limited in the embodiment of the present application.
  • the second node may reply with a response message within one or more time periods (the TTL in the detection message received in the corresponding time period is zero).
  • the first node can determine the preferred TTL between the first node and the second node according to the response message.
  • the first node may determine whether the TTL in the detection message sent during the same time period is a reliable TTL according to the response message received from the second node during the same time period; The first node determines the preferred TTL according to at least one reliable TTL.
  • the first node sends a detection message with a TTL of 0 in the first time period, and receives a response message corresponding to the detection message with a TTL of 0 in the first time period.
  • a response message determine whether the TTL of 0 is a reliable TTL between the first node and the second node according to the response message from the second node; send a detection message with a TTL of 1 in the second time period, and Receive the response message corresponding to the detection message with TTL of 1 in the second time period; in the case of receiving the response message from the second node, determine whether the TTL of 1 is the first node according to the response message from the second node Reliable TTL with the second node; and so on.
  • the first node determines the preferred TTL between the first node and the second node according to at least one reliable TTL between the first node and the second node.
  • the response message is sent by the second node when the TTL in the detection message is equal to zero.
  • the first node receives a response message from the second node, it can directly determine all the response messages corresponding to the response message.
  • the TTL in the detection message sent by the first node is a reliable TTL of the message transmitted between the first node and the second node.
  • the first node may send the same TTL detection message multiple times to determine whether the TTL is between the first node and the second node. Reliable TTL of messages transmitted between nodes.
  • the detection messages sent in the same time period include multiple detection messages of the same TTL repeatedly sent by the first node in the same time period.
  • the first node may determine whether the TTL in the detection message sent during the same time period is reliable according to the response message received from the second node during the same time period. TTL.
  • the TTL in the detection message sent within the same time period is a reliable TTL.
  • the first node in the MESH network sends a detection message with a TTL of 1.
  • the TTL is 0, and the second node Sending a response message to the first node
  • the first node may then repeatedly send the detection message with the TTL of 1 to the second node.
  • the first node will detect a response message. If the difference between the number of times that the first node receives the response message from the second node and the number of times that the TTL is 1 detection message is repeatedly sent is within the threshold range, it is determined that 1 is the first node and the The reliable TTL of the message transmitted between the second nodes.
  • the number of response messages from the second node received by the first node within the preset time within the same time period is the same as the number of repeated transmissions within the same time period If the difference in the number of detection messages with the same TTL is within the threshold range, it is determined that the TTL in the detection messages sent within the same time period is a reliable TTL.
  • the first node in the MESH network sends a detection message with a TTL of 1.
  • the TTL is 0, and the second node Sending a response message to the first node
  • the first node may then repeatedly send the detection message with the TTL of 1 to the second node.
  • the first node will detect the response message within a preset time.
  • the first node determines 1 It is a reliable TTL for transmitting messages between the first node and the second node.
  • the first node only receives response messages from the second node without delay, so that the transmission quality of the message can be judged; if the delay is greater, the transmission quality is worse.
  • the first node can send multiple detection messages with different TTLs in the same time period.
  • the at least one detection message may include at least one detection message of at least one TTL sent by the first node within at least one time period, where the at least one detection message sent during the same time period in the at least one time period The TTL in the detection message is different, and the TTL in the detection message sent in different time periods is the same, and the at least one response message includes the information received by the first node from the second node in the at least one time period.
  • a response message where the at least one response message includes the TTL in the corresponding detection message sent by the first node.
  • the first node determines whether the TTL in the detection message sent in the same time period is a reliable TTL according to the response message received from the second node in the different time period; The first node determines the preferred TTL according to at least one reliable TTL.
  • the first node may send detection messages with TTLs of 0, 1, 2, and 3 in the first time period, and receive detection messages with TTLs of 0, 1, 2, and 3 in the first time period.
  • the response message corresponding to the detection message where, when the TTL in the detection message is 2, the corresponding response message also includes the TTL of 2.
  • the first node may send detection messages with TTLs of 0, 1, 2, and 3 again in the second time period, and receive the detections with TTLs of 0, 1, 2 and 3 in the second time period.
  • the embodiment of this application takes 4 TTL values as an example for illustration, but it is also possible to select any number of TTL values according to the number of nodes or the network size. The number of TTL values is also not limited.
  • the first node determines the preferred TTL between the first node and the second node according to at least one reliable TTL between the first node and the second node.
  • the number of response messages from the second node received by the first node in the different time period and the detection message of the same TTL sent in the different time period The difference of the number of times is within a threshold range, and it is determined that the TTL in the detection message sent in the same time period is the reliable TTL.
  • the first node sends a detection message with a TTL of 2 within the second time period, and the second node receives the detection message with a TTL of 0, and the second node sends a response message to the first node Since the response message is forwarded back to the first node, the first node may receive at least one response message for the detection message with a TTL of 2, which should be regarded as the first node receiving a response information.
  • the first node sends a detection message with a TTL of 2 again in the third time period. Each time the first node sends a detection message, it will detect a response message.
  • the TTL in the detection messages sent within the same time period is the reliable TTL.
  • the first node sends a detection message with a TTL of 2 within the second time period, and the second node receives the detection message with a TTL of 0, and the second node sends a response message to the first node
  • the first node sends a detection message with a TTL of 2 again.
  • the first node sends a detection message, it will detect the response message within a preset time. If the difference between the number of times the first node receives the response message from the second node within the preset time within the different time periods and the number of times the TTL is 2 detection message is repeatedly sent within the threshold range , Then it can be determined that 2 is the reliable TTL for message transmission between the first node and the second node.
  • the first node determines two minimum reliable TTLs according to the multiple reliable TTLs, and sets the two minimum reliable TTLs The larger reliable TTL in, is determined as the preferred TTL.
  • the at least one reliable TTL is a plurality of reliable TTLs
  • the second-to-last TTL among the plurality of reliable TTLs is determined as the preferred TTL.
  • the reliable TTL of the message transmitted between the first node and the second node includes 2, 3, 4, and 5.
  • the two smallest reliable TTLs can be screened out as 2 and 3, and the largest reliable TTL can be screened out from the two reliable TTLs as 3, and then the first node sends the signal to the second node according to the TTL of 3
  • the node sends a message. Filtering out the two smallest reliable TTLs from the plurality of reliable TTLs can reduce the number of forwarding times under the condition that the message is delivered, and then filter the larger reliable TTL from the two smallest reliable TTLs, according to
  • the forwarding path for sending messages according to the larger reliable TTL will be included in the forwarding path for sending messages according to the smallest TTL. Therefore, sending messages according to the larger reliable TTL has a certain degree of redundancy, and therefore can guarantee the transmission effect .
  • the first node determines the smallest reliable TTL among the plurality of reliable TTLs as the preferred TTL. Using the smallest reliable TTL among the plurality of reliable TTLs to send the message, the message can be delivered with the least number of forwarding times.
  • the first node determines the one reliable TTL as the preferred TTL.
  • the first node sends a message to the second node according to the preferred TTL.
  • the second node is a node that has determined the preferred TTL for message transmission with the first node, that is, the second node is one or more of the nodes that send the response message;
  • the second node may be a node directly or indirectly selected by the user.
  • the message may be a user's instruction or audio data.
  • the preferred TTL is the fewer or least number of forwarding times in the case of reliable transmission between the first node and the second node. Therefore, the first node sends messages to the second node according to the preferred TTL, which can reduce redundant forwarding frequency.
  • the first node in the MESH network sends a detection message carrying TTL, and the TTL in the detection message decreases as the number of times the detection message is forwarded, and the first node in the MESH network
  • the second node receives the detection message. If the TTL is zero, the second node sends a response message to the first node. At this time, the first node may determine the first node according to the response message. The preferred TTL of the message transmitted between the node and the second node. During subsequent message transmission, the first node sends the message to the second node according to the preferred TTL, which can avoid unnecessary message forwarding times.
  • the method further includes: the first node receives an instruction sent by the distribution network terminal, the instruction is used to instruct the first node to send the at least one detection message, that is, initiate according to the instruction Optimize the process.
  • the method further includes: after the first node determines the preferred TTL for message transmission with each other node in the MESH network, sending the corresponding instruction to the distribution network end The detection complete message.
  • the distribution network terminal is a node (network distribution equipment) independent of the first node and the second node.
  • the first node after the first node accesses the MESH network, it may actively initiate an optimization process, that is, the first node may actively send the at least one detection message. After the first node determines the preferred TTL of the message transmitted with each other node in the MESH network, there is no need to send the detection completion message to the distribution network end.
  • node A is the first node
  • node G is the second node.
  • Step 1 Node A sends a detection message carrying a TTL of 0 to the MESH network.
  • Step 2 Node B, node H, and node G in the MESH network receive the detection message, and check the TTL in the detection message, and find that the TTL is 0, and the node B, node H, and node G are all Send a response message to the node A.
  • Step 3 The node A receives response messages from the node B, node H, and node G, and records according to the response message that when the TTL is 0, the node that receives the detection message sent by the node A B.
  • Step 4 The node A repeatedly sends a detection message with a TTL of 0 to the node G according to the source address in the response message from the node G, and receives the response message from the node G; it should be understood that Each time the node A sends it, it will detect the response message from the node G.
  • Step 5 The node A judges whether 0 is a transmission between the node A and the node G according to the number of received response messages from the node G and the number of repeated transmissions of detection messages with a TTL of 0 The reliable TTL of the message; if the difference between the number of response messages received by the node A from the node G and the number of repeated detection messages with a TTL of 0 is within the threshold range, then 0 is considered as the node The reliable TTL of the message transmitted between A and the node G.
  • the node A will detect the response message from the node G within a preset time every time the node A repeats the transmission. If the difference between the number of response messages received from the node G by the node A within the preset time and the number of repeated detection messages with a TTL of 0 is within the threshold range, then 0 is considered as the node The reliable TTL of the message transmitted between A and the node G.
  • Step 1 Node A sends a detection message carrying a TTL of 1 to the MESH network.
  • Step 2 Node B, Node H, and Node G in the MESH network first receive the detection message, and check the TTL in the detection message, and find that the TTL is 1, reduce the TTL by one, and add all The detection message is forwarded.
  • Node B, Node H, and Node G forward the detection message, they may also be forwarded to A, or not to A, which is not limited in this embodiment.
  • Step 3 Node F, node C, node E, and node D in the MESH network all receive the detection message, and find that the TTL is 0, and the node F, node C, node E, and node D all report to the Node A sends a response message; as shown in Figure 4.
  • the node G receives the detection message from the node H and finds that the TTL is 0, and the node G also sends a response message to the node A.
  • Step 4 The node A receives the response message from the node F, the node C, the node E, the node D, and the node G, and records that the TTL is 1 according to the response message, and then receives the message sent by the node A
  • Step 5 The node A repeatedly sends a detection message with a TTL of 1 to the node G according to the source address in the response message from the node G, and receives the response message from the node G; it should be understood that Each time the node A sends it, it will detect the response message from the node G.
  • Step 6 The node A judges whether 1 is a transmission between the node A and the node G according to the number of received response messages from the node G and the number of repeatedly sent detection messages with a TTL of 1 The reliable TTL of the message; if the difference between the number of response messages received by the node A from the node G and the number of repeated detection messages with a TTL of 1 is within the threshold range, then 1 is considered the node The reliable TTL of the message transmitted between A and the node G.
  • the second node sends a response message to the first node. Since the response message is forwarded back to the first node, the first node may receive at least one response to a detection message with a TTL of 2.
  • the message should be regarded as the first node receiving a response message, and it can also be understood as the first node receiving the response message from the second node. For example, after node B receives the detection message, decrements the TTL by one, and forwards the detection message, node C receives the detection message and finds that the TTL is 0, and the node C sends a response message to the node A; After node H receives the detection message, it decrements the TTL by one, and forwards the detection message.
  • Node C receives the detection message and finds that the TTL is 0, and the node C sends a response message to the node A; , Node C receives the detection messages forwarded by B and H, node C will also send two response messages to A, if node A receives two response messages from node C, it should be regarded as the first node A A response message is received, that is, when the first node sends a TTL detection message, if A receives multiple response messages from the same second node for the TTL, it should be regarded as the first node receiving The response message from the second node is reached once.
  • a receives a response message from a second node for the TTL it should also be considered that the first node has received the response message from the second node once. For example, if the first node A sends a detection message carrying a TTL of 1 for the second time, after receiving the detection message, node B decrements the TTL by one, and forwards the detection message, and node C receives the detection message. When the message finds that the TTL is 0, the node C sends a response message to the node A; after receiving the detection message, the node H reduces the TTL by one and forwards the detection message.
  • the node C does not receive the detection message, then the node C will not send a response message to the node A again; therefore, the node C only receives the message from For the detection message forwarded by B, node C will also send a response message to A correspondingly. If node A receives only one response message from node C, it should be considered that the first node has received the response from the second node C Message once.
  • each time the node A sends it it detects the response message from the node G within a preset time. If the difference between the number of response messages received from the node G by the node A within the preset time and the number of repeated detection messages with a TTL of 1 is within the threshold range, then 1 is considered to be the node The reliable TTL of the message transmitted between A and the node G.
  • Step 1 Node A sends a detection message carrying a TTL of 2 to the MESH network.
  • Step 2 Node B, Node H, and Node G in the MESH network first receive the detection message, and check the TTL in the detection message, and find that the TTL is 2, reduce the TTL by one, and add all The detection message is forwarded.
  • Step 3 Node F, node C, node E, node D, and node G in the MESH network all receive the detection message, find that the TTL is 1, reduce the TTL by one, and forward the detection message go out.
  • Step 4 The node Z in the MESH network receives the detection message and finds that the TTL is 0, and the node Z sends a response message to the node A; as shown in FIG. 5.
  • the node G receives the detection message from the node D and finds that the TTL is 0, and the node G also sends a response message to the node A.
  • Step 5 The node A receives the response message from the node Z and the node G, and records according to the response message that when the TTL is 2, the node Z and the node that received the detection message sent by the node A G's address.
  • the carried detection message with a TTL of 2 may also be transmitted to the node D through the path A-H-E-D. Therefore, the node A may also receive a response message from the node D. Therefore, node A may also receive response messages from other nodes.
  • the embodiments of this application do not make any limitation on this.
  • Step 6 The node A repeatedly sends a detection message with a TTL of 2 to the node G according to the source address in the response message from the node G, and receives the response message from the node G; it should be understood that The node A will detect the response message from the node G every time the node A sends it repeatedly.
  • Step 7 The node A judges whether 2 is a transmission between the node A and the node G according to the number of received response messages from the node G and the number of repeated transmissions of detection messages with a TTL of 2 The reliable TTL of the message; if the difference between the number of response messages received by the node A from the node G and the number of repeated detection messages with a TTL of 2 is within the threshold range, then 2 is considered the node The reliable TTL of the message transmitted between A and the node G.
  • the node A will detect the response message from the node G within a preset time every time the node A repeats the transmission. If the difference between the number of response messages received from the node G by the node A within the preset time and the number of repeated detection messages with a TTL of 2 is within the threshold range, then 2 is considered the node The reliable TTL of the message transmitted between A and the node G.
  • the TTL in the detection messages sent in different time periods can be increased by one in turn. It should be understood that when the TTL in the detection messages sent in the first time period is relatively large, the TTL in the detection messages sent in the different time periods may also be decreased by one in order to determine that the node A and the Smaller reliable TTL for transferring messages between nodes G.
  • the embodiments of this application do not make any limitation on this.
  • At least one reliable TTL of the message transmitted between the node A and the node G is determined, and the preferred TTL of the message transmitted between the node A and the node G is determined according to the at least one reliable TTL .
  • the preferred TTL is used to send the message to the node G.
  • the node A determines two minimum reliable TTLs according to the plurality of reliable TTLs, and calculates the larger of the two minimum reliable TTLs
  • the reliable TTL is determined as the preferred TTL.
  • the node A determines 1 as the preferred TTL for message transmission with the node G. It should be understood that the reliable TTL may also be other values, such as 3, 4, etc. However, if the number of forwarding times is too much, the number of forwarding times and the power consumption of the node cannot be effectively reduced.
  • the node A sends a message to the node G according to the TTL of 1.
  • the node A when the node A sends a message to the node G according to a TTL of 0 or a TTL of 1 than sends a message to the node G according to a TTL of 2, the message is forwarded fewer times.
  • the node A sending a message to the node G according to a TTL of 1 is more reliable than sending a message to the node G using a TTL of 0, because sending a message to the node G according to a TTL of 1 will send a message to the node G according to a TTL of 0
  • the situation where node G sends a message is included.
  • the node A sends a message to the node G according to the TTL of 1, and the transmission path of the message may be A-G-D or A-H-G.
  • the transmission path is AGD
  • the message can be directly received by the node G, and the destination address in the message is the node G. Therefore, only the node G can obtain the information in the message through decryption. Even if the message is transmitted to the node D, the node D cannot obtain the information in the message.
  • the transmission path is A-H-G
  • the message does not need to be forwarded after the node G receives the message, and the node G can obtain the information in the message through decryption.
  • the first node determines the smallest reliable TTL among the plurality of reliable TTLs as the preferred TTL. For example, when the at least one reliable TTL includes three values of 0, 1, and 2, the node A determines 0 as the preferred TTL for message transmission with the node G. When a message is subsequently transmitted between the node A and the node G, the node A sends a message to the node G according to the TTL of 0. It should be understood that by using the smallest reliable TTL of the plurality of reliable TTLs to send a message, the message can be delivered with the least number of forwarding times.
  • the node A determines the one reliable TTL as the preferred TTL.
  • the node A sends a message to the node G according to the preferred TTL.
  • node A Take node A as the first node and node Z as the second node as an example.
  • the node Z receives the detection message sent by the first node and carried the TTL of 2.
  • the node A may repeatedly send the carried detection message with a TTL of 2 to the node Z to determine the reliable TTL of the message transmitted between the node A and the node Z.
  • the node A may send a detection message with a TTL of 3.
  • the node A may receive the response message sent by the node Z within the corresponding same time period, and determine the reliable TTL of the transmission message between the node A and the node Z according to the response message. It should be understood that in different time periods, the TTL carried in the detection message sent by the node A is different; in the same time period, the TTL carried in the detection message sent by the node A is the same.
  • the TTL may be increased several times, so that at least one reliable TTL for message transmission between the node A and the node Z is determined.
  • the node A determines a preferred TTL according to the at least one reliable TTL.
  • the node A sends a message to the node Z according to the preferred TTL.
  • the nodes B, C, D, E, F, G, H, and Z in the MESH network Any node in can be the second node (target node).
  • Node A may actively send the detection message after joining the MESH network, or may send the detection message according to an instruction sent by the distribution network terminal. If node A sends the detection message according to the instruction sent by the distribution network end, after the node A has determined the reliable TTL of the message transmitted with each second node, the node A sends all the detection messages to the distribution network end. The detection completion message corresponding to the command.
  • the first node may also be any node other than node A, and in this case, the node A may also be a second node.
  • each node in the MESH network can send messages to other nodes according to the preferred TTL, thereby effectively reducing the number of message forwarding, reducing node power consumption, and reducing network broadcast storms.
  • An embodiment of the present application proposes a low-power Bluetooth BLE device 600, and a schematic block diagram of the BLE device 600 is shown in FIG. 6.
  • the BLE device 600 is the first node in the BLE MESH network, and the MESH network includes multiple nodes.
  • the BLE device 600 includes a transceiver unit 610 configured to send at least one detection message. Carry the time-to-live TTL, and the TTL in the detection message decreases with the number of times the detection message is forwarded; the transceiver unit 610 is further configured to receive at least one response message from the second node in the MESH network, so The response message is sent by the second node when the TTL in the received detection message is zero; the processing unit 620 is configured to determine the relationship between the first node and the second node according to the at least one response message.
  • the preferred TTL for message transmission between nodes; the transceiver unit 610 is further configured to send a message to the second node according to the preferred TTL.
  • the at least one detection message includes at least one detection message of at least one TTL sent by the transceiver unit 610 in at least one time period, wherein the detection messages sent in the same time period in the at least one time period The TTL in the message is the same, and the TTL in the detection message sent in different time periods is different, and the at least one response message includes the response from the second node received by the transceiver unit 610 within the at least one time period Message; the processing unit 620 is specifically configured to: according to the response message received from the second node in the same time period, determine whether the TTL in the detection message sent in the same time period is a reliable TTL ; Determine the preferred TTL according to at least one reliable TTL.
  • the detection messages sent in the same time period include multiple detection messages of the same TTL repeatedly sent by the transceiver unit 610 in the same time period; the processing unit 620 is specifically configured to: The difference between the number of response messages from the second node received by the transceiver unit 610 in the same time period and the number of repeated transmissions of the same TTL detection message in the same time period is within a threshold range If the TTL in the detection message sent within the same time period is determined to be a reliable TTL; or, if the transceiver unit 610 receives the data from the second node within the preset time within the same time period The difference between the number of response messages and the number of repeatedly sent detection messages of the same TTL in the same time period is within a threshold range, and the TTL in the detection messages sent in the same time period is determined to be a reliable TTL.
  • the at least one detection message includes at least one detection message of at least one TTL sent by the transceiver unit in at least one time period, wherein the detection messages sent in the same time period in the at least one time period
  • the TTL in, the TTL in the detection messages sent in different time periods is the same
  • the at least one response message includes the response message from the second node received by the transceiver unit in the at least one time period
  • the at least one response message includes the TTL in the corresponding detection message sent by the transceiver unit
  • the processing unit is specifically configured to: according to the response message received from the second node within the different time periods , Determining whether the TTL in the detection message sent within the same time period is a reliable TTL; and determining the preferred TTL according to at least one reliable TTL.
  • the processing unit is specifically configured to: if the number of response messages from the second node received by the transceiving unit in the different time periods and the number of response messages sent in the different time periods If the difference in the number of detection messages with the same TTL is within the threshold range, it is determined that the TTL in the detection messages sent in the same time period is the reliable TTL; or, if the transceiver unit is in the different time period The difference between the number of response messages received from the second node within the preset time and the number of detection messages of the same TTL sent in the different time periods is within a threshold range, and the same time is determined The TTL in the detection message sent in the segment is the reliable TTL.
  • the processing unit 620 is specifically configured to: when the at least one reliable TTL is multiple reliable TTLs, the processing unit 610 determines two minimum reliable TTLs according to the multiple reliable TTLs, and The larger reliable TTL of the two smallest reliable TTLs is determined as the preferred TTL.
  • the processing unit 620 is specifically configured to: when the at least one reliable TTL is multiple reliable TTLs, the processing unit determines the smallest reliable TTL among the multiple reliable TTLs as the TTL is preferred.
  • the processing unit 620 is specifically configured to: when the at least one reliable TTL is a reliable TTL, the processing unit determines the one reliable TTL as the preferred TTL.
  • the TTLs in the detection messages sent in the different time periods are sequentially increased by one.
  • the transceiving unit 610 is further configured to receive an instruction sent by a distribution network terminal, where the instruction is used to instruct the transceiving unit to send the at least one detection message.
  • the transceiving unit 610 is further configured to: after the processing unit determines the preferred TTL for message transmission between the first node and each other node in the MESH network, to the distribution network The terminal sends a detection completion message corresponding to the instruction.
  • the embodiment of the present application proposes another low-power Bluetooth BLE device 700, and a schematic block diagram of the BLE device 700 is shown in FIG. 7.
  • the BLE device 700 is the second node in the BLE MESH network, the MESH network includes multiple nodes, and the BLE device 700 includes: a transceiver unit 710, configured to receive data from the first node in the MESH network
  • the detection message the detection message carries the time-to-live TTL
  • the processing unit 720 is configured to determine the TTL in the detection message; if the TTL is zero, the processing unit 720 controls the transceiver unit 710 to send the The first node sends a response message, where the response message is used by the first node to determine the preferred TTL of the message transmitted between the first node and the second node; if the TTL is not zero, the processing unit 720 reduces the TTL by one, and controls the transceiver unit 710 to forward the detection message.
  • FIG. 8 is a schematic structural diagram of a low-power Bluetooth BLE chip 800 according to an embodiment of the present application.
  • the BLE chip 800 shown in FIG. 8 includes a memory 810 and a processor 820.
  • the memory 810 is used to store executable instructions; the processor 820 is used to call and run the executable instructions in the memory 810 to implement the method in the embodiment of the present application.
  • the BLE chip 800 may be specifically set in the first node of the embodiment of the present application, and the BLE chip 800 may implement the corresponding process implemented by the first node in each method of the embodiment of the present application. For the sake of brevity, it will not be omitted here. Go into details.
  • the BLE chip 800 may be specifically set in the second node of the embodiment of the present application, and the BLE chip 800 may implement the corresponding procedures implemented by the second node in the various methods of the embodiments of the present application. For the sake of brevity, it will not be omitted here. Go into details.

Abstract

本申请实施例公开了一种消息传输的方法、BLE设备和BLE芯片,能够降低MESH网络中消息的转发次数。该方法应用于低功耗蓝牙BLE的MESH网络中,所述MESH网络中包括多个节点,所述方法包括:所述MESH网络中的第一节点发送至少一个检测消息,所述检测消息中携带生存时间TTL,所述检测消息中的TTL随着转发所述检测消息的次数递减;所述第一节点接收来自所述MESH网络中的第二节点的至少一个应答消息,所述应答消息为所述第二节点在接收到的所述检测消息中的TTL为零时发送的;所述第一节点根据所述至少一个应答消息确定所述第一节点与所述第二节点之间传输消息的优选TTL;所述第一节点根据所述优选TTL向所述第二节点发送消息。

Description

消息传输的方法、BLE设备和BLE芯片 技术领域
本申请实施例涉及信息技术领域,并且更具体地,涉及一种消息传输的方法、BLE设备和BLE芯片。
背景技术
当前,低功耗蓝牙(Bluetooth Low Energy,BLE)的MESH网络组网成功后,网络中的节点会无条件地转发(relay)本网络中的消息,即使节点实际上只需要通过一次转发就可以收到消息,所述消息依然需要在当前网络继续传输或者转发多次才会消散,从而导致消息转发多余的次数,使节点功耗增加、网络广播风暴增加。
发明内容
本申请实施例提供了一种消息传输的方法、BLE设备和BLE芯片,能够降低MESH网络中消息的转发次数。
第一方面,提供了一种消息传输的方法,所述方法应用于低功耗蓝牙BLE的MESH网络中,所述MESH网络中包括多个节点,所述方法包括:所述MESH网络中的第一节点发送至少一个检测消息,所述检测消息中携带生存时间TTL,所述检测消息中的TTL随着转发所述检测消息的次数递减;所述第一节点接收来自所述MESH网络中的第二节点的至少一个应答消息,所述应答消息为所述第二节点在接收到的所述检测消息中的TTL为零时发送的;所述第一节点根据所述至少一个应答消息确定所述第一节点与所述第二节点之间传输消息的优选TTL;所述第一节点根据所述优选TTL向所述第二节点发送消息。
基于上述技术方案,MESH网络中的第一节点发送携带TTL的检测消息,且所述检测消息中的TTL随着转发所述检测消息的次数递减,所述MESH网络中的第二节点接收所述检测消息,若所述TTL为零,则所述第二节点给所述第一节点发送应答消息,此时,所述第一节点可以根据所述应答消息确定所述第一节点与所述第二节点之间传输消息的优选TTL,后续传输消息时,所述第一节点根据所述优选TTL向所述第二节点发送消息,可以避免消息转发多余的次数。
在一种可能的实现方式中,所述至少一个检测消息包括所述第一节点在至少一 个时间段内发送的至少一个TTL的至少一个检测消息,其中,所述至少一个时间段中的同一时间段内发送的检测消息中的TTL相同,不同时间段内发送的检测消息中的TTL不同,所述至少一个应答消息包括所述第一节点在所述至少一个时间段内接收到的来自所述第二节点的应答消息;所述第一节点根据所述至少一个应答消息确定所述第一节点与所述第二节点之间传输消息的优选TTL,包括:所述第一节点根据在所述同一时间段内接收到的来自所述第二节点的应答消息,确定所述同一时间段内发送的检测消息中的TTL是否为可靠TTL;所述第一节点根据至少一个可靠TTL确定所述优选TTL。
先根据应答消息确定出所述第一节点与所述第二节点之间传输消息的可靠TTL,再根据所述可靠TTL确定出优选TTL,在后续传输消息的过程中,第一节点根据所述优选TTL向所述第二节点发送消息,不仅可以避免消息转发多余的次数,还可以提高所述消息被第二节点接收到的可靠性。
在一种可能的实现方式中,所述同一时间段内发送的检测消息包括所述第一节点在所述同一时间段内重复发送的相同TTL的多个检测消息;所述第一节点根据在所述同一时间段内接收到的来自所述第二节点的应答消息,确定所述同一时间段内发送的检测消息中的TTL是否为可靠TTL,包括:若所述第一节点在所述同一时间段内接收到的来自所述第二节点的应答消息的次数和在所述同一时间段内重复发送的所述相同TTL的检测消息的次数的差值在阈值范围内,确定所述同一时间段内发送的检测消息中的TTL为可靠TTL;或者,若所述第一节点在所述同一时间段内的预设时间内接收到的来自所述第二节点的应答消息的次数和在所述同一时间段内重复发送的所述相同TTL的检测消息的次数的差值在阈值范围内,确定所述同一时间段内发送的检测消息的TTL为可靠TTL。
在一种可能的实现方式中,所述至少一个检测消息包括所述第一节点在至少一个时间段内发送的至少一个TTL的至少一个检测消息,其中,所述至少一个时间段中的同一时间段内发送的检测消息中的TTL不同,不同时间段内发送的检测消息中的TTL相同,所述至少一个应答消息包括所述第一节点在所述至少一个时间段内接收到的来自所述第二节点的应答消息,所述至少一个应答消息中包括对应的所述第一节点发送的检测消息中的TTL;所述第一节点根据所述至少一个应答消息确定所述第一节点与所述第二节点之间传输消息的优选TTL,包括:所述第一节点根据在所述不同时间段内接收到的来自所述第二节点的应答消息,确定所述同一时间段内 发送的检测消息中的TTL是否为可靠TTL;所述第一节点根据至少一个可靠的TTL确定所述优选TTL。
在一种可能的实现方式中,所述第一节点根据在所述不同时间段内接收到的来自所述第二节点的应答消息,确定所述同一时间段内发送的检测消息中的TTL是否为可靠TTL,包括:若所述第一节点在所述不同时间段内接收到的来自所述第二节点的应答消息的次数和在所述不同时间段内发送的所述相同TTL的检测消息的次数的差值在阈值范围内,确定所述同一时间段内发送的检测消息中的TTL为所述可靠TTL;或者,若所述第一节点在所述不同时间段内的预设时间内接收到的来自所述第二节点的应答消息的次数和在所述不同时间段内发送的所述相同TTL的检测消息的次数的差值在阈值范围内,确定所述同一时间段内发送的检测消息中的TTL为所述可靠TTL。
在一种可能的实现方式中,所述第一节点根据至少一个可靠TTL确定所述优选TTL,包括:在所述至少一个可靠TTL为多个可靠TTL的情况下,所述第一节点根据所述多个可靠TTL确定两个最小的可靠TTL,并将所述两个最小的可靠TTL中的较大的可靠TTL确定为所述优选TTL。
在一种可能的实现方式中,所述第一节点根据至少一个可靠TTL确定所述优选TTL,包括:在所述至少一个可靠TTL为多个可靠TTL的情况下,所述第一节点将所述多个可靠TTL中的最小的可靠TTL确定为所述优选TTL。
在一种可能的实现方式中,所述第一节点根据至少一个可靠TTL确定所述优选TTL,包括:在所述至少一个可靠TTL为一个可靠TTL的情况下,所述第一节点将所述一个可靠TTL确定为所述优选TTL。
在一种可能的实现方式中,其特征在于,所述不同时间段内发送的检测消息中的TTL依次加一。
在一种可能的实现方式中,所述方法还包括:所述第一节点接收配网端发送的指令,所述指令用于指示所述第一节点发送所述至少一个检测消息。
在一种可能的实现方式中,所述方法还包括:所述第一节点在确定了与所述MESH网络中的每个其他节点之间传输消息的优选TTL之后,向所述配网端发送所述指令对应的检测完成消息。
第二方面,提供了一种消息传输的方法,所述方法应用于低功耗蓝牙BLE的MESH网络中,所述MESH网络中包括多个节点,所述方法包括:所述MESH网 络中的第二节点接收来自所述MESH网络中的第一节点的检测消息,所述检测消息中携带生存时间TTL;所述第二节点确定所述检测消息中的TTL;若所述TTL为零,所述第二节点向所述第一节点发送应答消息,所述应答消息用于所述第一节点确定所述第一节点与所述第二节点之间传输消息的优选TTL;若所述TTL不为零,所述第二节点将所述TTL减一,并将所述检测消息转发出去。
第三方面,提供了一种低功耗蓝牙BLE设备,所述BLE设备为BLE的MESH网络中的第一节点,所述MESH网络中包括多个节点,所述BLE设包括:收发单元,用于发送至少一个检测消息,所述检测消息中携带生存时间TTL,所述检测消息中的TTL随着转发所述检测消息的次数递减;所述收发单元还用于,接收来自所述MESH网络中的第二节点的至少一个应答消息,所述应答消息为所述第二节点在接收到的所述检测消息中的TTL为零时发送的;处理单元,用于根据所述至少一个应答消息确定所述第一节点与所述第二节点之间传输消息的优选TTL;所述收发单元还用于,根据所述优选TTL向所述第二节点发送消息。
在一种可能的实现方式中,所述至少一个检测消息包括所述收发单元在至少一个时间段内发送的至少一个TTL的至少一个检测消息,其中,所述至少一个时间段中的同一时间段内发送的检测消息中的TTL相同,不同时间段内发送的检测消息中的TTL不同,所述至少一个应答消息包括所述收发单元在所述至少一个时间段内接收到的来自所述第二节点的应答消息;所述处理单元具体用于:根据在所述同一时间段内接收到的来自所述第二节点的应答消息,确定所述同一时间段内发送的检测消息中的TTL是否为可靠TTL;根据至少一个可靠TTL确定所述优选TTL。
在一种可能的实现方式中,所述同一时间段内发送的检测消息包括所述收发单元在所述同一时间段内重复发送的相同TTL的多个检测消息;所述处理单元具体用于:若所述收发单元在所述同一时间段内接收到的来自所述第二节点的应答消息的次数和在所述同一时间段内重复发送的所述相同TTL的检测消息的次数的差值在阈值范围内,确定所述同一时间段内发送的检测消息中的TTL为可靠TTL;或者,若所述收发单元在所述同一时间段内的预设时间内接收到的来自所述第二节点的应答消息的次数和在所述同一时间段内重复发送的所述相同TTL的检测消息的次数的差值在阈值范围内,确定所述同一时间段内发送的检测消息中的TTL为可靠TTL。
在一种可能的实现方式中,所述至少一个检测消息包括所述收发单元在至少一 个时间段内发送的至少一个TTL的至少一个检测消息,其中,所述至少一个时间段中的同一时间段内发送的检测消息中的TTL不同,不同时间段内发送的检测消息中的TTL相同,所述至少一个应答消息包括所述收发单元在所述至少一个时间段内接收到的来自所述第二节点的应答消息,所述至少一个应答消息中包括对应的所述收发单元发送的检测消息中的TTL;所述处理单元具体用于:根据在所述不同时间段内接收到的来自所述第二节点的应答消息,确定所述同一时间段内发送的检测消息中的TTL是否为可靠TTL;根据至少一个可靠的TTL确定所述优选TTL。
在一种可能的实现方式中,所述处理单元具体用于:若所述收发单元在所述不同时间段内接收到的来自所述第二节点的应答消息的次数和在所述不同时间段内发送的所述相同TTL的检测消息的次数的差值在阈值范围内,确定所述同一时间段内发送的检测消息中的TTL为所述可靠TTL;或者,若所述收发单元在所述不同时间段内的预设时间内接收到的来自所述第二节点的应答消息的次数和在所述不同时间段内发送的所述相同TTL的检测消息的次数的差值在阈值范围内,确定所述同一时间段内发送的检测消息中的TTL为所述可靠TTL。
在一种可能的实现方式中,所述处理单元具体用于:在所述至少一个可靠TTL为多个可靠TTL的情况下,所述处理单元根据所述多个可靠TTL确定两个最小的可靠TTL,并将所述两个最小的可靠TTL中的较大的可靠TTL确定为所述优选TTL。
在一种可能的实现方式中,所述处理单元具体用于:在所述至少一个可靠TTL为多个可靠TTL的情况下,所述处理单元将所述多个可靠TTL中的最小的可靠TTL确定为所述优选TTL。
在一种可能的实现方式中,所述处理单元具体用于:在所述至少一个可靠TTL为一个可靠TTL的情况下,所述处理单元将所述一个可靠TTL确定为所述优选TTL。
在一种可能的实现方式中,所述不同时间段内发送的检测消息中的TTL依次加一。
在一种可能的实现方式中,所述收发单元还用于:接收配网端发送的指令,所述指令用于指示所述收发单元发送所述至少一个检测消息。
在一种可能的实现方式中,所述收发单元还用于:在所述处理单元确定了所述第一节点与所述MESH网络中的每个其他节点之间传输消息的优选TTL之后,向 所述配网端发送所述指令对应的检测完成消息。
第四方面,提供了一种低功耗蓝牙BLE设备,所述BLE设备为BLE的MESH网络中的第二节点,所述MESH网络中包括多个节点,所述BLE设包括:收发单元,用于接收来自所述MESH网络中的第一节点的检测消息,所述检测消息中携带生存时间TTL;处理单元,用于确定所述检测消息中的TTL;若所述TTL为零,所述处理单元控制所述收发单元向所述第一节点发送应答消息,所述应答消息用于所述第一节点确定所述第一节点与所述第二节点之间传输消息的优选TTL;若所述TTL不为零,所述处理单元将所述TTL减一,并控制所述收发单元将所述检测消息转发出去。
第五方面,提供了一种低功耗蓝牙BLE芯片,包括:存储器,用于存储可执行指令;处理器,用于调用并运行所述存储器中的所述可执行指令,以执行第一方面或第一方面的任意可能的实现方式中的方法。
第六方面,提供了一种低功耗蓝牙BLE芯片,包括:存储器,用于存储可执行指令;处理器,用于调用并运行所述存储器中的所述可执行指令,以执行第二方面或第二方面的任意可能的实现方式中的方法。
附图说明
图1为MESH网络的示意图。
图2为本申请实施例的一种消息传输的方法的流程交互图。
图3为TTL为0时,节点参与消息的传输情况。
图4为TTL为1时,节点参与消息的传输情况。
图5为TTL为2时,节点参与消息的传输情况。
图6为本申请实施例的一种BLE设备的示意性框图。
图7为本申请实施例的另一种BLE设备的示意性框图。
图8是本申请实施例的BLE芯片的示意性结构图。
具体实施方式
下面将结合附图,对本申请实施例中的技术方案进行描述。
图1是一种可能的MESH网络的示意图。MESH网络可以认为是一种基于网络拓扑类型的无线通信系统。该MESH网络中包括多个设备,每个设备可以称为一个 节点(node)。每个节点都可以进行消息传输。消息可以在各个节点之间被转发,从而使该消息传输至距离更远的位置。在实际应用中,这些节点可以被分布在制造工厂、办公楼、购物中心、商业园区、家庭以及其他环境中。该MESH网络中可以包括任意次数的节点,图1中仅以节点A至节点H、以及节点Z为例。在MESH网络中,消息基于广播(advertising)的方式进行传输。每个节点接收另一节点发送的消息后,对该消息进行转发,从而将该消息转发给附近其他节点。
例如,节点A向节点Z发送的消息可以经过至少一次转发达到节点Z。其中,节点B接收到节点A发送的消息后,可以将该消息转发给节点F和节点C;节点H接收到该消息后,可以将该消息分别转发给节点C、节点G、节点D和节点E;节点G接收到该消息后,可以将该消息转发给节点H和节点D;节点F、节点C、节点E和节点D接收到该消息时,可以向附近节点进一步转发,最终使该消息到达节点Z。可见,节点A向节点Z发送消息,可以经过节点B和节点F传输至节点Z,即消息可以通过2次转发从节点A传输至节点Z;也可以经过节点G、节点D和节点E传输至节点Z,即消息也可以通过3次转发从节点A传输至节点Z;也可以经过节点H、节点G、节点D和节点E传输至节点Z,即消息也可以通过4次转发从节点A传输至节点Z。消息从节点A传输至节点Z后,节点Z仍可能将该消息转发出去,达到最大转发次数才会停止传输。又例如,节点A与节点B之间传输消息,即使不需要转发就可以收到消息,该消息仍需要在MESH网络继续传输或者达到最大转发次数才会消散,从而导致消息转发多余的次数,使节点功耗增加、网络广播风暴增加。
为此,本申请实施例提出了一种消息传输的方法,能够有效降低MESH网络中消息的转发次数。
图2出示了本申请实施例的一种消息传输的方法200的流程交互图。所述方法应用于低功耗蓝牙BLE的MESH网络中,所述MESH网络中包括多个节点,每个节点都可以为下述的第一节点,除所述第一节点之外的任一节点都可以为第二节点。
210,所述MESH网络中的第一节点发送至少一个检测消息,所述检测消息中携带生存时间TTL,所述检测消息中的TTL随着转发所述检测消息的次数递减。
在本申请实施例中,在消息中携带生存时间(Time To Live,TTL),所述TTL表示消息在网络中可以存活的时间。可选地,TTL的值可以为消息需要转发的次数。
例如:所述第一节点发送的检测消息中的TTL为2,表示需要转发两次,所述检测消息被转发一次后,所述TTL成为1,所述检测消息被转发两次后,所述TTL为0。
第一节点发送的检测消息中的目的地址可以是第二节点的地址,也可以是所述MESH网络中所有节点的组地址。
220,所述MESH网络中的第二节点接收来自所述MESH网络中的第一节点的检测消息,并确定所述检测消息中的TTL。若所述TTL为零,则执行步骤230;若所述TTL不为零,所述第二节点将所述TTL减一,并将所述检测消息转发出去。
230,所述第二节点向所述第一节点发送应答消息。其中,所述应答消息可以被转发至所述第一节点。
240,所述第一节点接收来自所述MESH网络中的第二节点的至少一个应答消息,并根据所述至少一个应答消息确定所述第一节点与所述第二节点之间传输消息的优选TTL。
第二节点在接收到的检测消息中的TTL为零时发送应答消息,基于该应答消息,第一节点可以确定第一节点与第二节点间的优选TTL,即最优的跳数/转发次数。
为了确定第一节点与第二节点之间的优选TTL,可以有不同的实施方式。
实施方式一:
第一节点可以在多个时间段内发送多个不同TTL的检测消息。具体而言,所述至少一个检测消息可以包括所述第一节点在至少一个时间段内发送的至少一个TTL的至少一个检测消息,其中,所述至少一个时间段中的同一时间段内发送的检测消息的TTL相同,不同时间段内发送的检测消息的TTL不同。在这种情况下,所述至少一个应答消息包括所述第一节点在所述至少一个时间段内接收到的来自所述第二节点的应答消息。
可选地,所述不同时间段内发送的检测消息中的TTL可以依次加一。例如,第一节点可以在第一时间段内发送TTL为0的检测消息,在第二时间段内发送TTL为1的检测消息,在第三时间段内发送TTL为2的检测消息,以此类推。
可选地,所述不同时间段内发送的检测消息中的TTL也可以依次减一或者按照其他预定的顺序变化,本申请实施例对此并不限定。
针对第一节点发送的上述检测消息,第二节点可能会在一个或多个时间段内 (相应时间段内接收到的检测消息中的TTL为零)回复应答消息。第一节点可以根据该应答消息,确定第一节点与第二节点间的优选TTL。
可选地,所述第一节点可以根据在所述同一时间段内接收到的来自所述第二节点的应答消息,确定所述同一时间段内发送的检测消息中的TTL是否为可靠TTL;所述第一节点根据至少一个可靠TTL确定所述优选TTL。
例如,第一节点在第一时间段内发送TTL为0的检测消息,并在所述第一时间段内接收所述TTL为0的检测消息对应的应答消息,在接收到来自第二节点的应答消息的情况下,根据来自第二节点的应答消息确定0的TTL是否为第一节点与第二节点间的可靠TTL;在第二时间段内发送TTL为1的检测消息,并在所述第二时间段内接收所述TTL为1的检测消息对应的应答消息;在接收到来自第二节点的应答消息的情况下,根据来自第二节点的应答消息确定1的TTL是否为第一节点与第二节点间的可靠TTL;以此类推。最后,第一节点根据第一节点与第二节点间的至少一个可靠TTL确定第一节点与第二节点间的优选TTL。
所述应答消息为检测消息中TTL等于零时第二节点发送的,可选的,若所述第一节点接收到来自所述第二节点的一次应答消息,可以直接确定所述应答消息对应的所述第一节点发送的检测消息中的TTL为所述第一节点与所述第二节点之间传输消息的可靠TTL。
可选的,若所述第一节点接收到来自所述第二节点的一次应答消息,可以多次发送相同TTL的检测消息,以确定所述TTL是否为所述第一节点与所述第二节点之间传输消息的可靠TTL。
具体而言,所述同一时间段内发送的检测消息包括所述第一节点在所述同一时间段内重复发送的相同TTL的多个检测消息。在这种情况下,所述第一节点可以根据在所述同一时间段内接收到的来自所述第二节点的应答消息,确定所述同一时间段内发送的检测消息中的TTL是否为可靠TTL。
在一个实施例中,若所述第一节点在所述同一时间段内接收到的来自所述第二节点的应答消息的次数和在所述同一时间段内重复发送的所述相同TTL的检测消息的次数的差值在阈值范围内,则确定所述同一时间段内发送的检测消息中的TTL为可靠TTL。
例如,在第二时间段内,MESH网络中的第一节点发送一个TTL为1的检测消息,所述MESH网络中的第二节点收到所述检测消息时TTL为0,所述第二节 点向所述第一节点发送一个应答消息,所述第一节点可再向所述第二节点重复发送所述TTL为1的检测消息。所述第一节点每发送一次检测消息,都会检测应答消息。若所述第一节点收到来自所述第二节点的应答消息的次数和重复发送所述TTL为1检测消息的次数的差值在阈值范围内,则确定1为所述第一节点与所述第二节点之间传输消息的可靠TTL。
在另一个实施例中,若所述第一节点在所述同一时间段内的预设时间内接收到的来自所述第二节点的应答消息的次数和在所述同一时间段内重复发送的所述相同TTL的检测消息的次数的差值在阈值范围内,则确定所述同一时间段内发送的检测消息中的TTL为可靠TTL。
例如,在第二时间段内,MESH网络中的第一节点发送一个TTL为1的检测消息,所述MESH网络中的第二节点收到所述检测消息时TTL为0,所述第二节点向所述第一节点发送一个应答消息,所述第一节点可再向所述第二节点重复发送所述TTL为1的检测消息。所述第一节点每发送一次检测消息,都会在预设时间内检测应答消息。若所述第一节点在预设时间内收到来自所述第二节点的所述应答消息的次数和重复发送所述TTL为1的检测消息的次数的差值在阈值范围内,则确定1为所述第一节点与所述第二节点之间传输消息的可靠TTL。通过设定预设时间,所述第一节点仅接收来自所述第二节点的没有延迟的应答消息,以此可以判断消息的传输质量;若延迟越多,表明传输质量越差。
实施方式二:
第一节点可以在相同时间段内发送多个不同TTL的检测消息。具体而言,所述至少一个检测消息可以包括所述第一节点在至少一个时间段内发送的至少一个TTL的至少一个检测消息,其中,所述至少一个时间段中的同一时间段内发送的检测消息中的TTL不同,不同时间段内发送的检测消息中的TTL相同,所述至少一个应答消息包括所述第一节点在所述至少一个时间段内接收到的来自所述第二节点的应答消息,所述至少一个应答消息中包括对应的所述第一节点发送的检测消息中的TTL。
可选的,所述第一节点根据在所述不同时间段内接收到的来自所述第二节点的应答消息,确定所述同一时间段内发送的检测消息中的TTL是否为可靠TTL;所述第一节点根据至少一个可靠的TTL确定所述优选TTL。
例如,第一节点可以在第一时间段内发送TTL分别为0、1、2和3的检测消 息,并在所述第一时间段内接收所述TTL分别为0、1、2和3的检测消息对应的应答消息,其中,检测消息中的TTL为2时,对应的应答消息中也包括所述TTL为2。在接收到来自第二节点的应答消息的情况下,根据来自第二节点的应答消息确定0、1、2和3是否为第一节点与第二节点间的可靠TTL。第一节点可以在第二时间段内再次发送TTL分别为0、1、2和3的检测消息,并在所述第二时间段内接收所述TTL分别为0、1、2和3的检测消息对应的应答消息;以此类推,本实施例中,对在不同时间段内发送TTL分别为0、1、2和3的检测消息的次数不做限制,即可以多次发送TTL分别为0、1、2和3的检测消息,另外,本申请实施例以4个TTL取值为例进行说明,但是也可以根据节点个数或者是网络大小选择任意TTL值的个数,本实施例对TTL的取值个数也不作限定。最后,第一节点根据第一节点与第二节点间的至少一个可靠TTL确定第一节点与第二节点间的优选TTL。
在一个实施例中,若所述第一节点在所述不同时间段内接收到的来自所述第二节点的应答消息的次数和在所述不同时间段内发送的所述相同TTL的检测消息的次数的差值在阈值范围内,确定所述同一时间段内发送的检测消息中的TTL为所述可靠TTL。
例如,所述第一节点在第二时间段内发送了TTL为2的检测消息,第二节点收到所述检测消息时TTL为0,所述第二节点向所述第一节点发送应答消息,由于所述应答消息被转发回至所述第一节点,则所述第一节点可能收到至少一个针对TTL为2的检测消息的应答消息,应看做所述第一节点收到了一次应答消息。所述第一节点在第三时间段内再次发送TTL为2的检测消息。所述第一节点每发送一次检测消息,都会检测应答消息。若所述第一节点收到来自所述第二节点的应答消息的次数和重复发送所述TTL为2检测消息的次数的差值在阈值范围内,则可以确定2为第一节点与第二节点间传输消息的可靠TTL。
在另一个实施例中,若所述第一节点在所述不同时间段内的预设时间内接收到的来自所述第二节点的应答消息的次数和在所述不同时间段内发送的所述相同TTL的检测消息的次数的差值在阈值范围内,确定所述同一时间段内发送的检测消息中的TTL为所述可靠TTL。
例如,所述第一节点在第二时间段内发送了TTL为2的检测消息,第二节点收到所述检测消息时TTL为0,所述第二节点向所述第一节点发送应答消息,所述第一节点在第三时间段内再次发送TTL为2的检测消息。所述第一节点每发送一次 检测消息,都会在预设时间内检测应答消息。若所述第一节点在所述不同时间段内的预设时间内收到来自所述第二节点的应答消息的次数和重复发送所述TTL为2检测消息的次数的差值在阈值范围内,则可以确定2为第一节点与第二节点间传输消息的可靠TTL。
可选地,在所述至少一个可靠TTL为多个可靠TTL的情况下,所述第一节点根据所述多个可靠TTL确定两个最小的可靠TTL,并将所述两个最小的可靠TTL中的较大的可靠TTL确定为所述优选TTL。换言之,在所述至少一个可靠TTL为多个可靠TTL的情况下,将所述多个可靠TTL中的倒数第二大的TTL确定为所述优选TTL。
例如,若第一节点与第二节点之间传输消息的可靠TTL包括2、3、4和5。可以筛选出最小的两个可靠TTL为2和3,再从所述两个可靠TTL中筛选出最大的一个可靠TTL为3,则所述第一节点根据所述TTL为3向所述第二节点发送消息。从所述多个可靠TTL中筛选出两个最小的可靠TTL,可以在确保消息送达的条件下减少转发次数,再从所述两个最小的可靠TTL中筛选出较大的可靠TTL,根据所述较大的可靠TTL发送消息的转发路径将根据最小的TTL发送消息的转发路径包含在其中,因此,根据所述较大的可靠TTL发送消息具有一定的冗余性,因此能够保证传输效果。
可选地,在所述至少一个可靠TTL为多个可靠TTL的情况下,所述第一节点将所述多个可靠TTL中的最小的可靠TTL确定为所述优选TTL。利用所述多个可靠TTL中的最小可靠TTL发送消息,可以通过最少的转发次数将所述消息送达。
可选地,在所述至少一个可靠TTL为一个可靠TTL的情况下,所述第一节点将所述一个可靠TTL确定为所述优选TTL。
250,所述第一节点根据所述优选TTL向所述第二节点发送消息。应理解,所述第二节点为确定完与所述第一节点之间传输消息的优选TTL的节点,即所述第二节点为上述发送应答消息的节点中的一个或多个节点;所述第二节点可以为用户直接或间接选定的节点。所述消息可以为用户的指令,也可以为音频数据等。
由上可知,优选TTL为第一节点与第二节点间可靠传输情况下的较少或最少的转发次数,因此,第一节点根据所述优选TTL向第二节点发送消息,能够减少多余的转发次数。
在本申请实施例的技术方案中,MESH网络中的第一节点发送携带TTL的检 测消息,且所述检测消息中的TTL随着转发所述检测消息的次数递减,所述MESH网络中的第二节点接收所述检测消息,若所述TTL为零,则所述第二节点给所述第一节点发送应答消息,此时,所述第一节点可以根据所述应答消息确定所述第一节点与所述第二节点之间传输消息的优选TTL,后续传输消息时,所述第一节点根据所述优选TTL向所述第二节点发送消息,可以避免消息转发多余的次数。
在一个实施例中,所述方法还包括:所述第一节点接收配网端发送的指令,所述指令用于指示所述第一节点发送所述至少一个检测消息,即根据所述指令发起优化流程。
可选地,所述方法还包括:所述第一节点在确定了与所述MESH网络中的每个其他节点之间传输消息的优选TTL之后,可以向所述配网端发送所述指令对应的检测完成消息。应理解,所述配网端为独立于所述第一节点和所述第二节点的一个节点(配网设备)。
在另一个实施例中,所述第一节点接入所述MESH网络之后,可以主动发起优化流程,即所述第一节点可以主动发送所述至少一个检测消息。所述第一节点确定完与所述MESH网络中的每个其他节点之间传输消息的优选TTL之后,无需向所述配网端发送所述检测完成消息。
以实施方式一为例,为了更清楚地说明本申请实施例的技术方案,以MESH网络的示意图3中的节点A和节点G为例。其中,节点A为所述第一节点,节点G为所述第二节点。
第一时间段内:
步骤1:节点A向MESH网络中发送一个携带的TTL为0的检测消息。
步骤2:所述MESH网络中的节点B、节点H和节点G收到所述检测消息,并检查所述检测消息中的TTL,发现TTL为0,所述节点B、节点H和节点G均向所述节点A发送应答消息。
步骤3:所述节点A接收来自所述节点B、节点H和节点G的应答消息,并根据所述应答消息记录下TTL为0时,收到所述节点A发送的检测消息的所述节点B、节点H和节点G的地址。
步骤4:所述节点A根据来自所述节点G的应答消息中的源地址,向所述节点G重复发送TTL为0的检测消息,并接收来自所述节点G的应答消息;应理解,所述节点A每发送一次,都会检测来自所述节点G的应答消息。
步骤5:所述节点A根据接收到的来自所述节点G的应答消息的次数和重复发送的TTL为0的检测消息的次数,判断0是否为所述节点A与所述节点G之间传输消息的可靠TTL;若所述节点A接收到的来自所述节点G的应答消息的次数和重复发送的TTL为0的检测消息的次数的差值在阈值范围内,则认为0为所述节点A与所述节点G之间传输消息的可靠TTL。
可选地,所述节点A每重复发送一次,都会在预设时间内检测来自所述节点G的应答消息。若所述节点A在预设时间内接收到的来自所述节点G的应答消息的次数和重复发送的TTL为0的检测消息的次数的差值在阈值范围内,则认为0为所述节点A与所述节点G之间传输消息的可靠TTL。
第二时间段内:
步骤1:节点A向MESH网络中发送一个携带的TTL为1的检测消息。
步骤2:所述MESH网络中的节点B、节点H和节点G先收到所述检测消息,并检查所述检测消息中的TTL,发现TTL为1,将所述TTL减一,并将所述检测消息转发出去。
需要说明的是,本实施例中,节点B、节点H和节点G将检测消息转发出去时,也可以转发给A,也可以不转发给A,本实施例对此不做限定。
步骤3:所述MESH网络中的节点F、节点C、节点E和节点D均收到所述检测消息,发现TTL为0,所述节点F、节点C、节点E和节点D均向所述节点A发送应答消息;如图4所示。
此时,节点G收到来自节点H的检测消息,发现TTL为0,所述节点G也向所述节点A发送应答消息。
步骤4:所述节点A接收来自所述节点F、节点C、节点E、节点D和节点G的应答消息,并根据所述应答消息记录下TTL为1时,收到所述节点A发送的检测消息的所述节点F、节点C、节点E、节点D和节点G的地址。
步骤5:所述节点A根据来自所述节点G的应答消息中的源地址,向所述节点G重复发送TTL为1的检测消息,并接收来自所述节点G的应答消息;应理解,所述节点A每发送一次,都会检测来自所述节点G的应答消息。
步骤6:所述节点A根据接收到的来自所述节点G的应答消息的次数和重复发送的TTL为1的检测消息的次数,判断1是否为所述节点A与所述节点G之间传输消息的可靠TTL;若所述节点A接收到的来自所述节点G的应答消息的次数和 重复发送的TTL为1的检测消息的次数的差值在阈值范围内,则认为1为所述节点A与所述节点G之间传输消息的可靠TTL。
所述第二节点向所述第一节点发送应答消息,由于所述应答消息被转发回至所述第一节点,则所述第一节点可能收到至少一个针对TTL为2的检测消息的应答消息,应看做所述第一节点收到了一次应答消息,也可以理解为第一节点收到了来自第二节点的应答消息。例如,节点B收到检测消息之后将所述TTL减一,并将所述检测消息转发出去,节点C收到该检测消息发现TTL为0,所述节点C向所述节点A发送应答消息;节点H收到检测消息之后将所述TTL减一,并将所述检测消息转发出去,节点C收到该检测消息发现TTL为0,所述节点C向所述节点A发送应答消息;由此,节点C收到了来自B和H转发的检测消息,节点C也会对应发送两次应答消息给A,如果节点A收到来自节点C的两次应答消息,应看做所述第一节点A收到了一次应答消息,即当第一节点发送了一次TTL的检测消息时,若A收到对于该TTL的来自同一个第二节点的多个应答消息时,应看做所述第一节点收到了来自该第二节点的应答消息一次。
若A收到对于该TTL的来自一个第二节点的一个应答消息时,也应看做所述第一节点收到了来自该第二节点的应答消息一次。例如,若第一节点A第二次发送一个携带的TTL为1的检测消息,节点B收到检测消息之后将所述TTL减一,并将所述检测消息转发出去,节点C收到该检测消息发现TTL为0,所述节点C向所述节点A发送应答消息;节点H收到检测消息之后将所述TTL减一,并将所述检测消息转发出去,若由于节点H与节点C之间的连接中断,或者是连接质量差等原因,导致节点C未收到该检测消息,则所述节点C也不会向所述节点A再次发送应答消息;由此,节点C仅收到了来自B转发的检测消息,节点C也会对应发送一次应答消息给A,如果节点A仅收到来自节点C的一次应答消息,应看做所述第一节点收到了来自该第二节点C的应答消息一次。
若所述第一节点接收到的来自所述第二节点的应答消息的次数和发送的所述相同TTL的检测消息的次数的差值在阈值范围内,确定发送的检测消息中的TTL为所述可靠TTL。例如,若第一节点A发送了两次TTL=1的检测消息,也收到了两次第二节点C的应答,若差值的阈值范围为1,则确定所述TTL=1为A与C之间的可靠TTL;若第一节点A发送了两次TTL=1的检测消息,在第二次发送TTL=1的检测消息时,B和H都未成功将检测消息转发给C,使得A只收到了一次第二节 点C的应答(即仅第一次发送TTL=1的检测消息时C对A发送了应答消息),若差值的阈值范围为0,则确定所述TTL=1不是A与C之间的可靠TTL;
可选地,所述节点A每发送一次,都会在预设时间内检测来自所述节点G的应答消息。若所述节点A在预设时间内接收到的来自所述节点G的应答消息的次数和重复发送的TTL为1的检测消息的次数的差值在阈值范围内,则认为1为所述节点A与所述节点G之间传输消息的可靠TTL。
第三时间段内:
步骤1:节点A向MESH网络中发送一个携带的TTL为2的检测消息。
步骤2:所述MESH网络中的节点B、节点H和节点G先收到所述检测消息,并检查所述检测消息中的TTL,发现TTL为2,将所述TTL减一,并将所述检测消息转发出去。
步骤3:所述MESH网络中的节点F、节点C、节点E和节点D和节点G均收到所述检测消息,发现TTL为1,将所述TTL减一,并将所述检测消息转发出去。
步骤4:所述MESH网络中的节点Z收到所述检测消息,发现TTL为0,所述节点Z向所述节点A发送应答消息;如图5所示。
此时,节点G收到来自节点D的检测消息,发现TTL为0,所述节点G也向所述节点A发送应答消息。
步骤5:所述节点A接收来自所述节点Z和节点G的应答消息,并根据所述应答消息记录下TTL为2时,收到所述节点A发送的检测消息的所述节点Z和节点G的地址。应理解,携带的TTL为2的检测消息也可能通过路径A-H-E-D传输至节点D,因此,节点A也可能收到来自节点D的应答消息。因此,节点A还可能接收到来自于其它节点的应答消息。本申请实施例对此不做任何限定。
步骤6:所述节点A根据来自所述节点G的应答消息中的源地址,向所述节点G重复发送TTL为2的检测消息,并接收来自所述节点G的应答消息;应理解,所述节点A每重复发送一次,都会检测来自所述节点G的应答消息。
步骤7:所述节点A根据接收到的来自所述节点G的应答消息的次数和重复发送的TTL为2的检测消息的次数,判断2是否为所述节点A与所述节点G之间传输消息的可靠TTL;若所述节点A接收到的来自所述节点G的应答消息的次数和重复发送的TTL为2的检测消息的次数的差值在阈值范围内,则认为2为所述节点A与所述节点G之间传输消息的可靠TTL。
可选地,所述节点A每重复发送一次,都会在预设时间内检测来自所述节点G的应答消息。若所述节点A在预设时间内接收到的来自所述节点G的应答消息的次数和重复发送的TTL为2的检测消息的次数的差值在阈值范围内,则认为2为所述节点A与所述节点G之间传输消息的可靠TTL。
以此类推,不同时间段内发送的检测消息中的TTL可以依次加一。应理解,当第一时间段内发送的所述检测消息中的TTL较大时,所述不同时间段内发送的检测消息中的TTL也可以依次减一,以确定所述节点A与所述节点G之间传输消息的较小的可靠TTL。本申请实施例对此不做任何限定。
根据上述过程,确定出所述节点A与所述节点G之间传输消息的至少一个可靠TTL,并根据所述至少一个可靠TTL确定所述节点A与所述节点G之间传输消息的优选TTL。在后续所述节点A与所述节点G之间传输消息时,利用所述优选TTL向所述节点G发送消息。
在所述至少一个可靠TTL为多个可靠TTL的情况下,所述节点A根据所述多个可靠TTL确定两个最小的可靠TTL,并将所述两个最小的可靠TTL中的较大的可靠TTL确定为所述优选TTL。
例如,当所述至少一个可靠TTL包括0、1和2三个值时,所述节点A将1确定为与所述节点G传输消息的优选TTL。应理解,所述可靠TTL还可能为其它值,例如3、4等,但是,若转发次数过多,并不能有效减少转发次数、降低节点功耗。后续所述节点A与所述节点G之间传输消息时,所述节点A根据TTL为1向所述节点G发送消息。应理解,所述节点A根据TTL为0或根据TTL为1向所述节点G发送消息比根据TTL为2向所述节点G发送消息,所述消息被转发的次数更少。所述节点A根据TTL为1向所述节点G发送消息比利用TTL为0向所述节点G发送消息更可靠,因为根据TTL为1向所述节点G发送消息将根据TTL为0向所述节点G发送消息的情况包含在其中。例如:所述节点A根据TTL为1向所述节点G发送消息,所述消息的传输路径可能是A-G-D,也可能是A-H-G。当传输路径为A-G-D时,所述消息直接可被所述节点G接收到,所述消息中的目的地址是所述节点G,因此,只有节点G才可以通过解密获取所述消息中的信息,即使所述消息被传输至节点D,所述节点D也不能获取所述消息中的信息。当传输路径为A-H-G时,所述节点G接收到所述消息后所述消息不用再被转发,所述节点G通过解密便可获取所述消息中的信息。
在所述至少一个可靠TTL为多个可靠TTL的情况下,所述第一节点将所述多个可靠TTL中的最小的可靠TTL确定为所述优选TTL。例如,当所述至少一个可靠TTL包括0、1和2三个值时,所述节点A将0确定为与所述节点G传输消息的优选TTL。后续所述节点A与所述节点G之间传输消息时,所述节点A根据TTL为0向所述节点G发送消息。应理解,利用所述多个可靠TTL中的最小可靠TTL发送消息,可以通过最少的转发次数将所述消息送达。
在所述至少一个可靠TTL为一个可靠TTL的情况下,所述节点A将所述一个可靠TTL确定为所述优选TTL。后续所述节点A与所述节点G之间传输消息时,所述节点A根据所述优选TTL向所述节点G发送消息。
以节点A为所述第一节点,节点Z为所述第二节点为例。
由上述可知,当TTL为2时,所述节点Z接收到所述第一节点发送的携带的TTL为2的检测消息。在某一时间段内,节点A可以向所述节点Z重复发送所述携带的TTL为2的检测消息,确定所述节点A与所述节点Z之间传输消息的可靠TTL。在另一时间段内,所述节点A可以发送携带的TTL为3的检测消息。所述节点A可以在对应的同一时间段内接收所述节点Z发送的应答消息,并根据所述应答消息确定所述节点A与所述节点Z之间传输消息的可靠TTL。应理解,在不同时间段内,所述节点A发送的检测消息中携带的TTL不同;在同一时间段内,所述节点A发送的检测消息中携带的TTL相同。
所述TTL可以增加若干次,使确定出的所述节点A与所述节点Z之间传输消息的至少一个可靠TTL。所述节点A再根据所述至少一个可靠TTL确定出优选TTL。在后续所述节点A与所述节点Z之间传输消息时,所述节点A根据所述优选TTL向所述节点Z发送消息。
当所述MESH网络中的第一节点(待测节点)为节点A时,所述MESH网络中的节点B、节点C、节点D、节点E、节点F、节点G、节点H和节点Z中的任一节点都可以为第二节点(目标节点)。节点A可以是加入所述MESH网络后主动发送所述检测消息,也可以是根据配网端发送的指令发送所述检测消息。若节点A是根据配网端发送的指令发送所述检测消息,所述节点A确定完与每个第二节点之间传输消息的可靠TTL之后,所述节点A向所述配网端发送所述指令对应的检测完成消息。
应理解,所述第一节点也可以为除节点A之外的任一节点,此时,所述节点A 也可以为第二节点。
当MESH网络中的所有节点都确定完与每个其他节点之间传输消息的优选TTL时,所述MESH网络的优化完成。后续发送消息时,所述MESH网络中的每个节点都可根据优选TTL向其他节点发送消息,从而可以有效降低消息的转发次数,减少节点功耗、降低网络的广播风暴。
本申请实施例提出了一种低功耗蓝牙BLE设备600,所述BLE设备600的示意性框图如图6所示。
所述BLE设备600为BLE的MESH网络中的第一节点,所述MESH网络中包括多个节点,所述BLE设备600包括:收发单元610,用于发送至少一个检测消息,所述检测消息中携带生存时间TTL,所述检测消息中的TTL随着转发所述检测消息的次数递减;所述收发单元610还用于,接收来自所述MESH网络中的第二节点的至少一个应答消息,所述应答消息为所述第二节点在接收到的所述检测消息中的TTL为零时发送的;处理单元620,用于根据所述至少一个应答消息确定所述第一节点与所述第二节点之间传输消息的优选TTL;所述收发单元610还用于,根据所述优选TTL向所述第二节点发送消息。
可选地,所述至少一个检测消息包括所述收发单元610在至少一个时间段内发送的至少一个TTL的至少一个检测消息,其中,所述至少一个时间段中的同一时间段内发送的检测消息中的TTL相同,不同时间段内发送的检测消息中的TTL不同,所述至少一个应答消息包括所述收发单元610在所述至少一个时间段内接收到的来自所述第二节点的应答消息;所述处理单元620具体用于:根据在所述同一时间段内接收到的来自所述第二节点的应答消息,确定所述同一时间段内发送的检测消息中的TTL是否为可靠TTL;根据至少一个可靠TTL确定所述优选TTL。
可选地,所述同一时间段内发送的检测消息包括所述收发单元610在所述同一时间段内重复发送的相同TTL的多个检测消息;所述处理单元620具体用于:若所述收发单元610在所述同一时间段内接收到的来自所述第二节点的应答消息的次数和在所述同一时间段内重复发送的所述相同TTL的检测消息的次数的差值在阈值范围内,确定所述同一时间段内发送的检测消息中的TTL为可靠TTL;或者,若所述收发单元610在所述同一时间段内的预设时间内接收到的来自所述第二节点的应答消息的次数和在所述同一时间段内重复发送的所述相同TTL的检测消息的次数的差值在阈值范围内,确定所述同一时间段内发送的检测消息中的TTL为可靠 TTL。
可选地,所述至少一个检测消息包括所述收发单元在至少一个时间段内发送的至少一个TTL的至少一个检测消息,其中,所述至少一个时间段中的同一时间段内发送的检测消息中的TTL不同,不同时间段内发送的检测消息中的TTL相同,所述至少一个应答消息包括所述收发单元在所述至少一个时间段内接收到的来自所述第二节点的应答消息,所述至少一个应答消息中包括对应的所述收发单元发送的检测消息中的TTL;所述处理单元具体用于:根据在所述不同时间段内接收到的来自所述第二节点的应答消息,确定所述同一时间段内发送的检测消息中的TTL是否为可靠TTL;根据至少一个可靠的TTL确定所述优选TTL。
可选地,所述处理单元具体用于:若所述收发单元在所述不同时间段内接收到的来自所述第二节点的应答消息的次数和在所述不同时间段内发送的所述相同TTL的检测消息的次数的差值在阈值范围内,确定所述同一时间段内发送的检测消息中的TTL为所述可靠TTL;或者,若所述收发单元在所述不同时间段内的预设时间内接收到的来自所述第二节点的应答消息的次数和在所述不同时间段内发送的所述相同TTL的检测消息的次数的差值在阈值范围内,确定所述同一时间段内发送的检测消息中的TTL为所述可靠TTL。
可选地,所述处理单元620具体用于:在所述至少一个可靠TTL为多个可靠TTL的情况下,所述处理单元610根据所述多个可靠TTL确定两个最小的可靠TTL,并将所述两个最小的可靠TTL中的较大的可靠TTL确定为所述优选TTL。
可选地,所述处理单元620具体用于:在所述至少一个可靠TTL为多个可靠TTL的情况下,所述处理单元将所述多个可靠TTL中的最小的可靠TTL确定为所述优选TTL。
可选地,所述处理单元620具体用于:在所述至少一个可靠TTL为一个可靠TTL的情况下,所述处理单元将所述一个可靠TTL确定为所述优选TTL。
可选地,所述不同时间段内发送的检测消息中的TTL依次加一。
可选地,所述收发单元610还用于:接收配网端发送的指令,所述指令用于指示所述收发单元发送所述至少一个检测消息。
可选地,所述收发单元610还用于:在所述处理单元确定了所述第一节点与所述MESH网络中的每个其他节点之间传输消息的优选TTL之后,向所述配网端发送所述指令对应的检测完成消息。
本申请实施例提出了另一种低功耗蓝牙BLE设备700,所述BLE设备700的示意性框图如图7所示。
所述BLE设备700为BLE的MESH网络中的第二节点,所述MESH网络中包括多个节点,所述BLE设备700包括:收发单元710,用于接收来自所述MESH网络中的第一节点的检测消息,所述检测消息中携带生存时间TTL;处理单元720,用于确定所述检测消息中的TTL;若所述TTL为零,所述处理单元720控制所述收发单元710向所述第一节点发送应答消息,所述应答消息用于所述第一节点确定所述第一节点与所述第二节点之间传输消息的优选TTL;若所述TTL不为零,所述处理单元720将所述TTL减一,并控制所述收发单元710将所述检测消息转发出去。
图8是本申请实施例的一种低功耗蓝牙BLE芯片800的示意性结构图。图8所示的BLE芯片800包括存储器810和处理器820。
其中,存储器810,用于存储可执行指令;处理器820,用于调用并运行所述存储器中810的所述可执行指令,以实现本申请实施例中的方法。
可选地,BLE芯片800具体可设置于本申请实施例的第一节点,并且BLE芯片800可以实现本申请实施例的各个方法中由第一节点实现的相应流程,为了简洁,在此不再赘述。
可选地,BLE芯片800具体可设置于本申请实施例的第二节点,并且BLE芯片800可以实现本申请实施例的各个方法中由第二节点实现的相应流程,为了简洁,在此不再赘述。
需要说明的是,在不冲突的前提下,本申请描述的各个实施例和/或各个实施例中的技术特征可以任意的相互组合,组合之后得到的技术方案也应落入本申请的保护范围。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的制备方法,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
本申请实施例中的具体的例子只是为了帮助本领域技术人员更好地理解本申请实施例,而非限制本申请实施例的范围,本领域技术人员可以在上述实施例的基 础上进行各种改进和变形,而这些改进或者变形均落在本申请的保护范围内。
以上所述,仅为本申请的具体实施方式,但本申请实施例的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请实施例揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请适合私利的保护范围之内。因此,本申请实施例的保护范围应该以权利要求的保护范围为准。

Claims (26)

  1. 一种消息传输的方法,其特征在于,所述方法应用于低功耗蓝牙BLE的MESH网络中,所述MESH网络中包括多个节点,所述方法包括:
    所述MESH网络中的第一节点发送至少一个检测消息,所述检测消息中携带生存时间TTL,所述检测消息中的TTL随着转发所述检测消息的次数递减;
    所述第一节点接收来自所述MESH网络中的第二节点的至少一个应答消息,所述应答消息为所述第二节点在接收到的所述检测消息中的TTL为零时发送的;
    所述第一节点根据所述至少一个应答消息确定所述第一节点与所述第二节点之间传输消息的优选TTL;
    所述第一节点根据所述优选TTL向所述第二节点发送消息。
  2. 根据权利要求1所述的方法,其特征在于,所述至少一个检测消息包括所述第一节点在至少一个时间段内发送的至少一个TTL的至少一个检测消息,其中,所述至少一个时间段中的同一时间段内发送的检测消息中的TTL相同,不同时间段内发送的检测消息中的TTL不同,所述至少一个应答消息包括所述第一节点在所述至少一个时间段内接收到的来自所述第二节点的应答消息;
    所述第一节点根据所述至少一个应答消息确定所述第一节点与所述第二节点之间传输消息的优选TTL,包括:
    所述第一节点根据在所述同一时间段内接收到的来自所述第二节点的应答消息,确定所述同一时间段内发送的检测消息中的TTL是否为可靠TTL;
    所述第一节点根据至少一个可靠的TTL确定所述优选TTL。
  3. 根据权利要求2所述的方法,其特征在于,所述同一时间段内发送的检测消息包括所述第一节点在所述同一时间段内重复发送的相同TTL的多个检测消息;
    所述第一节点根据在所述同一时间段内接收到的来自所述第二节点的应答消息,确定所述同一时间段内发送的检测消息中的TTL是否为可靠TTL,包括:
    若所述第一节点在所述同一时间段内接收到的来自所述第二节点的应答消息的次数和在所述同一时间段内重复发送的所述相同TTL的检测消息的次数的差值在阈值范围内,确定所述同一时间段内发送的检测消息中的TTL为所述可靠TTL;或者,
    若所述第一节点在所述同一时间段内的预设时间内接收到的来自所述第二节点的应答消息的次数和在所述同一时间段内重复发送的所述相同TTL的检测消息 的次数的差值在阈值范围内,确定所述同一时间段内发送的检测消息的TTL为所述可靠TTL。
  4. 根据权利要求1所述的方法,其特征在于,所述至少一个检测消息包括所述第一节点在至少一个时间段内发送的至少一个TTL的至少一个检测消息,其中,所述至少一个时间段中的同一时间段内发送的检测消息中的TTL不同,不同时间段内发送的检测消息中的TTL相同,所述至少一个应答消息包括所述第一节点在所述至少一个时间段内接收到的来自所述第二节点的应答消息,所述至少一个应答消息中包括对应的所述第一节点发送的检测消息中的TTL;
    所述第一节点根据所述至少一个应答消息确定所述第一节点与所述第二节点之间传输消息的优选TTL,包括:
    所述第一节点根据在所述不同时间段内接收到的来自所述第二节点的应答消息,确定所述同一时间段内发送的检测消息中的TTL是否为可靠TTL;
    所述第一节点根据至少一个可靠的TTL确定所述优选TTL。
  5. 根据权利要求4所述的方法,其特征在于,所述第一节点根据在所述不同时间段内接收到的来自所述第二节点的应答消息,确定所述同一时间段内发送的检测消息中的TTL是否为可靠TTL,包括:
    若所述第一节点在所述不同时间段内接收到的来自所述第二节点的应答消息的次数和在所述不同时间段内发送的所述相同TTL的检测消息的次数的差值在阈值范围内,确定所述同一时间段内发送的检测消息中的TTL为所述可靠TTL;或者,
    若所述第一节点在所述不同时间段内的预设时间内接收到的来自所述第二节点的应答消息的次数和在所述不同时间段内发送的所述相同TTL的检测消息的次数的差值在阈值范围内,确定所述同一时间段内发送的检测消息中的TTL为所述可靠TTL。
  6. 根据权利要求2至5中任一项所述的方法,其特征在于,所述第一节点根据至少一个可靠TTL确定所述优选TTL,包括:
    在所述至少一个可靠TTL为多个可靠TTL的情况下,所述第一节点根据所述多个可靠TTL确定两个最小的可靠TTL,并将所述两个最小的可靠TTL中的较大的可靠TTL确定为所述优选TTL。
  7. 根据权利要求2至5中任一项所述的方法,其特征在于,所述第一节点根 据至少一个可靠TTL确定所述优选TTL,包括:
    在所述至少一个可靠TTL为多个可靠TTL的情况下,所述第一节点将所述多个可靠TTL中的最小的可靠TTL确定为所述优选TTL。
  8. 根据权利要求2至5中任一项所述的方法,其特征在于,所述第一节点根据至少一个可靠TTL确定所述优选TTL,包括:
    在所述至少一个可靠TTL为一个可靠TTL的情况下,所述第一节点将所述一个可靠TTL确定为所述优选TTL。
  9. 根据权利要求2所述的方法,其特征在于,所述不同时间段内发送的检测消息中的TTL依次加一。
  10. 根据权利要求1至9中任一项所述方法,其特征在于,所述方法还包括:
    所述第一节点接收配网端发送的指令,所述指令用于指示所述第一节点发送所述至少一个检测消息。
  11. 根据权利要求10所述方法,其特征在于,所述方法还包括:
    所述第一节点在确定了与所述MESH网络中的每个其他节点之间传输消息的优选TTL之后,向所述配网端发送所述指令对应的检测完成消息。
  12. 一种消息传输的方法,其特征在于,所述方法应用于低功耗蓝牙BLE的MESH网络中,所述MESH网络中包括多个节点,所述方法包括:
    所述MESH网络中的第二节点接收来自所述MESH网络中的第一节点的检测消息,所述检测消息中携带生存时间TTL;
    所述第二节点确定所述检测消息中的TTL;
    若所述TTL为零,所述第二节点向所述第一节点发送应答消息,所述应答消息用于所述第一节点确定所述第一节点与所述第二节点之间传输消息的优选TTL;
    若所述TTL不为零,所述第二节点将所述TTL减一,并将所述检测消息转发出去。
  13. 一种低功耗蓝牙BLE设备,其特征在于,所述BLE设备为BLE的MESH网络中的第一节点,所述MESH网络中包括多个节点,所述BLE设备包括:
    收发单元,用于发送至少一个检测消息,所述检测消息中携带生存时间TTL,所述检测消息中的TTL随着转发所述检测消息的次数递减;
    所述收发单元还用于,接收来自所述MESH网络中的第二节点的至少一个应答消息,所述应答消息为所述第二节点在接收到的所述检测消息中的TTL为零时发送 的;
    处理单元,用于根据所述至少一个应答消息确定所述第一节点与所述第二节点之间传输消息的优选TTL;
    所述收发单元还用于,根据所述优选TTL向所述第二节点发送消息。
  14. 根据权利要求13所述的BLE设备,其特征在于,所述至少一个检测消息包括所述收发单元在至少一个时间段内发送的至少一个TTL的至少一个检测消息,其中,所述至少一个时间段中的同一时间段内发送的检测消息中的TTL相同,不同时间段内发送的检测消息中的TTL不同,所述至少一个应答消息包括所述收发单元在所述至少一个时间段内接收到的来自所述第二节点的应答消息;
    所述处理单元具体用于:
    根据在所述同一时间段内接收到的来自所述第二节点的应答消息,确定所述同一时间段内发送的检测消息中的TTL是否为可靠TTL;
    根据至少一个可靠TTL确定所述优选TTL。
  15. 根据权利要求14所述的BLE设备,其特征在于,所述同一时间段内发送的检测消息包括所述收发单元在所述同一时间段内重复发送的相同TTL的多个检测消息;
    所述处理单元具体用于:
    若所述收发单元在所述同一时间段内接收到的来自所述第二节点的应答消息的次数和在所述同一时间段内重复发送的所述相同TTL的检测消息的次数的差值在阈值范围内,确定所述同一时间段内发送的检测消息中的TTL为可靠TTL;或者,
    若所述收发单元在所述同一时间段内的预设时间内接收到的来自所述第二节点的应答消息的次数和在所述同一时间段内重复发送的所述相同TTL的检测消息的次数的差值在阈值范围内,确定所述同一时间段内发送的检测消息中的TTL为可靠TTL。
  16. 根据权利要求13所述的BLE设备,其特征在于,所述至少一个检测消息包括所述收发单元在至少一个时间段内发送的至少一个TTL的至少一个检测消息,其中,所述至少一个时间段中的同一时间段内发送的检测消息中的TTL不同,不同时间段内发送的检测消息中的TTL相同,所述至少一个应答消息包括所述收发单元在所述至少一个时间段内接收到的来自所述第二节点的应答消息,所述至少一个应 答消息中包括对应的所述收发单元发送的检测消息中的TTL;
    所述处理单元具体用于:
    根据在所述不同时间段内接收到的来自所述第二节点的应答消息,确定所述同一时间段内发送的检测消息中的TTL是否为可靠TTL;
    根据至少一个可靠的TTL确定所述优选TTL。
  17. 根据权利要求16所述的BLE设备,其特征在于,所述处理单元具体用于:
    若所述收发单元在所述不同时间段内接收到的来自所述第二节点的应答消息的次数和在所述不同时间段内发送的所述相同TTL的检测消息的次数的差值在阈值范围内,确定所述同一时间段内发送的检测消息中的TTL为所述可靠TTL;或者,
    若所述收发单元在所述不同时间段内的预设时间内接收到的来自所述第二节点的应答消息的次数和在所述不同时间段内发送的所述相同TTL的检测消息的次数的差值在阈值范围内,确定所述同一时间段内发送的检测消息中的TTL为所述可靠TTL。
  18. 根据权利要求14至17中任一项所述的BLE设备,其特征在于,所述处理单元具体用于:
    在所述至少一个可靠TTL为多个可靠TTL的情况下,所述处理单元根据所述多个可靠TTL确定两个最小的可靠TTL,并将所述两个最小的可靠TTL中的较大的可靠TTL确定为所述优选TTL。
  19. 根据权利要求14至17中任一项所述的BLE设备,其特征在于,所述处理单元具体用于:
    在所述至少一个可靠TTL为多个可靠TTL的情况下,所述处理单元将所述多个可靠TTL中的最小的可靠TTL确定为所述优选TTL。
  20. 根据权利要求14至17中任一项所述的BLE设备,其特征在于,所述处理单元具体用于:
    在所述至少一个可靠TTL为一个可靠TTL的情况下,所述处理单元将所述一个可靠TTL确定为所述优选TTL。
  21. 根据权利要求14所述的BLE设备,其特征在于,所述不同时间段内发送的检测消息中的TTL依次加一。
  22. 根据权利要求13至21中任一项所述的BLE设备,其特征在于,所述收 发单元还用于:接收配网端发送的指令,所述指令用于指示所述收发单元发送所述至少一个检测消息。
  23. 根据权利要求22所述的BLE设备,其特征在于,所述收发单元还用于:在所述处理单元确定了所述第一节点与所述MESH网络中的每个其他节点之间传输消息的优选TTL之后,向所述配网端发送所述指令对应的检测完成消息。
  24. 一种低功耗蓝牙BLE设备,其特征在于,所述BLE设备为BLE的MESH网络中的第二节点,所述MESH网络中包括多个节点,所述BLE设备包括:
    收发单元,用于接收来自所述MESH网络中的第一节点的检测消息,所述检测消息中携带生存时间TTL;
    处理单元,用于确定所述检测消息中的TTL;
    若所述TTL为零,所述处理单元控制所述收发单元向所述第一节点发送应答消息,所述应答消息用于所述第一节点确定所述第一节点与所述第二节点之间传输消息的优选TTL;
    若所述TTL不为零,所述处理单元将所述TTL减一,并控制所述收发单元将所述检测消息转发出去。
  25. 一种低功耗蓝牙BLE芯片,其特征在于,包括:
    存储器,用于存储可执行指令;
    处理器,用于调用并运行所述存储器中的所述可执行指令,以执行权利要求1至11中任一项所述的方法。
  26. 一种低功耗蓝牙BLE芯片,其特征在于,包括:
    存储器,用于存储可执行指令;
    处理器,用于调用并运行所述存储器中的所述可执行指令,以执行权利要求12所述的方法。
PCT/CN2020/073361 2020-01-21 2020-01-21 消息传输的方法、ble设备和ble芯片 WO2021146879A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202080001628.7A CN111869246B (zh) 2020-01-21 2020-01-21 消息传输的方法、ble设备和ble芯片
PCT/CN2020/073361 WO2021146879A1 (zh) 2020-01-21 2020-01-21 消息传输的方法、ble设备和ble芯片

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/073361 WO2021146879A1 (zh) 2020-01-21 2020-01-21 消息传输的方法、ble设备和ble芯片

Publications (1)

Publication Number Publication Date
WO2021146879A1 true WO2021146879A1 (zh) 2021-07-29

Family

ID=72968466

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/073361 WO2021146879A1 (zh) 2020-01-21 2020-01-21 消息传输的方法、ble设备和ble芯片

Country Status (2)

Country Link
CN (1) CN111869246B (zh)
WO (1) WO2021146879A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114465918B (zh) * 2022-02-24 2024-03-08 杭州中天微系统有限公司 消息应答方法以及装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105515895A (zh) * 2015-11-30 2016-04-20 东南大学 基于软件定义网络的端到端路径上逐跳时延测量方法
CN108667681A (zh) * 2017-03-27 2018-10-16 丛林网络公司 用于多路径路由的路由跟踪
US20190159022A1 (en) * 2016-08-10 2019-05-23 Telefonaktiebolaget Lm Ericsson (Publ) Packet forwarding in a wireless mesh network
CN110572808A (zh) * 2019-10-11 2019-12-13 瓴盛科技有限公司 蓝牙Mesh网络系统及其建立方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105515895A (zh) * 2015-11-30 2016-04-20 东南大学 基于软件定义网络的端到端路径上逐跳时延测量方法
US20190159022A1 (en) * 2016-08-10 2019-05-23 Telefonaktiebolaget Lm Ericsson (Publ) Packet forwarding in a wireless mesh network
CN108667681A (zh) * 2017-03-27 2018-10-16 丛林网络公司 用于多路径路由的路由跟踪
CN110572808A (zh) * 2019-10-11 2019-12-13 瓴盛科技有限公司 蓝牙Mesh网络系统及其建立方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
INTEL: "On UE-UE Relay work in SA2 (ProSe) and SA6 (MCPTT)", 3GPP DRAFT; S2-151752_MCPTT_PROSE, 3RD GENERATION PARTNERSHIP PROJECT (3GPP), MOBILE COMPETENCE CENTRE ; 650, ROUTE DES LUCIOLES ; F-06921 SOPHIA-ANTIPOLIS CEDEX ; FRANCE, vol. SA WG2, no. Fukuoka, Japan; 20150525 - 20150529, 24 May 2015 (2015-05-24), Mobile Competence Centre ; 650, route des Lucioles ; F-06921 Sophia-Antipolis Cedex ; France, XP050977109 *

Also Published As

Publication number Publication date
CN111869246A (zh) 2020-10-30
CN111869246B (zh) 2022-05-17

Similar Documents

Publication Publication Date Title
RU2682930C2 (ru) Выбор маршрута в беспроводных сетях
KR101821711B1 (ko) 슬리피 노드들을 지원하기 위한 이웃 발견
US10171986B2 (en) Radio relay device and system with waiting time optimization
JP4805646B2 (ja) センサ端末、センサ端末の制御方法
US9495326B2 (en) Providing communication path information in a hybrid communication network
EP3055950B1 (en) Ad-hoc on-demand routing through central control
US8811190B2 (en) Maximum transmission unit (MTU) size discovery mechanism and method for data-link layers
CN108476457A (zh) 在时隙化信道跳变网络中的分布式反应性资源和调度管理
WO2018188337A1 (zh) 报文广播方法及设备
KR20040094260A (ko) 에드 혹 네트워크에서의 패스 엠티유 발견 시스템 및 방법
JP4808731B2 (ja) 通信ネットワークシステムにおけるサブシステム間のロードを調節する方法
KR20150084647A (ko) 상호-청취자 장치 세트에 대하여 가상 인터페이스를 설정하는 방법 및 장치
WO2023045143A1 (zh) 一种基于时间脉冲源的混合路由协议的实现方法
WO2020214469A1 (en) Efficient message transmission and loop avoidance in an rpl network
JP5801887B2 (ja) 無線ネットワークのノード間で通信するためのシステムおよび方法
WO2021146879A1 (zh) 消息传输的方法、ble设备和ble芯片
US10680899B1 (en) Topology discovery through multicast transmission
US20220232449A1 (en) Method of Waking up a Mesh Node in a Wireless Mesh Network as Well as a Related Mesh Node and a Computer Program Product
JP6493945B2 (ja) 高密度大規模ネットワーク向けのGreen Power(プロキシテーブルのスケーリング)
US11405325B2 (en) In-band-telemetry-based path MTU size determination system
WO2020147081A1 (zh) 一种数据传输方法、相关设备及计算机存储介质
Priya et al. Retp: Reliable event transmission protocol in a wireless sensor network
JP2006067377A (ja) 分散型ネットワークの情報集約方式
WO2022188869A1 (en) System and method for implementing relay nodes in a wireless network
TW202029701A (zh) 通信鏈路檢查方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20915487

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20915487

Country of ref document: EP

Kind code of ref document: A1