WO2021097628A1 - Path selecting method and ble device - Google Patents

Path selecting method and ble device Download PDF

Info

Publication number
WO2021097628A1
WO2021097628A1 PCT/CN2019/119259 CN2019119259W WO2021097628A1 WO 2021097628 A1 WO2021097628 A1 WO 2021097628A1 CN 2019119259 W CN2019119259 W CN 2019119259W WO 2021097628 A1 WO2021097628 A1 WO 2021097628A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
path
packet
mesh network
detection
Prior art date
Application number
PCT/CN2019/119259
Other languages
French (fr)
Chinese (zh)
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 CN201980005133.9A priority Critical patent/CN111247818A/en
Priority to PCT/CN2019/119259 priority patent/WO2021097628A1/en
Publication of WO2021097628A1 publication Critical patent/WO2021097628A1/en

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
    • H04W40/00Communication routing or communication path finding
    • H04W40/02Communication route or path selection, e.g. power-based or shortest path routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W40/00Communication routing or communication path finding
    • H04W40/02Communication route or path selection, e.g. power-based or shortest path routing
    • H04W40/04Communication route or path selection, e.g. power-based or shortest path routing based on wireless node resources
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Definitions

  • the embodiments of the present application relate to the field of information technology, and more specifically, to a method for path selection 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 data, and the data between the nodes is transmitted to the entire MESH network. This may lead to a situation where the data transmission between the source node and the target node has been completed, but the data is still being transmitted between other nodes in the MESH network. These unnecessary transmissions not only make the network environment more complicated, but also waste node resources.
  • the embodiments of the present application provide a path selection method and a BLE device, which can reduce unnecessary data transmission between nodes in a MESH network.
  • a method for path selection is provided.
  • the method is applied to a MESH network of BLE.
  • the MESH network includes multiple nodes.
  • the method includes: a second node in the MESH network receives At least one detection packet of the first node in the MESH network, wherein each detection packet reaches the second node through at least one path, and the detection packet transmitted on each path in the at least one path Includes the address of the node on each path; the second node determines the optimal path according to the at least one detection packet; the second node sends a first response packet in response to the first node , Wherein, the first response packet includes the address of each node on the optimal path.
  • the first response packet is used for nodes in the MESH network that receive the first response packet to establish their respective whitelists and/or blacklists.
  • the blacklist is used to determine whether to forward the data packet between the first node and the second node.
  • the second node determining the optimal path according to the at least one detection packet includes: the second node transmits each detection packet from the at least one path to the The transmission time and/or the number of nodes passed by the second node determine the candidate path corresponding to each detection packet in the at least one path; the second node corresponds to the at least one detection packet Among at least one candidate path, the optimal path is determined.
  • the second node determining, in the at least one path, the candidate path corresponding to each detection packet includes: the second node selecting from the at least one path M detection packets with the shortest transmission time; among the M detection packets, the second node selects K detection packets with the least number of nodes passing through, where M and K are positive integers and K ⁇ M; The second node uses the path taken by the K detection packets as the candidate path corresponding to each detection packet.
  • determining the optimal path by the second node among at least one candidate path corresponding to the at least one detection packet includes: the second node is in the at least one detection packet. Among at least one candidate path corresponding to the test packet, the candidate path with the highest occurrence probability is selected as the optimal path.
  • the method further includes: in at least one candidate path corresponding to the at least one detection packet, determining a candidate path of the optimal path, wherein the candidate path is The path with the least number of overlapping nodes between the at least one candidate path and the optimal path.
  • the first response packet further includes the address of each node on the candidate path.
  • the method further includes: the second node receives a plurality of update packages from the first node; in response to the plurality of update packages, the second node passes all the update packages.
  • the optimal path sends a plurality of second response packets to the first node, wherein the receiving time and/or the number of the second response packets are used by the first node to determine whether to update the optimal path.
  • a method for path selection 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 three nodes receive at least one detection packet from the first node in the MESH network to the second node in the MESH network; the third node adds the third node to the at least one detection packet The address of the node; the third node forwards the at least one detection packet, and the at least one detection packet is used by the second node to select the optimal path between the first node and the second node .
  • the method further includes: the third node receives a first response packet from the second node to the first node, and the first response packet includes the most The address of each node on the optimal path; if the first response packet includes the address of the third node, the third node uses the addresses of the first node and the second node as an address pair, Added to the whitelist of the third node; and/or, if the first response packet does not include the address of the third node, the third node adds the address pair to the In the blacklist of the third node; the third node forwards the first response packet.
  • the method further includes: the third node receives a data packet from the first node to the second node; the third node according to the white list and/or The blacklist determines whether to forward the data packet.
  • the third node determines whether to forward the data packet according to the white list and/or the black list, including: if the address pair is in the white list, The third node forwards the data packet; and/or, if the address pair is in the blacklist, the third node does not forward the data packet.
  • a method for path selection is provided.
  • the method is applied to a MESH network of BLE.
  • the MESH network includes multiple nodes.
  • the method includes: the first node in the MESH network passes all the nodes.
  • the MESH network sends at least one detection packet to a second node in the MESH network, wherein the at least one detection packet is used to record the addresses of the nodes on the paths that they pass through for the second node
  • the node selects the optimal path between the first node and the second node; the first node receives a first response packet from the second node, and the first response packet includes the optimal path The address of each node on the path.
  • the first response packet is used for nodes in the MESH network that receive the first response packet to establish their respective whitelists and/or blacklists.
  • the blacklist is used to determine whether to forward the data packet between the first node and the second node.
  • the method further includes: when the first node does not detect a heartbeat packet sent by a node on the optimal path within a predetermined period of time, passing the optimal path to the The second node sends a plurality of update packets; the first node receives a plurality of second response packets from the second node in response to the plurality of update packets; the first node according to the second The receiving time and/or the receiving quantity of the response packet determine whether to update the optimal path.
  • the method further includes: the first node determines whether to update the optimal path according to a change in the number of nodes in the MESH network.
  • 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 any possible implementation of the second aspect.
  • a computer program product including computer program instructions that cause a computer to execute the above-mentioned third aspect or the method in any possible implementation manner of the third aspect.
  • the detection packet from the first node to the second node is used to record the addresses of the nodes on each path that the detection packet passes, so that the second node selects the optimal path among these paths.
  • the subsequent data packet transmission is performed between the first node and the second node, the data packet may be transmitted only through the node on the optimal path, and the other nodes do not transmit the data packet. Therefore, this method can reduce unnecessary data transmission between nodes in the MESH network and save node resources.
  • FIG. 1 is a schematic diagram of the MESH network.
  • Fig. 2 is a flow interaction diagram of a path selection method according to an embodiment of the present application.
  • FIG. 3 is a schematic diagram of the processing procedure of the detection packet by the third node.
  • Figure 4 is a schematic flow chart of the third node establishing the white list and the black list.
  • Fig. 5 is a schematic diagram of a possible implementation based on the method shown in Fig. 2.
  • Fig. 6 is a schematic block diagram of a BLE device according to an embodiment of the present application.
  • Fig. 7 is a schematic block diagram of a BLE device according to an embodiment of the present application.
  • Fig. 8 is a schematic block diagram of a BLE device according to an embodiment 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 can be considered as a wireless communication system based on the network topology.
  • 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 FIG. 1, only nodes A to H, and node Z are taken as examples.
  • data packets are transmitted based on advertising. After each node receives a data packet sent by another node, it forwards the data packet, thereby forwarding the data packet to other nearby nodes.
  • the data packet sent by node A to node Z can reach node Z through at least one relay.
  • node B receives the data packet sent by node A, it can forward the data packet to node C and node D; after node E receives the data packet, it can forward the data packet to node D, node F, and node D respectively.
  • the data packet sent by node A to node Z can reach node Z through at least one path, and the nodes included in each path are not exactly the same. Therefore, when the data packet is transmitted from node A to node Z through different paths, the node that it passes through The amount is different, the required transmission time may also be different. In this way, when the data transmission between node A and node B has been completed through a certain path, the data may still be transmitted between other nodes in the MESH network. These unnecessary transmissions not only make the network environment more complicated, but also waste node resources.
  • node A may be called a source node
  • node Z may be called a target node
  • other nodes used for relay are called relay nodes.
  • Fig. 2 is a flow interaction diagram of a path selection method according to an embodiment of the present application.
  • the method 200 is applied to a BLE MESH network, and the MESH network may include multiple nodes.
  • the method 200 shown in FIG. 2 may be executed by the first node, the second node, and the third node in the MESH network.
  • the first node is the source node
  • the second node is the target node
  • the third node is the relay node.
  • only one relay node, that is, the third node is used as an example for description.
  • the related operations of other relay nodes in the MESH network are the same as those of the third node. You can refer to the following related descriptions for the third node.
  • the method 200 may include some or all of the following steps.
  • the first node sends at least one detection packet to the second node through the MESH network.
  • the at least one detection packet is used to record the address of the node on the path that each passes through.
  • the third node receives at least one detection packet from the first node to the second node.
  • the third node adds the address of the third node to the at least one detection packet.
  • the third node forwards the at least one detection packet.
  • the second node receives at least one detection packet from the first node.
  • each detection packet reaches the second node through at least one path, and the detection packet transmitted on each path in the at least one path includes the address of the node on each path.
  • the second node determines the optimal path according to the at least one detection packet.
  • the second node sends a first response packet in response to the first node.
  • the first response packet includes the address of each node on the optimal path.
  • the first node receives the first response packet from the second node.
  • the first node may send at least one detection packet to the second node, and the third node that receives the detection packet will add its own address to the detection packet before forwarding it.
  • Each detection packet can reach the second node through at least one path, and the detection packet on each path will carry the address of the node on the path it passes.
  • the second node can determine the possible path between the first node and the second node based on the detection packets transmitted from different paths, so as to select the optimal path among these paths for subsequent data transmission.
  • the second node can inform other nodes in the MESH network of the optimal path it chooses through the first response packet.
  • the aforementioned at least one detection packet may be one detection packet or may include multiple detection packets. When there are multiple detection packets, each detection packet has its own sequence number.
  • a detection packet When a detection packet is forwarded in the MESH network, it may reach the third node many times. However, the third node only needs to add its own address to the detection packet once. The third node may add its own address to the detection packet when receiving the detection packet for the first time, and no longer add its address when receiving the detection packet subsequently. For example, as shown in Figure 3, after the third node receives a detection packet, it determines whether the detection packet already includes the address of the third node. If the detection packet includes the address of the third node, the third node No need to add its address again, but directly forward the detection packet. If the detection packet does not include the address of the third node, it means that the detection packet reaches the third node for the first time, and the third node adds its own address to the detection packet before forwarding it.
  • the first node may also send a path optimization message to each node in the MESH network, and the path optimization message is used to instruct each node in the MESH network to enter the path optimization mode.
  • the path optimization message is used to instruct each node in the MESH network to enter the path optimization mode.
  • each node does not actively forward other messages, but only forwards detection packets.
  • the detection packet can have a specific format for each node to identify the detection packet.
  • the first response packet is used for the nodes in the MESH network that received the first response packet to establish their respective whitelists and/or blacklists, and the whitelists and blacklists are used to determine whether to forward the first node and Data packets between the second node.
  • the following takes the third node as an example to describe the whitelist and the process of establishing the blacklist in detail.
  • step 270 the third node may specifically execute step 271 to step 274.
  • the third node receives the first response packet from the second node to the first node.
  • the first response packet includes the address of each node on the optimal path.
  • the third node adds the addresses of the first node and the second node as an address pair to the white list of the third node.
  • the third node adds the addresses of the first node and the second node as an address pair to the blacklist of the third node.
  • the third node forwards the first response packet.
  • the third node After establishing its own blacklist and whitelist, if the third node subsequently receives a data packet from the first node to the second node, it can determine whether to forward the data packet according to its own whitelist and/or blacklist .
  • the third node forwards the data packet; if the address pair is in the blacklist, the third node does not Forward the packet.
  • the first response packet sent by the second node only includes the address of each node on the optimal path. Therefore, the address pair consisting of the address of the first node and the address of the second node will only be used by the address on the optimal path.
  • Each node is added to its whitelist, and each node on the non-optimal path is added to its blacklist. In this way, when the first node sends a data packet to the second node through the MESH, only those nodes on the optimal path will forward the data packet, and nodes that are not on the optimal path will not forward the data packet.
  • those nodes that are not on the optimal path will filter out the data packet without forwarding, which not only saves power consumption, but also reduces unnecessary data forwarding between nodes in the MESH network and reduces broadcast storms. Make the transmission between the first node and the second node more stable and efficient, and save node resources in the MESH network.
  • steps 272 and 273 may exist at the same time, that is, the nodes that receive the first response packet may establish a blacklist and a whitelist at the same time; or, these nodes may only establish a blacklist or only a whitelist.
  • the third node uses the addresses of the first node and the second node as an address pair and adds it to the third node.
  • the node's whitelist If the first response packet does not include the address of the third node, the third node directly forwards the first response packet without any related processing.
  • the third node receives a data packet from the first node to the second node, it will judge whether the data packet is in its white list, if it is in the white list, then forward the data packet, if it is not in the white list , The packet is not forwarded.
  • the third node uses the addresses of the first node and the second node as an address pair and adds it to The third node is in the blacklist. If the first response packet includes the address of the third node, the third node directly forwards the first response packet without any related processing. After that, if the third node receives a data packet from the first node to the second node, it will determine whether the data packet is in its blacklist, if it is in the blacklist, it will not forward the data packet, if it is not in the blacklist In, the data packet is forwarded.
  • the whitelist and blacklist of the third node can be used for data packet transmission between the first node and the second node.
  • the third node can use the whitelist and blacklist to determine whether to The packet is forwarded.
  • the optimal path determined when the first node sends the detection packet to the second node may be different from the optimal path determined when the second node sends the detection packet to the first node.
  • the whitelist and blacklist of the third node are only used for data packets from the first node to the second node.
  • the third node can use the addresses of the first node and the second node as an address pair, and add them to the appropriate list according to the corresponding transmission direction. For example, if the transmission direction corresponding to the address pair is from the first node to the second node, it may be added to the whitelist, and the transmission direction corresponding to the address pair is from the second node to the first node, it may be added To the blacklist. Then, the third node only forwards the data packet sent from the first node to the second node, and does not forward the data packet sent from the second node to the first node.
  • step 260 may include step 261 and step 262.
  • the second node determines a candidate path corresponding to each detection packet in at least one path traversed by each detection packet.
  • the second node determines the candidate corresponding to each detection packet in the at least one path according to the transmission time and/or the number of nodes that each detection packet is transmitted from the at least one path to the second node. path.
  • the second node determines the optimal path among at least one candidate path corresponding to the at least one detection packet.
  • each detection packet sent by the first node can be transmitted to the second node through at least one path.
  • the second node judges the optimal path, it considers the transmission time of the detection packet on different paths and/or the number of nodes on different paths.
  • the second node may use one or more paths with a short transmission time and/or a small number of nodes as candidate paths corresponding to the detection packet.
  • the first node sends multiple detection packets, such as N detection packets numbered from 1 to N
  • the second node can determine the corresponding candidate path according to each detection packet, so these N detection packets are all Have their respective candidate paths.
  • the second node selects the optimal path among the candidate paths corresponding to the N detection packets.
  • the second node may according to the transmission time on the at least one path that the detection packet traverses, or according to the number of nodes on the at least one path, in the at least one path, Select the candidate path corresponding to the detection packet.
  • the second node may also comprehensively consider the transmission time and the number of nodes, and select the candidate path corresponding to each detection packet.
  • the second node may first select the M detection packets with the shortest transmission time in the at least one path, and then select the K detection packets with the least number of nodes passing through the M detection packets, and then combine the K detection packets with the least number of nodes.
  • the path that the detection packet traverses is used as the candidate path corresponding to each detection packet.
  • the second node may first select the M detection packets with the least number of nodes passing through the at least one path, and then select the K detection packets with the shortest transmission time among the M detection packets, and combine the K detection packets with the shortest transmission time.
  • the path traversed by each detection packet is used as the candidate path corresponding to each detection packet.
  • M and K are positive integers, and K ⁇ M.
  • the transmission time of a path may be affected by many factors. Generally, a path with a smaller number of nodes has a shorter transmission time. However, in some cases, the transmission time of the path is also affected by the performance of each node on the path. For example, if a node on the path scans or processes detection packets very slowly, then the node may cause the transmission time of the path to increase. At this time, even if the number of nodes on the path is small, it may cause The transmission time is longer; if a node on the path scans or processes detection packets at a significantly higher speed than the nodes on other paths, then the node can significantly shorten the transmission time of the path. At this time, even if the path is The larger number of nodes may also make the transmission time very short.
  • the number of the at least one detection packet and the number of the at least one candidate path may be equal or not equal.
  • the second node may select only one candidate path from each path it passes, or may select multiple candidate paths. Therefore, the number of at least one candidate path corresponding to the at least one detection packet may be greater than or equal to the number of the at least one detection packet.
  • the optimal path determined by the second node may be one or multiple.
  • the first response packet sent by the second node to each node in the MESH network includes the address of each node in the optimal path.
  • the first response packet includes a node on each of the multiple optimal paths.
  • the optimal path is determined among the candidate paths corresponding to the detection packets.
  • the second node may select the candidate path with the highest occurrence probability as the optimal path among the at least one candidate path corresponding to the at least one detection packet.
  • the candidate path corresponding to the detection packet is the optimal path.
  • the optimal path selected based on a detection packet may be unreliable. Therefore, the first node can send multiple detection packets, such as N detection packets numbered from 1 to N.
  • the second node can determine the candidate path corresponding to the detection packet according to each detection packet, so as to Among the candidate paths corresponding to each of the multiple detection packets, the candidate path with the highest occurrence probability is selected as the optimal path.
  • the candidate path with the higher the probability of occurrence is more reliable. This can greatly improve the reliability of the selected optimal path.
  • the second node may also determine a candidate path of the optimal path among at least one candidate path corresponding to the at least one detection packet.
  • the candidate path may be, for example, the path with the least number of overlapping nodes between the at least one candidate path and the optimal path.
  • the number of overlapping nodes with the optimal path is 0, which means that there are no overlapping nodes with the optimal path.
  • the first response packet also includes the address of each node on the alternative path.
  • the optimal path cannot be used.
  • the data packet between the first node and the second node can be transmitted through the alternative path, thereby improving the reliability of the data packet transmission between the first node and the second node.
  • FIG. 5 takes FIG. 5 as an example to describe in detail a possible implementation manner of the path selection method described in the embodiment of the present application.
  • the MESH network includes nodes A to H and node Z. Now we need to determine the optimal path from node A to node Z. Node A is the aforementioned first node, node Z is the aforementioned second node, and node B to node H are the aforementioned third node.
  • Node A sends a path selection message to instruct other nodes to enter path selection mode.
  • Node A sends N detection packets of sequence number 1 to sequence number N to node Z in sequence.
  • the node B to the node H judge whether the detection packet of the sequence number includes its own address.
  • the detection packet of the serial number includes its own address, the detection packet of the serial number is directly forwarded; if the detection packet of the serial number does not include its own address, then add your own address to the detection packet of the serial number Then forward it out.
  • Node Z receives N detection packets from sequence number 1 to sequence number N.
  • the detection packet of each sequence number can reach node Z through at least one path.
  • Node Z determines the candidate path corresponding to each detection packet of the sequence number.
  • detection packet No. 1 As an example, suppose that detection packet No. 1 goes from node A to node Z through 8 paths. These 8 paths are shown in Table 1 for example. Paths 1 to 8 in Table 1 are arranged in order from top to bottom according to the order of arrival of detection packets.
  • node Z After node Z receives the detection packet No. 1 through the above 8 paths, it selects the candidate path corresponding to the detection packet No. 1 among them. Specifically, the node Z may first select the 6 paths with the shortest transmission time among the 8 paths, that is, the 6 paths received first, which are path 1 to path 6 here. Secondly, among the 6 paths, node Z selects the 2 paths with the least number of nodes from top to bottom, here is path 1 and path 2. Therefore, the candidate paths corresponding to detection packet No. 1 are path 1 and path 2.
  • node Z uses the same method to determine its corresponding candidate path.
  • a candidate path For the detection packets of sequence number 2 to sequence number N, node Z uses the same method to determine its corresponding candidate path.
  • two candidate paths corresponding to each serial number detection packet In practical applications, other numbers of candidates can be selected for each serial number detection packet according to the number of nodes and node characteristics in the MESH network. path.
  • Detection package Candidate path Detection package No. 1 Path 1, path 2 Detection package 2 Path 2, Path 4 No. 3 detection package Path 1, path 2 ... ... N-1 detection package Path 2, path 9 N detection package Path 1, path 5
  • Node Z selects the optimal path among the candidate paths corresponding to the N detection packets.
  • node Z can choose two optimal paths, then node Z can select the two candidate paths with the highest occurrence probability in Table 2 as the optimal path.
  • the two candidate paths with the highest occurrence probability in Table 2 are path 1.
  • path 2 then the optimal path from node A to node Z finally selected by node Z is path 1 and path 2, as shown in Figure 5.
  • Node Z can also select an alternative path from the candidate paths shown in Table 2.
  • the alternative path and path 1 and path 2 preferably include different nodes to avoid node failure in path 1 and path 2, and at the same time Affect the use of optimal paths and alternative paths.
  • node Z selects path 5 as the candidate path.
  • Node E and node H in path 5 do not overlap with node B, node C, and node D in path 1 and path 2.
  • the way of using the alternative path can refer to the way of using the optimal path.
  • Node Z generates a first response packet, and sends the first response packet to each node in the MESH network.
  • the first response packet includes the addresses of nodes on the optimal path, that is, the addresses of node B, node C, and node D.
  • Node B to Node H After receiving the first response packet, Node B to Node H establish their respective whitelists and blacklists, and forward the first response packet.
  • node C Take node C as an example. After node C receives the first response packet, it finds that the first response packet includes its own address. Then, node C can use the addresses of node A and node Z as an address pair and add it to its own white address. In the list.
  • node G Take node G as an example. After node G receives the first response packet, it finds that the first response packet does not include its own address. Then, node G can use the addresses of node A and node Z as an address pair and add it to its own address. In the blacklist.
  • the address pair composed of the addresses of node A and node Z will be added to the white list by node B, node C, and node D, and added to the black list by other nodes.
  • node A After node A receives the first response packet, it sends a confirmation message to node Z.
  • Node Z receives the confirmation message, and the path selection process ends.
  • Node A sends a path selection completion message to each node in the MESH network to instruct these nodes to exit the path selection mode.
  • these nodes can perform the forwarding of data packets between node A and node Z according to their respective white lists and black lists.
  • node A sends a data packet to node Z
  • node B node B
  • node C node D
  • node D will forward the data packet
  • other nodes will not forward the data packet. This avoids unnecessary data transmission between nodes, significantly reduces network storms, and saves node resources.
  • the optimal path can be updated.
  • the first node can determine whether the optimal path needs to be updated based on factors such as whether the optimal path is reliable, whether the path transmission delay is increased, and whether nodes are added or removed in the MESH network.
  • the first node can detect the heartbeat packets sent by each node on the optimal path. If the heartbeat packets sent by one or some nodes on the optimal path are not detected within a predetermined period of time, the first node It is possible to send multiple update packets to the second node through the optimal path. After receiving the multiple update packets from the first node, the second node sends multiple second response packets that respond to the multiple update packets to the first node through the optimal path. The first node receives the second response packet from the second node, and determines whether to update the optimal path according to the receiving time and/or the received quantity of the second response packet.
  • the first node sends P update packets.
  • the first node receives the second response packet, which indicates that the optimal path is still valid. If the first node does not receive any second response packets, or the number of second response packets received by the first node is lower than the predetermined ratio, it means that a certain degree of packet loss has occurred, and the reliability of the path is reduced. , The optimal path can be updated. On the contrary, if the first node has received all P second response packets, or the number of second response packets received by the first node is higher than a predetermined ratio, it indicates that the optimal path is still reliable and does not need to be updated.
  • the first node can also consider the transmission delay of the optimal path. If the first node does not receive the second response packet within the delay requirement, or does not receive a predetermined proportion of the second response packet within the delay requirement, it will The optimal path is updated.
  • the first node may also determine whether to update the optimal path according to a change in the number of nodes in the MESH network.
  • the first node can determine whether to update the optimal path. For example, when a new node joins the MESH network, the first node may consider updating the optimal path. For another example, after the number of nodes changes, the foregoing method is used to determine whether the reliability and delay of the optimal path are affected, and if affected, the optimal path is updated.
  • the first node may also update the optimal path in other ways, for example, update the optimal path according to a certain time period.
  • the first node After the first node determines to update the optimal path, it can send a path release message to each node in the MESH network to instruct each node that receives the path release message to delete the first node and the second node from its whitelist and blacklist. An address pair composed of nodes. After that, the new optimal path can be selected again according to the method described in the embodiment of the present application.
  • 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 second node in the BLE MESH network
  • the MESH network includes multiple nodes
  • the BLE device 600 includes:
  • the transceiver unit 610 is configured to receive at least one detection packet from the first node in the MESH network, wherein each detection packet reaches the second node through at least one path, and each of the at least one path
  • the detection packet transmitted on each path includes the address of the node on each path;
  • the processing unit 620 is configured to determine an optimal path according to the at least one detection packet
  • the transceiving unit 610 is further configured to send a first response packet in response to the first node, wherein the first response packet includes the address of each node on the optimal path.
  • the second node when the second node receives the detection packet from the first node, since the detection packet includes the address of the node on the path through which the detection packet passes, the second node can be based on the detection packet transmitted from a different path. Test the packet, determine the possible path between the first node and the second node, and select the optimal path among these paths for subsequent data transmission. During subsequent data transmission between the first node and the second node, the data packet may be transmitted only through the node on the optimal path, and the other nodes may not transmit the data packet. This can reduce unnecessary data transmission between nodes in the MESH network and save node resources.
  • the first response packet is used for a node in the MESH network that receives the first response packet to establish a respective whitelist and/or blacklist, and the whitelist and the blacklist are used for Determining whether to forward the data packet between the first node and the second node.
  • the processing unit 620 is specifically configured to: determine in the at least one path according to the transmission time and/or the number of nodes that each detection packet has been transmitted from the at least one path to the second node.
  • the candidate path corresponding to each detection packet; among at least one candidate path corresponding to the at least one detection packet, the optimal path is determined.
  • the processing unit 620 is specifically configured to: in the at least one path, select M detection packets with the shortest transmission time; among the M detection packets, select K detection packets with the least number of nodes. Packet, M and K are positive integers and K ⁇ M; the path taken by the K detection packets is taken as the candidate path corresponding to each detection packet.
  • the processing unit 620 is specifically configured to: among the at least one candidate path corresponding to the at least one detection packet, select the candidate path with the highest occurrence probability as the optimal path.
  • the processing unit 620 is further configured to determine, among at least one candidate path corresponding to the at least one detection packet, a candidate path of the optimal path, wherein the candidate path is the at least one candidate path.
  • the candidate path is the at least one candidate path.
  • the first response packet also includes the address of each node on the candidate path.
  • the transceiving unit 610 is further configured to: receive multiple update packets from the first node; respectively, in response to the multiple update packets, send multiple first nodes to the first node through the optimal path.
  • a second response packet wherein the receiving time and/or the received quantity of the second response packet are used by the first node to determine whether to update the optimal path.
  • node 600 may perform the corresponding operations performed by the second node in the foregoing method embodiments, and for the sake of 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 third node in the BLE MESH network
  • the MESH network includes multiple nodes
  • the BLE device 700 includes:
  • the transceiver unit 710 is configured to receive at least one detection packet from a first node in the MESH network to a second node in the MESH network;
  • the processing unit 720 is configured to add the address of the third node to the at least one detection packet
  • the transceiver unit 710 is further configured to forward the at least one detection packet, and the at least one detection packet is used by the second node to select the optimal path between the first node and the second node.
  • the third node when the third node receives a detection packet from the first node to the second node, it adds its own address to the detection packet, so that the second node can follow the detection packets transmitted from different paths. , Determine the possible path between the first node and the second node, so as to select the optimal path among these paths for subsequent data transmission. This can reduce unnecessary data transmission between nodes in the MESH network and save node resources.
  • the transceiver unit 710 is further configured to: receive a first response packet from the second node to the first node, where the first response packet includes the address of each node on the optimal path;
  • the processing unit 720 is further configured to: if the first response packet includes the address of the third node, add the addresses of the first node and the second node as an address pair to the third node And/or, if the address of the third node is not included in the first response packet, add the address pair to the blacklist of the third node; the transceiver unit 710 also Used for: forwarding the first response packet.
  • the transceiving unit 710 is further configured to: receive a data packet from the first node to the second node; the processing unit 720 is further configured to: determine whether or not according to the whitelist and/or the blacklist Forward the data packet.
  • the transceiver unit 710 is specifically configured to: if the address pair is in the whitelist, forward the data packet; and/or, if the address pair is in the blacklist, not forward the data package.
  • the BLE device 700 can perform the corresponding operations performed by the third 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 first node in the BLE MESH network
  • the MESH network includes multiple nodes
  • the BLE device 800 includes:
  • the transceiver unit 810 is configured to send at least one detection packet to a second node in the MESH network through the MESH network, wherein the at least one detection packet is used to record the addresses of the nodes on the respective paths , For the second node to select the optimal path between the first node and the second node;
  • the transceiver unit 810 is further configured to receive a first response packet from the second node, where the first response packet includes the address of each node on the optimal path.
  • the first node sends a detection packet to the second node, and the detection packet is used to record the addresses of nodes on each path from the first node to the second node, so that the second node can According to the received detection packets transmitted from different paths, a possible path between the first node and the second node is determined, and the optimal path is selected among these paths for subsequent data transmission.
  • the data packet may be transmitted only through the node on the optimal path, and the other nodes may not transmit the data packet. This can reduce unnecessary data transmission between nodes in the MESH network and save node resources.
  • the first response packet is used for a node in the MESH network that receives the first response packet to establish a respective whitelist and/or blacklist, and the whitelist and the blacklist are used for Determining whether to forward the data packet between the first node and the second node.
  • the BLE device 800 further includes a processing unit 820, wherein the transceiving unit 810 is further configured to: when a heartbeat packet sent by a node on the optimal path is not detected within a predetermined period of time, pass the optimal path to the The second node sends multiple update packets; receives multiple second response packets from the second node in response to the multiple update packets; the processing unit 820 is configured to, according to the second response The time and/or number of packets received determines whether to update the optimal path.
  • the transceiving unit 810 is further configured to: when a heartbeat packet sent by a node on the optimal path is not detected within a predetermined period of time, pass the optimal path to the The second node sends multiple update packets; receives multiple second response packets from the second node in response to the multiple update packets; the processing unit 820 is configured to, according to the second response The time and/or number of packets received determines whether to update the optimal path.
  • the BLE device 800 further includes a processing unit 820 configured to determine whether to update the optimal path according to a change in the number of nodes in the MESH network.
  • the BLE device 800 can perform the corresponding operations performed by the first 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 may include 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 can 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 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.

Abstract

The present application provides a path selecting method, which can reduce unnecessary data transmission between nodes in an MESH network. The method is applied to the MESH network of low-power-consumption Bluetooth BLE, the MESH network comprises a plurality of nodes, the method comprises: a second node in the MESH network receives at least one detecting packet from a first node in the MESH network, wherein each detecting packet arrives the second node through at least one path, the detecting packet transmitted in each path of at least one path comprises the address of the node in each path; the second node determines an optimal path according to at least one detecting packet; the second node transmits a first response packet in response to the first node, wherein the first response packet comprises the address of each node in the optimal path.

Description

路径选择的方法和BLE设备Path selection method and BLE device 技术领域Technical field
本申请实施例涉及信息技术领域,并且更具体地,涉及一种路径选择的方法和BLE设备。The embodiments of the present application relate to the field of information technology, and more specifically, to a method for path selection and a BLE device.
背景技术Background technique
低功耗蓝牙(Bluetooth Low Energy,BLE)的MESH网络中包括大量节点,在进行数据传输时,该网络中的所有节点均对数据进行转发,节点之间的数据会传递到整个MESH网络。这就可能导致一种情况,源节点和目标节点之间的数据传输已经完成,但是该数据仍然在MESH网络的其他节点之间进行传输。这些不必要的传输不仅使网络环境更为复杂,也浪费了节点资源。The Bluetooth Low Energy (BLE) MESH network includes a large number of nodes. During data transmission, all nodes in the network forward the data, and the data between the nodes is transmitted to the entire MESH network. This may lead to a situation where the data transmission between the source node and the target node has been completed, but the data is still being transmitted between other nodes in the MESH network. These unnecessary transmissions not only make the network environment more complicated, but also waste node resources.
发明内容Summary of the invention
本申请实施例提供一种路径选择的方法和BLE设备,能够减少MESH网络中节点之间的不必要的数据传输。The embodiments of the present application provide a path selection method and a BLE device, which can reduce unnecessary data transmission between nodes in a MESH network.
第一方面,提供了一种路径选择的方法,所述方法应用于BLE的MESH网络中,所述MESH网络中包括多个节点,所述方法包括:所述MESH网络中的第二节点接收来自所述MESH网络中的第一节点的至少一个侦测包,其中,每个侦测包通过至少一个路径达到所述第二节点,所述至少一个路径中的每个路径上传输的侦测包中包括所述每个路径上的节点的地址;所述第二节点根据所述至少一个侦测包,确定最优路径;所述第二节点发送响应于所述第一节点的第一应答包,其中,所述第一应答包中包括所述最优路径上的各个节点的地址。In the first aspect, a method for path selection is provided. The method is applied to a MESH network of BLE. The MESH network includes multiple nodes. The method includes: a second node in the MESH network receives At least one detection packet of the first node in the MESH network, wherein each detection packet reaches the second node through at least one path, and the detection packet transmitted on each path in the at least one path Includes the address of the node on each path; the second node determines the optimal path according to the at least one detection packet; the second node sends a first response packet in response to the first node , Wherein, the first response packet includes the address of each node on the optimal path.
在一种可能的实现方式中,所述第一应答包用于所述MESH网络中接收到所述第一应答包的节点,建立各自的白名单和/或黑名单,所述白名单和所述黑名单用于确定是否转发所述第一节点与所述第二节点之间的数据包。In a possible implementation manner, the first response packet is used for nodes in the MESH network that receive the first response packet to establish their respective whitelists and/or blacklists. The blacklist is used to determine whether to forward the data packet between the first node and the second node.
在一种可能的实现方式中,所述第二节点根据所述至少一个侦测包,确定最优路径,包括:所述第二节点根据每个侦测包从所述至少一个路径分别传输至所述第二节点所经过的传输时间和/或节点数量,在所述至少一个路径 中确定所述每个侦测包对应的候选路径;所述第二节点在所述至少一个侦测包对应的至少一个候选路径中,确定所述最优路径。In a possible implementation manner, the second node determining the optimal path according to the at least one detection packet includes: the second node transmits each detection packet from the at least one path to the The transmission time and/or the number of nodes passed by the second node determine the candidate path corresponding to each detection packet in the at least one path; the second node corresponds to the at least one detection packet Among at least one candidate path, the optimal path is determined.
在一种可能的实现方式中,所述第二节点在所述至少一个路径中确定所述每个侦测包对应的候选路径,包括:所述第二节点在所述至少一个路径中,选择传输时间最短的M个侦测包;所述第二节点在所述M个侦测包中,选择经过节点数量最少的K个侦测包,M和K为正整数且K<M;所述第二节点将所述K个侦测包所经过的路径,作为所述每个侦测包对应的候选路径。In a possible implementation manner, the second node determining, in the at least one path, the candidate path corresponding to each detection packet includes: the second node selecting from the at least one path M detection packets with the shortest transmission time; among the M detection packets, the second node selects K detection packets with the least number of nodes passing through, where M and K are positive integers and K<M; The second node uses the path taken by the K detection packets as the candidate path corresponding to each detection packet.
在一种可能的实现方式中,所述第二节点在所述至少一个侦测包对应的至少一个候选路径中,确定所述最优路径,包括:所述第二节点在所述至少一个侦测包对应的至少一个候选路径中,选择出现概率最高的候选路径作为所述最优路径。In a possible implementation manner, determining the optimal path by the second node among at least one candidate path corresponding to the at least one detection packet includes: the second node is in the at least one detection packet. Among at least one candidate path corresponding to the test packet, the candidate path with the highest occurrence probability is selected as the optimal path.
在一种可能的实现方式中,所述方法还包括:在所述至少一个侦测包对应的至少一个候选路径中,确定所述最优路径的备选路径,其中,所述备选路径是所述至少一个候选路径中与所述最优路径之间重叠节点的数量最少的路径。In a possible implementation manner, the method further includes: in at least one candidate path corresponding to the at least one detection packet, determining a candidate path of the optimal path, wherein the candidate path is The path with the least number of overlapping nodes between the at least one candidate path and the optimal path.
在一种可能的实现方式中,所述第一应答包中还包括所述备选路径上的各个节点的地址。In a possible implementation manner, the first response packet further includes the address of each node on the candidate path.
在一种可能的实现方式中,所述方法还包括:所述第二节点接收来自所述第一节点的多个更新包;分别响应于所述多个更新包,所述第二节点通过所述最优路径,向所述第一节点发送多个第二应答包,其中,所述第二应答包的接收时间和/或接收数量,用于所述第一节点确定是否更新所述最优路径。In a possible implementation manner, the method further includes: the second node receives a plurality of update packages from the first node; in response to the plurality of update packages, the second node passes all the update packages. The optimal path sends a plurality of second response packets to the first node, wherein the receiving time and/or the number of the second response packets are used by the first node to determine whether to update the optimal path.
第二方面,提供了一种路径选择的方法,所述方法应用于低功耗蓝牙BLE的MESH网络中,所述MESH网络中包括多个节点,所述方法包括:所述MESH网络中的第三节点接收从所述MESH网络中的第一节点至所述MESH网络中的第二节点的至少一个侦测包;所述第三节点在所述至少一个侦测包中,添加所述第三节点的地址;所述第三节点转发所述至少一个侦测包,所述至少一个侦测包用于所述第二节点选择所述第一节点与所述第二节点之间的最优路径。In a second aspect, a method for path selection 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 three nodes receive at least one detection packet from the first node in the MESH network to the second node in the MESH network; the third node adds the third node to the at least one detection packet The address of the node; the third node forwards the at least one detection packet, and the at least one detection packet is used by the second node to select the optimal path between the first node and the second node .
在一种可能的实现方式中,所述方法还包括:所述第三节点接收从所述第二节点至所述第一节点的第一应答包,所述第一应答包中包括所述最优路径上的各个节点的地址;若所述第一应答包中包括所述第三节点的地址,则 所述第三节点将所述第一节点和所述第二节点的地址作为地址对,添加至所述第三节点的白名单中;和/或,若所述第一应答包中不包括所述第三节点的地址,则所述第三节点将所述地址对,添加至所述第三节点的黑名单中;所述第三节点转发所述第一应答包。In a possible implementation manner, the method further includes: the third node receives a first response packet from the second node to the first node, and the first response packet includes the most The address of each node on the optimal path; if the first response packet includes the address of the third node, the third node uses the addresses of the first node and the second node as an address pair, Added to the whitelist of the third node; and/or, if the first response packet does not include the address of the third node, the third node adds the address pair to the In the blacklist of the third node; the third node forwards the first response packet.
在一种可能的实现方式中,所述方法还包括:所述第三节点接收从所述第一节点至所述第二节点的数据包;所述第三节点根据所述白名单和/或所述黑名单,确定是否转发所述数据包。In a possible implementation, the method further includes: the third node receives a data packet from the first node to the second node; the third node according to the white list and/or The blacklist determines whether to forward the data packet.
在一种可能的实现方式中,所述第三节点根据所述白名单和/或所述黑名单,确定是否转发所述数据包,包括:若所述地址对位于所述白名单中,所述第三节点转发所述数据包;和/或,若所述地址对位于所述黑名单中,所述第三节点不转发所述数据包。In a possible implementation manner, the third node determines whether to forward the data packet according to the white list and/or the black list, including: if the address pair is in the white list, The third node forwards the data packet; and/or, if the address pair is in the blacklist, the third node does not forward the data packet.
第三方面,提供了一种路径选择的方法,所述方法应用于BLE的MESH网络中,所述MESH网络中包括多个节点,所述方法包括:所述MESH网络中的第一节点通过所述MESH网络,向所述MESH网络中的第二节点发送至少一个侦测包,其中,所述至少一个侦测包用于记录各自经过的路径上的节点的地址,以用于所述第二节点选择所述第一节点与所述第二节点之间的最优路径;所述第一节点接收来自所述第二节点的第一应答包,所述第一应答包中包括所述最优路径上的各个节点的地址。In a third aspect, a method for path selection is provided. The method is applied to a MESH network of BLE. The MESH network includes multiple nodes. The method includes: the first node in the MESH network passes all the nodes. The MESH network sends at least one detection packet to a second node in the MESH network, wherein the at least one detection packet is used to record the addresses of the nodes on the paths that they pass through for the second node The node selects the optimal path between the first node and the second node; the first node receives a first response packet from the second node, and the first response packet includes the optimal path The address of each node on the path.
在一种可能的实现方式中,所述第一应答包用于所述MESH网络中接收到所述第一应答包的节点,建立各自的白名单和/或黑名单,所述白名单和所述黑名单用于确定是否转发所述第一节点与所述第二节点之间的数据包。In a possible implementation manner, the first response packet is used for nodes in the MESH network that receive the first response packet to establish their respective whitelists and/or blacklists. The blacklist is used to determine whether to forward the data packet between the first node and the second node.
在一种可能的实现方式中,所述方法还包括:所述第一节点在预定时长内没有检测到所述最优路径上的节点发出的心跳包时,通过所述最优路径,向所述第二节点发送多个更新包;所述第一节点接收来自所述第二节点的分别响应于所述多个更新包的多个第二应答包;所述第一节点根据所述第二应答包的接收时间和/或接收数量,确定是否更新所述最优路径。In a possible implementation manner, the method further includes: when the first node does not detect a heartbeat packet sent by a node on the optimal path within a predetermined period of time, passing the optimal path to the The second node sends a plurality of update packets; the first node receives a plurality of second response packets from the second node in response to the plurality of update packets; the first node according to the second The receiving time and/or the receiving quantity of the response packet determine whether to update the optimal path.
在一种可能的实现方式中,所述方法还包括:所述第一节点根据所述MESH网络中的节点数量的变化,确定是否更新所述最优路径。In a possible implementation manner, the method further includes: the first node determines whether to update the optimal path according to a change in the number of nodes in the MESH network.
第四方面,提供了一种BLE设备,包括用于执行第一方面或第一方面的任意可能的实现方式中的方法的功能模块。In a fourth aspect, a BLE device is provided, which includes a functional module for executing the method in the first aspect or any possible implementation of the first aspect.
第五方面,提供了一种BLE设备,包括用于执行第二方面或第二方面 的任意可能的实现方式中的方法的功能模块。In a fifth aspect, a BLE device is provided, which includes a functional module for executing the second aspect or any possible implementation of the second aspect.
第六方面,提供了一种BLE设备,包括用于执行第三方面或第三方面的任意可能的实现方式中的方法的功能模块。In a sixth aspect, a BLE device is provided, including a functional module for executing the third aspect or any possible implementation of the third aspect.
第七方面,提供了一种BLE芯片,所述BLE芯片包括处理器和存储器,所述存储器用于存储计算机程序,所述处理器用于调用并运行所述存储器中存储的计算机程序,以执行第一方面或第一方面的任意可能的实现方式中的方法。In a seventh aspect, a BLE chip is provided, 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 method in one aspect or any possible implementation of the first aspect.
第八方面,提供了一种BLE芯片,所述BLE芯片包括处理器和存储器,所述存储器用于存储计算机程序,所述处理器用于调用并运行所述存储器中存储的计算机程序,以执行第二方面或第二方面的任意可能的实现方式中的方法。In an eighth aspect, a BLE chip is provided. 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 The second aspect or any possible implementation of the second aspect.
第九方面,提供了一种BLE芯片,所述BLE芯片包括处理器和存储器,所述存储器用于存储计算机程序,所述处理器用于调用并运行所述存储器中存储的计算机程序,以执行第三方面或第三方面的任意可能的实现方式中的方法。In a ninth aspect, a BLE chip is provided, 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 The third aspect or any possible implementation of the third aspect.
第十方面,提供了一种计算机可读存储介质,所述计算机可读存储介质用于存储计算机程序。其中,当所述计算机程序被处理器执行时,使得所述处理器执行第一方面或第一方面的任意可能的实现方式中的方法。In a tenth aspect, a computer-readable storage medium is provided, and the computer-readable storage medium is used to store a computer program. Wherein, 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.
第十一方面,提供了一种计算机可读存储介质,所述计算机可读存储介质用于存储计算机程序。其中,当所述计算机程序被处理器执行时,使得所述处理器执行第二方面或第二方面的任意可能的实现方式中的方法。In an eleventh aspect, a computer-readable storage medium is provided, and the computer-readable storage medium is used to store a computer program. Wherein, 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.
第十二方面,提供了一种计算机可读存储介质,所述计算机可读存储介质用于存储计算机程序。其中,当所述计算机程序被处理器执行时,使得所述处理器执行第三方面或第三方面的任意可能的实现方式中的方法。In a twelfth aspect, a computer-readable storage medium is provided, and the computer-readable storage medium is used to store a computer program. Wherein, 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.
第十三方面,提供了一种计算机程序产品,包括计算机程序指令,该计算机程序指令使得计算机执行上述第一方面或第一方面的任意可能的实现方式中的方法。In a thirteenth aspect, a computer program product is provided, 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.
第十四方面,提供了一种计算机程序产品,包括计算机程序指令,该计算机程序指令使得计算机执行上述第二方面或第二方面的任意可能的实现方式中的方法。In a fourteenth aspect, a computer program product is provided, including computer program instructions that cause a computer to execute the foregoing second aspect or any possible implementation of the second aspect.
第十五方面,提供了一种计算机程序产品,包括计算机程序指令,该计 算机程序指令使得计算机执行上述第三方面或第三方面的任意可能的实现方式中的方法。In a fifteenth aspect, a computer program product is provided, including computer program instructions that cause a computer to execute the above-mentioned third aspect or the method in any possible implementation manner of the third aspect.
基于上述技术方案,利用从第一节点至第二节点的侦测包,记录该侦测包所经过的各个路径上的节点的地址,以用于第二节点在这些路径中选择最优路径。第一节点与第二节点之间进行后续的数据包传输时,可以仅通过该最优路径上的节点传输该数据包,而其余节点不传输该数据包。因此,该方法能够减少MESH网络中节点之间的不必要的数据传输,节省了节点资源。Based on the above technical solution, the detection packet from the first node to the second node is used to record the addresses of the nodes on each path that the detection packet passes, so that the second node selects the optimal path among these paths. When the subsequent data packet transmission is performed between the first node and the second node, the data packet may be transmitted only through the node on the optimal path, and the other nodes do not transmit the data packet. Therefore, this method can reduce unnecessary data transmission between nodes in the MESH network and save node resources.
附图说明Description of the drawings
图1是MESH网络的示意图。Figure 1 is a schematic diagram of the MESH network.
图2是本申请实施例的路径选择的方法的流程交互图。Fig. 2 is a flow interaction diagram of a path selection method according to an embodiment of the present application.
图3是第三节点对侦测包的处理过程的示意图。FIG. 3 is a schematic diagram of the processing procedure of the detection packet by the third node.
图4是第三节点建立白名单和黑名单的示意性流程图。Figure 4 is a schematic flow chart of the third node establishing the white list and the black list.
图5是基于图2所示的方法的一种可能的实现方式的示意图。Fig. 5 is a schematic diagram of a possible implementation based on the method shown in Fig. 2.
图6是本申请实施例的BLE设备的示意性框图。Fig. 6 is a schematic block diagram of a BLE device according to an embodiment of the present application.
图7是本申请实施例的BLE设备的示意性框图。Fig. 7 is a schematic block diagram of a BLE device according to an embodiment of the present application.
图8是本申请实施例的BLE设备的示意性框图。Fig. 8 is a schematic block diagram of a BLE device according to an embodiment of the present application.
图9是本申请实施例的BLE芯片的示意性结构图。FIG. 9 is a schematic structural diagram of a BLE chip according to an embodiment of the present application.
具体实施方式Detailed ways
下面将结合附图,对本申请中的技术方案进行描述。The technical solution in this application will be described below in conjunction with the accompanying drawings.
图1是一种可能的MESH网络的示意图。MESH网络可以认为是一种基于网络拓扑类型的无线通信系统。该MESH网络中包括多个设备,每个设备可以称为一个节点(node)。每个节点都可以进行数据传输。数据包可以在各个节点之间被中继,从而使该数据包传输至距离更远的位置。在实际应用中,这些节点可以被分布在制造工厂、办公楼、购物中心、商业园区、家庭以及其他环境中。该MESH网络中可以包括任意数量的节点,图1中仅以节点A至节点H、以及节点Z为例。在MESH网络中,数据包基于广播(advertising)的方式进行传输。每个节点接收另一节点发送的数据包后,对该数据包进行转发,从而将该数据包转发给附近其他节点。Figure 1 is a schematic diagram of a possible MESH network. The MESH network can be considered as a wireless communication system based on the network topology. The MESH network includes multiple devices, and each device 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 FIG. 1, only nodes A to H, and node Z are taken as examples. In the MESH network, data packets are transmitted based on advertising. After each node receives a data packet sent by another node, it forwards the data packet, thereby forwarding the data packet to other nearby nodes.
例如,节点A向节点Z发送的数据包可以经过至少一次中继达到节点Z。 其中,节点B接收到节点A发送的数据包后,可以将该数据包转发给节点C和节点D;节点E接收到该数据包后,可以将该数据包分别转发给节点D、节点F、节点G和节点H;节点F接收到该数据包后,可以将该数据包转发给节点E和节点G;节点C、节点D节点G节点H接收到该数据包时,可以向附近节点进一步转发,最终使该数据包到达节点Z。可见,节点A向节点Z发送的数据包可以经过至少一个路径达到节点Z,每个路径上包括的节点不完全相同,因此数据包从节点A通过不同路径传输至节点Z时,所经过的节点数量不同,所需要的传输时间也可能不同。这样,节点A和节点B之间的数据传输已经通过某个路径传输完成时,该数据仍然可能在MESH网络的其他节点之间进行传输。这些不必要的传输不仅使网络环境更为复杂,也浪费了节点资源。For example, the data packet sent by node A to node Z can reach node Z through at least one relay. Among them, after node B receives the data packet sent by node A, it can forward the data packet to node C and node D; after node E receives the data packet, it can forward the data packet to node D, node F, and node D respectively. Node G and node H; after node F receives the data packet, it can forward the data packet to node E and node G; node C, node D, node G, and node H can further forward the data packet to nearby nodes when receiving the data packet , And finally make the data packet reach node Z. It can be seen that the data packet sent by node A to node Z can reach node Z through at least one path, and the nodes included in each path are not exactly the same. Therefore, when the data packet is transmitted from node A to node Z through different paths, the node that it passes through The amount is different, the required transmission time may also be different. In this way, when the data transmission between node A and node B has been completed through a certain path, the data may still be transmitted between other nodes in the MESH network. These unnecessary transmissions not only make the network environment more complicated, but also waste node resources.
这里,节点A可以称为源节点,节点Z可以称为目标节点,其他用于中继的节点称为中继节点。Here, node A may be called a source node, node Z may be called a target node, and other nodes used for relay are called relay nodes.
图2是本申请实施例的路径选择的方法的流程交互图。该方法200应用于BLE的MESH网络中,该MESH网络中可以包括多个节点。图2中所示的方法200可以由MESH网络中的第一节点、第二节点、以及第三节点执行。其中,针对第一节点与第二节点之间的数据传输而言,该第一节点为源节点,第二节点为目标节点,第三节点为中继节点。图2中仅以一个中继节点,即第三节点为例进行描述,该MESH网络中的其他中继节点的相关操作与第三节点相同,可以参考以下针对第三节点的相关描述。如图2所示,该方法200可以包括以下步骤中的部分或全部。Fig. 2 is a flow interaction diagram of a path selection method according to an embodiment of the present application. The method 200 is applied to a BLE MESH network, and the MESH network may include multiple nodes. The method 200 shown in FIG. 2 may be executed by the first node, the second node, and the third node in the MESH network. For data transmission between the first node and the second node, the first node is the source node, the second node is the target node, and the third node is the relay node. In FIG. 2, only one relay node, that is, the third node, is used as an example for description. The related operations of other relay nodes in the MESH network are the same as those of the third node. You can refer to the following related descriptions for the third node. As shown in FIG. 2, the method 200 may include some or all of the following steps.
在210中,第一节点通过所述MESH网络,向第二节点发送至少一个侦测包。In 210, the first node sends at least one detection packet to the second node through the MESH network.
其中,该至少一个侦测包用于记录各自经过的路径上的节点的地址。Wherein, the at least one detection packet is used to record the address of the node on the path that each passes through.
在220中,第三节点接收从第一节点至第二节点的至少一个侦测包。In 220, the third node receives at least one detection packet from the first node to the second node.
在230中,第三节点在该至少一个侦测包中,添加第三节点的地址。In 230, the third node adds the address of the third node to the at least one detection packet.
在240中,第三节点转发该至少一个侦测包。In 240, the third node forwards the at least one detection packet.
在250中,第二节点接收来自第一节点的至少一个侦测包。In 250, the second node receives at least one detection packet from the first node.
其中,每个侦测包通过至少一个路径达到所述第二节点,该至少一个路径中的每个路径上传输的侦测包中包括每个路径上的节点的地址。Wherein, each detection packet reaches the second node through at least one path, and the detection packet transmitted on each path in the at least one path includes the address of the node on each path.
在260中,第二节点根据该至少一个侦测包,确定最优路径。In 260, the second node determines the optimal path according to the at least one detection packet.
在270中,第二节点发送响应于第一节点的第一应答包。In 270, the second node sends a first response packet in response to the first node.
其中,该第一应答包中包括该最优路径上的各个节点的地址。Wherein, the first response packet includes the address of each node on the optimal path.
在280中,第一节点接收来自第二节点的该第一应答包。In 280, the first node receives the first response packet from the second node.
该实施例中,第一节点可以向第二节点发送至少一个侦测包,接收到侦测包的第三节点会将自己的地址添加至该侦测包后再进行转发。每个侦测包可以通过至少一个路径达到第二节点,其中每个路径上的该侦测包中会携带其经过的该路径上的节点的地址。这样,第二节点就可以根据从不同路径传输过来的侦测包,确定第一节点与第二节点之间可能的路径,从而在这些路径中选择最优路径用于后续的数据传输。第二节点可以通过第一应答包,将其选择的最优路径告知MESH网络中的其他节点。In this embodiment, the first node may send at least one detection packet to the second node, and the third node that receives the detection packet will add its own address to the detection packet before forwarding it. Each detection packet can reach the second node through at least one path, and the detection packet on each path will carry the address of the node on the path it passes. In this way, the second node can determine the possible path between the first node and the second node based on the detection packets transmitted from different paths, so as to select the optimal path among these paths for subsequent data transmission. The second node can inform other nodes in the MESH network of the optimal path it chooses through the first response packet.
应理解,上述的至少一个侦测包可以是一个侦测包,也可以包括多个侦测包。当为多个侦测包时,其中每个侦测包具有各自的序号。It should be understood that the aforementioned at least one detection packet may be one detection packet or may include multiple detection packets. When there are multiple detection packets, each detection packet has its own sequence number.
一个侦测包在该MESH网络中进行转发时,可能多次到达第三节点。但是第三节点仅在该侦测包中添加一次自己的地址即可。第三节点可以在第一次接收到该侦测包时,在该侦测包中添加自己的地址,而后续接收到该侦测包时不再添加其地址。例如图3所示,第三节点接收到某个侦测包后,判断该侦测包中是否已经包括了第三节点的地址,如果该侦测包中包括第三节点的地址,第三节点不用再次添加其地址,而是直接转发该侦测包。如果该侦测包中不包括第三节点的地址,说明该侦测包是第一次达到第三节点,则第三节点在该侦测包中添加自己的地址之后再转发出去。When a detection packet is forwarded in the MESH network, it may reach the third node many times. However, the third node only needs to add its own address to the detection packet once. The third node may add its own address to the detection packet when receiving the detection packet for the first time, and no longer add its address when receiving the detection packet subsequently. For example, as shown in Figure 3, after the third node receives a detection packet, it determines whether the detection packet already includes the address of the third node. If the detection packet includes the address of the third node, the third node No need to add its address again, but directly forward the detection packet. If the detection packet does not include the address of the third node, it means that the detection packet reaches the third node for the first time, and the third node adds its own address to the detection packet before forwarding it.
在执行图2所示的方法之前,可选地,第一节点还可以向MESH网络中的各个节点发送一个路径优化消息,该路径优化消息用于指示MESH网络中的各个节点进入路径优化模式,当所有节点进入路径优化模式后,各个节点不主动转发其他消息,而仅转发侦测包。该侦测包可以具有特定的格式,以用于各个节点识别该侦测包。Before performing the method shown in FIG. 2, optionally, the first node may also send a path optimization message to each node in the MESH network, and the path optimization message is used to instruct each node in the MESH network to enter the path optimization mode. When all nodes enter the path optimization mode, each node does not actively forward other messages, but only forwards detection packets. The detection packet can have a specific format for each node to identify the detection packet.
进一步地,该第一应答包用于MESH网络中接收到该第一应答包的节点,建立各自的白名单和/或黑名单,该白名单和该黑名单用于确定是否转发第一节点与第二节点之间的数据包。Further, the first response packet is used for the nodes in the MESH network that received the first response packet to establish their respective whitelists and/or blacklists, and the whitelists and blacklists are used to determine whether to forward the first node and Data packets between the second node.
下面以第三节点为例,对该白名单和该黑名单的建立过程进行详细说明。The following takes the third node as an example to describe the whitelist and the process of establishing the blacklist in detail.
可选地,在步骤270中,如图4所示,第三节点具体可以执行步骤271至步骤274。Optionally, in step 270, as shown in FIG. 4, the third node may specifically execute step 271 to step 274.
在271中,第三节点接收从第二节点至第一节点的第一应答包。In 271, the third node receives the first response packet from the second node to the first node.
其中,该第一应答包中包括最优路径上的各个节点的地址。Wherein, the first response packet includes the address of each node on the optimal path.
在272中,若第一应答包中包括第三节点的地址,则第三节点将第一节点和第二节点的地址作为地址对,添加至第三节点的白名单中。In 272, if the first response packet includes the address of the third node, the third node adds the addresses of the first node and the second node as an address pair to the white list of the third node.
在273中,若第一应答包中不包括第三节点的地址,则第三节点将第一节点和第二节点的地址作为地址对,添加至第三节点的黑名单中。In 273, if the address of the third node is not included in the first response packet, the third node adds the addresses of the first node and the second node as an address pair to the blacklist of the third node.
在274中,第三节点转发该第一应答包。In 274, the third node forwards the first response packet.
其他接收到该第一应答包的节点可以采用相同的方法,建立自己的白名单和黑名单。Other nodes that receive the first response packet can use the same method to establish their own whitelist and blacklist.
在建立了自己的黑名单和白名单后,第三节点后续如果接收到从第一节点至第二节点的数据包,则可以根据自己的白名单和/或黑名单,确定是否转发该数据包。After establishing its own blacklist and whitelist, if the third node subsequently receives a data packet from the first node to the second node, it can determine whether to forward the data packet according to its own whitelist and/or blacklist .
例如,若由第一节点的地址和第二节点的地址组成的该地址对,位于该白名单中,则第三节点转发该数据包;若该地址对位于该黑名单中,第三节点不转发该数据包。For example, if the address pair consisting of the address of the first node and the address of the second node is in the whitelist, the third node forwards the data packet; if the address pair is in the blacklist, the third node does not Forward the packet.
第二节点发送的第一应答包中仅包括了最优路径上的各个节点的地址,因此由第一节点的地址和第二节点的地址组成的该地址对,仅会被最优路径上的各个节点添加至其白名单中,而被非最优路径上的各个节点添加至其黑名单中。这样,第一节点通过MESH向第二节点发送数据包时,只有最优路径上的那些节点会转发该数据包,而不在该最优路径上的节点不会转发该数据包。也就是说,不在最优路径上的那些节点会过滤掉该数据包而不进行转发,不仅节省了功耗,也减少了MESH网络中各个节点之间不必要的数据转发,降低了广播风暴,使第一节点至第二节点之间的传输更加稳定和高效,并且节省了MESH网络中的节点资源。The first response packet sent by the second node only includes the address of each node on the optimal path. Therefore, the address pair consisting of the address of the first node and the address of the second node will only be used by the address on the optimal path. Each node is added to its whitelist, and each node on the non-optimal path is added to its blacklist. In this way, when the first node sends a data packet to the second node through the MESH, only those nodes on the optimal path will forward the data packet, and nodes that are not on the optimal path will not forward the data packet. In other words, those nodes that are not on the optimal path will filter out the data packet without forwarding, which not only saves power consumption, but also reduces unnecessary data forwarding between nodes in the MESH network and reduces broadcast storms. Make the transmission between the first node and the second node more stable and efficient, and save node resources in the MESH network.
应理解,上述步骤272和步骤273可以同时存在,即,接收到第一应答包的节点可以同时建立黑名单和白名单;或者,这些节点也可以只建立黑名单或者只建立白名单。It should be understood that the above steps 272 and 273 may exist at the same time, that is, the nodes that receive the first response packet may establish a blacklist and a whitelist at the same time; or, these nodes may only establish a blacklist or only a whitelist.
例如,第三节点在接收到第一应答包后,若该第一应答包中包括第三节点的地址,则第三节点将第一节点和第二节点的地址作为地址对,添加至第三节点的白名单中。若第一应答包中不包括第三节点的地址,则第三节点直接将该第一应答包转发出去,而不做相关处理。之后,如果第三节点接收到 从第一节点至第二节点的数据包,会判断该数据包是否在其白名单中,如果在白名单中,则转发该数据包,如果不在该白名单中,则不转发该数据包。For example, after the third node receives the first response packet, if the first response packet includes the address of the third node, the third node uses the addresses of the first node and the second node as an address pair and adds it to the third node. The node's whitelist. If the first response packet does not include the address of the third node, the third node directly forwards the first response packet without any related processing. After that, if the third node receives a data packet from the first node to the second node, it will judge whether the data packet is in its white list, if it is in the white list, then forward the data packet, if it is not in the white list , The packet is not forwarded.
又例如,第三节点在接收到第一应答包后,若该第一应答包中不包括第三节点的地址,则第三节点将第一节点和第二节点的地址作为地址对,添加至第三节点的黑名单中。若第一应答包中包括第三节点的地址,则第三节点直接将该第一应答包转发出去,而不做相关处理。之后,如果第三节点接收到从第一节点至第二节点的数据包,会判断该数据包是否在其黑名单中,如果在黑名单中,则不转发该数据包,如果不在该黑名单中,则转发该数据包。For another example, after the third node receives the first response packet, if the first response packet does not include the address of the third node, the third node uses the addresses of the first node and the second node as an address pair and adds it to The third node is in the blacklist. If the first response packet includes the address of the third node, the third node directly forwards the first response packet without any related processing. After that, if the third node receives a data packet from the first node to the second node, it will determine whether the data packet is in its blacklist, if it is in the blacklist, it will not forward the data packet, if it is not in the blacklist In, the data packet is forwarded.
第三节点的白名单和黑名单可以用于第一节点与第二节点之间的数据包传输。在一种情况下,对于从第一节点向第二节点发送的数据包,以及从第二节点向第一节点发送的数据包,第三节点均可以使用该白名单和黑名单判断是否对数据包进行转发。The whitelist and blacklist of the third node can be used for data packet transmission between the first node and the second node. In one case, for data packets sent from the first node to the second node, and data packets sent from the second node to the first node, the third node can use the whitelist and blacklist to determine whether to The packet is forwarded.
在另一种情况下,第一节点向第二节点发送侦测包时所确定的最优路径,与第二节点向第一节点发送侦测包时所确定的最优路径,可能不同。这时,第三节点的白名单和黑名单仅用于从第一节点至第二节点的数据包。第三节点可以将第一节点与第二节点的地址作为地址对,并根据相应的传输方向添加至合适的名单中。例如,该地址对对应的传输方向是从第一节点至第二节点,则可能被添加至白名单中,而该地址对对应的传输方向是从第二节点至第一节点,则可能被添加至黑名单中。那么,第三节点仅转发从第一节点向第二节点发送的数据包,而不转发从第二节点向第一节点发送的数据包。In another case, the optimal path determined when the first node sends the detection packet to the second node may be different from the optimal path determined when the second node sends the detection packet to the first node. At this time, the whitelist and blacklist of the third node are only used for data packets from the first node to the second node. The third node can use the addresses of the first node and the second node as an address pair, and add them to the appropriate list according to the corresponding transmission direction. For example, if the transmission direction corresponding to the address pair is from the first node to the second node, it may be added to the whitelist, and the transmission direction corresponding to the address pair is from the second node to the first node, it may be added To the blacklist. Then, the third node only forwards the data packet sent from the first node to the second node, and does not forward the data packet sent from the second node to the first node.
下面具体描述步骤260中的第二节点如何根据第一节点发送的至少一个侦测包,确定最优路径。The following specifically describes how the second node in step 260 determines the optimal path according to at least one detection packet sent by the first node.
可选地,步骤260可以包括步骤261和步骤262。Optionally, step 260 may include step 261 and step 262.
在261中,第二节点在每个侦测包所经过的至少一个路径中,确定所述每个侦测包对应的候选路径。In 261, the second node determines a candidate path corresponding to each detection packet in at least one path traversed by each detection packet.
例如,第二节点根据每个侦测包从该至少一个路径分别传输至所述第二节点所经过的传输时间和/或节点数量,在该至少一个路径中确定每个侦测包对应的候选路径。For example, the second node determines the candidate corresponding to each detection packet in the at least one path according to the transmission time and/or the number of nodes that each detection packet is transmitted from the at least one path to the second node. path.
在262中,第二节点在该至少一个侦测包对应的至少一个候选路径中,确定该最优路径。In 262, the second node determines the optimal path among at least one candidate path corresponding to the at least one detection packet.
该实施例中,针对第一节点发送的每一个侦测包,都可以经过至少一个 路径传输至第二节点。第二节点在判断最优路径时,考虑了该侦测包在不同路径上的传输时间和/或不同路径上的节点数量。第二节点可以将传输时间较短和/或节点数量较少的一个或多个路径,作为该侦测包对应的候选路径。当第一节点发送多个侦测包例如编号1至N的N个侦测包时,第二节点根据每个侦测包都可以确定出其对应的候选路径,因此这N个侦测包都具有各自对应的候选路径。最后,第二节点在这N个侦测包各自对应的候选路径中,选择最优路径。In this embodiment, each detection packet sent by the first node can be transmitted to the second node through at least one path. When the second node judges the optimal path, it considers the transmission time of the detection packet on different paths and/or the number of nodes on different paths. The second node may use one or more paths with a short transmission time and/or a small number of nodes as candidate paths corresponding to the detection packet. When the first node sends multiple detection packets, such as N detection packets numbered from 1 to N, the second node can determine the corresponding candidate path according to each detection packet, so these N detection packets are all Have their respective candidate paths. Finally, the second node selects the optimal path among the candidate paths corresponding to the N detection packets.
在步骤261中,针对每个侦测包,第二节点可以根据该侦测包所经过的至少一个路径上的传输时间,或者根据该至少一个路径上的节点数量,在该至少一个路径中,选择该侦测包对应的候选路径。In step 261, for each detection packet, the second node may according to the transmission time on the at least one path that the detection packet traverses, or according to the number of nodes on the at least one path, in the at least one path, Select the candidate path corresponding to the detection packet.
或者,第二节点也可以综合考虑该传输时间和该节点数量,选择每个侦测包对应的候选路径。Alternatively, the second node may also comprehensively consider the transmission time and the number of nodes, and select the candidate path corresponding to each detection packet.
例如,第二节点可以先在该至少一个路径中选择传输时间最短的M个侦测包,再在这M个侦测包中选择经过节点数量最少的K个侦测包,并将这K个侦测包所经过的路径,作为每个侦测包对应的候选路径。For example, the second node may first select the M detection packets with the shortest transmission time in the at least one path, and then select the K detection packets with the least number of nodes passing through the M detection packets, and then combine the K detection packets with the least number of nodes. The path that the detection packet traverses is used as the candidate path corresponding to each detection packet.
又例如,第二节点可以先在该至少一个路径中选择经过节点数量最少的M个侦测包,再在这M个侦测包中选择传输时间最短的K个侦测包,并将这K个侦测包所经过的路径,作为每个侦测包对应的候选路径。For another example, the second node may first select the M detection packets with the least number of nodes passing through the at least one path, and then select the K detection packets with the shortest transmission time among the M detection packets, and combine the K detection packets with the shortest transmission time. The path traversed by each detection packet is used as the candidate path corresponding to each detection packet.
其中,M和K为正整数,且K<M。Among them, M and K are positive integers, and K<M.
一条路径的传输时间可能受到多种因素的影响。通常,节点数量较少的路径的传输时间较短。但是,在一些情况下,该路径的传输时间也受到该路径上的各个节点的性能的影响。例如,如果该路径上的某个节点扫描或处理侦测包的速度很慢,那么该节点可能会导致该路径的传输时间加长,这时,即使该路径上的节点数量较少,也可能导致其传输时间较长;如果该路径上的某个节点扫描或处理侦测包的速度明显高于其他路径上的节点,那么该节点可以明显缩短该路径的传输时间,这时,即使该路径上的节点数量较多,也可能使传输时间很短。The transmission time of a path may be affected by many factors. Generally, a path with a smaller number of nodes has a shorter transmission time. However, in some cases, the transmission time of the path is also affected by the performance of each node on the path. For example, if a node on the path scans or processes detection packets very slowly, then the node may cause the transmission time of the path to increase. At this time, even if the number of nodes on the path is small, it may cause The transmission time is longer; if a node on the path scans or processes detection packets at a significantly higher speed than the nodes on other paths, then the node can significantly shorten the transmission time of the path. At this time, even if the path is The larger number of nodes may also make the transmission time very short.
应理解,在步骤262中,所述的至少一个侦测包的数量,与所述的至少一个候选路径的数量可以相等,也可以不相等。第二节点针对每个侦测包,可以在其经过的各个路径中仅选择一个候选路径,也可以选择多个候选路径。因此,至少一个侦测包对应的至少一个候选路径的数量,可以大于或者等于 该至少一个侦测包的数量。It should be understood that in step 262, the number of the at least one detection packet and the number of the at least one candidate path may be equal or not equal. For each detection packet, the second node may select only one candidate path from each path it passes, or may select multiple candidate paths. Therefore, the number of at least one candidate path corresponding to the at least one detection packet may be greater than or equal to the number of the at least one detection packet.
另外,在步骤262中,第二节点确定的最优路径可以是一个,也可以是多个。当第二节点确定了一个最优路径时,第二节点向MESH网络中的各个节点发送的第一应答包中,包括该最优路径中各个节点的地址。而第二节点确定了多个最优路径时,该第一应答包中包括这多个最优路径中每个最优路径上的节点。In addition, in step 262, the optimal path determined by the second node may be one or multiple. When the second node determines an optimal path, the first response packet sent by the second node to each node in the MESH network includes the address of each node in the optimal path. When the second node determines multiple optimal paths, the first response packet includes a node on each of the multiple optimal paths.
当第二节点确定了每个侦测包对应的候选路径后,在这些侦测包各自对应的候选路径中,确定最优路径。可选地,在步骤262中,第二节点可以在该至少一个侦测包对应的至少一个候选路径中,选择出现概率最高的候选路径作为最优路径。After the second node determines the candidate path corresponding to each detection packet, the optimal path is determined among the candidate paths corresponding to the detection packets. Optionally, in step 262, the second node may select the candidate path with the highest occurrence probability as the optimal path among the at least one candidate path corresponding to the at least one detection packet.
若第一节点仅发送一个侦测包时,该侦测包对应的候选路径即为该最优路径。考虑到MESH网络中各个节点可能存在的不稳定性,基于一个侦测包所选择出来的最优路径可能不可靠。因此,第一节点可以发送多个侦测包例如编号1至N的N个侦测包,这时,第二节点可以根据每个侦测包,确定该侦测包对应的候选路径,从而在多个侦测包各自对应的候选路径中,选择出现概率最高的候选路径作为该最优路径。出现概率越高的候选路径越可靠。这样可以极大地提高所选择出来的最优路径的可靠性。If the first node sends only one detection packet, the candidate path corresponding to the detection packet is the optimal path. Considering the possible instability of each node in the MESH network, the optimal path selected based on a detection packet may be unreliable. Therefore, the first node can send multiple detection packets, such as N detection packets numbered from 1 to N. At this time, the second node can determine the candidate path corresponding to the detection packet according to each detection packet, so as to Among the candidate paths corresponding to each of the multiple detection packets, the candidate path with the highest occurrence probability is selected as the optimal path. The candidate path with the higher the probability of occurrence is more reliable. This can greatly improve the reliability of the selected optimal path.
进一步地,可选地,所述第二节点还可以在该至少一个侦测包对应的至少一个候选路径中,确定最优路径的备选路径。Further, optionally, the second node may also determine a candidate path of the optimal path among at least one candidate path corresponding to the at least one detection packet.
其中,备选路径例如可以是该至少一个候选路径中与最优路径之间重叠节点的数量最少的路径。其中,与最优路径之间重叠节点的数量为0,表示与最优路径之间没有重叠节点。Wherein, the candidate path may be, for example, the path with the least number of overlapping nodes between the at least one candidate path and the optimal path. Among them, the number of overlapping nodes with the optimal path is 0, which means that there are no overlapping nodes with the optimal path.
这时,第一应答包中还包括备选路径上的各个节点的地址。At this time, the first response packet also includes the address of each node on the alternative path.
当最优路径中的某些节点无法正常工作时,最优路径将无法使用。这时,可以通过备选路径传输第一节点和第二节点之间的数据包,从而提高了第一节点和第二节点之间的数据包传输的可靠性。When some nodes in the optimal path cannot work normally, the optimal path cannot be used. At this time, the data packet between the first node and the second node can be transmitted through the alternative path, thereby improving the reliability of the data packet transmission between the first node and the second node.
下面以图5为例,详细描述本申请实施例所述的路径选择方法的一种可能的实现方式。如图5所示,假设MESH网络中包括节点A至节点H以及节点Z。现在需要确定节点A至节点Z之间的最优路径。节点A为前述的第一节点,节点Z为前述的第二节点,节点B至节点H为前述的第三节点。图5中的各个节点加入MESH网络并组网成功之后,执行以下路径选择流程:The following takes FIG. 5 as an example to describe in detail a possible implementation manner of the path selection method described in the embodiment of the present application. As shown in Figure 5, assume that the MESH network includes nodes A to H and node Z. Now we need to determine the optimal path from node A to node Z. Node A is the aforementioned first node, node Z is the aforementioned second node, and node B to node H are the aforementioned third node. After each node in Figure 5 joins the MESH network and successfully builds the network, execute the following path selection process:
501、节点A发送路径选择消息,以指示其他节点进入路径选择模式。501. Node A sends a path selection message to instruct other nodes to enter path selection mode.
502、节点A依次发送序号1至序号N的N个侦测包,至节点Z。502. Node A sends N detection packets of sequence number 1 to sequence number N to node Z in sequence.
503、节点B至节点H接收到每个序号的侦测包后,判断该序号的侦测包中是否包括自己的地址。503. After receiving the detection packet of each sequence number, the node B to the node H judge whether the detection packet of the sequence number includes its own address.
如果该序号的侦测包中包括自己的地址,则直接转发该序号的侦测包;如果该序号的侦测包中不包括自己的地址,则在该序号的侦测包中添加自己的地址后再将其转发出去。If the detection packet of the serial number includes its own address, the detection packet of the serial number is directly forwarded; if the detection packet of the serial number does not include its own address, then add your own address to the detection packet of the serial number Then forward it out.
504、节点Z接收到序号1至序号N的N个侦测包。504. Node Z receives N detection packets from sequence number 1 to sequence number N.
其中,每个序号的侦测包都可以通过至少一个路径达到节点Z。Among them, the detection packet of each sequence number can reach node Z through at least one path.
505、节点Z确定每个序号的侦测包对应的候选路径。505. Node Z determines the candidate path corresponding to each detection packet of the sequence number.
以1号侦测包为例,假设1号侦测包经过8条路径从节点A达到节点Z。这8条路径例如表一所示。表一中的路径1至路径8按照侦测包的到达顺序的先后,从上至下依次排列。Taking detection packet No. 1 as an example, suppose that detection packet No. 1 goes from node A to node Z through 8 paths. These 8 paths are shown in Table 1 for example. Paths 1 to 8 in Table 1 are arranged in order from top to bottom according to the order of arrival of detection packets.
表一Table I
1号侦测包所经过的路径Path taken by detection packet No. 1 路径上的节点Nodes on the path
路径1Path 1 节点A→节点B→节点C→节点ZNode A → Node B → Node C → Node Z
路径2Path 2 节点A→节点B→节点D→节点ZNode A → Node B → Node D → Node Z
路径3Path 3 节点A→节点B→节点D→节点C→节点ZNode A → Node B → Node D → Node C → Node Z
路径4Path 4 节点A→节点E→节点D→节点ZNode A → Node E → Node D → Node Z
路径5Path 5 节点A→节点E→节点H→节点ZNode A → Node E → Node H → Node Z
路径6Path 6 节点A→节点E→节点D→节点H→节点ZNode A → Node E → Node D → Node H → Node Z
路径7Path 7 节点A→节点E→节点G→节点H→节点ZNode A → Node E → Node G → Node H → Node Z
路径8Path 8 节点A→节点F→节点G→节点H→节点ZNode A → Node F → Node G → Node H → Node Z
节点Z通过上述8条路径接收到1号侦测包后,在其中选择1号侦测包对应的候选路径。具体地,节点Z可以在这8条路径中,先选择传输时间最短的6条路径,即最先接收到的6条路径,这里为路径1至路径6。其次,节点Z在这6条路径中,从上至下依次选择包含节点数量最少的2条路径,这里为路径1和路径2。因此,1号侦测包对应的候选路径即为路径1和路径2。After node Z receives the detection packet No. 1 through the above 8 paths, it selects the candidate path corresponding to the detection packet No. 1 among them. Specifically, the node Z may first select the 6 paths with the shortest transmission time among the 8 paths, that is, the 6 paths received first, which are path 1 to path 6 here. Secondly, among the 6 paths, node Z selects the 2 paths with the least number of nodes from top to bottom, here is path 1 and path 2. Therefore, the candidate paths corresponding to detection packet No. 1 are path 1 and path 2.
对于序号2至序号N的侦测包,节点Z采用相同的方式确定其对应的 候选路径。这里是以每个序号的侦测包对应2条候选路径为例进行描述,在实际应用中可以根据MESH网络中的节点数量和节点特性等,为每个序号的侦测包选择其他数量的候选路径。For the detection packets of sequence number 2 to sequence number N, node Z uses the same method to determine its corresponding candidate path. Here is an example of two candidate paths corresponding to each serial number detection packet. In practical applications, other numbers of candidates can be selected for each serial number detection packet according to the number of nodes and node characteristics in the MESH network. path.
假设节点Z针对这N个侦测包所选择出来的候选路径如表二所示。Suppose that the candidate path selected by node Z for these N detection packets is shown in Table 2.
表二Table II
侦测包Detection package 候选路径Candidate path
1号侦测包Detection package No. 1 路径1、路径2Path 1, path 2
2号侦测包Detection package 2 路径2、路径4Path 2, Path 4
3号侦测包No. 3 detection package 路径1、路径2Path 1, path 2
……... ……...
N-1号侦测包N-1 detection package 路径2、路径9Path 2, path 9
N号侦测包N detection package 路径1、路径5Path 1, path 5
506、节点Z在N个侦测包对应的候选路径中,选择最优路径。506. Node Z selects the optimal path among the candidate paths corresponding to the N detection packets.
若节点Z可以选择两个最优路径,那么,节点Z可以在表二中选择出现概率最高的两个候选路径作为最优路径,这里假设表二中出现概率最高的两个候选路径为路径1和路径2,则节点Z最终选择的节点A至节点Z的最优路径为路径1和路径2,如图5所示。If node Z can choose two optimal paths, then node Z can select the two candidate paths with the highest occurrence probability in Table 2 as the optimal path. Here it is assumed that the two candidate paths with the highest occurrence probability in Table 2 are path 1. And path 2, then the optimal path from node A to node Z finally selected by node Z is path 1 and path 2, as shown in Figure 5.
节点Z还可以在表二所示的候选路径中选择一个备选路径,该备选路径与路径1和路径2最好包括不同的节点,以避免路径1和路径2中的节点故障时,同时影响最优路径和备选路径的使用。假设节点Z选择了路径5作为备选路径。路径5中的节点E和节点H,与路径1和路径2中的节点B、节点C和节点D都不重叠。为了简洁,以下步骤的描述中均不考虑备选路径。备选路径的使用方式可以参考最优路径的使用方式。Node Z can also select an alternative path from the candidate paths shown in Table 2. The alternative path and path 1 and path 2 preferably include different nodes to avoid node failure in path 1 and path 2, and at the same time Affect the use of optimal paths and alternative paths. Assume that node Z selects path 5 as the candidate path. Node E and node H in path 5 do not overlap with node B, node C, and node D in path 1 and path 2. For the sake of brevity, the description of the following steps does not consider alternative paths. The way of using the alternative path can refer to the way of using the optimal path.
507、节点Z生成第一应答包,并向MESH网络中的各个节点发送第一应答包。507. Node Z generates a first response packet, and sends the first response packet to each node in the MESH network.
其中,该第一应答包中包括最优路径上的节点的地址,即节点B、节点C和节点D的地址。Wherein, the first response packet includes the addresses of nodes on the optimal path, that is, the addresses of node B, node C, and node D.
508、节点B至节点H接收到该第一应答包后,建立各自的白名单和黑名单,并转发该第一应答包。508. After receiving the first response packet, Node B to Node H establish their respective whitelists and blacklists, and forward the first response packet.
以节点C为例,节点C接收到第一应答包后,发现第一应答包中包括 自己的地址,那么,节点C可以将节点A和节点Z的地址作为一个地址对,添加在自己的白名单中。Take node C as an example. After node C receives the first response packet, it finds that the first response packet includes its own address. Then, node C can use the addresses of node A and node Z as an address pair and add it to its own white address. In the list.
以节点G为例,节点G接收到第一应答包后,发现第一应答包中没有包括自己的地址,那么,节点G可以将节点A和节点Z的地址作为一个地址对,添加在自己的黑名单中。Take node G as an example. After node G receives the first response packet, it finds that the first response packet does not include its own address. Then, node G can use the addresses of node A and node Z as an address pair and add it to its own address. In the blacklist.
这样,节点A和节点Z的地址所组成的地址对,会被节点B、节点C和节点D添加至白名单中,而被其他节点添加至黑名单中。In this way, the address pair composed of the addresses of node A and node Z will be added to the white list by node B, node C, and node D, and added to the black list by other nodes.
509、节点A接收到第一应答包后,发送确认消息给节点Z。509. After node A receives the first response packet, it sends a confirmation message to node Z.
510、节点Z接收到该确认消息,路径选择流程结束。510. Node Z receives the confirmation message, and the path selection process ends.
511、节点A向MESH网络中的各个节点发送路径选择完成消息,以指示这些节点退出路径选择模式。511. Node A sends a path selection completion message to each node in the MESH network to instruct these nodes to exit the path selection mode.
之后,这些节点可以根据各自的白名单和黑名单执行节点A至节点Z之间的数据包的转发。Afterwards, these nodes can perform the forwarding of data packets between node A and node Z according to their respective white lists and black lists.
可以看出,此后节点A在向节点Z发送数据包时,只有节点B、节点C和节点D会对该数据包进行转发,而其他节点不会对该数据包进行转发。这就避免了节点之间不必要的数据传输,明显降低了网络风暴,节省了节点资源。It can be seen that when node A sends a data packet to node Z, only node B, node C, and node D will forward the data packet, and other nodes will not forward the data packet. This avoids unnecessary data transmission between nodes, significantly reduces network storms, and saves node resources.
考虑到网络环境可能发生变化,因此可以对该最优路径进行更新。第一节点可以根据最优路径是否可靠、路径传输时延是否增大、MESH网络中是否增减节点等因素,判断是否需要更新该最优路径。Considering that the network environment may change, the optimal path can be updated. The first node can determine whether the optimal path needs to be updated based on factors such as whether the optimal path is reliable, whether the path transmission delay is increased, and whether nodes are added or removed in the MESH network.
例如,第一节点可以检测该最优路径上的各个节点发出的心跳包(heartbeat),如果在预定时长内没有检测到最优路径上的某个或某些节点发出的心跳包,第一节点可以通过该最优路径,向第二节点发送多个更新包。第二节点接收到来自第一节点的多个更新包后,通过该最优路径,向第一节点发送分别响应于多个更新包的多个第二应答包。第一节点接收来自第二节点的第二应答包,并根据第二应答包的接收时间和/或接收数量,确定是否更新该最优路径。For example, the first node can detect the heartbeat packets sent by each node on the optimal path. If the heartbeat packets sent by one or some nodes on the optimal path are not detected within a predetermined period of time, the first node It is possible to send multiple update packets to the second node through the optimal path. After receiving the multiple update packets from the first node, the second node sends multiple second response packets that respond to the multiple update packets to the first node through the optimal path. The first node receives the second response packet from the second node, and determines whether to update the optimal path according to the receiving time and/or the received quantity of the second response packet.
假设第一节点发送了P个更新包。第一节点接收到了第二应答包,则说明该最优路径依然有效。而如果第一节点没有接收到任何第二应答包,或者第一节点接收到的第二应答包的数量低于预定比例,则说明有一定程度的丢包情况发生,那么该路径的可靠性降低,可以对该最优路径进行更新。相反, 如果第一节点接收到了全部P个第二应答包,或者第一节点接收到的第二应答包的数量高于预定比例,则说明该最优路径依然可靠,不需要进行更新。Assume that the first node sends P update packets. The first node receives the second response packet, which indicates that the optimal path is still valid. If the first node does not receive any second response packets, or the number of second response packets received by the first node is lower than the predetermined ratio, it means that a certain degree of packet loss has occurred, and the reliability of the path is reduced. , The optimal path can be updated. On the contrary, if the first node has received all P second response packets, or the number of second response packets received by the first node is higher than a predetermined ratio, it indicates that the optimal path is still reliable and does not need to be updated.
第一节点也可以考虑最优路径的传输时延,如果第一节点在时延要求内没有接收到第二应答包,或者在时延要求内没有接收到预定比例的第二应答包,则对该最优路径进行更新。The first node can also consider the transmission delay of the optimal path. If the first node does not receive the second response packet within the delay requirement, or does not receive a predetermined proportion of the second response packet within the delay requirement, it will The optimal path is updated.
又例如,第一节点也可以根据MESH网络中的节点数量的变化,确定是否更新所述最优路径。For another example, the first node may also determine whether to update the optimal path according to a change in the number of nodes in the MESH network.
当有新的节点加入该MESH网络,或者有节点离开该MESH网络时,第一节点可以判断是否更新该最优路径。比如有新的节点加入MESH网络时,第一节点可以考虑更新该最优路径。又比如,节点数量发生变化后,通过前述方式确定最优路径的可靠性和时延是否受到影响,如果受到影响,则更新该最优路径。When a new node joins the MESH network or a node leaves the MESH network, the first node can determine whether to update the optimal path. For example, when a new node joins the MESH network, the first node may consider updating the optimal path. For another example, after the number of nodes changes, the foregoing method is used to determine whether the reliability and delay of the optimal path are affected, and if affected, the optimal path is updated.
此外,第一节点也可以通过其他方式对最优路径进行更新,例如按照一定的时间周期对该最优路径进行更新。In addition, the first node may also update the optimal path in other ways, for example, update the optimal path according to a certain time period.
第一节点确定更新最优路径后,可以向MESH网络中的各个节点发送路径解除消息,以指示接收到该路径解除消息的各个节点从自己的白名单和黑名单中删除第一节点和第二节点所组成的地址对。之后重新按照本申请实施例所述的方法选择新的最优路径即可。After the first node determines to update the optimal path, it can send a path release message to each node in the MESH network to instruct each node that receives the path release message to delete the first node and the second node from its whitelist and blacklist. An address pair composed of nodes. After that, the new optimal path can be selected again according to the method described in the embodiment of the present application.
在本申请实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。In the embodiments of this application, 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. .
并且,在不冲突的前提下,本申请描述的各个实施例和/或各个实施例中的技术特征可以任意的相互组合,组合之后得到的技术方案也应落入本申请的保护范围。Moreover, under the premise of no conflict, the various embodiments described in this application and/or the technical features in each embodiment can be combined with each other arbitrarily, and the technical solutions obtained after the combination should also fall within the protection scope of this application.
上文中详细描述了根据本申请实施例的数据传输的方法,下面将结合图6至图9,描述根据本申请实施例的装置,方法实施例所描述的技术特征适用于以下装置实施例。The data transmission method according to the embodiment of the present application is described in detail above. The device according to the embodiment of the present application will be described below with reference to FIGS. 6 to 9. The technical features described in the method embodiment are applicable to the following device embodiments.
图6是根据本申请实施例的BLE设备600的示意性框图。如图6所示,BLE设备600为BLE的MESH网络中的第二节点,所述MESH网络中包括多个节点,BLE设备600包括:Fig. 6 is a schematic block diagram of a BLE device 600 according to an embodiment of the present application. As shown in FIG. 6, the BLE device 600 is the second node in the BLE MESH network, the MESH network includes multiple nodes, and the BLE device 600 includes:
收发单元610,用于接收来自所述MESH网络中的第一节点的至少一个 侦测包,其中,每个侦测包通过至少一个路径达到所述第二节点,所述至少一个路径中的每个路径上传输的侦测包中包括所述每个路径上的节点的地址;The transceiver unit 610 is configured to receive at least one detection packet from the first node in the MESH network, wherein each detection packet reaches the second node through at least one path, and each of the at least one path The detection packet transmitted on each path includes the address of the node on each path;
处理单元620,用于根据所述至少一个侦测包,确定最优路径;The processing unit 620 is configured to determine an optimal path according to the at least one detection packet;
收发单元610还用于,发送响应于所述第一节点的第一应答包,其中,所述第一应答包中包括所述最优路径上的各个节点的地址。The transceiving unit 610 is further configured to send a first response packet in response to the first node, wherein the first response packet includes the address of each node on the optimal path.
因此,第二节点接收到来自第一节点的侦测包时,由于侦测包中包括该侦测包所经过的路径上的节点的地址,因此第二节点可以根据从不同路径传输过来的侦测包,确定第一节点与第二节点之间可能的路径,从而在这些路径中选择最优路径用于后续的数据传输。第一节点与第二节点之间进行后续的数据传输时,可以仅通过该最优路径上的节点传输数据包,而其余节点可以不传输数据包。这样能够减少MESH网络中节点之间的不必要的数据传输,并节省节点资源。Therefore, when the second node receives the detection packet from the first node, since the detection packet includes the address of the node on the path through which the detection packet passes, the second node can be based on the detection packet transmitted from a different path. Test the packet, determine the possible path between the first node and the second node, and select the optimal path among these paths for subsequent data transmission. During subsequent data transmission between the first node and the second node, the data packet may be transmitted only through the node on the optimal path, and the other nodes may not transmit the data packet. This can reduce unnecessary data transmission between nodes in the MESH network and save node resources.
可选地,所述第一应答包用于所述MESH网络中接收到所述第一应答包的节点,建立各自的白名单和/或黑名单,所述白名单和所述黑名单用于确定是否转发所述第一节点与所述第二节点之间的数据包。Optionally, the first response packet is used for a node in the MESH network that receives the first response packet to establish a respective whitelist and/or blacklist, and the whitelist and the blacklist are used for Determining whether to forward the data packet between the first node and the second node.
可选地,处理单元620具体用于:根据每个侦测包从所述至少一个路径分别传输至所述第二节点所经过的传输时间和/或节点数量,在所述至少一个路径中确定所述每个侦测包对应的候选路径;在所述至少一个侦测包对应的至少一个候选路径中,确定所述最优路径。Optionally, the processing unit 620 is specifically configured to: determine in the at least one path according to the transmission time and/or the number of nodes that each detection packet has been transmitted from the at least one path to the second node. The candidate path corresponding to each detection packet; among at least one candidate path corresponding to the at least one detection packet, the optimal path is determined.
可选地,处理单元620具体用于:在所述至少一个路径中,选择传输时间最短的M个侦测包;在所述M个侦测包中,选择经过节点数量最少的K个侦测包,M和K为正整数且K<M;将所述K个侦测包所经过的路径,作为所述每个侦测包对应的候选路径。Optionally, the processing unit 620 is specifically configured to: in the at least one path, select M detection packets with the shortest transmission time; among the M detection packets, select K detection packets with the least number of nodes. Packet, M and K are positive integers and K<M; the path taken by the K detection packets is taken as the candidate path corresponding to each detection packet.
可选地,处理单元620具体用于:在所述至少一个侦测包对应的至少一个候选路径中,选择出现概率最高的候选路径作为所述最优路径。Optionally, the processing unit 620 is specifically configured to: among the at least one candidate path corresponding to the at least one detection packet, select the candidate path with the highest occurrence probability as the optimal path.
可选地,处理单元620还用于:在所述至少一个侦测包对应的至少一个候选路径中,确定所述最优路径的备选路径,其中,所述备选路径是所述至少一个候选路径中与所述最优路径之间重叠节点的数量最少的路径。Optionally, the processing unit 620 is further configured to determine, among at least one candidate path corresponding to the at least one detection packet, a candidate path of the optimal path, wherein the candidate path is the at least one candidate path. Among the candidate paths, the path with the least number of overlapping nodes with the optimal path.
可选地,所述第一应答包中还包括所述备选路径上的各个节点的地址。Optionally, the first response packet also includes the address of each node on the candidate path.
可选地,收发单元610还用于:接收来自所述第一节点的多个更新包; 分别响应于所述多个更新包,通过所述最优路径向所述第一节点发送多个第二应答包,其中,所述第二应答包的接收时间和/或接收数量,用于所述第一节点确定是否更新所述最优路径。Optionally, the transceiving unit 610 is further configured to: receive multiple update packets from the first node; respectively, in response to the multiple update packets, send multiple first nodes to the first node through the optimal path. A second response packet, wherein the receiving time and/or the received quantity of the second response packet are used by the first node to determine whether to update the optimal path.
应理解,节点600可以执行上述方法实施例中由第二节点执行的相应操作,为了简洁,在此不再赘述。It should be understood that the node 600 may perform the corresponding operations performed by the second node in the foregoing method embodiments, and for the sake of brevity, details are not described herein again.
图7是根据本申请实施例的BLE设备700的示意性框图。如图7所示,所述BLE设备700为BLE的MESH网络中的第三节点,所述MESH网络中包括多个节点,BLE设备700包括:Fig. 7 is a schematic block diagram of a BLE device 700 according to an embodiment of the present application. As shown in FIG. 7, the BLE device 700 is the third node in the BLE MESH network, the MESH network includes multiple nodes, and the BLE device 700 includes:
收发单元710,用于接收从所述MESH网络中的第一节点至所述MESH网络中的第二节点的至少一个侦测包;The transceiver unit 710 is configured to receive at least one detection packet from a first node in the MESH network to a second node in the MESH network;
处理单元720,用于在所述至少一个侦测包中,添加所述第三节点的地址;The processing unit 720 is configured to add the address of the third node to the at least one detection packet;
收发单元710还用于,转发所述至少一个侦测包,所述至少一个侦测包用于所述第二节点选择所述第一节点与所述第二节点之间的最优路径。The transceiver unit 710 is further configured to forward the at least one detection packet, and the at least one detection packet is used by the second node to select the optimal path between the first node and the second node.
因此,第三节点在接收到从第一节点至第二节点的侦测包时,通过在该侦测包中加入自己的地址,以使第二节点可以根据从不同路径传输过来的侦测包,确定第一节点与第二节点之间可能的路径,从而在这些路径中选择最优路径用于后续的数据传输。这样能够减少MESH网络中节点之间的不必要的数据传输,并节省节点资源。Therefore, when the third node receives a detection packet from the first node to the second node, it adds its own address to the detection packet, so that the second node can follow the detection packets transmitted from different paths. , Determine the possible path between the first node and the second node, so as to select the optimal path among these paths for subsequent data transmission. This can reduce unnecessary data transmission between nodes in the MESH network and save node resources.
可选地,收发单元710还用于:接收从所述第二节点至所述第一节点的第一应答包,所述第一应答包中包括所述最优路径上的各个节点的地址;处理单元720还用于:若所述第一应答包中包括所述第三节点的地址,则将所述第一节点和所述第二节点的地址作为地址对,添加至所述第三节点的白名单中;和/或,若所述第一应答包中不包括所述第三节点的地址,则将所述地址对,添加至所述第三节点的黑名单中;收发单元710还用于:转发所述第一应答包。Optionally, the transceiver unit 710 is further configured to: receive a first response packet from the second node to the first node, where the first response packet includes the address of each node on the optimal path; The processing unit 720 is further configured to: if the first response packet includes the address of the third node, add the addresses of the first node and the second node as an address pair to the third node And/or, if the address of the third node is not included in the first response packet, add the address pair to the blacklist of the third node; the transceiver unit 710 also Used for: forwarding the first response packet.
可选地,收发单元710还用于:接收从所述第一节点至所述第二节点的数据包;处理单元720还用于:根据所述白名单和/或所述黑名单,确定是否转发所述数据包。Optionally, the transceiving unit 710 is further configured to: receive a data packet from the first node to the second node; the processing unit 720 is further configured to: determine whether or not according to the whitelist and/or the blacklist Forward the data packet.
可选地,收发单元710具体用于:若所述地址对位于所述白名单中,转发所述数据包;和/或,若所述地址对位于所述黑名单中,不转发所述数据包。Optionally, the transceiver unit 710 is specifically configured to: if the address pair is in the whitelist, forward the data packet; and/or, if the address pair is in the blacklist, not forward the data package.
应理解,BLE设备700可以执行上述方法实施例中由第三节点执行的相应操作,为了简洁,在此不再赘述。It should be understood that the BLE device 700 can perform the corresponding operations performed by the third node in the foregoing method embodiments, which are not repeated here for brevity.
图8是根据本申请实施例的BLE设备800的示意性框图。如图8所示,BLE设备800为BLE的MESH网络中的第一节点,所述MESH网络中包括多个节点,BLE设备800包括:FIG. 8 is a schematic block diagram of a BLE device 800 according to an embodiment of the present application. As shown in FIG. 8, the BLE device 800 is the first node in the BLE MESH network, the MESH network includes multiple nodes, and the BLE device 800 includes:
收发单元810,用于通过所述MESH网络,向所述MESH网络中的第二节点发送至少一个侦测包,其中,所述至少一个侦测包用于记录各自经过的路径上的节点的地址,以用于所述第二节点选择所述第一节点与所述第二节点之间的最优路径;The transceiver unit 810 is configured to send at least one detection packet to a second node in the MESH network through the MESH network, wherein the at least one detection packet is used to record the addresses of the nodes on the respective paths , For the second node to select the optimal path between the first node and the second node;
收发单元810还用于,接收来自所述第二节点的第一应答包,所述第一应答包中包括所述最优路径上的各个节点的地址。The transceiver unit 810 is further configured to receive a first response packet from the second node, where the first response packet includes the address of each node on the optimal path.
因此,第一节点通过向第二节点发送侦测包,该侦测包用于记录从所述第一节点至所述第二节点之间的各个路径上的节点的地址,以便第二节点可以根据接收到的从不同路径传输过来的侦测包,确定第一节点与第二节点之间可能的路径,从而在这些路径中选择最优路径用于后续的数据传输。第一节点与第二节点之间进行后续的数据传输时,可以仅通过该最优路径上的节点传输数据包,而其余节点可以不传输数据包。这样能够减少MESH网络中节点之间的不必要的数据传输,并节省节点资源。Therefore, the first node sends a detection packet to the second node, and the detection packet is used to record the addresses of nodes on each path from the first node to the second node, so that the second node can According to the received detection packets transmitted from different paths, a possible path between the first node and the second node is determined, and the optimal path is selected among these paths for subsequent data transmission. During subsequent data transmission between the first node and the second node, the data packet may be transmitted only through the node on the optimal path, and the other nodes may not transmit the data packet. This can reduce unnecessary data transmission between nodes in the MESH network and save node resources.
可选地,所述第一应答包用于所述MESH网络中接收到所述第一应答包的节点,建立各自的白名单和/或黑名单,所述白名单和所述黑名单用于确定是否转发所述第一节点与所述第二节点之间的数据包。Optionally, the first response packet is used for a node in the MESH network that receives the first response packet to establish a respective whitelist and/or blacklist, and the whitelist and the blacklist are used for Determining whether to forward the data packet between the first node and the second node.
可选地,BLE设备800还包括处理单元820,其中,收发单元810还用于:在预定时长内没有检测到所述最优路径上的节点发出的心跳包时,通过所述最优路径向所述第二节点发送多个更新包;接收来自所述第二节点的分别响应于所述多个更新包的多个第二应答包;所述处理单元820用于,根据所述第二应答包的接收时间和/或接收数量,确定是否更新所述最优路径。Optionally, the BLE device 800 further includes a processing unit 820, wherein the transceiving unit 810 is further configured to: when a heartbeat packet sent by a node on the optimal path is not detected within a predetermined period of time, pass the optimal path to the The second node sends multiple update packets; receives multiple second response packets from the second node in response to the multiple update packets; the processing unit 820 is configured to, according to the second response The time and/or number of packets received determines whether to update the optimal path.
可选地,BLE设备800还包括处理单元820,处理单元820用于:根据所述MESH网络中的节点数量的变化,确定是否更新所述最优路径。Optionally, the BLE device 800 further includes a processing unit 820 configured to determine whether to update the optimal path according to a change in the number of nodes in the MESH network.
应理解,BLE设备800可以执行上述方法实施例中由第一节点执行的相应操作,为了简洁,在此不再赘述。It should be understood that the BLE device 800 can perform the corresponding operations performed by the first node in the foregoing method embodiments, which are not repeated here for brevity.
图9是本申请实施例的一种BLE芯片900的示意性结构图。图9所示 的BLE芯片900包括处理器910、存储器920、以及收发器930。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.
其中,处理器910可以从存储器920中调用并运行计算机程序,以实现本申请实施例中的方法。处理器910可以控制收发器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.
收发器930可以包括输入接口931和输出接口932。处理器910可以控制输入接口931和输出接口932与其他设备或BLE芯片之间进行通信,从而获取其他设备或芯片发送的信息或数据,或者向其他设备或芯片输出信息或数据。The transceiver 930 may include 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.
可选地,BLE芯片900具体可为本申请实施例的第一节点,并且BLE芯片900可以实现本申请实施例的各个方法中由第一节点实现的相应流程,为了简洁,在此不再赘述。Optionally, 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. .
可选地,BLE芯片900具体可为本申请实施例的第二节点,并且BLE芯片900可以实现本申请实施例的各个方法中由第二节点实现的相应流程,为了简洁,在此不再赘述。Optionally, 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. .
可选地,BLE芯片900具体可为本申请实施例的第三节点,并且BLE芯片900可以实现本申请实施例的各个方法中由第三节点实现的相应流程,为了简洁,在此不再赘述。Optionally, 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. .
上述的处理器可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法实施例的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器可以是通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法的步骤。The above-mentioned processor may be an integrated circuit chip with signal processing capability. In the implementation process, 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 can 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. 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.
上述的存储器可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(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)。The aforementioned memory may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory. Among them, 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. By way of exemplary but not restrictive description, many forms of RAM are available, such as static random access memory (Static RAM, SRAM), dynamic random access memory (Dynamic RAM, DRAM), synchronous dynamic random access memory (Synchronous DRAM, SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (Double Data Rate SDRAM, DDR SDRAM), Enhanced Synchronous Dynamic Random Access Memory (Enhanced SDRAM, ESDRAM), Synchronous Link Dynamic Random Access Memory (Synchlink DRAM, SLDRAM) ) And Direct Rambus RAM (DR RAM).
本申请实施例还提供了一种计算机可读存储介质,用于存储计算机程序。该计算机可读存储介质可应用于本申请实施例中的BLE设备,并且该计算机程序使得计算机执行本申请实施例的各个方法中由第一节点、第二节点或者第三节点实现的相应流程,为了简洁,不再赘述。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 brevity, I won't repeat it.
本申请实施例还提供了一种计算机程序产品,包括计算机程序指令。该计算机程序产品可应用于本申请实施例中的BLE设备,并且该计算机程序指令使得计算机执行本申请实施例的各个方法中由第一节点、第二节点或者第三节点实现的相应流程,为了简洁,在此不再赘述。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.
本发明实施例中的术语“系统”和“网络”在本文中常被可互换使用。本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。The terms "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. In addition, the character "/" in this text generally indicates that the associated objects before and after are in an "or" relationship.
在本发明实施例中,“与A相应(对应)的B”表示B与A相关联,根据A可以确定B。但还应理解,根据A确定B并不意味着仅仅根据A确定B,还可以根据A和/或其它信息确定B。In the embodiment of the present invention, "B corresponding (corresponding) to A" means that B is associated with A, and B can be determined according to A. However, it should also be understood that 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.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结 合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。A person of ordinary skill in the art may realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed in this document can be implemented by electronic hardware or a combination of computer software and electronic hardware. Whether these functions are performed by hardware or software depends on the specific application and design constraint conditions of the technical solution. Professionals and technicians can use different methods for each specific application to implement the described functions, but such implementation should not be considered beyond the scope of this application.
本申请实施例中的具体的例子只是为了帮助本领域技术人员更好地理解本申请实施例,而非限制本申请实施例的范围,本领域技术人员可以在上述实施例的基础上进行各种改进和变形,而这些改进或者变形均落在本申请的保护范围内。The specific examples in the embodiments of the present application are only to help those skilled in the art to better understand the embodiments of the present application, rather than limiting the scope of the embodiments of the present application. Those skilled in the art can perform various operations on the basis of the foregoing embodiments. Improvements and deformations, and these improvements or deformations fall within the scope of protection of this application.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above are only specific implementations of this application, but the protection scope of this application is not limited to this. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in this application. Should be covered within the scope of protection of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.

Claims (38)

  1. 一种路径选择的方法,其特征在于,所述方法应用于低功耗蓝牙BLE的MESH网络中,所述MESH网络中包括多个节点,所述方法包括:A method for path selection, characterized in that the method is applied to a low energy Bluetooth BLE MESH network, the MESH network includes multiple nodes, and the method includes:
    所述MESH网络中的第二节点接收来自所述MESH网络中的第一节点的至少一个侦测包,其中,每个侦测包通过至少一个路径达到所述第二节点,所述至少一个路径中的每个路径上传输的侦测包中包括所述每个路径上的节点的地址;The second node in the MESH network receives at least one detection packet from the first node in the MESH network, wherein each detection packet reaches the second node through at least one path, and the at least one path The detection packet transmitted on each path in includes the address of the node on each path;
    所述第二节点根据所述至少一个侦测包,确定最优路径;The second node determines the optimal path according to the at least one detection packet;
    所述第二节点发送响应于所述第一节点的第一应答包,其中,所述第一应答包中包括所述最优路径上的各个节点的地址。The second node sends a first response packet in response to the first node, wherein the first response packet includes the address of each node on the optimal path.
  2. 根据权利要求1所述的方法,其特征在于,所述第一应答包用于所述MESH网络中接收到所述第一应答包的节点,建立各自的白名单和/或黑名单,所述白名单和所述黑名单用于确定是否转发所述第一节点与所述第二节点之间的数据包。The method according to claim 1, wherein the first response packet is used for nodes in the MESH network that received the first response packet to establish their respective whitelists and/or blacklists, and The white list and the black list are used to determine whether to forward the data packet between the first node and the second node.
  3. 根据权利要求1或2所述的方法,其特征在于,所述第二节点根据所述至少一个侦测包,确定最优路径,包括:The method according to claim 1 or 2, wherein the second node determining the optimal path according to the at least one detection packet comprises:
    所述第二节点根据每个侦测包从所述至少一个路径分别传输至所述第二节点所经过的传输时间和/或节点数量,在所述至少一个路径中确定所述每个侦测包对应的候选路径;The second node determines each detection packet in the at least one path according to the transmission time and/or the number of nodes that each detection packet is transmitted from the at least one path to the second node. Candidate path corresponding to the package;
    所述第二节点在所述至少一个侦测包对应的至少一个候选路径中,确定所述最优路径。The second node determines the optimal path among at least one candidate path corresponding to the at least one detection packet.
  4. 根据权利要求3所述的方法,其特征在于,所述第二节点在所述至少一个路径中确定所述每个侦测包对应的候选路径,包括:The method according to claim 3, wherein the second node determining the candidate path corresponding to each detection packet in the at least one path comprises:
    所述第二节点在所述至少一个路径中,选择传输时间最短的M个侦测包;Selecting, by the second node, M detection packets with the shortest transmission time in the at least one path;
    所述第二节点在所述M个侦测包中,选择经过节点数量最少的K个侦测包,M和K为正整数且K<M;The second node selects the K detection packets with the least number of passing nodes among the M detection packets, where M and K are positive integers and K<M;
    所述第二节点将所述K个侦测包所经过的路径,作为所述每个侦测包对应的候选路径。The second node uses the path traversed by the K detection packets as the candidate path corresponding to each detection packet.
  5. 根据权利要求3或4所述的方法,其特征在于,所述第二节点在所述至少一个侦测包对应的至少一个候选路径中,确定所述最优路径,包括:The method according to claim 3 or 4, wherein the second node determining the optimal path among at least one candidate path corresponding to the at least one detection packet comprises:
    所述第二节点在所述至少一个侦测包对应的至少一个候选路径中,选择出现概率最高的候选路径作为所述最优路径。The second node selects the candidate path with the highest occurrence probability among the at least one candidate path corresponding to the at least one detection packet as the optimal path.
  6. 根据权利要求1至5中任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1 to 5, wherein the method further comprises:
    所述第二节点在所述至少一个侦测包对应的至少一个候选路径中,确定所述最优路径的备选路径,其中,所述备选路径是所述至少一个候选路径中与所述最优路径之间重叠节点的数量最少的路径。The second node determines, among at least one candidate path corresponding to the at least one detection packet, a candidate path of the optimal path, where the candidate path is the one among the at least one candidate path and the The path with the least number of overlapping nodes between the optimal paths.
  7. 根据权利要求6所述的方法,其特征在于,所述第一应答包中还包括所述备选路径上的各个节点的地址。7. The method according to claim 6, wherein the first response packet further includes the addresses of each node on the candidate path.
  8. 根据权利要求1至7中任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1 to 7, wherein the method further comprises:
    所述第二节点接收来自所述第一节点的多个更新包;The second node receives multiple update packages from the first node;
    分别响应于所述多个更新包,所述第二节点通过所述最优路径向所述第一节点发送多个第二应答包,其中,所述第二应答包的接收时间和/或接收数量,用于所述第一节点确定是否更新所述最优路径。In response to the multiple update packets respectively, the second node sends multiple second response packets to the first node through the optimal path, wherein the receiving time and/or receiving time of the second response packet The quantity is used by the first node to determine whether to update the optimal path.
  9. 一种路径选择的方法,其特征在于,所述方法应用于低功耗蓝牙BLE的MESH网络中,所述MESH网络中包括多个节点,所述方法包括:A method for path selection, characterized in that the method is applied to a low-power Bluetooth BLE MESH network, the MESH network includes multiple nodes, and the method includes:
    所述MESH网络中的第三节点接收从所述MESH网络中的第一节点至所述MESH网络中的第二节点的至少一个侦测包;The third node in the MESH network receives at least one detection packet from the first node in the MESH network to the second node in the MESH network;
    所述第三节点在所述至少一个侦测包中,添加所述第三节点的地址;Adding, by the third node, the address of the third node to the at least one detection packet;
    所述第三节点转发所述至少一个侦测包,所述至少一个侦测包用于所述第二节点选择所述第一节点与所述第二节点之间的最优路径。The third node forwards the at least one detection packet, and the at least one detection packet is used by the second node to select an optimal path between the first node and the second node.
  10. 根据权利要求9所述的方法,其特征在于,所述方法还包括:The method according to claim 9, wherein the method further comprises:
    所述第三节点接收从所述第二节点至所述第一节点的第一应答包,所述第一应答包中包括所述最优路径上的各个节点的地址;Receiving, by the third node, a first response packet from the second node to the first node, where the first response packet includes the address of each node on the optimal path;
    若所述第一应答包中包括所述第三节点的地址,则所述第三节点将所述第一节点和所述第二节点的地址作为地址对,添加至所述第三节点的白名单中;和/或,若所述第一应答包中不包括所述第三节点的地址,则所述第三节点将所述地址对,添加至所述第三节点的黑名单中;If the first response packet includes the address of the third node, the third node uses the addresses of the first node and the second node as an address pair and adds it to the white address of the third node. And/or, if the address of the third node is not included in the first response packet, the third node adds the address pair to the blacklist of the third node;
    所述第三节点转发所述第一应答包。The third node forwards the first response packet.
  11. 根据权利要求10所述的方法,其特征在于,所述方法还包括:The method according to claim 10, wherein the method further comprises:
    所述第三节点接收从所述第一节点至所述第二节点的数据包;Receiving, by the third node, a data packet from the first node to the second node;
    所述第三节点根据所述白名单和/或所述黑名单,确定是否转发所述数据包。The third node determines whether to forward the data packet according to the white list and/or the black list.
  12. 根据权利要求11所述的方法,其特征在于,所述第三节点根据所述白名单和/或所述黑名单,确定是否转发所述数据包,包括:The method according to claim 11, wherein the third node determining whether to forward the data packet according to the white list and/or the black list comprises:
    若所述地址对位于所述白名单中,所述第三节点转发所述数据包;和/或,If the address pair is in the whitelist, the third node forwards the data packet; and/or,
    若所述地址对位于所述黑名单中,所述第三节点不转发所述数据包。If the address pair is in the blacklist, the third node does not forward the data packet.
  13. 一种路径选择的方法,其特征在于,所述方法应用于低功耗蓝牙BLE的MESH网络中,所述MESH网络中包括多个节点,所述方法包括:A method for path selection, characterized in that the method is applied to a low-power Bluetooth BLE MESH network, the MESH network includes multiple nodes, and the method includes:
    所述MESH网络中的第一节点通过所述MESH网络,向所述MESH网络中的第二节点发送至少一个侦测包,其中,所述至少一个侦测包用于记录各自经过的路径上的节点的地址,以用于所述第二节点选择所述第一节点与所述第二节点之间的最优路径;The first node in the MESH network sends at least one detection packet to the second node in the MESH network through the MESH network, wherein the at least one detection packet is used to record the path that each passes through The address of the node, used by the second node to select the optimal path between the first node and the second node;
    所述第一节点接收来自所述第二节点的第一应答包,所述第一应答包中包括所述最优路径上的各个节点的地址。The first node receives a first response packet from the second node, and the first response packet includes the address of each node on the optimal path.
  14. 根据权利要求13所述的方法,其特征在于,所述第一应答包用于所述MESH网络中接收到所述第一应答包的节点,建立各自的白名单和/或黑名单,所述白名单和所述黑名单用于确定是否转发所述第一节点与所述第二节点之间的数据包。The method according to claim 13, wherein the first response packet is used for nodes in the MESH network that received the first response packet to establish their respective whitelists and/or blacklists, and The white list and the black list are used to determine whether to forward the data packet between the first node and the second node.
  15. 根据权利要求13或14所述的方法,其特征在于,所述方法还包括:The method according to claim 13 or 14, wherein the method further comprises:
    所述第一节点在预定时长内没有检测到所述最优路径上的节点发出的心跳包时,通过所述最优路径,向所述第二节点发送多个更新包;When the first node does not detect a heartbeat packet sent by a node on the optimal path within a predetermined period of time, sending a plurality of update packets to the second node through the optimal path;
    所述第一节点接收来自所述第二节点的分别响应于所述多个更新包的多个第二应答包;Receiving, by the first node, a plurality of second response packets from the second node that respectively respond to the plurality of update packets;
    所述第一节点根据所述第二应答包的接收时间和/或接收数量,确定是否更新所述最优路径。The first node determines whether to update the optimal path according to the receiving time and/or the received quantity of the second response packet.
  16. 根据权利要求13或14所述的方法,其特征在于,所述方法还包括:The method according to claim 13 or 14, wherein the method further comprises:
    所述第一节点根据所述MESH网络中的节点数量的变化,确定是否更新所述最优路径。The first node determines whether to update the optimal path according to the change in the number of nodes in the MESH network.
  17. 一种低功耗蓝牙BLE设备,其特征在于,所述BLE设备为BLE的 MESH网络中的第二节点,所述MESH网络中包括多个节点,所述BLE设备包括:A low-power Bluetooth BLE device, characterized in that the BLE device is a second node in a BLE MESH network, the MESH network includes multiple nodes, and the BLE device includes:
    收发单元,用于接收来自所述MESH网络中的第一节点的至少一个侦测包,其中,每个侦测包通过至少一个路径达到所述第二节点,所述至少一个路径中的每个路径上传输的侦测包中包括所述每个路径上的节点的地址;The transceiver unit is configured to receive at least one detection packet from the first node in the MESH network, wherein each detection packet reaches the second node through at least one path, and each of the at least one path The detection packet transmitted on the path includes the address of the node on each path;
    处理单元,用于根据所述至少一个侦测包,确定最优路径;A processing unit, configured to determine an optimal path according to the at least one detection packet;
    所述收发单元还用于,发送响应于所述第一节点的第一应答包,其中,所述第一应答包中包括所述最优路径上的各个节点的地址。The transceiver unit is further configured to send a first response packet in response to the first node, wherein the first response packet includes the address of each node on the optimal path.
  18. 根据权利要求17所述的BLE设备,其特征在于,所述第一应答包用于所述MESH网络中接收到所述第一应答包的节点,建立各自的白名单和/或黑名单,所述白名单和所述黑名单用于确定是否转发所述第一节点与所述第二节点之间的数据包。The BLE device according to claim 17, wherein the first response packet is used for nodes in the MESH network that received the first response packet to establish their respective whitelists and/or blacklists, so The white list and the black list are used to determine whether to forward the data packet between the first node and the second node.
  19. 根据权利要求17或18所述的BLE设备,其特征在于,所述处理单元具体用于:The BLE device according to claim 17 or 18, wherein the processing unit is specifically configured to:
    根据每个侦测包从所述至少一个路径分别传输至所述第二节点所经过的传输时间和/或节点数量,在所述至少一个路径中确定所述每个侦测包对应的候选路径;According to the transmission time and/or the number of nodes that each detection packet is transmitted from the at least one path to the second node, determine the candidate path corresponding to each detection packet in the at least one path ;
    在所述至少一个侦测包对应的至少一个候选路径中,确定所述最优路径。In at least one candidate path corresponding to the at least one detection packet, the optimal path is determined.
  20. 根据权利要求19所述的BLE设备,其特征在于,所述处理单元具体用于:The BLE device according to claim 19, wherein the processing unit is specifically configured to:
    在所述至少一个路径中,选择传输时间最短的M个侦测包;In the at least one path, select M detection packets with the shortest transmission time;
    在所述M个侦测包中,选择经过节点数量最少的K个侦测包,M和K为正整数且K<M;Among the M detection packets, select the K detection packets with the least number of nodes, M and K are positive integers and K<M;
    将所述K个侦测包所经过的路径,作为所述每个侦测包对应的候选路径。The path traversed by the K detection packets is taken as the candidate path corresponding to each detection packet.
  21. 根据权利要求19或20所述的BLE设备,其特征在于,所述处理单元具体用于:The BLE device according to claim 19 or 20, wherein the processing unit is specifically configured to:
    在所述至少一个侦测包对应的至少一个候选路径中,选择出现概率最高的候选路径作为所述最优路径。Among the at least one candidate path corresponding to the at least one detection packet, the candidate path with the highest occurrence probability is selected as the optimal path.
  22. 根据权利要求17至21中任一项所述的BLE设备,其特征在于,所述处理单元还用于:The BLE device according to any one of claims 17 to 21, wherein the processing unit is further configured to:
    在所述至少一个侦测包对应的至少一个候选路径中,确定所述最优路径 的备选路径,其中,所述备选路径是所述至少一个候选路径中与所述最优路径之间重叠节点的数量最少的路径。In at least one candidate path corresponding to the at least one detection packet, determine the candidate path of the optimal path, wherein the candidate path is between the at least one candidate path and the optimal path The path with the least number of overlapping nodes.
  23. 根据权利要求22所述的BLE设备,其特征在于,所述第一应答包中还包括所述备选路径上的各个节点的地址。The BLE device according to claim 22, wherein the first response packet further includes the address of each node on the candidate path.
  24. 根据权利要求17至23中任一项所述的BLE设备,其特征在于,所述收发单元还用于:The BLE device according to any one of claims 17 to 23, wherein the transceiver unit is further configured to:
    接收来自所述第一节点的多个更新包;Receiving multiple update packages from the first node;
    分别响应于所述多个更新包,通过所述最优路径向所述第一节点发送多个第二应答包,其中,所述第二应答包的接收时间和/或接收数量,用于所述第一节点确定是否更新所述最优路径。In response to the plurality of update packets, respectively, a plurality of second response packets are sent to the first node through the optimal path, wherein the receiving time and/or the received number of the second response packets are used for all The first node determines whether to update the optimal path.
  25. 一种低功耗蓝牙BLE设备,其特征在于,所述BLE设备为BLE的MESH网络中的第三节点,所述MESH网络中包括多个节点,所述BLE设备包括:A low-power Bluetooth BLE device, wherein the BLE device is a third node in a BLE MESH network, the MESH network includes multiple nodes, and the BLE device includes:
    收发单元,用于接收从所述MESH网络中的第一节点至所述MESH网络中的第二节点的至少一个侦测包;The transceiver unit is configured to receive at least one detection packet from the first node in the MESH network to the second node in the MESH network;
    处理单元,用于在所述至少一个侦测包中,添加所述第三节点的地址;A processing unit, configured to add the address of the third node to the at least one detection packet;
    所述收发单元还用于,转发所述至少一个侦测包,所述至少一个侦测包用于所述第二节点选择所述第一节点与所述第二节点之间的最优路径。The transceiver unit is further configured to forward the at least one detection packet, and the at least one detection packet is used by the second node to select an optimal path between the first node and the second node.
  26. 根据权利要求25所述的BLE设备,其特征在于,The BLE device of claim 25, wherein:
    所述收发单元还用于:接收从所述第二节点至所述第一节点的第一应答包,所述第一应答包中包括所述最优路径上的各个节点的地址;The transceiving unit is further configured to: receive a first response packet from the second node to the first node, the first response packet including the address of each node on the optimal path;
    所述处理单元还用于:若所述第一应答包中包括所述第三节点的地址,则将所述第一节点和所述第二节点的地址作为地址对,添加至所述第三节点的白名单中;和/或,若所述第一应答包中不包括所述第三节点的地址,则将所述地址对,添加至所述第三节点的黑名单中;The processing unit is further configured to: if the first response packet includes the address of the third node, add the addresses of the first node and the second node as an address pair to the third node. And/or, if the address of the third node is not included in the first response packet, add the address pair to the blacklist of the third node; and/or, if the address of the third node is not included in the first response packet;
    所述收发单元还用于:转发所述第一应答包。The transceiver unit is further configured to: forward the first response packet.
  27. 根据权利要求26所述的BLE设备,其特征在于,The BLE device of claim 26, wherein:
    所述收发单元还用于:接收从所述第一节点至所述第二节点的数据包;The transceiving unit is further configured to: receive data packets from the first node to the second node;
    所述处理单元还用于:根据所述白名单和/或所述黑名单,确定是否转发所述数据包。The processing unit is further configured to determine whether to forward the data packet according to the white list and/or the black list.
  28. 根据权利要求27所述的BLE设备,其特征在于,所述收发单元具 体用于:The BLE device of claim 27, wherein the transceiver unit is specifically configured to:
    若所述地址对位于所述白名单中,转发所述数据包;和/或,If the address pair is in the whitelist, forward the data packet; and/or,
    若所述地址对位于所述黑名单中,不转发所述数据包。If the address pair is in the blacklist, the data packet is not forwarded.
  29. 一种低功耗蓝牙BLE设备,其特征在于,所述BLE设备为BLE的MESH网络中的第一节点,所述MESH网络中包括多个节点,所述BLE设备包括:A low-power Bluetooth BLE device, wherein the BLE device is a first node in a BLE MESH network, the MESH network includes multiple nodes, and the BLE device includes:
    收发单元,用于通过所述MESH网络,向所述MESH网络中的第二节点发送至少一个侦测包,其中,所述至少一个侦测包用于记录各自经过的路径上的节点的地址,以用于所述第二节点选择所述第一节点与所述第二节点之间的最优路径;The transceiver unit is configured to send at least one detection packet to a second node in the MESH network through the MESH network, wherein the at least one detection packet is used to record the addresses of the nodes on the paths that they pass through, For the second node to select the optimal path between the first node and the second node;
    所述收发单元还用于,接收来自所述第二节点的第一应答包,所述第一应答包中包括所述最优路径上的各个节点的地址。The transceiver unit is further configured to receive a first response packet from the second node, where the first response packet includes the address of each node on the optimal path.
  30. 根据权利要求29所述的BLE设备,其特征在于,所述第一应答包用于所述MESH网络中接收到所述第一应答包的节点,建立各自的白名单和/或黑名单,所述白名单和所述黑名单用于确定是否转发所述第一节点与所述第二节点之间的数据包。The BLE device according to claim 29, wherein the first response packet is used for nodes in the MESH network that received the first response packet to establish their respective whitelists and/or blacklists, so The white list and the black list are used to determine whether to forward the data packet between the first node and the second node.
  31. 根据权利要求29或30所述的BLE设备,其特征在于,所述BLE设备还包括处理单元,其中,所述收发单元还用于:The BLE device according to claim 29 or 30, wherein the BLE device further comprises a processing unit, wherein the transceiving unit is further configured to:
    在预定时长内没有检测到所述最优路径上的节点发出的心跳包时,通过所述最优路径,向所述第二节点发送多个更新包;When a heartbeat packet sent by a node on the optimal path is not detected within a predetermined period of time, sending multiple update packets to the second node through the optimal path;
    接收来自所述第二节点的分别响应于所述多个更新包的多个第二应答包;Receiving a plurality of second response packets from the second node in response to the plurality of update packets;
    所述处理单元用于,根据所述第二应答包的接收时间和/或接收数量,确定是否更新所述最优路径。The processing unit is configured to determine whether to update the optimal path according to the receiving time and/or the received quantity of the second response packet.
  32. 根据权利要求29或30所述的BLE设备,其特征在于,所述BLE设备还包括处理单元,所述处理单元用于:The BLE device according to claim 29 or 30, wherein the BLE device further comprises a processing unit, and the processing unit is configured to:
    根据所述MESH网络中的节点数量的变化,确定是否更新所述最优路径。According to the change in the number of nodes in the MESH network, it is determined whether to update the optimal path.
  33. 一种低功耗蓝牙BLE芯片,其特征在于,包括处理器和存储器,所述存储器用于存储计算机程序,所述处理器用于调用并运行所述存储器中存储的计算机程序,以执行权利要求1至8中任一项所述的方法。A low-power Bluetooth BLE chip, characterized by comprising 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 claim 1 To the method of any one of 8.
  34. 一种低功耗蓝牙BLE芯片,其特征在于,包括处理器和存储器, 所述存储器用于存储计算机程序,所述处理器用于调用并运行所述存储器中存储的计算机程序,以执行权利要求9至12中任一项所述的方法。A low-power Bluetooth BLE chip, characterized by comprising 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 claim 9 To the method of any one of 12.
  35. 一种低功耗蓝牙BLE芯片,其特征在于,包括处理器和存储器,所述存储器用于存储计算机程序,所述处理器用于调用并运行所述存储器中存储的计算机程序,以执行权利要求13至16中任一项所述的方法。A low-power Bluetooth BLE chip, characterized by comprising 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 claim 13 The method described in any one of to 16.
  36. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质用于存储计算机程序,其中,当所述计算机程序被处理器执行时,使得所述处理器执行权利要求1至8中任一项所述的方法。A computer-readable storage medium, characterized in that the computer-readable storage medium is used to store a computer program, wherein when the computer program is executed by a processor, the processor is caused to execute claims 1 to 8 Any of the methods.
  37. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质用于存储计算机程序,其中,当所述计算机程序被处理器执行时,使得所述处理器执行权利要求9至12中任一项所述的方法。A computer-readable storage medium, characterized in that the computer-readable storage medium is used to store a computer program, wherein when the computer program is executed by a processor, the processor is caused to execute claims 9 to 12 Any of the methods.
  38. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质用于存储计算机程序,其中,当所述计算机程序被处理器执行时,使得所述处理器执行权利要求13至16中任一项所述的方法。A computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, wherein, when the computer program is executed by a processor, the processor is caused to execute claims 13 to 16 Any of the methods.
PCT/CN2019/119259 2019-11-18 2019-11-18 Path selecting method and ble device WO2021097628A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201980005133.9A CN111247818A (en) 2019-11-18 2019-11-18 Path selection method and BLE device
PCT/CN2019/119259 WO2021097628A1 (en) 2019-11-18 2019-11-18 Path selecting method and ble device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/119259 WO2021097628A1 (en) 2019-11-18 2019-11-18 Path selecting method and ble device

Publications (1)

Publication Number Publication Date
WO2021097628A1 true WO2021097628A1 (en) 2021-05-27

Family

ID=70866322

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/119259 WO2021097628A1 (en) 2019-11-18 2019-11-18 Path selecting method and ble device

Country Status (2)

Country Link
CN (1) CN111247818A (en)
WO (1) WO2021097628A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112396814B (en) * 2020-11-26 2022-04-01 深圳市安室智能有限公司 Alarm topology transmission method and related product

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101056240A (en) * 2007-05-22 2007-10-17 杭州华三通信技术有限公司 A route maintenance method and device between the MESH points
CN104244359A (en) * 2013-06-09 2014-12-24 浙江瑞瀛网络科技有限公司 Method for optimizing wireless network route paths
US20180254972A1 (en) * 2015-02-20 2018-09-06 Cisco Technology, Inc. Automatic optimal route reflector root address assignment to route reflector clients and fast failover in a network environment
CN109511091A (en) * 2018-11-26 2019-03-22 广州鲁邦通物联网科技有限公司 A kind of BLE MESH network routing algorithm based on location information

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105429933A (en) * 2014-09-19 2016-03-23 中国电信股份有限公司 Access method of network equipment in local area network, access equipment and system
CN105592459B (en) * 2015-07-09 2019-06-18 中国银联股份有限公司 Safety certification device based on wireless communication
CN107431968B (en) * 2015-12-30 2020-10-09 华为技术有限公司 Method for establishing routing table, electronic equipment and network
CN106658482B (en) * 2016-10-08 2020-04-07 西安电子科技大学 Black hole attack defense method in route discovery
CN109510832A (en) * 2018-11-29 2019-03-22 北京天元特通信息技术股份有限公司 A kind of communication means based on dynamic blacklist mechanism

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101056240A (en) * 2007-05-22 2007-10-17 杭州华三通信技术有限公司 A route maintenance method and device between the MESH points
CN104244359A (en) * 2013-06-09 2014-12-24 浙江瑞瀛网络科技有限公司 Method for optimizing wireless network route paths
US20180254972A1 (en) * 2015-02-20 2018-09-06 Cisco Technology, Inc. Automatic optimal route reflector root address assignment to route reflector clients and fast failover in a network environment
CN109511091A (en) * 2018-11-26 2019-03-22 广州鲁邦通物联网科技有限公司 A kind of BLE MESH network routing algorithm based on location information

Also Published As

Publication number Publication date
CN111247818A (en) 2020-06-05

Similar Documents

Publication Publication Date Title
WO2021174888A1 (en) Data transmission method, system and apparatus, and device and storage medium
JP5276220B2 (en) Bus control device and control device for outputting instructions to bus control device
US20080159358A1 (en) Unknown Destination Traffic Repetition
US11838198B2 (en) Path optimization based on reducing dominating set membership to essential parent devices
US20230179980A1 (en) Communication method employing bluetooth network, and node and communication system applying same
WO2018188337A1 (en) Method and device for packet broadcasting
JP2013507879A (en) Reliable communication in on-chip network
CN112261702B (en) Wireless Mesh network routing method and device based on position and electronic equipment
CN104604293A (en) Method and apparatus for selecting a router in an infinite link network
WO2021097628A1 (en) Path selecting method and ble device
US20110069606A1 (en) Communication node and method of processing communication fault thereof
WO2012060686A1 (en) Method of communication in wireless sensor networks
CN116886591B (en) Computer network system and routing method
US20140286220A1 (en) Multi-cast Optimized Medium Access Method for Wireless Network
WO2021092760A1 (en) Data transmission method and ble device
JP5664768B2 (en) Node, link forming method and link forming program
JP6523112B2 (en) Communication apparatus, relay determination method and relay determination program
CN111869246B (en) Message transmission method, BLE equipment and BLE chip
CN109218199B (en) Message processing method and device
JPWO2014016885A1 (en) Communication device
JP4613967B2 (en) Communication path setting method, communication path setting program, communication terminal, wireless network system
Habbal et al. A model for congestion control of transmission control protocol in mobile wireless Ad hoc networks
CN109617822A (en) Multicast path creation method, device and RP equipment
CN103685039B (en) The transmission method of broadcast in radio communication
CN104426780A (en) Data forwarding method and system

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

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

Country of ref document: EP

Kind code of ref document: A1