WO2021092760A1 - 数据传输的方法和ble设备 - Google Patents

数据传输的方法和ble设备 Download PDF

Info

Publication number
WO2021092760A1
WO2021092760A1 PCT/CN2019/117534 CN2019117534W WO2021092760A1 WO 2021092760 A1 WO2021092760 A1 WO 2021092760A1 CN 2019117534 W CN2019117534 W CN 2019117534W WO 2021092760 A1 WO2021092760 A1 WO 2021092760A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
mesh network
data packets
data packet
switching instruction
Prior art date
Application number
PCT/CN2019/117534
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 PCT/CN2019/117534 priority Critical patent/WO2021092760A1/zh
Priority to CN201980005132.4A priority patent/CN111279729A/zh
Publication of WO2021092760A1 publication Critical patent/WO2021092760A1/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
    • H04W36/00Hand-off or reselection arrangements
    • H04W36/0005Control or signalling for completing the hand-off
    • 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 data transmission method and a BLE device.
  • the Bluetooth Low Energy (BLE) MESH network includes a large number of nodes. During data transmission, all nodes in the network forward the received data packets based on unconditional forwarding. When there are a large number of data packets to be transmitted between nodes in the MESH network, the transmission efficiency of this method is very low.
  • the embodiments of the present application provide a data transmission method and a BLE device, which can improve the efficiency of data packet transmission between nodes in a MESH network.
  • a data transmission method 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: the first in the MESH network A node sends a first switching instruction, the first switching instruction is used to instruct each node in the MESH network to switch to the first transmission mode after a predetermined period of time, wherein the first transmission mode is only forwarding from the A data packet pattern from the first node to the second node in the MESH network; the first node sends the data packet to the second node through the MESH network.
  • the predetermined duration is a preset duration after the moment when the first node sends the data packet, or is a preset duration after the moment when each node receives the data packet. Set the duration.
  • the first handover instruction includes the address of the first node and the address of the second node.
  • the first node sending the data packet to the second node through the MESH network includes: the first node splits the data packet to form multiple data packets. Sub-data packets; the first node cyclically sends the multiple sub-data packets to the second node through the MESH network according to the numbers of the multiple sub-data packets.
  • the method further includes: the first node sends a transmission start instruction to the second node through the MESH network, and the transmission start instruction includes at least one of the following information Type: the number of the multiple sub-data packets, the number of the multiple sub-data packets, and the total length of the multiple sub-data packets.
  • the method further includes: the first node receives a response message sent by the second node through the MESH network, and the response message includes the successful reception by the second node.
  • the number of the sub-data packet wherein the first node cyclically sends the multiple sub-data packets to the second node, including: the first node cyclically sends to the second node according to the response message Sub-packets that were not successfully received.
  • the first node cyclically sends sub-data packets that are not successfully received according to the response message, including: if the number of sub-data packets that are not successfully received is less than a preset value, the first node A node sends multiple unsuccessfully received sub-data packets in one cycle; if the number of unsuccessfully received sub-data packets is greater than the preset value, the first node sends only one sub-data packet in one cycle. Share the unsuccessfully received sub-data packets.
  • the method further includes: the first node removes the sub-data packet successfully received by the second node from the sending queue according to the response message.
  • the method further includes: if all the multiple sub-data packets are removed, the first node sends a first indication message to the second node through the MESH network, The first indication message is used to indicate the completion of sending the multiple sub-data packets.
  • the method further includes: the first node receives a second indication message sent by the second node through the MESH network, and the second indication message is used to indicate the Multiple sub-packets were successfully received.
  • the method further includes: the first node sending a second switching instruction, the second switching instruction is used to instruct each node in the MESH network to exit the first transmission mode .
  • the method further includes: the first node receives the data packet from other nodes The first switching instruction; the first node determines whether to send the data packet to the second node according to the serial number of the address of the first node and the serial number of the addresses of the other nodes.
  • the first node determines whether to send the data packet to the second node according to the serial number of the address of the first node and the serial number of the addresses of the other nodes, including : If the sequence number of the address of the first node is greater than the sequence number of the addresses of the other nodes, the first node determines to send the data packet to the second node; or, if the address of the first node If the sequence number of is smaller than the sequence number of the address of the other node, the first node determines to send the data packet to the second node.
  • a data transmission method is provided, which is applied to a MESH network of Bluetooth Low Energy BLE, and the method includes: a second node in the MESH network receives a first handover instruction, and The first switching instruction is used to instruct each node in the MESH network to switch to the first transmission mode after a predetermined period of time, wherein the first transmission mode is to only forward from the first node in the MESH network to the The mode of the data packet of the second node; the second node switches to the first transmission mode after the predetermined time period according to the first switching instruction; the second node receives all the data through the MESH network The data packet sent by the first node.
  • the predetermined duration is a preset duration after the moment when the first node sends the data packet, or is a preset duration after the moment when each node receives the data packet. Set the duration.
  • the first handover instruction includes the address of the first node and the address of the second node.
  • the second node receiving the data packet sent by the first node through the third node includes: the second node receiving the data packet sent by the first node through the MESH network The multiple sub-data packets formed based on the data packet.
  • the method further includes: the second node receives a transmission start instruction sent by the first node through the MESH network, and the transmission start instruction includes at least one of the following information One type: the number of the multiple sub-data packets, the number of the multiple sub-data packets, and the total length of the multiple sub-data packets.
  • the method further includes: the second node generates a response message, the response message includes the number of the successfully received sub-data packet; the second node passes through the MESH network, Sending the response message to the first node.
  • the generation of the response message by the second node includes: each time the second node successfully receives K sub-data packets, generating one of the response messages, the response message includes the K Number of sub-packets.
  • the method further includes: the second node receives a first indication message sent by the first node through the MESH network, and the first indication message is used to indicate the Multiple sub-data packets have been sent.
  • the method further includes: the second node determines whether the multiple sub-data packets are successfully received according to the first indication message; if it is determined that the multiple sub-data packets are successfully received, The second node sends a second indication message to the first node through the MESH network, where the second indication message is used to indicate that the multiple sub-data packets are successfully received.
  • the method further includes: the second node receives a second switching instruction, the second switching instruction is used to instruct each node in the MESH network to exit the first transmission mode ; The second node exits the first transmission mode according to the second switching instruction.
  • the method before the second node switches to the first transmission mode after the predetermined period of time according to the first switching instruction, the method further includes: the second node Receiving the first handover instruction from another node; the second node determines whether according to the sequence number of the address of the first node and the sequence number of the address of the other node according to the The first switching instruction switches to the first transmission mode.
  • the second node determines whether according to the first handover sent by the first node according to the sequence number of the address of the first node and the sequence number of the addresses of the other nodes. Instruction to switch to the first transmission mode, including: if the sequence number of the address of the first node is greater than the sequence number of the addresses of the other nodes, then the second node determines according to the The first switching instruction is to switch to the first transmission mode; or, if the sequence number of the address of the first node is less than the sequence number of the addresses of the other nodes, the second node determines to send according to the first node The first switching instruction to switch to the first transmission mode.
  • a data transmission method including: 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: in the MESH network The third node receives a first switching instruction, the first switching instruction is used to instruct each node in the MESH network to switch to the first transmission mode after a predetermined period of time, wherein the first transmission mode is forwarding only from The mode of data packets from the first node to the second node in the MESH network; the third node switches to the first transmission mode after the predetermined time period according to the first switching instruction; The three nodes forward the data packet from the first node to the second node.
  • the predetermined duration is a preset duration after the moment when the first node sends the data packet, or is a preset duration after the moment when each node receives the data packet. Set the duration.
  • the first handover instruction includes the address of the first node and the address of the second node.
  • the method further includes: the third node forwards a transmission start instruction from the first node to the second node, and the transmission start instruction includes at least one of the following information One type: the number of the multiple sub-data packets, the number of the multiple sub-data packets, and the total length of the multiple sub-data packets.
  • the third node forwarding the data packet from the first node to the second node includes: the third node forwarding the data packet from the first node to the A plurality of sub-data packets of the second node formed based on the data packet.
  • the method further includes: the third node forwards a response message from the second node to the first node, and the response message includes that the second node successfully received The number of the sub-packet.
  • the method further includes: the third node receives a second switching instruction, the second switching instruction is used to instruct each node in the MESH network to exit the first transmission mode ; The third node exits the first transmission mode according to the second switching instruction.
  • the method before the third node switches to the first transmission mode after the predetermined period of time according to the first switching instruction, the method further includes: the third node Receiving the first handover instruction from another node; the third node determines whether according to the sequence number of the address of the first node and the sequence number of the address of the other node according to the The first switching instruction switches to the first transmission mode.
  • the third node determines whether according to the first handover sent by the first node according to the sequence number of the address of the first node and the sequence number of the addresses of the other nodes. Instruction to switch to the first transmission mode, including: if the sequence number of the address of the first node is greater than the sequence number of the addresses of the other nodes, the third node determines according to the The first switching instruction is to switch to the first transmission mode; or, if the sequence number of the address of the first node is less than the sequence number of the addresses of the other nodes, the third node determines to send according to the first node The first switching instruction to switch to the first transmission mode.
  • a BLE device which includes a functional module for executing the method in the first aspect or any possible implementation of the first aspect.
  • a BLE device which includes a functional module for executing the second aspect or any possible implementation of the second aspect.
  • a BLE device including a functional module for executing the third aspect or any possible implementation of the third aspect.
  • a BLE chip in a seventh aspect, includes a processor and a memory, the memory is used to store a computer program, and the processor is used to call and run the computer program stored in the memory to execute the first A method in one aspect or any possible implementation of the first aspect.
  • a BLE chip in an eighth aspect, includes a processor and a memory, the memory is used to store a computer program, and the processor is used to call and run the computer program stored in the memory to execute the first The second aspect or any possible implementation of the second aspect.
  • a BLE chip in a ninth aspect, includes a processor and a memory, the memory is used to store a computer program, and the processor is used to call and run the computer program stored in the memory to execute the first
  • the BLE chip includes a processor and a memory, the memory is used to store a computer program, and the processor is used to call and run the computer program stored in the memory to execute the first
  • a computer-readable storage medium is provided, and the computer-readable storage medium is used to store a computer program.
  • the processor when the computer program is executed by the processor, the processor is caused to execute the method in the first aspect or any possible implementation manner of the first aspect.
  • a computer-readable storage medium is provided, and the computer-readable storage medium is used to store a computer program.
  • the processor when the computer program is executed by the processor, the processor is caused to execute the second aspect or the method in any possible implementation manner of the second aspect.
  • a computer-readable storage medium is provided, and the computer-readable storage medium is used to store a computer program.
  • the processor when the computer program is executed by the processor, the processor is caused to execute the third aspect or the method in any possible implementation manner of the third aspect.
  • a computer program product including computer program instructions that cause a computer to execute the foregoing first aspect or the method in any possible implementation manner of the first aspect.
  • a computer program product including computer program instructions that cause a computer to execute the foregoing second aspect or the method in any possible implementation manner of the second aspect.
  • a computer program product including computer program instructions that cause a computer to execute the foregoing third aspect or the method in any possible implementation manner of the third aspect.
  • each node in the network enters the first transmission mode by sending a switching instruction, that is, only forwards from the first node to the second node.
  • the data packet of the node can thereby improve the transmission efficiency of the data packet between the nodes.
  • FIG. 1 is a schematic diagram of the MESH network.
  • Fig. 2 is a flow interaction diagram of a data transmission method according to an embodiment of the present application.
  • Fig. 3 is a flow interaction diagram of a data transmission method according to another embodiment of the present application.
  • Fig. 4 is a flow interaction diagram of a data transmission method according to another embodiment of the present application.
  • Fig. 5 is a flow interaction diagram of a data transmission method according to another embodiment of the present application.
  • FIGS. 6 to 8 are schematic block diagrams of BLE devices according to embodiments of the present application.
  • FIG. 9 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 includes multiple devices, and each device may be called a node.
  • Each node can carry out data transmission. Data packets can be relayed between various nodes, so that the data packets can be transmitted to more distant locations. 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 Figure 1, only node A to node G are taken as an example.
  • data packets are transmitted based on advertising. After each node receives a data packet sent by another node, it unconditionally forwards the data packet, thereby forwarding the data packet to other nearby nodes.
  • a data packet from node A to node B can be relayed at least once.
  • node C receives the data packet sent by node A, it can forward the data packet to node D and node G; after node D receives the data packet, it can forward the data packet to node G and node B respectively; After node G receives the data packet, it can forward the data packet to node B, node E, and node F. Since the data packet transmission is based on advertising, the data transmission is unreliable. Therefore, when the node A sends the data packet to the node B, the data packet can be repeatedly sent to ensure that the data packet is successfully received.
  • node A When node A needs to send a large number of data packets to node B, the above-mentioned relaying node will unconditionally forward these data packets when receiving these data packets, which makes the transmission efficiency of data packets very low. Moreover, since all data packets have to be sent repeatedly, it also causes a waste of bandwidth.
  • the embodiment of the present application provides a data transmission solution used in a MESH network, which can improve the data transmission efficiency between nodes, and is especially suitable for a situation where a large number of data packets need to be transmitted between two nodes.
  • Fig. 2 is a flow interaction diagram of a data transmission method according to an embodiment of the present application.
  • the method 200 shown in FIG. 2 may be executed by the first node, the second node, and the third node.
  • the method is applied to the MESH network of BLE, and the MESH network may include multiple nodes.
  • the first node may also be referred to as a source node
  • the second node may also be referred to as a target node
  • the third node may also be referred to as a relay node.
  • the identities of the first node, the second node, and the third node can also be exchanged.
  • the method that can be executed by any one of the nodes can also be executed by the other two nodes.
  • the first node is the source node
  • the second node is the target node
  • the third node is the relay node as examples for description.
  • only one relay node, that is, the third node is taken as an example for description.
  • the method 200 may include some or all of the following steps.
  • the first node sends a first switching instruction.
  • the first switching instruction is used to instruct each node in the MESH network to switch to the first transmission mode after a predetermined period of time.
  • the first transmission mode is a mode in which only data packets from the first node to the second node in the MESH network are forwarded.
  • the predetermined duration may be a preset duration after the moment when the first node sends the data packet.
  • the first switching instruction may carry the time T1 at which the first node sends the data packet. After receiving the first switching instruction, each node in the MESH network enters the first transmission mode at the end of the predetermined period after the time T1. .
  • the predetermined duration may be a preset duration after the moment when each node receives the data packet.
  • the third node enters the first transmission mode when the predetermined time period after the time T2 at which the first switching instruction is received ends.
  • the first switching instruction may include, for example, the address of the first node and the address of the second node, so that each node that receives the first switching instruction stops forwarding data between nodes other than the first node and the second node package.
  • the address of the first node is the source address of the first switching instruction, and the address of the second node may be carried in the payload field of the first switching instruction.
  • the target address of the first switching instruction may be the group address of the group formed by the nodes in the MESH network that receive the first switching instruction.
  • the third node receives the first switching instruction, and according to the first switching instruction, switches to the first transmission mode after the predetermined period of time.
  • the second node receives the first switching instruction sent by the first node, and according to the first switching instruction, switches to the first transmission mode after the predetermined period of time.
  • each node in the MESH network After each node in the MESH network receives the first handover instruction, it can continue to forward the data packet within a preset period of time to complete the transmission of the air data packet. However, these nodes will not send out new data packets, but will cache these data packets locally, and then send them out after exiting the first transmission mode. After the preset time period ends, each node enters the first transmission mode.
  • the preset duration may not be set, and the first switching instruction instructs each node in the MESH network to switch to the first transmission mode.
  • the first switching instruction instructs each node in the MESH network to switch to the first transmission mode.
  • the MESH network After each node in the MESH network receives the first switching instruction, it caches the data packets to be sent and the data packets to be forwarded locally, and immediately switches to the first transmission mode, and then transfers these data packets after exiting the first transmission mode. The packet is sent out.
  • the first node sends a data packet to the second node through the MESH network.
  • the third node forwards the data packet from the first node to the second node.
  • the second node receives the data packet sent by the first node through the MESH network.
  • the first node when a large number of data packets need to be transmitted between the first node and the second node in the MESH network, the first node can send a first switching instruction in the MESH network to instruct each node to enter the first transmission mode , So that each node only forwards data packets from the first node to the second node, while suspending the transmission of other data packets.
  • the data transmission efficiency and transmission quality between nodes are improved.
  • the above method can also be used for transmission, so that these high-priority data packets can reach the target node as soon as possible.
  • the first node may also send a second switching instruction.
  • the second switching instruction is used to instruct each node in the MESH network to exit the first transmission mode.
  • nodes such as the third node and the second node, after receiving the second switching instruction, will exit the first transmission mode according to the second switching instruction. After that, each node in the MESH network can return to the mode of unconditionally forwarding all data packets.
  • Each node in the MESH network can send a first switching instruction to instruct other nodes to switch the transmission mode according to its own needs, so as to only forward the data packet sent by each node to its desired target node.
  • the first node may also receive the first switching instruction from other nodes.
  • the second node and the third node may also receive the first switching instruction sent from other nodes.
  • a node receives multiple first switching instructions at the same time, the node needs to determine which node sent the first switching instruction from among the received multiple first switching instructions, while ignoring the first switching of other nodes Instructions, otherwise it will cause conflicts. For example, the node may determine which first switching instruction is valid according to the sequence number of the source node address of the first switching instruction; or, the node may also determine according to the sequence number of the destination address of a large number of data packets to be transmitted Which first switching command is valid.
  • the first node may determine whether to send the data packet to the second node according to the sequence number of the address of the first node and the sequence numbers of the addresses of other nodes, and when determining to send the data packet to the second node, execute 240 . For example, if the sequence number of the address of the first node is greater than the sequence number of the addresses of other nodes, the first node determines to send the data packet to the second node; or, if the sequence number of the address of the first node is less than the sequence number of the addresses of other nodes, Then the first node determines to send the data packet to the second node.
  • the second node and the third node can determine which node sends the first switching instruction to switch the transmission mode according to the serial number of the address of the first node and the serial number of the addresses of other nodes. If the second node and the third node determine to switch to the first transmission mode according to the first switching instruction sent by the first node, 230 and 240 are executed respectively.
  • the second node and the third node determine to switch to the first transmission mode according to the first switching instruction; or, if the address of the first node is If the sequence number is smaller than the sequence number of the addresses of other nodes, the second node and the third node determine to switch to the first transmission mode according to the first switching instruction.
  • node A, node C, and node D currently all have a large number of data packets to be sent, so node A, node C, and node D all send their respective first switching instructions.
  • the sequence numbers of the addresses of node A, node C, and node D are ascending from small to large. It is assumed that the first switching command sent by the node with the smallest address sequence number is valid.
  • the first switching instruction sent by node A instructs each node to only forward data packets from node A to node B.
  • other nodes in the MESH network switch the transmission mode according to the first switching instruction sent by node A, thereby only forwarding data packets from node A to node B .
  • node C and node D can also receive the first switching instruction sent by node A, and find that the sequence number of node A's address is less than its own sequence number, node C and node D only forward the data from node A to node B Packet, and after the data packet transmission from node A to node B is completed, try to send its first switching instruction.
  • step 240 may include step 241 and step 242.
  • step 250 can be replaced by step 251
  • step 260 can be replaced by step 261.
  • the first node splits the data packet to form multiple sub-data packets.
  • the multiple sub-data packets may have respective numbers, or called sequence numbers (Sequence Number, SN).
  • sequence Number Sequence Number
  • the first node numbers multiple sub-data packets, and the multiple sub-data packets have numbers 1, number 2, ..., number N, respectively.
  • the length of each sub-data packet can be the same, for example, the length is the maximum transmission unit (Maximum Transmission Unit, MTU)-2; or the length of these sub-data packets may not be exactly the same. Make a limit.
  • MTU Maximum Transmission Unit
  • the first node cyclically sends the multiple sub-data packets to the second node through the MESH network according to the numbers of the multiple sub-data packets.
  • the third node forwards a plurality of sub-data packets formed based on the data packet.
  • the second node receives the multiple sub-data packets sent by the first node through the MESH network.
  • the first node may also send a transmission start instruction to the second node through the MESH network.
  • the transmission start instruction includes, for example, at least one of the following information: the number of the multiple sub-data packets, the number of the multiple sub-data packets, and the total length of the multiple sub-data packets.
  • the second node receives the transmission start instruction sent by the first node through the MESH network. And get the data information from the transmission start instruction, and prepare to receive data.
  • the method may further include step 271 to step 275.
  • the second node generates a response message.
  • the response message includes the number of the sub-data packet successfully received by the second node.
  • the second node sends the response message to the first node through the MESH network.
  • the third node forwards the response message from the second node to the first node.
  • the first node receives the response message sent by the second node through the MESH network.
  • the first node may cyclically send unsuccessfully received sub-data packets to the second node through the MESH network according to the received response message.
  • the first node sends multiple unsuccessfully received sub-data packets in one cycle; and/or if the number of unsuccessfully received sub-data packets If the value is greater than the preset value, the first node sends only one sub-data packet that has not been successfully received in one cycle.
  • the first node sends sub-data packets in cycles according to the number of the sub-data packets. In one cycle, the first node can send only one sub-data packet for each numbered sub-data packet according to the number of sub-data packets in the sending queue. One copy of the numbered sub-packet or multiple copies of the numbered sub-packet. The specific number of the multiple copies can be pre-configured.
  • the sending queue of the first node is: data packet 6, data packet 7, data packet 8, Data packet 6, data packet 7, data packet 8,.... If the first node sends 2 copies of the numbered sub-data packet for each numbered sub-data packet in one cycle, the sending queue of the first node is: data packet 6, data packet 6, data packet 7, data Package 7, data package 8, data package 8, data package 6, data package 6, data package 7, data package 7, ....
  • the first node can determine whether to send only one sub-data packet or repeat multiple sub-data packets according to the number of sub-data packets in the sending queue, instead of repeating multiple data packets each time.
  • the first node can determine whether to send only one sub-data packet or repeat multiple sub-data packets according to the number of sub-data packets in the sending queue, instead of repeating multiple data packets each time.
  • the second node after receiving the sub-data packet, the second node needs to send a response message to the first node to indicate that it has successfully received the sub-data packet.
  • the second node can respond to each sub-data packet separately, but this will result in a large number of air packets, which affects the data transmission efficiency in the network.
  • the second node may generate one response message every time K sub-data packets are successfully received.
  • the response message includes the numbers of the K sub-data packets.
  • K can be a pre-configured value.
  • the number of the K sub-data packets may be continuous or discontinuous.
  • the first node cyclically sends sub-data packets numbered 1 to N, and if the second node successfully receives sub-data packets numbered 1 to K, a response message is generated, and the response message carries numbers 1 to Number K.
  • the number of response packets in the air can be reduced, thereby further improving the efficiency of data transmission between nodes. And can reduce equipment power consumption.
  • the second node When responding, each time the second node receives K sub-data packets, the number of the K sub-data packets is carried in a response message and sent to the first node.
  • the second node can calculate the number of sub-data packets that have not been received according to the total number of sub-data packets and the number of sub-data packets it has received. When the number of remaining unreceived sub-data packets is less than K, it is possible to respond to these sub-data packets individually or to respond to the remaining sub-data packets together.
  • the method further includes: the first node removes the sub-data packet successfully received by the second node from the sending queue according to the response message.
  • the dashed frame represents the removed sub-data packet.
  • the first node splits the data packet to be sent to form N sub-data packets; the first node removes the sub-data packets numbered 1 to K from the sending queue after receiving the response message numbered 1 to K; After a node receives the response message with the number N-1, it removes the sub-data packet with the number N-1 from the queue; it continues to receive other response messages until all the sub-data packets in the sending queue are removed, indicating that it is sending All sub-packets have been sent.
  • the first node can send a first indication message to the second node through the MESH network.
  • the first indication message is used to indicate the completion of sending the multiple sub-data packets.
  • the second node receives the first indication message sent by the first node.
  • the second node can determine whether the multiple sub-data packets are successfully received according to the first indication message; if it is determined that the multiple sub-data packets are successfully received, the second node sends a second indication message to the first node through the MESH network . Wherein, the second indication message is used to indicate that the multiple sub-data packets are successfully received.
  • the two-way verification between the first node and the second node is realized through the first indication message and the second indication message, which can further improve the reliability of data packet transmission between the two nodes.
  • the first indication message may include at least one of the following information: the number of the multiple sub-data packets, the number of the multiple sub-data packets, and the total length of the multiple sub-data packets.
  • the second node can verify the received sub-data packet based on the information, and if the verification is successful, it will reply with a second indication message.
  • the size of the sequence numbers of the above-mentioned processes does not mean the order of execution.
  • the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of this application. .
  • Fig. 6 is a schematic block diagram of a BLE device 600 according to an embodiment of the present application.
  • the BLE device 600 is the first node in the BLE MESH network
  • the MESH network includes multiple nodes
  • the first node includes:
  • the transceiver unit 610 is configured to send a first switching instruction, where the first switching instruction is used to instruct each node in the MESH network to switch to the first transmission mode after a predetermined period of time, where the first transmission mode is only A mode of forwarding data packets from the first node to the second node in the MESH network;
  • the transceiver unit 610 is further configured to send the data packet to the second node through the MESH network.
  • each node in the network When the first node in the MESH network needs to send a large number of data packets to the second node, each node in the network enters the first transmission mode by sending a switching instruction, that is, only forwarding data packets from the first node to the second node, Therefore, the transmission efficiency of the data packet between the first node and the second node can be improved.
  • the first handover instruction includes the address of the first node and the address of the second node.
  • the predetermined duration is a preset duration after the moment when the first node sends the data packet, or is a preset duration after the moment when each node receives the data packet.
  • the node 600 further includes: a processing unit 620, configured to split the data packet to form a plurality of sub-data packets; wherein, the transceiver unit 610 is specifically configured to: use the MESH network according to the multiple sub-data packets. The number of the data packet, and the multiple sub-data packets are cyclically sent to the second node.
  • the transceiver unit 610 is further configured to: send a transmission start instruction to the second node through the MESH network, where the transmission start instruction includes at least one of the following information: The number, the number of the multiple sub-data packets, and the total length of the multiple sub-data packets.
  • the transceiver unit 610 is specifically configured to: receive a response message sent by the second node through the MESH network, where the response message includes the number of the sub-data packet successfully received by the second node; The reply message is to send sub-data packets that are not successfully received cyclically.
  • the transceiver unit 610 is specifically configured to: if the number of unsuccessfully received sub-data packets is less than a preset value, in one cycle, send multiple copies of the unsuccessfully received sub-data packets; The number of data packets is greater than the preset value, and in one cycle, only one copy of the unsuccessfully received sub-data packets is sent.
  • processing unit 620 is further configured to: according to the response message, remove the sub-data packet successfully received by the second node from the sending queue.
  • the transceiver unit 610 is further configured to: if all of the multiple sub-data packets are removed, send a first indication message to the second node through the MESH network, where the first indication message is used to indicate The transmission of the multiple sub-data packets is completed.
  • the transceiver unit 610 is further configured to: receive a second indication message sent by the second node through the MESH network, where the second indication message is used to indicate that the multiple sub-data packets are successfully received.
  • the transceiver unit 610 is further configured to send a second switching instruction, where the second switching instruction is used to instruct each node in the MESH network to exit the first transmission mode.
  • the transceiver unit 610 is further configured to: receive the first handover instruction from other nodes; the processing unit 620 is further configured to: according to the serial number of the address of the first node and the serial number of the address of the other node To determine whether to send the data packet to the second node.
  • the processing unit 620 is specifically configured to: if the sequence number of the address of the first node is greater than the sequence number of the addresses of the other nodes, determine to send the data packet to the second node; or, if the sequence number of the address of the first node is greater than the sequence number of the address of the other node; If the sequence number of the address of the first node is less than the sequence number of the addresses of the other nodes, it is determined to send the data packet to the second node.
  • node 600 can perform the corresponding operations performed by the first node in the foregoing method embodiments, and for brevity, details are not described herein again.
  • Fig. 7 is a schematic block diagram of a BLE device 700 according to an embodiment of the present application.
  • the BLE device 700 is the second node in the BLE MESH network
  • the MESH network includes multiple nodes
  • the second node includes:
  • the transceiver unit 710 is configured to receive a first switching instruction, where the first switching instruction is used to instruct each node in the MESH network to switch to the first transmission mode after a predetermined period of time, wherein the first transmission mode is only A mode of forwarding data packets from the first node to the second node in the MESH network;
  • the processing unit 720 is configured to switch to the first transmission mode after the predetermined period of time according to the first switching instruction
  • the transceiver unit 710 is further configured to receive a data packet sent by the first node through the MESH network.
  • the second node When the second node receives the first handover instruction from the first node, it enters the first transmission mode, that is, only receives data packets from the first node to the second node, and does not forward data packets between other nodes, so The transmission efficiency of data packets between the first node and the second node can be improved.
  • the first handover instruction includes the address of the first node and the address of the second node.
  • the predetermined duration is a preset duration after the moment when the first node sends the data packet, or is a preset duration after the moment when each node receives the data packet.
  • the transceiver unit 710 is specifically configured to: receive multiple sub-data packets formed based on the data packet sent by the first node through the MESH network.
  • the transceiver unit 710 is further configured to: receive a transmission start instruction sent by the first node through the MESH network, where the transmission start instruction includes at least one of the following information: the multiple sub-data packets The number of sub-data packets, the number of the multiple sub-data packets, and the total length of the multiple sub-data packets.
  • the processing unit 720 is further configured to: generate a response message, the response message including the number of the successfully received sub-data packet; the transceiver unit 710 is further configured to: send to the first node through the MESH network The reply message.
  • the processing unit 720 is specifically configured to generate one response message every time K sub-data packets are successfully received, and the response message includes the numbers of the K sub-data packets.
  • the transceiving unit 710 is further configured to receive a first indication message sent by the first node through the MESH network, where the first indication message is used to indicate that the multiple sub-data packets are sent.
  • the processing unit 720 is further configured to: according to the first indication message, determine whether the multiple sub-data packets are successfully received; the transceiver unit 710 is further configured to: if it is determined that the multiple sub-data packets are successfully received, pass the The MESH network sends a second indication message to the first node, where the second indication message is used to indicate that the multiple sub-data packets are successfully received.
  • the transceiver unit 710 is further configured to: receive a second switching instruction, where the second switching instruction is used to instruct each node in the MESH network to exit the first transmission mode; the processing unit 720 is further configured to: The second switching instruction exits the first transmission mode.
  • the transceiver unit 710 is further configured to: receive the first handover instruction from other nodes; the processing unit 720 is further configured to: according to the serial number of the address of the first node and the serial number of the address of the other node , Determining whether to switch to the first transmission mode according to the first switching instruction sent by the first node.
  • the processing unit 720 is specifically configured to: if the sequence number of the address of the first node is greater than the sequence number of the addresses of the other nodes, determine to switch to according to the first switching instruction sent by the first node The first transmission mode; or, if the sequence number of the address of the first node is less than the sequence number of the addresses of the other nodes, it is determined to switch to the first switching instruction sent by the first node The first transmission mode.
  • the BLE device 700 can perform the corresponding operations performed by the second node in the foregoing method embodiments, which are not repeated here for brevity.
  • FIG. 8 is a schematic block diagram of a BLE device 800 according to an embodiment of the present application.
  • the BLE device 800 is the third node in the BLE MESH network
  • the MESH network includes multiple nodes
  • the third node includes:
  • the transceiver unit 810 is configured to receive a first switching instruction, where the first switching instruction is used to instruct each node in the MESH network to switch to the first transmission mode after a predetermined period of time, wherein the first transmission mode is only A mode of forwarding data packets from the first node to the second node in the MESH network;
  • the processing unit 820 is configured to switch to the first transmission mode after the predetermined period of time according to the first switching instruction
  • the transceiver unit 810 is further configured to forward the data packet from the first node to the second node.
  • the third node When the third node receives the first switching instruction from the first node, it enters the first transmission mode, that is, only forwards data packets from the first node to the second node, and does not forward data packets between other nodes, so The transmission efficiency of data packets between the first node and the second node can be improved.
  • the first handover instruction includes the address of the first node and the address of the second node.
  • the predetermined duration is a preset duration after the moment when the first node sends the data packet, or is a preset duration after the moment when each node receives the data packet.
  • the transceiver unit 810 is further configured to: forward a transmission start instruction from the first node to the second node, where the transmission start instruction includes at least one of the following information: the multiple sub-data packets The number of sub-data packets, the number of the multiple sub-data packets, and the total length of the multiple sub-data packets.
  • the transceiving unit 810 is specifically configured to: forward multiple sub-data packets formed based on the data packet from the first node to the second node.
  • the transceiver unit 810 is further configured to: forward a response message from the second node to the first node, where the response message includes the number of the sub-data packet successfully received by the second node.
  • the transceiver unit 810 is further configured to: receive a second switching instruction, where the second switching instruction is used to instruct each node in the MESH network to exit the first transmission mode; the processing unit 820 is further configured to: The second switching instruction exits the first transmission mode.
  • the transceiver unit 810 is further configured to: receive the first switching instruction from other nodes; the processing unit 820 is further configured to: according to the serial number of the address of the first node and the serial number of the address of the other node , Determining whether to switch to the first transmission mode according to the first switching instruction sent by the first node.
  • the processing unit 820 is specifically configured to: if the sequence number of the address of the first node is greater than the sequence number of the addresses of the other nodes, the determination is based on the first switching instruction sent by the first node, Switch to the first transmission mode; or, if the sequence number of the address of the first node is less than the sequence number of the addresses of the other nodes, the node determines to switch according to the first switching instruction sent by the first node To the first transmission mode.
  • the BLE device 800 can perform the corresponding operations performed by the third node in the foregoing method embodiments, which are not repeated here for brevity.
  • FIG. 9 is a schematic structural diagram of a BLE chip 900 according to an embodiment of the present application.
  • the BLE chip 900 shown in FIG. 9 includes a processor 910, a memory 920, and a transceiver 930.
  • the processor 910 can call and run a computer program from the memory 920 to implement the method in the embodiment of the present application.
  • the processor 910 may control the transceiver 930 to communicate with other nodes. Specifically, it may send data to other nodes or receive information or data sent by other nodes.
  • the transceiver 930 includes an input interface 931 and an output interface 932.
  • the processor 910 may control the input interface 931 and the output interface 932 to communicate with other devices or BLE chips, thereby obtaining information or data sent by other devices or chips, or outputting information or data to other devices or chips.
  • the BLE chip 900 may specifically be the first node of the embodiment of the present application, and the BLE chip 900 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, details are not repeated here. .
  • the BLE chip 900 may specifically be the second node of the embodiment of the present application, and the BLE chip 900 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, details are not repeated here. .
  • the BLE chip 900 may specifically be the third node of the embodiment of the present application, and the BLE chip 900 may implement the corresponding processes implemented by the third node in the various methods of the embodiments of the present application. For the sake of brevity, details are not repeated here. .
  • the above-mentioned processor may be an integrated circuit chip with signal processing capability.
  • the steps of the foregoing method embodiments can be completed by hardware integrated logic circuits in the processor or instructions in the form of software.
  • the above-mentioned processor may be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (ASIC), a ready-made programmable gate array (Field Programmable Gate Array, FPGA) or other Programming logic devices, discrete gates or transistor logic devices, discrete hardware components.
  • DSP Digital Signal Processor
  • ASIC application specific integrated circuit
  • FPGA ready-made programmable gate array
  • the methods, steps, and logical block diagrams disclosed in the embodiments of the present application can be implemented or executed.
  • the general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.
  • the steps of the method disclosed in the embodiments of the present application can be directly embodied as being executed and completed by a hardware decoding processor, or executed and completed by a combination of hardware and software modules in the decoding processor.
  • the software module can be located in a mature storage medium in the field, such as random access memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, registers.
  • the storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
  • the aforementioned memory may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory.
  • the non-volatile memory can be read-only memory (Read-Only Memory, ROM), programmable read-only memory (Programmable ROM, PROM), erasable programmable read-only memory (Erasable PROM, EPROM), and electrically available Erase programmable read-only memory (Electrically EPROM, EEPROM) or flash memory.
  • the volatile memory may be random access memory (Random Access Memory, RAM), which is used as an external cache.
  • RAM static random access memory
  • DRAM dynamic random access memory
  • DRAM synchronous dynamic random access memory
  • DDR SDRAM Double Data Rate Synchronous Dynamic Random Access Memory
  • Enhanced SDRAM, ESDRAM Enhanced Synchronous Dynamic Random Access Memory
  • Synchronous Link Dynamic Random Access Memory Synchronous Link Dynamic Random Access Memory
  • DR RAM Direct Rambus RAM
  • the embodiment of the present application also provides a computer-readable storage medium for storing computer programs.
  • the computer-readable storage medium can be applied to the BLE device in the embodiment of the present application, and the computer program causes the computer to execute the corresponding process implemented by the first node, the second node, or the third node in each method of the embodiment of the present application, For the sake of brevity, I won't repeat it.
  • the embodiments of the present application also provide a computer program product, including computer program instructions.
  • the computer program product can be applied to the BLE device in the embodiment of the present application, and the computer program instructions cause the computer to execute the corresponding process implemented by the first node, the second node, or the third node in each method of the embodiment of the present application, in order to It's concise, so I won't repeat it here.
  • system and “network” in the embodiments of the present invention are often used interchangeably herein.
  • the term “and/or” in this article is only an association relationship describing the associated objects, which means that there can be three relationships, for example, A and/or B, which can mean: A alone exists, A and B exist at the same time, exist alone B these three situations.
  • the character "/" in this text generally indicates that the associated objects before and after are in an "or” relationship.
  • B corresponding (corresponding) to A means that B is associated with A, and B can be determined according to A.
  • determining B based on A does not mean that B is determined only based on A, and B can also be determined based on A and/or other information.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本申请提供一种数据传输的方法和BLE设备,能够提高MESH网络中节点之间的数据包传输效率。该方法应用于BLE的MESH网络中,该MESH网络中包括多个节点,该方法包括:该MESH网络中的第一节点发送第一切换指令,该第一切换指令用于指示该MESH网络中的各个节点在预定时长之后切换至第一传输模式,其中,第一传输模式为仅转发从第一节点至该MESH网络中的第二节点的数据包的模式;第一节点通过该MESH网络,向第二节点发送该数据包。

Description

数据传输的方法和BLE设备 技术领域
本申请实施例涉及信息技术领域,并且更具体地,涉及一种数据传输的方法和BLE设备。
背景技术
低功耗蓝牙(Bluetooth Low Energy,BLE)的MESH网络中包括大量节点,在进行数据传输时,该网络中的所有节点基于无条件转发的方式,转发接收到的数据包。当MESH网络中的节点之间有大量数据包需要传输时,这种方式的传输效率很低。
发明内容
本申请实施例提供一种数据传输的方法和BLE设备,能够提高MESH网络中节点之间的数据包传输效率。
第一方面,提供了一种数据传输的方法,所述方法应用于低功耗蓝牙BLE的MESH网络中,所述MESH网络中包括多个节点,所述方法包括:所述MESH网络中的第一节点发送第一切换指令,所述第一切换指令用于指示所述MESH网络中的各个节点在预定时长之后切换至第一传输模式,其中,所述第一传输模式为仅转发从所述第一节点至所述MESH网络中的第二节点的数据包的模式;所述第一节点通过所述MESH网络,向所述第二节点发送所述数据包。
在一种可能的实现方式中,所述预定时长为所述第一节点发送所述数据包的时刻之后的预设时长,或者为所述各个节点各自接收到所述数据包的时刻之后的预设时长。
在一种可能的实现方式中,所述第一切换指令中包括所述第一节点的地址和所述第二节点的地址。
在一种可能的实现方式中,所述第一节点通过所述MESH网络,向所述第二节点发送所述数据包,包括:所述第一节点对所述数据包进行拆分,形成多个子数据包;所述第一节点通过所述MESH网络,按照所述多个子数据包的编号,向所述第二节点循环发送所述多个子数据包。
在一种可能的实现方式中,所述方法还包括:所述第一节点通过所述MESH网络,向所述第二节点发送传输开始指令,所述传输开始指令中包括以下信息中的至少一种:所述多个子数据包的数量、所述多个子数据包的编号、所述多个子数据包的总长度。
在一种可能的实现方式中,所述方法还包括:所述第一节点通过所述MESH网络,接收所述第二节点发送的应答消息,所述应答消息中包括所述第二节点成功接收的子数据包的编号;其中,所述第一节点向所述第二节点循环发送所述多个子数据包,包括:所述第一节点根据所述应答消息,向所述第二节点循环发送未成功接收的子数据包。
在一种可能的实现方式中,所述第一节点根据所述应答消息,循环发送未成功接收的子数据包,包括:若未成功接收的子数据包的数量小于预设值,所述第一节点在一次循环中,发送多份所述未成功接收的子数据包;若未成功接收的子数据包的数量大于所述预设值,所述第一节点在一次循环中,仅发送一份所述未成功接收的子数据包。
在一种可能的实现方式中,所述方法还包括:所述第一节点根据所述应答消息,从发送队列中移除所述第二节点成功接收的子数据包。
在一种可能的实现方式中,所述方法还包括:若所述多个子数据包全部被移除,所述第一节点通过所述MESH网络,向所述第二节点发送第一指示消息,所述第一指示消息用于指示所述多个子数据包发送完成。
在一种可能的实现方式中,所述方法还包括:所述第一节点通过所述MESH网络,接收所述第二节点发送的第二指示消息,所述第二指示消息用于指示所述多个子数据包成功接收。
在一种可能的实现方式中,所述方法还包括:所述第一节点发送第二切换指令,所述第二切换指令用于指示所述MESH网络中的各个节点退出所述第一传输模式。
在一种可能的实现方式中,在所述第一节点通过所述MESH网络,向所述第二节点发送所述数据包之前,所述方法还包括:所述第一节点接收来自其他节点的所述第一切换指令;所述第一节点根据所述第一节点的地址的序号,以及所述其他节点的地址的序号,确定是否向所述第二节点发送所述数据包。
在一种可能的实现方式中,所述第一节点根据所述第一节点的地址的序 号,以及所述其他节点的地址的序号,确定是否向所述第二节点发送所述数据包,包括:若所述第一节点的地址的序号大于所述其他节点的地址的序号,则所述第一节点确定向所述第二节点发送所述数据包;或者,若所述第一节点的地址的序号小于所述其他节点的地址的序号,则所述第一节点确定向所述第二节点发送所述数据包。
第二方面,提供了一种数据传输的方法,所述方法应用于低功耗蓝牙BLE的MESH网络中,所述方法包括:所述MESH网络中的第二节点接收第一切换指令,所述第一切换指令用于指示所述MESH网络中的各个节点在预定时长之后切换至第一传输模式,其中,所述第一传输模式为仅转发从所述MESH网络中的第一节点至所述第二节点的数据包的模式;所述第二节点根据所述第一切换指令,在所述预定时长之后切换至所述第一传输模式;所述第二节点通过所述MESH网络,接收所述第一节点发送的数据包。
在一种可能的实现方式中,所述预定时长为所述第一节点发送所述数据包的时刻之后的预设时长,或者为所述各个节点各自接收到所述数据包的时刻之后的预设时长。
在一种可能的实现方式中,所述第一切换指令中包括所述第一节点的地址和所述第二节点的地址。
在一种可能的实现方式中,所述第二节点通过第三节点,接收所述第一节点发送的数据包,包括:所述第二节点通过所述MESH网络,接收所述第一节点发送的基于所述数据包形成的多个子数据包。
在一种可能的实现方式中,所述方法还包括:所述第二节点通过所述MESH网络,接收所述第一节点发送的传输开始指令,所述传输开始指令中包括以下信息中的至少一种:所述多个子数据包的数量、所述多个子数据包的编号、所述多个子数据包的总长度。
在一种可能的实现方式中,所述方法还包括:所述第二节点生成应答消息,所述应答消息中包括成功接收的子数据包的编号;所述第二节点通过所述MESH网络,向所述第一节点发送所述应答消息。
在一种可能的实现方式中,所述第二节点生成应答消息,包括:所述第二节点每成功接收K个子数据包时,生成一个所述应答消息,所述应答消息中包括所述K个子数据包的编号。
在一种可能的实现方式中,所述方法还包括:所述第二节点通过所述 MESH网络,接收所述第一节点发送的第一指示消息,所述第一指示消息用于指示所述多个子数据包发送完成。
在一种可能的实现方式中,所述方法还包括:所述第二节点根据所述第一指示消息,确定所述多个子数据包是否成功接收;若确定所述多个子数据包成功接收,所述第二节点通过所述MESH网络,向所述第一节点发送第二指示消息,所述第二指示消息用于指示所述多个子数据包成功接收。
在一种可能的实现方式中,所述方法还包括:所述第二节点接收第二切换指令,所述第二切换指令用于指示所述MESH网络中的各个节点退出所述第一传输模式;所述第二节点根据所述第二切换指令,退出所述第一传输模式。
在一种可能的实现方式中,在所述第二节点根据所述第一切换指令,在所述预定时长之后切换至所述第一传输模式之前,所述方法还包括:所述第二节点接收来自其他节点的所述第一切换指令;所述第二节点根据所述第一节点的地址的序号,以及所述其他节点的地址的序号,确定是否根据所述第一节点发送的所述第一切换指令,切换至所述第一传输模式。
在一种可能的实现方式中,所述第二节点根据所述第一节点的地址的序号,以及所述其他节点的地址的序号,确定是否根据所述第一节点发送的所述第一切换指令,切换至所述第一传输模式,包括:若所述第一节点的地址的序号大于所述其他节点的地址的序号,则所述第二节点确定根据所述第一节点发送的所述第一切换指令,切换至所述第一传输模式;或者,若所述第一节点的地址的序号小于所述其他节点的地址的序号,则所述第二节点确定根据所述第一节点发送的所述第一切换指令,切换至所述第一传输模式。
第三方面,提供了一种数据传输的方法,包括:所述方法应用于低功耗蓝牙BLE的MESH网络中,所述MESH网络中包括多个节点,所述方法包括:所述MESH网络中的第三节点接收第一切换指令,所述第一切换指令用于指示所述MESH网络中的各个节点在预定时长之后切换至第一传输模式,其中,所述第一传输模式为仅转发从所述MESH网络中的第一节点至第二节点的数据包的模式;所述第三节点根据所述第一切换指令,在所述预定时长之后切换至所述第一传输模式;所述第三节点转发从所述第一节点至所述第二节点的所述数据包。
在一种可能的实现方式中,所述预定时长为所述第一节点发送所述数据 包的时刻之后的预设时长,或者为所述各个节点各自接收到所述数据包的时刻之后的预设时长。
在一种可能的实现方式中,所述第一切换指令中包括所述第一节点的地址和所述第二节点的地址。
在一种可能的实现方式中,所述方法还包括:所述第三节点转发从所述第一节点至所述第二节点的传输开始指令,所述传输开始指令中包括以下信息中的至少一种:所述多个子数据包的数量、所述多个子数据包的编号、所述多个子数据包的总长度。
在一种可能的实现方式中,所述第三节点转发从所述第一节点至所述第二节点的所述数据包,包括:所述第三节点转发从所述第一节点至所述第二节点的基于所述数据包形成的多个子数据包。
在一种可能的实现方式中,所述方法还包括:所述第三节点转发从所述第二节点至所述第一节点的应答消息,所述应答消息中包括所述第二节点成功接收的子数据包的编号。
在一种可能的实现方式中,所述方法还包括:所述第三节点接收第二切换指令,所述第二切换指令用于指示所述MESH网络中的各个节点退出所述第一传输模式;所述第三节点根据所述第二切换指令,退出所述第一传输模式。
在一种可能的实现方式中,在所述第三节点根据所述第一切换指令,在所述预定时长之后切换至所述第一传输模式之前,所述方法还包括:所述第三节点接收来自其他节点的所述第一切换指令;所述第三节点根据所述第一节点的地址的序号,以及所述其他节点的地址的序号,确定是否根据所述第一节点发送的所述第一切换指令,切换至所述第一传输模式。
在一种可能的实现方式中,所述第三节点根据所述第一节点的地址的序号,以及所述其他节点的地址的序号,确定是否根据所述第一节点发送的所述第一切换指令,切换至所述第一传输模式,包括:若所述第一节点的地址的序号大于所述其他节点的地址的序号,则所述第三节点确定根据所述第一节点发送的所述第一切换指令,切换至所述第一传输模式;或者,若所述第一节点的地址的序号小于所述其他节点的地址的序号,则所述第三节点确定根据所述第一节点发送的所述第一切换指令,切换至所述第一传输模式。
第四方面,提供了一种BLE设备,包括用于执行第一方面或第一方面 的任意可能的实现方式中的方法的功能模块。
第五方面,提供了一种BLE设备,包括用于执行第二方面或第二方面的任意可能的实现方式中的方法的功能模块。
第六方面,提供了一种BLE设备,包括用于执行第三方面或第三方面的任意可能的实现方式中的方法的功能模块。
第七方面,提供了一种BLE芯片,所述BLE芯片包括处理器和存储器,所述存储器用于存储计算机程序,所述处理器用于调用并运行所述存储器中存储的计算机程序,以执行第一方面或第一方面的任意可能的实现方式中的方法。
第八方面,提供了一种BLE芯片,所述BLE芯片包括处理器和存储器,所述存储器用于存储计算机程序,所述处理器用于调用并运行所述存储器中存储的计算机程序,以执行第二方面或第二方面的任意可能的实现方式中的方法。
第九方面,提供了一种BLE芯片,所述BLE芯片包括处理器和存储器,所述存储器用于存储计算机程序,所述处理器用于调用并运行所述存储器中存储的计算机程序,以执行第三方面或第三方面的任意可能的实现方式中的方法。
第十方面,提供了一种计算机可读存储介质,所述计算机可读存储介质用于存储计算机程序。其中,当所述计算机程序被处理器执行时,使得所述处理器执行第一方面或第一方面的任意可能的实现方式中的方法。
第十一方面,提供了一种计算机可读存储介质,所述计算机可读存储介质用于存储计算机程序。其中,当所述计算机程序被处理器执行时,使得所述处理器执行第二方面或第二方面的任意可能的实现方式中的方法。
第十二方面,提供了一种计算机可读存储介质,所述计算机可读存储介质用于存储计算机程序。其中,当所述计算机程序被处理器执行时,使得所述处理器执行第三方面或第三方面的任意可能的实现方式中的方法。
第十三方面,提供了一种计算机程序产品,包括计算机程序指令,该计算机程序指令使得计算机执行上述第一方面或第一方面的任意可能的实现方式中的方法。
第十四方面,提供了一种计算机程序产品,包括计算机程序指令,该计算机程序指令使得计算机执行上述第二方面或第二方面的任意可能的实现 方式中的方法。
第十五方面,提供了一种计算机程序产品,包括计算机程序指令,该计算机程序指令使得计算机执行上述第三方面或第三方面的任意可能的实现方式中的方法。
基于上述技术方案,当MESH网络中的第一节点需要向第二节点发送大量数据包时,通过发送切换指令使网络中的各个节点进入第一传输模式,即仅转发从第一节点至第二节点的数据包,从而可以提高节点之间的数据包的传输效率。
附图说明
图1是MESH网络的示意图。
图2是本申请一个实施例的数据传输的方法的流程交互图。
图3是本申请另一实施例的数据传输的方法的流程交互图。
图4是本申请另一实施例的数据传输的方法的流程交互图。
图5是本申请另一实施例的数据传输的方法的流程交互图。
图6至图8是本申请实施例的BLE设备的示意性框图。
图9是本申请实施例的BLE芯片的示意性结构图。
具体实施方式
下面将结合附图,对本申请中的技术方案进行描述。
为了更清楚地理解本申请实施例的方案,下面首先对MESH网络进行简单描述。
图1是一种可能的MESH网络的示意图。该MESH网络中包括多个设备,每个设备可以称为一个节点(node)。每个节点都可以进行数据传输。数据包可以在各个节点之间被中继,从而使该数据包传输至距离更远的位置。在实际应用中,这些节点可以被分布在制造工厂、办公楼、购物中心、商业园区、家庭以及其他环境中。该MESH网络中可以包括任意数量的节点,图1中仅以节点A至节点G为例。在MESH网络中,数据包基于广播(advertising)的方式进行传输。每个节点接收另一节点发送的数据包后,对该数据包进行无条件转发,从而将该数据包转发给附近其他节点。
例如,从节点A至节点B的数据包可以经过至少一次中继。其中,节 点C接收到节点A发送的数据包后,可以将该数据包转发给节点D和节点G;节点D接收到该数据包后,可以将该数据包分别转发给节点G和节点B;节点G接收到该数据包后,可以将该数据包转发给节点B、节点E和节点F。由于是基于advertising的方式进行数据包传输,数据传输不可靠,因此,节点A向节点B发送该数据包时,可以多次重复发送该数据包,以确保数据包成功接收。
节点A需要向节点B发送大量数据包时,上述用于中继的节点在收到这些数据包时,均对这些数据包进行无条件转发,这就使得数据包的传输效率很低。并且,由于所有数据包都要重复发送,也造成了带宽浪费。
为此,本申请实施例提供了一种用于MESH网络中的数据传输方案,能够提高节点之间的数据传输效率,尤其适用于两个节点之间存在大量数据包需要传输的情况。
图2是本申请实施例的数据传输的方法的流程交互图。图2中所示的方法200可以由第一节点、第二节点、以及第三节点执行。该方法应用于BLE的MESH网络中,该MESH网络中可以包括多个节点。其中,针对从第一节点至第二节点的数据传输而言,该第一节点也可以称为源节点,第二节点也可以称为目标节点,第三节点也可以称为中继节点。在其他情况下,第一节点、第二节点和第三节点的身份也可以互换。也即,其中任意一个节点能够执行的方法,另外两个节点也能够执行。本申请实施例中仅以第一节点为源节点、第二节点为目标节点、第三节点为中继节点为例进行描述。图2中仅以一个中继节点,即第三节点为例进行描述,该MESH网络中的其他中继节点的相关操作可以参考第三节点。如图2所示,该方法200可以包括以下步骤中的部分或全部。
在210中,第一节点发送第一切换指令。
其中,该第一切换指令用于指示MESH网络中的各个节点在预定时长之后切换至第一传输模式。
该第一传输模式为仅转发从第一节点至该MESH网络中的第二节点的数据包的模式。
该预定时长可以是第一节点发送该数据包的时刻之后的预设时长。例如,该第一切换指令中可以携带第一节点发送该数据包的时刻T1,MESH网络中的各个节点接收到第一切换指令后,在时刻T1之后的预定时长结束时, 进入第一传输模式。
或者,该预定时长可以是各个节点各自接收到该数据包的时刻之后的预设时长。例如,第三节点在接收到第一切换指令的时刻T2之后的预定时长结束时,进入第一传输模式。
该第一切换指令中例如可以包括第一节点的地址和第二节点的地址,从而使接收到第一切换指令的各个节点停止转发除第一节点和第二节点之外的节点之间的数据包。
其中,该第一节点的地址为该第一切换指令的源地址,第二节点的地址可以承载于第一切换指令的有效载荷(payload)字段。第一切换指令的目标地址可以是MESH网络中接收该第一切换指令的各个节点所组成的组的组地址。
在220中,第三节点接收第一切换指令,并根据该第一切换指令,在该预定时长之后切换至第一传输模式。
在230中,第二节点接收第一节点发送的第一切换指令,并根据该第一切换指令,在该预定时长之后切换至第一传输模式。
MESH网络中的各个节点接收到第一切换指令后,在预设时长内可以继续转发数据包,以将空中数据包传输完成。但是这些节点不会再将新数据包发出来,而是将这些数据包缓存在本地,等退出第一传输模式后再发出来。在该预设时长结束后,各个节点进入第一传输模式。
当然,也可以不设置该预设时长,第一切换指令指示MESH网络中的各个节点切换至第一传输模式。MESH网络中的各个节点接收到第一切换指令后,将待发送的数据包和待转发的数据包均缓存至本地,并立即切换至第一传输模式,等退出第一传输模式后再将这些数据包发出来。
在240中,第一节点通过MESH网络,向第二节点发送数据包。
在250中,第三节点转发从第一节点至第二节点的该数据包。
在260中,第二节点通过MESH网络,接收第一节点发送的该数据包。
该实施例中,当MESH网络中的第一节点和第二节点之间存在大量数据包需要传输时,第一节点可以在MESH网络中发送第一切换指令,以指示各个节点进入第一传输模式,从而使各个节点仅转发从第一节点至第二节点的数据包,而暂停其他数据包的传输。这样,通过临时控制MESH网络中的某些数据包优先传输,从而提高节点之间的数据传输效率和传输质量。
另外,如果第一节点和第二节点之间存在重要数据包或者紧急数据包时,也可以采用上述方式进行传输,以使这些高优先级数据包尽快达到目标节点。
进一步地,可选地,在数据包被目标节点成功接收后,第一节点还可以发送第二切换指令。其中,该第二切换指令用于指示该MESH网络中的各个节点退出该第一传输模式。
相应地,其他节点例如第三节点和第二节点,在接收到该第二切换指令后,会根据该第二切换指令,退出该第一传输模式。之后,MESH网络中的各个节点可以恢复至无条件转发所有数据包的模式。
可以看出,本申请实施例中,当有节点之间有大量数据包需要传输时,通过调用全网资源优先传输这些数据包,从而缓解网络中的拥挤,提高节点之间的数据传输效率和传输质量。
MESH网络中的每个节点都可以根据自己的需求,发送第一切换指令以指示其他节点进行传输模式的切换,从而仅转发该每个节点发送的数据包至其期望的目标节点。这时,第一节点在发送第一切换指令后,还可能接收到来自其他节点的第一切换指令。第二节点和第三节点在接收到第一节点发送的第一切换指令的同时,也可能接收到来自其他节点发送的第一切换指令。
如果一个节点同时收到了多个第一切换指令,则该节点需要在接收到的多个第一切换指令中,确定哪个节点发送的第一切换指令是有效的,而忽略其他节点的第一切换指令,否则会引起冲突。例如,该节点可以根据第一切换指令的源节点的地址的序号大小,确定哪个第一切换指令是有效的;或者,该节点也可以根据待传输的大量数据包的目标地址的序号大小,确定哪个第一切换指令是有效的。
具体地,第一节点可以根据第一节点的地址的序号,以及其他节点的地址的序号,确定是否向第二节点发送该数据包,并在确定向第二节点发送该数据包时,执行240。例如,若第一节点的地址的序号大于其他节点的地址的序号,则第一节点确定向第二节点发送该数据包;或者,若第一节点的地址的序号小于其他节点的地址的序号,则第一节点确定向第二节点发送该数据包。
第二节点和第三节点可以根据第一节点的地址的序号,以及其他节点的地址的序号,确定根据哪个节点发送的第一切换指令进行传输模式的切换。如果第二节点和第三节点确定根据第一节点发送的第一切换指令切换至第 一传输模式,则分别执行230和240。例如,若第一节点的地址的序号大于其他节点的地址的序号,则第二节点和第三节点确定根据该第一切换指令切换至该第一传输模式;或者,若第一节点的地址的序号小于其他节点的地址的序号,则第二节点和第三节点确定根据该第一切换指令切换至该第一传输模式。
以节点A、节点C和节点D为例,节点A、节点C和节点D当前都有大量数据包待发送,因此节点A、节点C和节点D均发送了各自的第一切换指令。其中,节点A、节点C和节点D的地址的序号依次由小至大。假设约定地址序号最小的节点发送的第一切换指令是有效的。节点A发送的第一切换指令指示各个节点仅转发节点A至节点B的数据包。则MESH网络中的其他节点接收节点A、节点C和节点D发送的第一切换指令后,根据节点A发送的第一切换指令进行传输模式的切换,从而仅转发节点A至节点B的数据包。
这时,由于节点C和节点D也可以接收到节点A发送的第一切换指令,并且发现节点A的地址的序号小于自己的序号,因此节点C和节点D仅转发节点A至节点B的数据包,并在节点A至节点B的数据包传输完成后,再尝试发送自己的第一切换指令。
可选地,如图3所示,步骤240可以包括步骤241和步骤242。这时,步骤250可以由步骤251替代,且步骤260可以由步骤261替代。
在241中,第一节点对该数据包进行拆分,形成多个子数据包。
其中,该多个子数据包可以具有各自的编号,或称为序列号(Sequence Number,SN)。例如,第一节点对多个子数据包进行编号,该多个子数据包分别具有编号1、编号2、……、编号N。
在该多个子数据包中,各个子数据包的长度可以相同,例如长度都为最大传输单元(Maximum Transmission Unit,MTU)-2;或者,这些子数据包的长度也可以不完全相同,这里不做限定。
在242中,第一节点通过该MESH网络,按照该多个子数据包的编号,向第二节点循环发送该多个子数据包。
例如,在每次循环中,依次发送编号1、编号2、……、编号N的子数据包。
在251中,第三节点转发基于该数据包形成的多个子数据包。
在261中,第二节点通过该MESH网络,接收第一节点发送的该多个子数据包。
可选地,在242之前,第一节点还可以通过该MESH网络,向第二节点发送传输开始指令。该传输开始指令中例如包括以下信息中的至少一种:多个子数据包的数量、多个子数据包的编号、以及多个子数据包的总长度。
第二节点通过该MESH网络,接收第一节点发送的该传输开始指令。并从该传输开始指令中获取数据信息,并准备接收数据。
可选地,如图4所示,该方法还可以包括步骤271至步骤275。
在271中,第二节点生成应答消息。
其中,该应答消息中包括第二节点成功接收的子数据包的编号。
在272中,第二节点通过该MESH网络,向第一节点发送该应答消息。
在273中,第三节点转发从第二节点至第一节点的该应答消息。
在274中,第一节点通过该MESH网络,接收第二节点发送的应答消息。
这时,可选地,在242中,第一节点可以根据接收到的该应答消息,通过该MESH网络,向第二节点循环发送未成功接收的子数据包。
例如,若未成功接收的子数据包的数量小于预设值,第一节点在一次循环中,发送多份未成功接收的子数据包;和/或,若未成功接收的子数据包的数量大于该预设值,第一节点在一次循环中,仅发送一份未成功接收的子数据包。
第一节点是按照子数据包的编号循环发送子数据包的,而在一次循环中,第一节点可以根据发送队列中的子数据包的数量,针对每个编号的子数据包,仅发送一份该编号的子数据包或者重复多份该编号的子数据包。该多份的具体数量可以预先配置。
例如,假设第二节点还未接收到的子数据包的编号为6至8。如果第一节点在一次循环中,针对每个编号的子数据包,仅发送1份该编号的子数据包,则第一节点的发送队列为:数据包6、数据包7、数据包8、数据包6、数据包7、数据包8、……。如果第一节点在一次循环中,针对每个编号的子数据包,发送2份该编号的子数据包,则第一节点的发送队列为:数据包6、数据包6、数据包7、数据包7、数据包8、数据包8、数据包6、数据包6、数据包7、数据包7、……。
第一节点可以根据发送队列中的子数据包的数量,确定仅发送一份子数 据包还是重复多份子数据包,而不需要每次都将数据包都重复多份。在发送队列中不同编号的子数据包较多时,为了使每个子数据包不用等太久才进入下一次循环,则每个编号的子数据包仅发送一份;发送队列中不同编号的子数据包较少时,由于一次循环很短,每个数据包很快就能进入下一次循环,因此恢复为采用重复多份发送的方式。这样能够减少空中重复包的数量,在一定程度上避免带宽浪费,提高各个子数据包的传输效率。
在图4中,第二节点在接收到子数据包后,需要向第一节点发送应答消息,以表示自己已经成功接收到该子数据包。第二节点可以针对每个子数据包分别进行应答,但是这样会导致存在大量的空中包,影响了网络中的数据传输效率。
因此,可选地,在271中,第二节点每成功接收K个子数据包时,可以生成一个该应答消息。该应答消息中包括这K个子数据包的编号。K可以是预配置的数值。
该K个子数据包的编号可以连续也可以不连续。
例如,第一节点循环发送编号1至编号N的子数据包,如果第二节点成功接收到编号1至编号K的子数据包,则生成一个应答消息,并在该应答消息中携带编号1至编号K。
通过采用图3所示的拆分数据包的传输方式,以及图4所示的“多发一应答”的应答机制,能够减少空中的应答包的数量,从而进一步提高节点之间的数据传输效率,并且可以降低设备功耗。
在进行应答时,第二节点每接收K个子数据包,就将这K个子数据包的编号携带在一个应答消息中,发送给第一节点。第二节点可以根据子数据包的总数量以及自己接收到的子数据包的数量,计算出还未接收到的子数据包的数量。当剩余的未接收到的子数据包的数量不足K个时,可以针对这些子数据包单独进行应答或者对剩余子数据包一起进行应答。
可选地,该方法还包括:第一节点根据该应答消息,从发送队列中移除第二节点成功接收的子数据包。
例如图5所示,虚线框表示被移除的子数据包。第一节点对待发送数据包进行拆分,形成N个子数据包;第一节点收到携带编号1至编号K的应答消息后,从发送队列中移除编号1至编号K的子数据包;第一节点收到携带编号N-1的应答消息后,从队列中移除编号N-1的子数据包;继续接收其 他应答消息,直至发送队列中的子数据包全部被移除,表明自己发送的子数据包都已经发送。
若该多个子数据包全部被移除,第一节点可以通过该MESH网络,向第二节点发送第一指示消息。其中,该第一指示消息用于指示该多个子数据包发送完成。
相应地,第二节点接收第一节点发送的第一指示消息。
之后,第二节点可以根据该第一指示消息,确定该多个子数据包是否成功接收;若确定该多个子数据包成功接收,第二节点通过该MESH网络,向第一节点发送第二指示消息。其中,该第二指示消息用于指示该多个子数据包成功接收。
该实施例中,通过第一指示消息和第二指示消息,实现第一节点和第二节点之间的双向验证,可以进一步提高两个节点之间的数据包传输的可靠性。
第一指示消息中例如可以包括以下信息中的至少一种:该多个子数据包的数量、该多个子数据包的编号、该多个子数据包的总长度。第二节点可以根据这些信息,对其接收到的子数据包进行验证,若验证成功,则回复第二指示消息。
在本申请实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
并且,在不冲突的前提下,本申请描述的各个实施例和/或各个实施例中的技术特征可以任意的相互组合,组合之后得到的技术方案也应落入本申请的保护范围。
上文中详细描述了根据本申请实施例的数据传输的方法,下面将结合图6至图9,描述根据本申请实施例的装置,方法实施例所描述的技术特征适用于以下装置实施例。
图6是根据本申请实施例的BLE设备600的示意性框图。如图6所示,BLE设备600为BLE的MESH网络中的第一节点,所述MESH网络中包括多个节点,所述第一节点包括:
收发单元610,用于发送第一切换指令,所述第一切换指令用于指示所述MESH网络中的各个节点在预定时长之后切换至第一传输模式,其中,所述第一传输模式为仅转发从所述第一节点至所述MESH网络中的第二节点 的数据包的模式;
收发单元610还用于,通过所述MESH网络,向所述第二节点发送所述数据包。
当MESH网络中的第一节点需要向第二节点发送大量数据包时,通过发送切换指令使网络中的各个节点进入第一传输模式,即仅转发从第一节点至第二节点的数据包,因此可以提高第一节点和第二节点之间的数据包的传输效率。
可选地,所述第一切换指令中包括所述第一节点的地址和所述第二节点的地址。
可选地,所述预定时长为所述第一节点发送所述数据包的时刻之后的预设时长,或者为所述各个节点各自接收到所述数据包的时刻之后的预设时长。
可选地,节点600还包括:处理单元620,用于对所述数据包进行拆分,形成多个子数据包;其中,收发单元610具体用于:通过所述MESH网络,按照所述多个子数据包的编号,向所述第二节点循环发送所述多个子数据包。
可选地,收发单元610还用于:通过所述MESH网络,向所述第二节点发送传输开始指令,所述传输开始指令中包括以下信息中的至少一种:所述多个子数据包的数量、所述多个子数据包的编号、所述多个子数据包的总长度。
可选地,收发单元610具体用于:通过所述MESH网络,接收所述第二节点发送的应答消息,所述应答消息中包括所述第二节点成功接收的子数据包的编号;根据所述应答消息,循环发送未成功接收的子数据包。
可选地,收发单元610具体用于:若未成功接收的子数据包的数量小于预设值,在一次循环中,发送多份所述未成功接收的子数据包;若未成功接收的子数据包的数量大于所述预设值,在一次循环中,仅发送一份所述未成功接收的子数据包。
可选地,处理单元620还用于:根据所述应答消息,从发送队列中移除所述第二节点成功接收的子数据包。
可选地,收发单元610还用于:若所述多个子数据包全部被移除,通过所述MESH网络,向所述第二节点发送第一指示消息,所述第一指示消息用于指示所述多个子数据包发送完成。
可选地,收发单元610还用于:通过所述MESH网络,接收所述第二节 点发送的第二指示消息,所述第二指示消息用于指示所述多个子数据包成功接收。
可选地,收发单元610还用于:发送第二切换指令,所述第二切换指令用于指示所述MESH网络中的各个节点退出所述第一传输模式。
可选地,收发单元610还用于:接收来自其他节点的所述第一切换指令;处理单元620还用于:根据所述第一节点的地址的序号,以及所述其他节点的地址的序号,确定是否向所述第二节点发送所述数据包。
可选地,处理单元620具体用于:若所述第一节点的地址的序号大于所述其他节点的地址的序号,则确定向所述第二节点发送所述数据包;或者,若所述第一节点的地址的序号小于所述其他节点的地址的序号,则确定向所述第二节点发送所述数据包。
应理解,节点600可以执行上述方法实施例中由第一节点执行的相应操作,为了简洁,在此不再赘述。
图7是根据本申请实施例的BLE设备700的示意性框图。如图7所示,BLE设备700为BLE的MESH网络中的第二节点,所述MESH网络中包括多个节点,所述第二节点包括:
收发单元710,用于接收第一切换指令,所述第一切换指令用于指示所述MESH网络中的各个节点在预定时长之后切换至第一传输模式,其中,所述第一传输模式为仅转发从所述MESH网络中的第一节点至所述第二节点的数据包的模式;
处理单元720,用于根据所述第一切换指令,在所述预定时长之后切换至所述第一传输模式;
收发单元710还用于,通过所述MESH网络,接收所述第一节点发送的数据包。
当第二节点接收到来自第一节点的第一切换指令时,进入第一传输模式,即仅接收从第一节点至第二节点的数据包,而不转发其他节点之间的数据包,因此可以提高第一节点和第二节点之间的数据包的传输效率。
可选地,所述第一切换指令中包括所述第一节点的地址和所述第二节点的地址。
可选地,所述预定时长为所述第一节点发送所述数据包的时刻之后的预设时长,或者为所述各个节点各自接收到所述数据包的时刻之后的预设时长。
可选地,收发单元710具体用于:通过所述MESH网络,接收所述第一节点发送的基于所述数据包形成的多个子数据包。
可选地,收发单元710还用于:通过所述MESH网络,接收所述第一节点发送的传输开始指令,所述传输开始指令中包括以下信息中的至少一种:所述多个子数据包的数量、所述多个子数据包的编号、所述多个子数据包的总长度。
可选地,处理单元720还用于:生成应答消息,所述应答消息中包括成功接收的子数据包的编号;收发单元710还用于:通过所述MESH网络,向所述第一节点发送所述应答消息。
可选地,处理单元720具体用于:每成功接收K个子数据包时,生成一个所述应答消息,所述应答消息中包括所述K个子数据包的编号。
可选地,收发单元710还用于:通过所述MESH网络,接收所述第一节点发送的第一指示消息,所述第一指示消息用于指示所述多个子数据包发送完成。
可选地,处理单元720还用于:根据所述第一指示消息,确定所述多个子数据包是否成功接收;收发单元710还用于:若确定所述多个子数据包成功接收,通过所述MESH网络,向所述第一节点发送第二指示消息,所述第二指示消息用于指示所述多个子数据包成功接收。
可选地,收发单元710还用于:接收第二切换指令,所述第二切换指令用于指示所述MESH网络中的各个节点退出所述第一传输模式;处理单元720还用于:根据所述第二切换指令,退出所述第一传输模式。
可选地,收发单元710还用于:接收来自其他节点的所述第一切换指令;处理单元720还用于:根据所述第一节点的地址的序号,以及所述其他节点的地址的序号,确定是否根据所述第一节点发送的所述第一切换指令,切换至所述第一传输模式。
可选地,处理单元720具体用于:若所述第一节点的地址的序号大于所述其他节点的地址的序号,则确定根据所述第一节点发送的所述第一切换指令,切换至所述第一传输模式;或者,若所述第一节点的地址的序号小于所述其他节点的地址的序号,则确定根据所述第一节点发送的所述第一切换指令,切换至所述第一传输模式。
应理解,BLE设备700可以执行上述方法实施例中由第二节点执行的相 应操作,为了简洁,在此不再赘述。
图8是根据本申请实施例的BLE设备800的示意性框图。如图8所示,BLE设备800为BLE的MESH网络中的第三节点,所述MESH网络中包括多个节点,所述第三节点包括:
收发单元810,用于接收第一切换指令,所述第一切换指令用于指示所述MESH网络中的各个节点在预定时长之后切换至第一传输模式,其中,所述第一传输模式为仅转发从所述MESH网络中的第一节点至第二节点的数据包的模式;
处理单元820,用于根据所述第一切换指令,在所述预定时长之后切换至所述第一传输模式;
收发单元810还用于,转发从所述第一节点至所述第二节点的所述数据包。
当第三节点接收到来自第一节点的第一切换指令时,进入第一传输模式,即仅转发从第一节点至第二节点的数据包,而不转发其他节点之间的数据包,因此可以提高第一节点和第二节点之间的数据包的传输效率。
可选地,所述第一切换指令中包括所述第一节点的地址和所述第二节点的地址。
可选地,所述预定时长为所述第一节点发送所述数据包的时刻之后的预设时长,或者为所述各个节点各自接收到所述数据包的时刻之后的预设时长。
可选地,收发单元810还用于:转发从所述第一节点至所述第二节点的传输开始指令,所述传输开始指令中包括以下信息中的至少一种:所述多个子数据包的数量、所述多个子数据包的编号、所述多个子数据包的总长度。
可选地,收发单元810具体用于:转发从所述第一节点至所述第二节点的基于所述数据包形成的多个子数据包。
可选地,收发单元810还用于:转发从所述第二节点至所述第一节点的应答消息,所述应答消息中包括所述第二节点成功接收的子数据包的编号。
可选地,收发单元810还用于:接收第二切换指令,所述第二切换指令用于指示所述MESH网络中的各个节点退出所述第一传输模式;处理单元820还用于:根据所述第二切换指令,退出所述第一传输模式。
可选地,收发单元810还用于:接收来自其他节点的所述第一切换指令;处理单元820还用于:根据所述第一节点的地址的序号,以及所述其他节点 的地址的序号,确定是否根据所述第一节点发送的所述第一切换指令,切换至所述第一传输模式。
可选地,处理单元820具体用于:若所述第一节点的地址的序号大于所述其他节点的地址的序号,则所述确定根据所述第一节点发送的所述第一切换指令,切换至所述第一传输模式;或者,若所述第一节点的地址的序号小于所述其他节点的地址的序号,则节点确定根据所述第一节点发送的所述第一切换指令,切换至所述第一传输模式。
应理解,BLE设备800可以执行上述方法实施例中由第三节点执行的相应操作,为了简洁,在此不再赘述。
图9是本申请实施例的一种BLE芯片900的示意性结构图。图9所示的BLE芯片900包括处理器910、存储器920、以及收发器930。
其中,处理器910可以从存储器920中调用并运行计算机程序,以实现本申请实施例中的方法。处理器910可以控制收发器930与其他节点之间进行通信,具体地,可以向其他节点发送数据,或接收其他节点发送的信息或数据。
收发器930包括输入接口931和输出接口932。处理器910可以控制输入接口931和输出接口932与其他设备或BLE芯片之间进行通信,从而获取其他设备或芯片发送的信息或数据,或者向其他设备或芯片输出信息或数据。
可选地,BLE芯片900具体可为本申请实施例的第一节点,并且BLE芯片900可以实现本申请实施例的各个方法中由第一节点实现的相应流程,为了简洁,在此不再赘述。
可选地,BLE芯片900具体可为本申请实施例的第二节点,并且BLE芯片900可以实现本申请实施例的各个方法中由第二节点实现的相应流程,为了简洁,在此不再赘述。
可选地,BLE芯片900具体可为本申请实施例的第三节点,并且BLE芯片900可以实现本申请实施例的各个方法中由第三节点实现的相应流程,为了简洁,在此不再赘述。
上述的处理器可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法实施例的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器可以是通用处理器、数字信号处理 器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法的步骤。
上述的存储器可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DR RAM)。
本申请实施例还提供了一种计算机可读存储介质,用于存储计算机程序。该计算机可读存储介质可应用于本申请实施例中的BLE设备,并且该计算机程序使得计算机执行本申请实施例的各个方法中由第一节点、第二节点或者第三节点实现的相应流程,为了简洁,不再赘述。
本申请实施例还提供了一种计算机程序产品,包括计算机程序指令。该计算机程序产品可应用于本申请实施例中的BLE设备,并且该计算机程序指令使得计算机执行本申请实施例的各个方法中由第一节点、第二节点或者第三节点实现的相应流程,为了简洁,在此不再赘述。
本发明实施例中的术语“***”和“网络”在本文中常被可互换使用。本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。
在本发明实施例中,“与A相应(对应)的B”表示B与A相关联,根据A可以确定B。但还应理解,根据A确定B并不意味着仅仅根据A确定B,还可以根据A和/或其它信息确定B。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
本申请实施例中的具体的例子只是为了帮助本领域技术人员更好地理解本申请实施例,而非限制本申请实施例的范围,本领域技术人员可以在上述实施例的基础上进行各种改进和变形,而这些改进或者变形均落在本申请的保护范围内。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (74)

  1. 一种数据传输的方法,其特征在于,所述方法应用于低功耗蓝牙BLE的MESH网络中,所述MESH网络中包括多个节点,所述方法包括:
    所述MESH网络中的第一节点发送第一切换指令,所述第一切换指令用于指示所述MESH网络中的各个节点在预定时长之后切换至第一传输模式,其中,所述第一传输模式为仅转发从所述第一节点至所述MESH网络中的第二节点的数据包的模式;
    所述第一节点通过所述MESH网络,向所述第二节点发送所述数据包。
  2. 根据权利要求1所述的方法,其特征在于,所述第一切换指令中包括所述第一节点的地址和所述第二节点的地址。
  3. 根据权利要求1或2所述的方法,其特征在于,所述预定时长为所述第一节点发送所述数据包的时刻之后的预设时长,或者为所述各个节点各自接收到所述数据包的时刻之后的预设时长。
  4. 根据权利要求1至3中任一项所述的方法,其特征在于,所述第一节点通过所述MESH网络,向所述第二节点发送所述数据包,包括:
    所述第一节点对所述数据包进行拆分,形成多个子数据包;
    所述第一节点通过所述MESH网络,按照所述多个子数据包的编号,向所述第二节点循环发送所述多个子数据包。
  5. 根据权利要求4所述的方法,其特征在于,在所述第一节点通过所述MESH网络,向所述第二节点发送所述数据包之前,所述方法还包括:
    所述第一节点通过所述MESH网络,向所述第二节点发送传输开始指令,所述传输开始指令中包括以下信息中的至少一种:所述多个子数据包的数量、所述多个子数据包的编号、所述多个子数据包的总长度。
  6. 根据权利要求4或5所述的方法,其特征在于,所述方法还包括:
    所述第一节点通过所述MESH网络,接收所述第二节点发送的应答消息,所述应答消息中包括所述第二节点成功接收的子数据包的编号;
    其中,所述第一节点向所述第二节点循环发送所述多个子数据包,包括:
    所述第一节点根据所述应答消息,向所述第二节点循环发送未成功接收的子数据包。
  7. 根据权利要求6所述的方法,其特征在于,所述第一节点根据所述应答消息,循环发送未成功接收的子数据包,包括:
    若未成功接收的子数据包的数量小于预设值,所述第一节点在一次循环中,发送多份所述未成功接收的子数据包;
    若未成功接收的子数据包的数量大于所述预设值,所述第一节点在一次循环中,仅发送一份所述未成功接收的子数据包。
  8. 根据权利要求6或7所述的方法,其特征在于,所述方法还包括:
    所述第一节点根据所述应答消息,从发送队列中移除所述第二节点成功接收的子数据包。
  9. 根据权利要求8所述的方法,其特征在于,所述方法还包括:
    若所述多个子数据包全部被移除,所述第一节点通过所述MESH网络,向所述第二节点发送第一指示消息,所述第一指示消息用于指示所述多个子数据包发送完成。
  10. 根据权利要求9所述的方法,其特征在于,所述方法还包括:
    所述第一节点通过所述MESH网络,接收所述第二节点发送的第二指示消息,所述第二指示消息用于指示所述多个子数据包成功接收。
  11. 根据权利要求1至10中任一项所述的方法,其特征在于,所述方法还包括:
    所述第一节点发送第二切换指令,所述第二切换指令用于指示所述MESH网络中的各个节点退出所述第一传输模式。
  12. 根据权利要求1至11中任一项所述的方法,其特征在于,在所述第一节点通过所述MESH网络,向所述第二节点发送所述数据包之前,所述方法还包括:
    所述第一节点接收来自其他节点的所述第一切换指令;
    所述第一节点根据所述第一节点的地址的序号,以及所述其他节点的地址的序号,确定是否向所述第二节点发送所述数据包。
  13. 根据权利要求12所述的方法,其特征在于,所述第一节点根据所述第一节点的地址的序号,以及所述其他节点的地址的序号,确定是否向所述第二节点发送所述数据包,包括:
    若所述第一节点的地址的序号大于所述其他节点的地址的序号,则所述第一节点确定向所述第二节点发送所述数据包;或者,
    若所述第一节点的地址的序号小于所述其他节点的地址的序号,则所述第一节点确定向所述第二节点发送所述数据包。
  14. 一种数据传输的方法,其特征在于,所述方法应用于低功耗蓝牙BLE的MESH网络中,所述MESH网络中包括多个节点,所述方法包括:
    所述MESH网络中的第二节点接收第一切换指令,所述第一切换指令用于指示所述MESH网络中的各个节点在预定时长之后切换至第一传输模式,其中,所述第一传输模式为仅转发从所述MESH网络中的第一节点至所述第二节点的数据包的模式;
    所述第二节点根据所述第一切换指令,在所述预定时长之后切换至所述第一传输模式;
    所述第二节点通过所述MESH网络,接收所述第一节点发送的数据包。
  15. 根据权利要求14所述的方法,其特征在于,所述第一切换指令中包括所述第一节点的地址和所述第二节点的地址。
  16. 根据权利要求14或15所述的方法,其特征在于,所述预定时长为所述第一节点发送所述数据包的时刻之后的预设时长,或者为所述各个节点各自接收到所述数据包的时刻之后的预设时长。
  17. 根据权利要求14至16中任一项所述的方法,其特征在于,所述第二节点通过所述MESH网络,接收所述第一节点发送的数据包,包括:
    所述第二节点通过所述MESH网络,接收所述第一节点发送的基于所述数据包形成的多个子数据包。
  18. 根据权利要求17所述的方法,其特征在于,在所述第二节点通过所述MESH网络,接收所述第一节点发送的数据包之前,所述方法还包括:
    所述第二节点通过所述MESH网络,接收所述第一节点发送的传输开始指令,所述传输开始指令中包括以下信息中的至少一种:所述多个子数据包的数量、所述多个子数据包的编号、所述多个子数据包的总长度。
  19. 根据权利要求17或18所述的方法,其特征在于,所述方法还包括:
    所述第二节点生成应答消息,所述应答消息中包括成功接收的子数据包的编号;
    所述第二节点通过所述MESH网络,向所述第一节点发送所述应答消息。
  20. 根据权利要求19所述的方法,其特征在于,所述第二节点生成应答消息,包括:
    所述第二节点每成功接收K个子数据包时,生成一个所述应答消息,所述应答消息中包括所述K个子数据包的编号,K为大于1的正整数。
  21. 根据权利要求17至20中任一项所述的方法,其特征在于,所述方法还包括:
    所述第二节点通过所述MESH网络,接收所述第一节点发送的第一指示消息,所述第一指示消息用于指示所述多个子数据包发送完成。
  22. 根据权利要求21所述的方法,其特征在于,所述方法还包括:
    所述第二节点根据所述第一指示消息,确定所述多个子数据包是否成功接收;
    若确定所述多个子数据包成功接收,所述第二节点通过所述MESH网络,向所述第一节点发送第二指示消息,所述第二指示消息用于指示所述多个子数据包成功接收。
  23. 根据权利要求14至22中任一项所述的方法,其特征在于,所述方法还包括:
    所述第二节点接收第二切换指令,所述第二切换指令用于指示所述MESH网络中的各个节点退出所述第一传输模式;
    所述第二节点根据所述第二切换指令,退出所述第一传输模式。
  24. 根据权利要求14至23中任一项所述的方法,其特征在于,在所述第二节点根据所述第一切换指令,在所述预定时长之后切换至所述第一传输模式之前,所述方法还包括:
    所述第二节点接收来自其他节点的所述第一切换指令;
    所述第二节点根据所述第一节点的地址的序号,以及所述其他节点的地址的序号,确定是否根据所述第一节点发送的所述第一切换指令,切换至所述第一传输模式。
  25. 根据权利要求24所述的方法,其特征在于,所述第二节点根据所述第一节点的地址的序号,以及所述其他节点的地址的序号,确定是否根据所述第一节点发送的所述第一切换指令,切换至所述第一传输模式,包括:
    若所述第一节点的地址的序号大于所述其他节点的地址的序号,则所述第二节点确定根据所述第一节点发送的所述第一切换指令,切换至所述第一传输模式;或者,
    若所述第一节点的地址的序号小于所述其他节点的地址的序号,则所述第二节点确定根据所述第一节点发送的所述第一切换指令,切换至所述第一传输模式。
  26. 一种数据传输的方法,其特征在于,所述方法应用于低功耗蓝牙BLE的MESH网络中,所述MESH网络中包括多个节点,所述方法包括:
    所述MESH网络中的第三节点接收第一切换指令,所述第一切换指令用于指示所述MESH网络中的各个节点在预定时长之后切换至第一传输模式,其中,所述第一传输模式为仅转发从所述MESH网络中的第一节点至第二节点的数据包的模式;
    所述第三节点根据所述第一切换指令,在所述预定时长之后切换至所述第一传输模式;
    所述第三节点转发从所述第一节点至所述第二节点的所述数据包。
  27. 根据权利要求26所述的方法,其特征在于,所述第一切换指令中包括所述第一节点的地址和所述第二节点的地址。
  28. 根据权利要求26或27所述的方法,其特征在于,所述预定时长为所述第一节点发送所述数据包的时刻之后的预设时长,或者为所述各个节点各自接收到所述数据包的时刻之后的预设时长。
  29. 根据权利要求26至28中任一项所述的方法,其特征在于,在所述第三节点转发从所述第一节点至所述第二节点的所述数据包之前,所述方法还包括:
    所述第三节点转发从所述第一节点至所述第二节点的传输开始指令,所述传输开始指令中包括以下信息中的至少一种:所述多个子数据包的数量、所述多个子数据包的编号、所述多个子数据包的总长度。
  30. 根据权利要求26至29中任一项所述的方法,其特征在于,所述第三节点转发从所述第一节点至所述第二节点的所述数据包,包括:
    所述第三节点转发从所述第一节点至所述第二节点的基于所述数据包形成的多个子数据包。
  31. 根据权利要求30所述的方法,其特征在于,所述方法还包括:
    所述第三节点转发从所述第二节点至所述第一节点的应答消息,所述应答消息中包括所述第二节点成功接收的子数据包的编号。
  32. 根据权利要求26至31中任一项所述的方法,其特征在于,所述方法还包括:
    所述第三节点接收第二切换指令,所述第二切换指令用于指示所述MESH网络中的各个节点退出所述第一传输模式;
    所述第三节点根据所述第二切换指令,退出所述第一传输模式。
  33. 根据权利要求26至32中任一项所述的方法,其特征在于,在所述第三节点根据所述第一切换指令,在所述预定时长之后切换至所述第一传输模式之前,所述方法还包括:
    所述第三节点接收来自其他节点的所述第一切换指令;
    所述第三节点根据所述第一节点的地址的序号,以及所述其他节点的地址的序号,确定是否根据所述第一节点发送的所述第一切换指令,切换至所述第一传输模式。
  34. 根据权利要求33所述的方法,其特征在于,所述第三节点根据所述第一节点的地址的序号,以及所述其他节点的地址的序号,确定是否根据所述第一节点发送的所述第一切换指令,切换至所述第一传输模式,包括:
    若所述第一节点的地址的序号大于所述其他节点的地址的序号,则所述第三节点确定根据所述第一节点发送的所述第一切换指令,切换至所述第一传输模式;或者,
    若所述第一节点的地址的序号小于所述其他节点的地址的序号,则所述第三节点确定根据所述第一节点发送的所述第一切换指令,切换至所述第一传输模式。
  35. 一种低功耗蓝牙BLE设备,其特征在于,所述BLE设备为BLE的MESH网络中的第一节点,所述MESH网络中包括多个节点,所述第一节点包括:
    收发单元,用于发送第一切换指令,所述第一切换指令用于指示所述MESH网络中的各个节点在预定时长之后切换至第一传输模式,其中,所述第一传输模式为仅转发从所述第一节点至所述MESH网络中的第二节点的数据包的模式;
    所述收发单元还用于,通过所述MESH网络,向所述第二节点发送所述数据包。
  36. 根据权利要求35所述的BLE设备,其特征在于,所述第一切换指令中包括所述第一节点的地址和所述第二节点的地址。
  37. 根据权利要求35或36所述的BLE设备,其特征在于,所述预定时长为所述第一节点发送所述数据包的时刻之后的预设时长,或者为所述各个节点各自接收到所述数据包的时刻之后的预设时长。
  38. 根据权利要求35至37中任一项所述的BLE设备,其特征在于,所述节点还包括:
    处理单元,用于对所述数据包进行拆分,形成多个子数据包;
    其中,所述收发单元具体用于:通过所述MESH网络,按照所述多个子数据包的编号,向所述第二节点循环发送所述多个子数据包。
  39. 根据权利要求38所述的BLE设备,其特征在于,所述收发单元还用于:
    通过所述MESH网络,向所述第二节点发送传输开始指令,所述传输开始指令中包括以下信息中的至少一种:所述多个子数据包的数量、所述多个子数据包的编号、所述多个子数据包的总长度。
  40. 根据权利要求38或39所述的BLE设备,其特征在于,所述收发单元具体用于:
    通过所述MESH网络,接收所述第二节点发送的应答消息,所述应答消息中包括所述第二节点成功接收的子数据包的编号;
    根据所述应答消息,循环发送未成功接收的子数据包。
  41. 根据权利要求40所述的BLE设备,其特征在于,所述收发单元具体用于:
    若未成功接收的子数据包的数量小于预设值,在一次循环中,发送多份所述未成功接收的子数据包;
    若未成功接收的子数据包的数量大于所述预设值,在一次循环中,仅发送一份所述未成功接收的子数据包。
  42. 根据权利要求40或41所述的BLE设备,其特征在于,所述处理单元还用于:
    根据所述应答消息,从发送队列中移除所述第二节点成功接收的子数据包。
  43. 根据权利要求42所述的BLE设备,其特征在于,所述收发单元还用于:
    若所述多个子数据包全部被移除,通过所述MESH网络,向所述第二节点发送第一指示消息,所述第一指示消息用于指示所述多个子数据包发送完成。
  44. 根据权利要求43所述的BLE设备,其特征在于,所述收发单元还 用于:
    通过所述MESH网络,接收所述第二节点发送的第二指示消息,所述第二指示消息用于指示所述多个子数据包成功接收。
  45. 根据权利要求35至44中任一项所述的BLE设备,其特征在于,所述收发单元还用于:
    发送第二切换指令,所述第二切换指令用于指示所述MESH网络中的各个节点退出所述第一传输模式。
  46. 根据权利要求35至45中任一项所述的BLE设备,其特征在于,
    所述收发单元还用于:接收来自其他节点的所述第一切换指令;
    所述处理单元还用于:根据所述第一节点的地址的序号,以及所述其他节点的地址的序号,确定是否向所述第二节点发送所述数据包。
  47. 根据权利要求46所述的BLE设备,其特征在于,所述处理单元具体用于:
    若所述第一节点的地址的序号大于所述其他节点的地址的序号,则确定向所述第二节点发送所述数据包;或者,
    若所述第一节点的地址的序号小于所述其他节点的地址的序号,则确定向所述第二节点发送所述数据包。
  48. 一种低功耗蓝牙BLE设备,其特征在于,所述BLE设备为BLE的MESH网络中的第二节点,所述MESH网络中包括多个节点,所述第二节点包括:
    收发单元,用于接收第一切换指令,所述第一切换指令用于指示所述MESH网络中的各个节点在预定时长之后切换至第一传输模式,其中,所述第一传输模式为仅转发从所述MESH网络中的第一节点至所述第二节点的数据包的模式;
    处理单元,用于根据所述第一切换指令,在所述预定时长之后切换至所述第一传输模式;
    所述收发单元还用于,通过所述MESH网络,接收所述第一节点发送的数据包。
  49. 根据权利要求48所述的BLE设备,其特征在于,所述第一切换指令中包括所述第一节点的地址和所述第二节点的地址。
  50. 根据权利要求48或49所述的BLE设备,其特征在于,所述预定 时长为所述第一节点发送所述数据包的时刻之后的预设时长,或者为所述各个节点各自接收到所述数据包的时刻之后的预设时长。
  51. 根据权利要求48至50中任一项所述的BLE设备,其特征在于,所述收发单元具体用于:
    通过所述MESH网络,接收所述第一节点发送的基于所述数据包形成的多个子数据包。
  52. 根据权利要求51所述的BLE设备,其特征在于,所述收发单元还用于:
    通过所述MESH网络,接收所述第一节点发送的传输开始指令,所述传输开始指令中包括以下信息中的至少一种:所述多个子数据包的数量、所述多个子数据包的编号、所述多个子数据包的总长度。
  53. 根据权利要求51或52所述的BLE设备,其特征在于,
    所述处理单元还用于:生成应答消息,所述应答消息中包括成功接收的子数据包的编号;
    所述收发单元还用于:通过所述MESH网络,向所述第一节点发送所述应答消息。
  54. 根据权利要求53所述的BLE设备,其特征在于,所述处理单元具体用于:
    每成功接收K个子数据包时,生成一个所述应答消息,所述应答消息中包括所述K个子数据包的编号。
  55. 根据权利要求53至54中任一项所述的BLE设备,其特征在于,所述收发单元还用于:
    通过所述MESH网络,接收所述第一节点发送的第一指示消息,所述第一指示消息用于指示所述多个子数据包发送完成。
  56. 根据权利要求55所述的BLE设备,其特征在于,
    所述处理单元还用于:根据所述第一指示消息,确定所述多个子数据包是否成功接收;
    所述收发单元还用于:若确定所述多个子数据包成功接收,通过所述MESH网络,向所述第一节点发送第二指示消息,所述第二指示消息用于指示所述多个子数据包成功接收。
  57. 根据权利要求48至56中任一项所述的BLE设备,其特征在于,
    所述收发单元还用于:接收第二切换指令,所述第二切换指令用于指示所述MESH网络中的各个节点退出所述第一传输模式;
    所述处理单元还用于:根据所述第二切换指令,退出所述第一传输模式。
  58. 根据权利要求48至57中任一项所述的BLE设备,其特征在于,
    所述收发单元还用于:接收来自其他节点的所述第一切换指令;
    所述处理单元还用于:根据所述第一节点的地址的序号,以及所述其他节点的地址的序号,确定是否根据所述第一节点发送的所述第一切换指令,切换至所述第一传输模式。
  59. 根据权利要求58所述的BLE设备,其特征在于,所述处理单元具体用于:
    若所述第一节点的地址的序号大于所述其他节点的地址的序号,则确定根据所述第一节点发送的所述第一切换指令,切换至所述第一传输模式;或者,
    若所述第一节点的地址的序号小于所述其他节点的地址的序号,则确定根据所述第一节点发送的所述第一切换指令,切换至所述第一传输模式。
  60. 一种低功耗蓝牙BLE设备,其特征在于,所述BLE设备为BLE的MESH网络中的第三节点,所述MESH网络中包括多个节点,所述第三节点包括:
    收发单元,用于接收第一切换指令,所述第一切换指令用于指示所述MESH网络中的各个节点在预定时长之后切换至第一传输模式,其中,所述第一传输模式为仅转发从所述MESH网络中的第一节点至第二节点的数据包的模式;
    处理单元,用于根据所述第一切换指令,在所述预定时长之后切换至所述第一传输模式;
    所述收发单元还用于,转发从所述第一节点至所述第二节点的所述数据包。
  61. 根据权利要求60所述的BLE设备,其特征在于,所述第一切换指令中包括所述第一节点的地址和所述第二节点的地址。
  62. 根据权利要求60或61所述的BLE设备,其特征在于,所述预定时长为所述第一节点发送所述数据包的时刻之后的预设时长,或者为所述各个节点各自接收到所述数据包的时刻之后的预设时长。
  63. 根据权利要求60至62中任一项所述的BLE设备,其特征在于,所述收发单元还用于:
    转发从所述第一节点至所述第二节点的传输开始指令,所述传输开始指令中包括以下信息中的至少一种:所述多个子数据包的数量、所述多个子数据包的编号、所述多个子数据包的总长度。
  64. 根据权利要求60至63中任一项所述的BLE设备,其特征在于,所述收发单元具体用于:
    转发从所述第一节点至所述第二节点的基于所述数据包形成的多个子数据包。
  65. 根据权利要求64所述的BLE设备,其特征在于,所述收发单元还用于:
    转发从所述第二节点至所述第一节点的应答消息,所述应答消息中包括所述第二节点成功接收的子数据包的编号。
  66. 根据权利要求60至65中任一项所述的BLE设备,其特征在于,
    所述收发单元还用于:接收第二切换指令,所述第二切换指令用于指示所述MESH网络中的各个节点退出所述第一传输模式;
    所述处理单元还用于:根据所述第二切换指令,退出所述第一传输模式。
  67. 根据权利要求60至66中任一项所述的BLE设备,其特征在于,
    所述收发单元还用于:接收来自其他节点的所述第一切换指令;
    手术处理单元还用于:根据所述第一节点的地址的序号,以及所述其他节点的地址的序号,确定是否根据所述第一节点发送的所述第一切换指令,切换至所述第一传输模式。
  68. 根据权利要求67所述的BLE设备,其特征在于,所述处理单元具体用于:
    若所述第一节点的地址的序号大于所述其他节点的地址的序号,则所述确定根据所述第一节点发送的所述第一切换指令,切换至所述第一传输模式;或者,
    若所述第一节点的地址的序号小于所述其他节点的地址的序号,则节点确定根据所述第一节点发送的所述第一切换指令,切换至所述第一传输模式。
  69. 一种低功耗蓝牙BLE芯片,其特征在于,包括处理器和存储器,所述存储器用于存储计算机程序,所述处理器用于调用并运行所述存储器中 存储的计算机程序,以执行权利要求1至13中任一项所述的方法。
  70. 一种低功耗蓝牙BLE芯片,其特征在于,包括处理器和存储器,所述存储器用于存储计算机程序,所述处理器用于调用并运行所述存储器中存储的计算机程序,以执行权利要求14至25中任一项所述的方法。
  71. 一种低功耗蓝牙BLE芯片,其特征在于,包括处理器和存储器,所述存储器用于存储计算机程序,所述处理器用于调用并运行所述存储器中存储的计算机程序,以执行权利要求26至34中任一项所述的方法。
  72. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质用于存储计算机程序,其中,当所述计算机程序被处理器执行时,使得所述处理器执行权利要求1至13中任一项所述的方法。
  73. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质用于存储计算机程序,其中,当所述计算机程序被处理器执行时,使得所述处理器执行权利要求14至25中任一项所述的方法。
  74. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质用于存储计算机程序,其中,当所述计算机程序被处理器执行时,使得所述处理器执行权利要求26至34中任一项所述的方法。
PCT/CN2019/117534 2019-11-12 2019-11-12 数据传输的方法和ble设备 WO2021092760A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2019/117534 WO2021092760A1 (zh) 2019-11-12 2019-11-12 数据传输的方法和ble设备
CN201980005132.4A CN111279729A (zh) 2019-11-12 2019-11-12 数据传输的方法和ble设备

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/117534 WO2021092760A1 (zh) 2019-11-12 2019-11-12 数据传输的方法和ble设备

Publications (1)

Publication Number Publication Date
WO2021092760A1 true WO2021092760A1 (zh) 2021-05-20

Family

ID=70998352

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/117534 WO2021092760A1 (zh) 2019-11-12 2019-11-12 数据传输的方法和ble设备

Country Status (2)

Country Link
CN (1) CN111279729A (zh)
WO (1) WO2021092760A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP4016002B1 (en) 2020-12-17 2024-07-10 Nxp B.V. An infrastructure controller for an infrastructure
CN115297461B (zh) * 2022-09-30 2022-12-06 小米汽车科技有限公司 数据交互方法、装置、车辆、可读存储介质及芯片

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103414542A (zh) * 2013-08-20 2013-11-27 清华大学 无线通信***中同时同频全双工节点数据传送方法及装置
CN103763751A (zh) * 2014-01-24 2014-04-30 广州杰赛科技股份有限公司 无线传感器网络的数据传输方法和***
CN106304229A (zh) * 2016-08-18 2017-01-04 南京邮电大学 一种基于内容存储的软件定义无线Mesh网络
CN108156584A (zh) * 2017-12-25 2018-06-12 深圳市闪联信息技术有限公司 一种蓝牙设备及其mesh网络的通信方法和***

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101990269B (zh) * 2009-08-05 2014-07-09 华为技术有限公司 一种数据转发的方法、网络节点及***
CN101945341B (zh) * 2010-09-16 2013-01-23 西北大学 一种无线传感器网络点对点传输协议
CN104580346B (zh) * 2014-09-11 2018-06-08 奇点新源国际技术开发(北京)有限公司 数据传输方法及装置
CN105681189B (zh) * 2016-01-21 2019-05-17 上海芃矽半导体技术有限公司 用于网格网络的数据转发方法及节点设备
CN109803244B (zh) * 2017-11-17 2020-10-23 华为技术有限公司 数据传输的方法和装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103414542A (zh) * 2013-08-20 2013-11-27 清华大学 无线通信***中同时同频全双工节点数据传送方法及装置
CN103763751A (zh) * 2014-01-24 2014-04-30 广州杰赛科技股份有限公司 无线传感器网络的数据传输方法和***
CN106304229A (zh) * 2016-08-18 2017-01-04 南京邮电大学 一种基于内容存储的软件定义无线Mesh网络
CN108156584A (zh) * 2017-12-25 2018-06-12 深圳市闪联信息技术有限公司 一种蓝牙设备及其mesh网络的通信方法和***

Also Published As

Publication number Publication date
CN111279729A (zh) 2020-06-12

Similar Documents

Publication Publication Date Title
CN110545241B (zh) 一种报文处理方法和装置
US9450894B2 (en) Integrated circuit device and method of performing cut-through forwarding of packet data
JP6265058B2 (ja) ネットワーク伝送システム、そのマスタノード、スレーブノード
US7889683B2 (en) Non-destructive media access resolution for asynchronous traffic in a half-duplex braided-ring
US11463844B2 (en) Reliable link layer multicast in a low power wide area network
JP2021536708A (ja) トラフィックスケジューリング方法、デバイス、およびシステム
JPWO2011148583A1 (ja) バス制御装置およびバス制御装置に指示を出力する制御装置
WO2021092760A1 (zh) 数据传输的方法和ble设备
US9515940B2 (en) Method for transmitting data in a packet-oriented communications network and correspondingly configured user terminal in said communications network
WO2020073907A1 (zh) 转发表项的更新方法及装置
CN111837424A (zh) 路由的建立方法及装置、电子设备以及计算机存储介质
WO2016045056A1 (zh) 交换机及业务请求报文的处理方法
Shin et al. Analysis and implementation of hybrid switching
US20060176821A1 (en) Network bandwidth utilization verification method and apparatus through reciprocating and multiplicative message distribution
WO2018003117A1 (ja) 通信システムおよび通信方法
He Kernel korner: Why and how to use netlink socket
JP6402576B2 (ja) 通信装置、情報処理装置、情報処理システム及び通信装置の制御方法
WO2021097628A1 (zh) 路径选择的方法和ble设备
JP5469028B2 (ja) 通信システム
JP7044081B2 (ja) 車載用通信システム
JP2010212938A (ja) リング型ネットワークシステム
Ashjaei et al. MTU configuration for real-time switched Ethernet networks
US20160277280A1 (en) Flow entry delivery method and communication system
WO2022007682A1 (zh) 发送数据的方法及装置
CN105227451B (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: 19952562

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: 19952562

Country of ref document: EP

Kind code of ref document: A1