WO2019128384A1 - Data forwarding path selection method and device, storage medium and server - Google Patents

Data forwarding path selection method and device, storage medium and server Download PDF

Info

Publication number
WO2019128384A1
WO2019128384A1 PCT/CN2018/110007 CN2018110007W WO2019128384A1 WO 2019128384 A1 WO2019128384 A1 WO 2019128384A1 CN 2018110007 W CN2018110007 W CN 2018110007W WO 2019128384 A1 WO2019128384 A1 WO 2019128384A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
routing
address
preset
packet
Prior art date
Application number
PCT/CN2018/110007
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 安凯(广州)微电子技术有限公司
Publication of WO2019128384A1 publication Critical patent/WO2019128384A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/32Flooding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/12Shortest path evaluation
    • H04L45/124Shortest path evaluation using a combination of metrics
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/20Hop count for routing purposes, e.g. TTL
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/70Routing based on monitoring results
    • 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/12Communication route or path selection, e.g. power-based or shortest path routing based on transmission quality or channel quality

Definitions

  • the present invention relates to the field of Bluetooth data transmission technologies, and in particular, to a data forwarding path selection method and apparatus, a storage medium, and a server.
  • Bluetooth technology has a history of nearly 20 years, with green energy saving and low cost as the design concept, and is widely used in mobile phones, wireless earphones and other related technologies.
  • Bluetooth protocol 4.x-5.0 which has a low power specification (BLE, Bluetooth Low Energy) attempts to extend Bluetooth to a wider range of low-cost applications such as instrument monitoring.
  • Mesh Bluetooth Grid Protocol
  • Mesh is mainly for building automation (such as lighting access control, etc.), with adaptive features.
  • Mesh's advertising bearer layer air package forwards data in a "controllable flooding broadcast” mode, which uses TTL (Time) To Live) and cache checking as a "controllable algorithm” to control the forwarding process of data in the network.
  • the result of this method is that for any data packet sent from one node to another, the entire data transmission network Almost all nodes will need to forward the packet once, which increases the overall power consumption of the network, and the node needs to add a random delay each time it forwards the packet.
  • the use of the existing method for network data transmission wastes common bandwidth, greatly reduces the transmission rate, and reduces the real-time performance of data transmission.
  • the object of the embodiments of the present invention is to provide a data forwarding path selection method and device, a storage medium, and a server, which can effectively solve the problem that the network data transmission in the prior art wastes the common bandwidth, greatly reduces the transmission rate, and improves the data transmission. Real time.
  • an embodiment of the present invention provides a data forwarding path selection method, including the following steps:
  • the preset node broadcasts a routing request packet to multiple nodes that have direct communication with the preset node.
  • the current node is not a preset termination node, modify the source address in the routing request packet to the address of the current node, and continue to broadcast a routing request packet to a node that has direct communication with the current node. ;
  • the termination node sends a routing response packet to the response target; wherein the response target is a node that sends the routing request packet to the termination node;
  • the preset node When the preset node receives the plurality of routing response packets, the preset node performs routing negotiation according to the multiple routing response packets, where the routing negotiation includes calculating a TTL of the node and Signal to noise ratio of the communication channel;
  • the preset node If the preset node successfully negotiates with the selected node, the preset node sends a routing data packet to the selected node, where the selected node is a preset node. There are nodes that communicate directly.
  • the data forwarding path selection method disclosed in the present invention broadcasts a routing request packet to a node that directly communicates with itself through a preset node, and if the current node is not a preset termination node, the routing is selected. After the content of the request packet is copied and the address is modified, the next-level node broadcast routing request packet that continues to communicate directly with itself exists; if the current node is a preset termination node, the terminating node forwards the selection to the node that directly communicates with itself. Road response package.
  • the preset node After the preset node receives the plurality of routing response packets, performing routing negotiation according to the routing response packet, when the preset node negotiates successfully with a next-level node that directly communicates with itself And the next level node is the selected node, and the preset node sends the routing data packet to the selected node.
  • the method that the selected node is successfully negotiated with the selected node indicates that the selected node is the next optimal node in the path of the preset node to the terminating node, and the current
  • the node only interacts with the nodes at the next level, which reduces unnecessary forwarding of data, increases the transmission rate, and improves the real-time performance of data transmission.
  • the routing request packet includes a source address, a destination address, and an initiating node address, where the source address of the routing request packet is a node address that sends the routing request packet, and the routing is performed.
  • the destination address of the request packet is the address of the terminating node, and the originating node address of the routing request packet is the address of the starting node.
  • the step S2 specifically includes:
  • the routing response packet includes a source address, a destination address, and a resolution address.
  • the source address of the routing response packet is a node address that sends the routing response packet
  • the routing response is
  • the destination address of the packet is an address of the response destination
  • the resolution address is an address of the preset termination node.
  • the preset node performs routing negotiation according to the multiple routing response packets, and specifically includes:
  • the preset node calculates a TTL of the routing response packet and a signal to noise ratio of the communication channel between the node and the preset node according to the plurality of routing response packets, and select one of the nodes according to the calculation result.
  • the selected node
  • the preset node sends the routing data packet to the selected node according to information in the routing table.
  • the routing table includes a plurality of data items; wherein any of the data items includes an address of a preset termination node in the data forwarding path and an address of a next node of the current node data transmission.
  • the routing data packet includes a source address, a destination address, and a lower station address; wherein, a source address of the routing packet is an address of the starting node, and the routing packet is The destination address is the address of the terminating node, and the lower station address is the address of the selected node.
  • the embodiment of the invention further provides a data forwarding path selecting device, including:
  • a routing request module configured to: the preset node broadcasts a routing request packet to a plurality of nodes that directly communicate with the preset node;
  • a routing forwarding module configured to modify a source address in the routing request packet to an address of the current node, and continue to directly communicate with the current node if the current node is not a preset termination node Broadcast routing request packet;
  • a routing response module configured to: if the current node is a preset termination node, send the routing response packet to the response target; wherein the response target is to send the routing request packet to the termination node Node
  • a routing negotiation module configured to: when the preset node receives the plurality of routing response packets, the preset node performs routing negotiation according to the plurality of routing response packets; wherein the routing negotiation includes Calculating the TTL of the node and the signal to noise ratio of the communication channel;
  • a data sending module configured to send a routing data packet to the selected node if the preset node successfully negotiates with the selected node routing; wherein the selected node is a The node where the preset node has direct communication exists.
  • the embodiment of the present invention further provides a storage medium, where the storage medium includes a stored program, wherein the device in which the storage medium is located controls the data forwarding path selection method according to any one of the above items when the program is running.
  • An embodiment of the present invention further provides a server, including one or more processors; a memory;
  • One or more programs wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the program comprising for performing any of the above Data forwarding path selection method.
  • FIG. 1 is a schematic flowchart of a data forwarding path selection method according to Embodiment 1 of the present invention.
  • FIG. 2 is a schematic flowchart of a data forwarding path selection method according to Embodiment 2 of the present invention.
  • FIG. 3 is a schematic structural diagram of a BLE advertisement package in a data forwarding path selection method according to Embodiment 2 of the present invention.
  • FIG. 4 is a schematic structural diagram of a data forwarding path selecting apparatus according to Embodiment 3 of the present invention.
  • FIG. 1 is a schematic flowchart of a method for selecting a data forwarding path according to Embodiment 1 of the present invention, including steps S1 to S5:
  • the preset node broadcasts a routing request packet to multiple nodes that have direct communication with the preset node.
  • the current node is not a preset termination node, modify the source address in the routing request packet to the address of the current node, and continue to broadcast a routing request packet to a node that has direct communication with the current node. ;
  • the termination node sends a routing response packet to the response target; wherein the response target is a node that sends the routing request packet to the termination node;
  • the preset node When the preset node receives the plurality of routing response packets, the preset node performs routing negotiation according to the multiple routing response packets, where the routing negotiation includes calculating a TTL of the node and Signal to noise ratio of the communication channel;
  • the preset node If the preset node successfully negotiates with the selected node, the preset node sends a routing data packet to the selected node, where the selected node is a preset node. There are nodes that communicate directly.
  • FIG. 2 is a second embodiment of the present invention.
  • Embodiment 2 On the basis of Embodiment 1, the method includes steps S21 to S28:
  • the preset node broadcasts a routing request packet to a plurality of nodes that directly communicate with the preset node.
  • the routing request packet includes a source address, a destination address, and an originating node address, where the source address of the routing request packet is a node address that sends the routing request packet, and the routing request packet is The destination address is an address of the terminating node, and an originating node address of the routing request packet is an address of the starting node.
  • the termination node sends a routing response packet to the response target, where the response target is a node that sends the routing request packet.
  • the routing response packet includes a source address, a destination address, and a resolution address.
  • the source address of the routing response packet is a node address for sending the routing response packet
  • the destination of the routing response packet is The address is an address of the response destination
  • the resolution address is an address of the preset termination node.
  • the preset node calculates a TTL of the routing response packet and a signal to noise ratio of a communication channel between the node and the preset node according to the plurality of routing response packets, and select one according to the calculation result. a node as the selected node;
  • the selected node is used as the next node of the preset node data transmission, and saves the address of the selected node to a routing table of the preset node.
  • the preset node sends the routing data packet to the selected node according to information in the routing table.
  • the routing table includes a plurality of data items; wherein any of the data items includes an address of a preset termination node in the data forwarding path and an address of a next node of the current node data transmission.
  • the preset node If the preset node successfully negotiates with the selected node, the preset node sends a routing data packet to the selected node, where the selected node is a preset node. There are nodes that communicate directly.
  • the routing data packet includes a source address, a destination address, and a lower station address; wherein, a source address of the routing data packet is an address of the starting node, and a destination address of the routing data packet For the address of the terminating node, the lower station address is the address of the selected node.
  • the routing request packet is broadcasted to the node that directly communicates with the self-predetermined node, and if the current node is not the preset termination node, the content of the routing request packet is copied and the address is modified, and then continues to exist with itself.
  • the next-level node of the direct communication broadcasts; if the current node is a preset termination node, the termination node forwards the routing response packet to the node that directly communicates with itself.
  • the preset node After the preset node receives the plurality of routing response packets, performing routing negotiation according to the routing response packet, when the preset node negotiates successfully with a next-level node that directly communicates with itself And the next level node is the selected node, and the preset node sends the routing data packet to the selected node.
  • the method that the selected node is successfully negotiated with the selected node indicates that the selected node is the next optimal node in the path of the preset node to the terminating node, and the current
  • the node only interacts with the nodes at the next level, which reduces unnecessary forwarding of data, increases the transmission rate, and improves the real-time performance of data transmission.
  • the BLE advertisement package In the Bluetooth Mesh network data transmission, data is generally sent through the BLE advertisement package, and the BLE advertisement package is further divided into a Mesh package and a routing package.
  • the Mesh packet refers to the packet propagated by the standard Mesh protocol.
  • the routing packet refers to the packet used in the routing protocol. It can be divided into three types: routing request packet, routing response packet, and routing packet. Each type of packet contains three addresses.
  • the routing request packet includes a source address, a destination address, and an initiating node address.
  • the source address of the routing request packet is a node address for sending the routing request packet
  • the destination address of the routing request packet is The address of the terminating node
  • the originating node address of the routing request packet is the address of the starting node.
  • the routing response packet further includes a source address, a destination address, and a resolution address.
  • the source address of the routing response packet is a node address for sending the routing response packet
  • the destination address of the routing response packet is The address of the response target
  • the resolution address is an address of the preset termination node.
  • the routing data packet further includes a source address, a destination address, and a lower station address.
  • the source address of the routing data packet is an address of the starting node
  • the destination address of the routing data packet is The address of the terminating node is the address of the selected node.
  • the source address and the destination address of the routing data packet remain unchanged, and the lower station address of the routing data packet is continuously changed.
  • FIG. 3 is a schematic structural diagram of a BLE advertisement package in a data forwarding path selection method according to Embodiment 2 of the present invention. The following describes how the present invention distinguishes between a Mesh packet and a routing packet according to FIG. 3. If the AdType flag in the advertisement package is M, the advertisement packet is a Mesh packet, and the AdType flag is specifically an 8-bit byte value; When the AdType flag in the advertisement package is R, the advertisement package is a routing package.
  • the embodiment of the present invention only the node having the routing function can forward the routing packet, and the ordinary standard Mesh node cannot identify the routing packet, so the routing packet is automatically ignored.
  • the embodiment of the invention avoids unnecessary data forwarding by using the foregoing method, saves public bandwidth, and improves data forwarding efficiency.
  • the node adopts a broadcast mode for forwarding the data packet. It can be understood that the node sends a routing packet to all nodes that have direct communication with itself, but only the node with the routing function can Directly accept the routing package.
  • the routing packet is first converted into a standard Mesh packet, and then sent to the standard Mesh node; if the standard Mesh node is to have a routing function When the node sends data, the standard Mesh packet is first converted into a routing packet, and then sent to the node with the routing function.
  • the node having the routing function includes a routing table, and the routing table includes a plurality of data items; wherein any data item includes a destination node address of the data packet and an address of a next node of the node.
  • the forwarding may cause a failure, and the original transmitting node may re-initiate the routing request.
  • FIG. 4 is a schematic structural diagram of a data forwarding path selecting apparatus according to Embodiment 3 of the present invention, where the apparatus includes:
  • the routing request module 101 is configured to: the preset node broadcasts a routing request packet to a plurality of nodes that have direct communication with the preset node;
  • the routing forwarding module 102 is configured to: if the current node is not a preset termination node, modify the source address in the routing request packet to an address of the current node, and continue to directly communicate with the current node.
  • the node broadcasts a routing request packet;
  • the routing response module 103 is configured to: if the current node is a preset termination node, send the routing response packet to the response target, where the response target is to send the routing request to the termination node The node of the package;
  • the routing negotiation module 104 is configured to: when the preset node receives the plurality of routing response packets, the preset node performs routing negotiation according to the plurality of routing response packets; wherein the routing negotiation Including the TTL of the computing node and the signal to noise ratio of the communication channel;
  • the data sending module 105 is configured to: if the preset node successfully negotiates with the selected node, the preset node sends a routing data packet to the selected node; wherein the selected node is a
  • the preset node has a node that directly communicates.
  • the data forwarding path selecting apparatus broadcasts a routing request packet to a plurality of nodes that directly communicate with the preset node by using the routing request module 101, if the current node is not a preset termination.
  • the routing forwarding module 102 modifies the source address in the routing request packet to the address of the current node, and continues to broadcast a routing request packet to a node that has direct communication with the current node; if the current node is After the preset termination node, the routing response module 103 sends a routing response packet to the response target; when the preset node receives the plurality of routing response packets, the routing negotiation module 104 responds according to the plurality of routing responses.
  • the packet performs routing negotiation; if the preset node successfully negotiates with the selected node routing, the data sending module 105 sends a method for selecting a routing packet to the selected node, and the current node only passes the node with the next node. Interacting reduces the number of data forwarding, increases the transmission rate, and improves the real-time performance of data transmission.
  • the embodiment of the present invention further provides a storage medium, wherein the storage medium includes a stored program, where the device where the storage medium is located is controlled to execute the data described in any of the embodiments. Forward path selection method.
  • An embodiment of the present invention further provides a server, including one or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory and configured to be configured by The one or more processors execute, the program comprising a data forwarding path selection method for performing any of the above embodiments.

Abstract

Provided by the present invention is a method for selecting a data forwarding path, comprising the steps of: a preset node broadcasting a path selection request packet to a plurality of nodes having direct communication with the preset node; if a current node is not a preset termination node, modifying a source address in the path selection request packet and continuing to broadcast the path selection request packet to nodes having direct communication with the current node; if the current node is a preset termination node, the termination node sending a path selection response packet to a response target; when the preset node receives a plurality of path selection response packets, the preset node conducting path selection negotiation according to the plurality of path selection response packets; if the path selection negotiation is successful, the preset node sending the a path selection data packet to a selected node. Also disclosed by the present invention are a data forwarding path selection device, a storage medium and a server. The data forwarding path selection method of the embodiments of the present invention reduces the number of instances of data forwarding and improves the real-time performance of data transmission by means of the method of a current node only interacting with a node of the next level.

Description

数据转发路径选择方法及装置、存储介质、服务端  Data forwarding path selection method and device, storage medium, server
技术领域Technical field
本发明涉及蓝牙数据传输技术领域,尤其涉及一种数据转发路径选择方法及装置、存储介质、服务端。The present invention relates to the field of Bluetooth data transmission technologies, and in particular, to a data forwarding path selection method and apparatus, a storage medium, and a server.
背景技术Background technique
蓝牙技术已有近二十年的历史,以绿色节能、低成本为设计理念,大量用于手机、无线耳机等产品和相关的技术领域。近年来随着蓝牙协议4.x-5.0的发布,其中低功耗规范(BLE, Bluetooth Low Energy)试图将蓝牙推广至更广泛的低成本应用领域,如仪表监控等。Bluetooth technology has a history of nearly 20 years, with green energy saving and low cost as the design concept, and is widely used in mobile phones, wireless earphones and other related technologies. In recent years, with the release of Bluetooth protocol 4.x-5.0, which has a low power specification (BLE, Bluetooth Low Energy) attempts to extend Bluetooth to a wider range of low-cost applications such as instrument monitoring.
近年来,随着物联网的兴起,蓝牙组织最近也推出了蓝牙网格协议(Mesh Profile 1.0,简称Mesh),以期抢占标准及市场的先机。Mesh主要面向楼宇自动化(如灯光门禁控制等),具有自适应等特点。为了满足其低成本、低功耗的设计目标,Mesh的广告承载层(空中包)以“可控的洪泛广播”方式来转发数据,它以TTL(Time To Live)及缓存检查作为“可控算法”来控制网络中数据的转发过程,采用这种方法的结果是,对于任何一个从某节点发往另一节点的数据包来说,整个数据传输网络上几乎所有节点都会需要转发该数据包一次,从而增加了网络的整体功耗,而且节点每次转发数据包还需增加一个随机的延时。采用现有的这种方法进行网络数据传输浪费了公共带宽,大幅降低传输速率,降低了数据传输的实时性。In recent years, with the rise of the Internet of Things, Bluetooth has recently launched the Bluetooth Grid Protocol (Mesh Profile). 1.0, referred to as Mesh), in order to seize the opportunity and market opportunities. Mesh is mainly for building automation (such as lighting access control, etc.), with adaptive features. In order to meet its low-cost, low-power design goals, Mesh's advertising bearer layer (air package) forwards data in a "controllable flooding broadcast" mode, which uses TTL (Time) To Live) and cache checking as a "controllable algorithm" to control the forwarding process of data in the network. The result of this method is that for any data packet sent from one node to another, the entire data transmission network Almost all nodes will need to forward the packet once, which increases the overall power consumption of the network, and the node needs to add a random delay each time it forwards the packet. The use of the existing method for network data transmission wastes common bandwidth, greatly reduces the transmission rate, and reduces the real-time performance of data transmission.
发明内容Summary of the invention
本发明实施例的目的是提供一种数据转发路径选择方法及装置、存储介质、服务端,能有效解决现有技术中网络数据传输浪费了公共带宽,大幅降低传输速率的问题,提高了数据传输的实时性。The object of the embodiments of the present invention is to provide a data forwarding path selection method and device, a storage medium, and a server, which can effectively solve the problem that the network data transmission in the prior art wastes the common bandwidth, greatly reduces the transmission rate, and improves the data transmission. Real time.
为实现上述目的,本发明实施例提供了一种数据转发路径选择方法,包括步骤: To achieve the above objective, an embodiment of the present invention provides a data forwarding path selection method, including the following steps:
S1、预设节点向多个与所述预设节点存在直接通信的节点广播选路请求包;S1. The preset node broadcasts a routing request packet to multiple nodes that have direct communication with the preset node.
S2、若当前节点不是预设的终止节点,则将所述选路请求包中的源地址修改为所述当前节点的地址,继续向与所述当前节点存在直接通信的节点广播选路请求包;S2. If the current node is not a preset termination node, modify the source address in the routing request packet to the address of the current node, and continue to broadcast a routing request packet to a node that has direct communication with the current node. ;
S3、若当前节点是预设的终止节点,则所述终止节点向响应目标发送选路响应包;其中,所述响应目标为向所述终止节点发送所述选路请求包的节点;S3. If the current node is a preset termination node, the termination node sends a routing response packet to the response target; wherein the response target is a node that sends the routing request packet to the termination node;
S4、当预设节点接收到多个所述选路响应包时,所述预设节点根据多个所述选路响应包进行选路协商;其中,所述选路协商包括计算节点的TTL以及通信通道的信噪比;S4. When the preset node receives the plurality of routing response packets, the preset node performs routing negotiation according to the multiple routing response packets, where the routing negotiation includes calculating a TTL of the node and Signal to noise ratio of the communication channel;
S5、若所述预设节点与选中的节点选路协商成功,则所述预设节点向所述选中的节点发送选路数据包;其中,所述选中的节点为一与所述预设节点存在直接通信的节点。S5. If the preset node successfully negotiates with the selected node, the preset node sends a routing data packet to the selected node, where the selected node is a preset node. There are nodes that communicate directly.
与现有技术相比,本发明公开的数据转发路径选择方法,通过预设节点向与自身存在直接通信的节点广播选路请求包,若当前节点不是预设的终止节点则将所述选路请求包的内容复制并修改地址后继续与自身存在直接通信的下一级节点广播选路请求包;若当前节点是预设的终止节点则所述终止节点向与自身存在直接通信的节点转发选路响应包。当所述预设节点接收到多个所述选路响应包后,根据所述选路响应包进行选路协商,当所述预设节点与一自身存在直接通信的下一级节点协商成功时,则该下一级节点为选中的节点,所述预设节点向所述选中的节点发送选路数据包。由于所述预设节点与所述选中的节点选路协商成功,则表明所述选中的节点为所述预设节点通向所述终止节点的路径中的下个最优节点的方法,通过当前节点只与其下一级的节点进行交互,减少了数据不必要的转发,增大了传输速率,提高了数据传输的实时性。Compared with the prior art, the data forwarding path selection method disclosed in the present invention broadcasts a routing request packet to a node that directly communicates with itself through a preset node, and if the current node is not a preset termination node, the routing is selected. After the content of the request packet is copied and the address is modified, the next-level node broadcast routing request packet that continues to communicate directly with itself exists; if the current node is a preset termination node, the terminating node forwards the selection to the node that directly communicates with itself. Road response package. After the preset node receives the plurality of routing response packets, performing routing negotiation according to the routing response packet, when the preset node negotiates successfully with a next-level node that directly communicates with itself And the next level node is the selected node, and the preset node sends the routing data packet to the selected node. The method that the selected node is successfully negotiated with the selected node indicates that the selected node is the next optimal node in the path of the preset node to the terminating node, and the current The node only interacts with the nodes at the next level, which reduces unnecessary forwarding of data, increases the transmission rate, and improves the real-time performance of data transmission.
作为上述方案的改进,所述选路请求包包括源地址、目的地址和发起节点地址;其中,所述选路请求包的源地址为发送所述选路请求包的节点地址,所述选路请求包的目的地址为所述终止节点的地址,所述选路请求包的发起节点地址为所述起始节点的地址。As a modification of the foregoing solution, the routing request packet includes a source address, a destination address, and an initiating node address, where the source address of the routing request packet is a node address that sends the routing request packet, and the routing is performed. The destination address of the request packet is the address of the terminating node, and the originating node address of the routing request packet is the address of the starting node.
作为上述方案的改进,所述步骤S2具体包括:As an improvement of the foregoing solution, the step S2 specifically includes:
若当前节点不是预设的终止节点,则将所述选路请求包的内容复制后生成副本数据包;If the current node is not a preset termination node, copying the content of the routing request packet to generate a replica data packet;
将所述副本数据包的源地址修改为所述当前节点的地址后继续向与所述当前节点存在直接通信的节点发送所述选路请求包。Modifying the source address of the replica data packet to the address of the current node and continuing to send the routing request packet to a node having direct communication with the current node.
作为上述方案的改进,所述选路响应包包括源地址、目的地址、解析地址;其中,所述选路响应包的源地址为发送所述选路响应包的节点地址,所述选路响应包的目的地址为所述响应目标的地址,所述解析地址为所述预设的终止节点的地址。As a modification of the foregoing solution, the routing response packet includes a source address, a destination address, and a resolution address. The source address of the routing response packet is a node address that sends the routing response packet, and the routing response is The destination address of the packet is an address of the response destination, and the resolution address is an address of the preset termination node.
作为上述方案的改进,所述预设节点根据多个所述选路响应包进行选路协商具体包括 :As an improvement of the foregoing solution, the preset node performs routing negotiation according to the multiple routing response packets, and specifically includes:
所述预设节点根据多个所述选路响应包计算所述选路响应包的TTL以及该节点与所述预设节点之间通信通道的信噪比,并根据计算结果选择其中一节点作为所述选中的节点;The preset node calculates a TTL of the routing response packet and a signal to noise ratio of the communication channel between the node and the preset node according to the plurality of routing response packets, and select one of the nodes according to the calculation result. The selected node;
将所述选中的节点作为所述预设节点数据传输的下一节点,并保存所述选中的节点的地址至所述预设节点的路由表中;Using the selected node as the next node of the preset node data transmission, and saving the address of the selected node to the routing table of the preset node;
所述预设节点根据所述路由表中的信息将所述选路数据包发送至所述选中的节点。The preset node sends the routing data packet to the selected node according to information in the routing table.
作为上述方案的改进,所述路由表包括多个数据项;其中,任一数据项包括数据转发路径中预设的终止节点的地址和当前节点数据传输的下一个节点的地址。As a modification of the above solution, the routing table includes a plurality of data items; wherein any of the data items includes an address of a preset termination node in the data forwarding path and an address of a next node of the current node data transmission.
作为上述方案的改进,所述选路数据包包括源地址和、目的地址及下站地址;其中,所述选路数据包的源地址为所述起始节点的地址,所述选路数据包的目的地址为所述终止节点的地址,所述下站地址为所述选中节点的地址。As a modification of the foregoing solution, the routing data packet includes a source address, a destination address, and a lower station address; wherein, a source address of the routing packet is an address of the starting node, and the routing packet is The destination address is the address of the terminating node, and the lower station address is the address of the selected node.
本发明实施例还提供了一种数据转发路径选择装置,包括:The embodiment of the invention further provides a data forwarding path selecting device, including:
选路请求模块,用于预设节点向多个与所述预设节点存在直接通信的节点广播选路请求包;a routing request module, configured to: the preset node broadcasts a routing request packet to a plurality of nodes that directly communicate with the preset node;
选路转发模块,用于若当前节点不是预设的终止节点,则将所述选路请求包中的源地址修改为所述当前节点的地址,继续向与所述当前节点存在直接通信的节点广播选路请求包;a routing forwarding module, configured to modify a source address in the routing request packet to an address of the current node, and continue to directly communicate with the current node if the current node is not a preset termination node Broadcast routing request packet;
选路响应模块,用于若当前节点是预设的终止节点,则所述终止节点向响应目标发送选路响应包;其中,所述响应目标为向所述终止节点发送所述选路请求包的节点;a routing response module, configured to: if the current node is a preset termination node, send the routing response packet to the response target; wherein the response target is to send the routing request packet to the termination node Node
选路协商模块,用于当预设节点接收到多个所述选路响应包时,所述预设节点根据多个所述选路响应包进行选路协商;其中,所述选路协商包括计算节点的TTL以及通信通道的信噪比;a routing negotiation module, configured to: when the preset node receives the plurality of routing response packets, the preset node performs routing negotiation according to the plurality of routing response packets; wherein the routing negotiation includes Calculating the TTL of the node and the signal to noise ratio of the communication channel;
数据发送模块,用于若所述预设节点与选中的节点选路协商成功,则所述预设节点向所述选中的节点发送选路数据包;其中,所述选中的节点为一与所述预设节点存在直接通信的节点。a data sending module, configured to send a routing data packet to the selected node if the preset node successfully negotiates with the selected node routing; wherein the selected node is a The node where the preset node has direct communication exists.
本发明实施例还提供了一种存储介质,所述存储介质包括存储的程序,其中,在所述程序运行时控制所述存储介质所在设备执行上述任一项所述的数据转发路径选择方法。The embodiment of the present invention further provides a storage medium, where the storage medium includes a stored program, wherein the device in which the storage medium is located controls the data forwarding path selection method according to any one of the above items when the program is running.
本发明实施例还提供了一种服务端,包括一个或多个处理器;存储器;以及An embodiment of the present invention further provides a server, including one or more processors; a memory;
一个或多个程序,其中所述一个或多个程序被存储在所述存储器中,并且被配置为由所述一个或多个处理器执行,所述程序包括用于执行上述任一项所述的数据转发路径选择方法。One or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the program comprising for performing any of the above Data forwarding path selection method.
附图说明DRAWINGS
图1是本发明实施例1提供的一种数据转发路径选择方法的流程示意图。1 is a schematic flowchart of a data forwarding path selection method according to Embodiment 1 of the present invention.
图2是本发明实施例2提供的一种数据转发路径选择方法的流程示意图。2 is a schematic flowchart of a data forwarding path selection method according to Embodiment 2 of the present invention.
图3是本发明实施例2提供的一种数据转发路径选择方法中BLE广告包的结构示意图。FIG. 3 is a schematic structural diagram of a BLE advertisement package in a data forwarding path selection method according to Embodiment 2 of the present invention.
图4为本发明实施例3提供的一种数据转发路径选择装置的结构示意图。FIG. 4 is a schematic structural diagram of a data forwarding path selecting apparatus according to Embodiment 3 of the present invention.
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is obvious that the described embodiments are only a part of the embodiments of the present invention, but not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
参见图1,是本发明实施例1提供的一种数据转发路径选择方法的流程示意图,包括步骤S1~ S5:FIG. 1 is a schematic flowchart of a method for selecting a data forwarding path according to Embodiment 1 of the present invention, including steps S1 to S5:
S1、预设节点向多个与所述预设节点存在直接通信的节点广播选路请求包;S1. The preset node broadcasts a routing request packet to multiple nodes that have direct communication with the preset node.
S2、若当前节点不是预设的终止节点,则将所述选路请求包中的源地址修改为所述当前节点的地址,继续向与所述当前节点存在直接通信的节点广播选路请求包;S2. If the current node is not a preset termination node, modify the source address in the routing request packet to the address of the current node, and continue to broadcast a routing request packet to a node that has direct communication with the current node. ;
S3、若当前节点是预设的终止节点,则所述终止节点向响应目标发送选路响应包;其中,所述响应目标为向所述终止节点发送所述选路请求包的节点;S3. If the current node is a preset termination node, the termination node sends a routing response packet to the response target; wherein the response target is a node that sends the routing request packet to the termination node;
S4、当预设节点接收到多个所述选路响应包时,所述预设节点根据多个所述选路响应包进行选路协商;其中,所述选路协商包括计算节点的TTL以及通信通道的信噪比;S4. When the preset node receives the plurality of routing response packets, the preset node performs routing negotiation according to the multiple routing response packets, where the routing negotiation includes calculating a TTL of the node and Signal to noise ratio of the communication channel;
S5、若所述预设节点与选中的节点选路协商成功,则所述预设节点向所述选中的节点发送选路数据包;其中,所述选中的节点为一与所述预设节点存在直接通信的节点。S5. If the preset node successfully negotiates with the selected node, the preset node sends a routing data packet to the selected node, where the selected node is a preset node. There are nodes that communicate directly.
参见图2,图2为本发明实施例2 提供的一种数据转发路径选择方法的流程示意图。实施例2在实施例1的基础上,所述方法包括步骤S21~ S28:Referring to FIG. 2, FIG. 2 is a second embodiment of the present invention. A flow diagram of a data forwarding path selection method provided. Embodiment 2 On the basis of Embodiment 1, the method includes steps S21 to S28:
S21、预设节点向多个与所述预设节点存在直接通信的节点广播选路请求包;S21. The preset node broadcasts a routing request packet to a plurality of nodes that directly communicate with the preset node.
S22、若当前节点不是预设的终止节点,则将所述选路请求包的内容复制后生成副本数据包;S22. If the current node is not a preset termination node, copy the content of the routing request packet to generate a replica data packet.
S23、将所述副本数据包的源地址修改为所述当前节点的地址后继续向与所述当前节点存在直接通信的节点广播所述选路请求包。S23. After modifying the source address of the replica data packet to the address of the current node, continue to broadcast the routing request packet to a node that has direct communication with the current node.
优选地,所述选路请求包包括源地址、目的地址和发起节点地址;其中,所述选路请求包的源地址为发送所述选路请求包的节点地址,所述选路请求包的目的地址为所述终止节点的地址,所述选路请求包的发起节点地址为所述起始节点的地址。Preferably, the routing request packet includes a source address, a destination address, and an originating node address, where the source address of the routing request packet is a node address that sends the routing request packet, and the routing request packet is The destination address is an address of the terminating node, and an originating node address of the routing request packet is an address of the starting node.
S24、若当前节点是预设的终止节点,则所述终止节点向响应目标发送选路响应包;其中,所述响应目标为发送所述选路请求包的节点;S24. If the current node is a preset termination node, the termination node sends a routing response packet to the response target, where the response target is a node that sends the routing request packet.
优选地,所述选路响应包包括源地址、目的地址、解析地址;其中,所述选路响应包的源地址为发送所述选路响应包的节点地址,所述选路响应包的目的地址为所述响应目标的地址,所述解析地址为所述预设的终止节点的地址。Preferably, the routing response packet includes a source address, a destination address, and a resolution address. The source address of the routing response packet is a node address for sending the routing response packet, and the destination of the routing response packet is The address is an address of the response destination, and the resolution address is an address of the preset termination node.
S25、所述预设节点根据多个所述选路响应包计算所述选路响应包的TTL以及该节点与所述预设节点之间通信通道的信噪比,并根据计算结果选择其中一节点作为所述选中的节点;S25. The preset node calculates a TTL of the routing response packet and a signal to noise ratio of a communication channel between the node and the preset node according to the plurality of routing response packets, and select one according to the calculation result. a node as the selected node;
S26、将所述选中的节点作为所述预设节点数据传输的下一节点,并保存所述选中的节点的地址至所述预设节点的路由表中;S26. The selected node is used as the next node of the preset node data transmission, and saves the address of the selected node to a routing table of the preset node.
S27、所述预设节点根据所述路由表中的信息将所述选路数据包发送至所述选中的节点。S27. The preset node sends the routing data packet to the selected node according to information in the routing table.
优选地,所述路由表包括多个数据项;其中,任一数据项包括数据转发路径中预设的终止节点的地址和当前节点数据传输的下一个节点的地址。Preferably, the routing table includes a plurality of data items; wherein any of the data items includes an address of a preset termination node in the data forwarding path and an address of a next node of the current node data transmission.
S28、若所述预设节点与选中的节点选路协商成功,则所述预设节点向所述选中的节点发送选路数据包;其中,所述选中的节点为一与所述预设节点存在直接通信的节点。S28. If the preset node successfully negotiates with the selected node, the preset node sends a routing data packet to the selected node, where the selected node is a preset node. There are nodes that communicate directly.
优选地,所述选路数据包包括源地址和、目的地址及下站地址;其中,所述选路数据包的源地址为所述起始节点的地址,所述选路数据包的目的地址为所述终止节点的地址,所述下站地址为所述选中节点的地址。Preferably, the routing data packet includes a source address, a destination address, and a lower station address; wherein, a source address of the routing data packet is an address of the starting node, and a destination address of the routing data packet For the address of the terminating node, the lower station address is the address of the selected node.
基于上述方案,通过预设节点向与自身存在直接通信的节点广播选路请求包,若当前节点不是预设的终止节点则将所述选路请求包的内容复制并修改地址后继续与自身存在直接通信的下一级节点广播;若当前节点是预设的终止节点则所述终止节点向与自身存在直接通信的节点转发选路响应包。当所述预设节点接收到多个所述选路响应包后,根据所述选路响应包进行选路协商,当所述预设节点与一自身存在直接通信的下一级节点协商成功时,则该下一级节点为选中的节点,所述预设节点向所述选中的节点发送选路数据包。由于所述预设节点与所述选中的节点选路协商成功,则表明所述选中的节点为所述预设节点通向所述终止节点的路径中的下个最优节点的方法,通过当前节点只与其下一级的节点进行交互,减少了数据不必要的转发,增大了传输速率,提高了数据传输的实时性。Based on the foregoing solution, the routing request packet is broadcasted to the node that directly communicates with the self-predetermined node, and if the current node is not the preset termination node, the content of the routing request packet is copied and the address is modified, and then continues to exist with itself. The next-level node of the direct communication broadcasts; if the current node is a preset termination node, the termination node forwards the routing response packet to the node that directly communicates with itself. After the preset node receives the plurality of routing response packets, performing routing negotiation according to the routing response packet, when the preset node negotiates successfully with a next-level node that directly communicates with itself And the next level node is the selected node, and the preset node sends the routing data packet to the selected node. The method that the selected node is successfully negotiated with the selected node indicates that the selected node is the next optimal node in the path of the preset node to the terminating node, and the current The node only interacts with the nodes at the next level, which reduces unnecessary forwarding of data, increases the transmission rate, and improves the real-time performance of data transmission.
在蓝牙Mesh网络数据传输中一般通过BLE的广告包发送数据,而BLE的广告包又分为Mesh包及选路包。其中,Mesh包是指标准Mesh协议所传播的包,选路包是指本选路协议所用到的包,它又可分为选路请求包、选路响应包及选路数据包三种类型,每种类型的数据包都含有三个地址。In the Bluetooth Mesh network data transmission, data is generally sent through the BLE advertisement package, and the BLE advertisement package is further divided into a Mesh package and a routing package. The Mesh packet refers to the packet propagated by the standard Mesh protocol. The routing packet refers to the packet used in the routing protocol. It can be divided into three types: routing request packet, routing response packet, and routing packet. Each type of packet contains three addresses.
所述选路请求包包括源地址、目的地址和发起节点地址;其中,所述选路请求包的源地址为发送所述选路请求包的节点地址,所述选路请求包的目的地址为所述终止节点的地址,所述选路请求包的发起节点地址为所述起始节点的地址。The routing request packet includes a source address, a destination address, and an initiating node address. The source address of the routing request packet is a node address for sending the routing request packet, and the destination address of the routing request packet is The address of the terminating node, the originating node address of the routing request packet is the address of the starting node.
所述选路响应包还包括源地址、目的地址、解析地址;其中,所述选路响应包的源地址为发送所述选路响应包的节点地址,所述选路响应包的目的地址为所述响应目标的地址,所述解析地址为所述预设的终止节点的地址。The routing response packet further includes a source address, a destination address, and a resolution address. The source address of the routing response packet is a node address for sending the routing response packet, and the destination address of the routing response packet is The address of the response target, the resolution address is an address of the preset termination node.
所述选路数据包还包括源地址和、目的地址及下站地址;其中,所述选路数据包的源地址为所述起始节点的地址,所述选路数据包的目的地址为所述终止节点的地址,所述下站地址为所述选中节点的地址。在数据转发的过程中所述选路数据包的源地址和目的地址保持不变,所述选路数据包的下站地址在不停的改变。The routing data packet further includes a source address, a destination address, and a lower station address. The source address of the routing data packet is an address of the starting node, and the destination address of the routing data packet is The address of the terminating node is the address of the selected node. In the process of data forwarding, the source address and the destination address of the routing data packet remain unchanged, and the lower station address of the routing data packet is continuously changed.
本发明实施例提供的数据转发路径选择方法采用数据包中的一个标识的值区分该数据包是Mesh包还是选路包。参见图3,为本发明实施例2提供的一种数据转发路径选择方法中BLE广告包的结构示意图。下面结合图3说明本发明如何区分Mesh包和选路包,若所述广告包中的AdType标志为M则该广告包为Mesh包,其中AdType标志具体为一个8位字节的数值;若所述广告包中的AdType标志为R则该广告包为选路包。本发明实施例中只有具有选路功能的节点才可以转发选路包,而普通的标准Mesh节点无法识别选路包,所以就会自动忽略选路包。本发明实施例采用上述方法避免了不必要的数据转发,节省了公共带宽,提高了数据转发的效率。The data forwarding path selection method provided by the embodiment of the present invention uses a value in the data packet to distinguish whether the data packet is a Mesh packet or a routing packet. FIG. 3 is a schematic structural diagram of a BLE advertisement package in a data forwarding path selection method according to Embodiment 2 of the present invention. The following describes how the present invention distinguishes between a Mesh packet and a routing packet according to FIG. 3. If the AdType flag in the advertisement package is M, the advertisement packet is a Mesh packet, and the AdType flag is specifically an 8-bit byte value; When the AdType flag in the advertisement package is R, the advertisement package is a routing package. In the embodiment of the present invention, only the node having the routing function can forward the routing packet, and the ordinary standard Mesh node cannot identify the routing packet, so the routing packet is automatically ignored. The embodiment of the invention avoids unnecessary data forwarding by using the foregoing method, saves public bandwidth, and improves data forwarding efficiency.
优选地,所述节点在进行数据包的转发采用的是广播模式,可以理解的,所述节点会向所有与自身存在直接通信联系的节点发送选路包,但是只有具有选路功能的节点才能直接接受所述选路包。Preferably, the node adopts a broadcast mode for forwarding the data packet. It can be understood that the node sends a routing packet to all nodes that have direct communication with itself, but only the node with the routing function can Directly accept the routing package.
进一步地,若具有选路功能的节点要向标准Mesh节点发送数据,则先将选路包转换为标准的Mesh包,然后再向标准Mesh节点发送;若标准Mesh节点要向具有选路功能的节点发送数据,则先将标准的Mesh包转换为选路包,然后再向具有选路功能的节点发送。Further, if the node having the routing function sends data to the standard Mesh node, the routing packet is first converted into a standard Mesh packet, and then sent to the standard Mesh node; if the standard Mesh node is to have a routing function When the node sends data, the standard Mesh packet is first converted into a routing packet, and then sent to the node with the routing function.
优选地,所述具有选路功能的节点中包括路由表,所述路由表包括多个数据项;其中,任一数据项包括数据包的目的节点地址和该节点下一个节点的地址。Preferably, the node having the routing function includes a routing table, and the routing table includes a plurality of data items; wherein any data item includes a destination node address of the data packet and an address of a next node of the node.
优选地,当路径中的一些节点被移除时,转发可能引起失败,这时原发送节点可以重新发起选路请求。Preferably, when some of the nodes in the path are removed, the forwarding may cause a failure, and the original transmitting node may re-initiate the routing request.
参见图4,为本发明实施例3提供的一种数据转发路径选择装置的结构示意图,所述装置包括:FIG. 4 is a schematic structural diagram of a data forwarding path selecting apparatus according to Embodiment 3 of the present invention, where the apparatus includes:
选路请求模块101,用于预设节点向多个与所述预设节点存在直接通信的节点广播选路请求包;The routing request module 101 is configured to: the preset node broadcasts a routing request packet to a plurality of nodes that have direct communication with the preset node;
选路转发模块102,用于若当前节点不是预设的终止节点,则将所述选路请求包中的源地址修改为所述当前节点的地址,继续向与所述当前节点存在直接通信的节点广播选路请求包;The routing forwarding module 102 is configured to: if the current node is not a preset termination node, modify the source address in the routing request packet to an address of the current node, and continue to directly communicate with the current node. The node broadcasts a routing request packet;
选路响应模块103,用于若当前节点是预设的终止节点,则所述终止节点向响应目标发送选路响应包;其中,所述响应目标为向所述终止节点发送所述选路请求包的节点;The routing response module 103 is configured to: if the current node is a preset termination node, send the routing response packet to the response target, where the response target is to send the routing request to the termination node The node of the package;
选路协商模块104,用于当预设节点接收到多个所述选路响应包时,所述预设节点根据多个所述选路响应包进行选路协商;其中,所述选路协商包括计算节点的TTL以及通信通道的信噪比;The routing negotiation module 104 is configured to: when the preset node receives the plurality of routing response packets, the preset node performs routing negotiation according to the plurality of routing response packets; wherein the routing negotiation Including the TTL of the computing node and the signal to noise ratio of the communication channel;
数据发送模块105,用于若所述预设节点与选中的节点选路协商成功,则所述预设节点向所述选中的节点发送选路数据包;其中,所述选中的节点为一与所述预设节点存在直接通信的节点。The data sending module 105 is configured to: if the preset node successfully negotiates with the selected node, the preset node sends a routing data packet to the selected node; wherein the selected node is a The preset node has a node that directly communicates.
本发明实施例提供的数据转发路径选择装置,通过选路请求模块101将预设节点向多个与所述预设节点存在直接通信的节点广播选路请求包,若当前节点不是预设的终止节点,则选路转发模块102将所述选路请求包中的源地址修改为所述当前节点的地址,继续向与所述当前节点存在直接通信的节点广播选路请求包;若当前节点是预设的终止节点,则选路响应模块103向响应目标发送选路响应包;当预设节点接收到多个所述选路响应包时,选路协商模块104根据多个所述选路响应包进行选路协商;若所述预设节点与选中的节点选路协商成功,则数据发送模块105向所述选中的节点发送选路数据包的方法,通过当前节点只与其下一级的节点进行交互,减少了数据的转发次数,增大了传输速率,提高了数据传输的实时性。The data forwarding path selecting apparatus provided by the embodiment of the present invention broadcasts a routing request packet to a plurality of nodes that directly communicate with the preset node by using the routing request module 101, if the current node is not a preset termination. a node, the routing forwarding module 102 modifies the source address in the routing request packet to the address of the current node, and continues to broadcast a routing request packet to a node that has direct communication with the current node; if the current node is After the preset termination node, the routing response module 103 sends a routing response packet to the response target; when the preset node receives the plurality of routing response packets, the routing negotiation module 104 responds according to the plurality of routing responses. The packet performs routing negotiation; if the preset node successfully negotiates with the selected node routing, the data sending module 105 sends a method for selecting a routing packet to the selected node, and the current node only passes the node with the next node. Interacting reduces the number of data forwarding, increases the transmission rate, and improves the real-time performance of data transmission.
本发明实施例还提供了一种存储介质,其特征在于,所述存储介质包括存储的程序,其中,在所述程序运行时控制所述存储介质所在设备执行上述任一实施例所述的数据转发路径选择方法。The embodiment of the present invention further provides a storage medium, wherein the storage medium includes a stored program, where the device where the storage medium is located is controlled to execute the data described in any of the embodiments. Forward path selection method.
本发明实施例还提供了一种服务端,包括一个或多个处理器;存储器;以及一个或多个程序,其中所述一个或多个程序被存储在所述存储器中,并且被配置为由所述一个或多个处理器执行,所述程序包括用于执行上述任一实施例所述的数据转发路径选择方法。An embodiment of the present invention further provides a server, including one or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory and configured to be configured by The one or more processors execute, the program comprising a data forwarding path selection method for performing any of the above embodiments.
以上所述是本发明的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也视为本发明的保护范围。The above is a preferred embodiment of the present invention, and it should be noted that those skilled in the art can also make several improvements and retouchings without departing from the principles of the present invention. It is the scope of protection of the present invention.

Claims (10)

  1. 一种数据转发路径选择方法,其特征在于,所述方法包括步骤: A data forwarding path selection method, characterized in that the method comprises the steps of:
    S1、预设节点向多个与所述预设节点存在直接通信的节点广播选路请求包;S1. The preset node broadcasts a routing request packet to multiple nodes that have direct communication with the preset node.
    S2、若当前节点不是预设的终止节点,则将所述选路请求包中的源地址修改为所述当前节点的地址,继续向与所述当前节点存在直接通信的节点广播选路请求包;S2. If the current node is not a preset termination node, modify the source address in the routing request packet to the address of the current node, and continue to broadcast a routing request packet to a node that has direct communication with the current node. ;
    S3、若当前节点是预设的终止节点,则所述终止节点向响应目标发送选路响应包;其中,所述响应目标为向所述终止节点发送所述选路请求包的节点;S3. If the current node is a preset termination node, the termination node sends a routing response packet to the response target; wherein the response target is a node that sends the routing request packet to the termination node;
    S4、当预设节点接收到多个所述选路响应包时,所述预设节点根据多个所述选路响应包进行选路协商;其中,所述选路协商包括计算节点的TTL以及通信通道的信噪比; S4. When the preset node receives the plurality of routing response packets, the preset node performs routing negotiation according to the multiple routing response packets, where the routing negotiation includes calculating a TTL of the node and Signal to noise ratio of the communication channel;
    S5、若所述预设节点与选中的节点选路协商成功,则所述预设节点向所述选中的节点发送选路数据包;其中,所述选中的节点为一与所述预设节点存在直接通信的节点。S5. If the preset node successfully negotiates with the selected node, the preset node sends a routing data packet to the selected node, where the selected node is a preset node. There are nodes that communicate directly.
  2. 如权利要求1述的数据转发路径选择方法,其特征在于,所述选路请求包包括源地址、目的地址和发起节点地址;其中,所述选路请求包的源地址为发送所述选路请求包的节点地址,所述选路请求包的目的地址为所述终止节点的地址,所述选路请求包的发起节点地址为所述起始节点的地址。 The data forwarding path selection method according to claim 1, wherein the routing request packet includes a source address, a destination address, and an originating node address; wherein a source address of the routing request packet is to send the routing The node address of the request packet, the destination address of the routing request packet is an address of the termination node, and the originating node address of the routing request packet is an address of the starting node.
  3. 如权利要求1所述的数据转发路径选择方法,其特征在于,所述步骤S2具体包括:The data forwarding path selection method according to claim 1, wherein the step S2 specifically includes:
    若当前节点不是预设的终止节点,则将所述选路请求包的内容复制后生成副本数据包;If the current node is not a preset termination node, copying the content of the routing request packet to generate a replica data packet;
    将所述副本数据包的源地址修改为所述当前节点的地址后继续向与所述当前节点存在直接通信的节点发送所述选路请求包。Modifying the source address of the replica data packet to the address of the current node and continuing to send the routing request packet to a node having direct communication with the current node.
  4. 如权利要求1所述的数据转发路径选择方法,其特征在于,所述选路响应包包括源地址、目的地址、解析地址;其中,所述选路响应包的源地址为发送所述选路响应包的节点地址,所述选路响应包的目的地址为所述响应目标的地址,所述解析地址为所述预设的终止节点的地址。 The data forwarding path selection method according to claim 1, wherein the routing response packet includes a source address, a destination address, and a resolution address, wherein the source address of the routing response packet is to send the routing And responding to the node address of the packet, the destination address of the routing response packet is an address of the response destination, and the resolution address is an address of the preset termination node.
  5. 如权利要求1所述的数据转发路径选择方法,其特征在于,所述预设节点根据多个所述选路响应包进行选路协商具体包括:The data forwarding path selection method according to claim 1, wherein the routing decision by the preset node according to the plurality of routing response packets comprises:
    所述预设节点根据多个所述选路响应包计算所述选路响应包的TTL以及该节点与所述预设节点之间通信通道的信噪比,并根据计算结果选择其中一节点作为所述选中的节点;The preset node calculates a TTL of the routing response packet and a signal to noise ratio of the communication channel between the node and the preset node according to the plurality of routing response packets, and select one of the nodes according to the calculation result. The selected node;
    将所述选中的节点作为所述预设节点数据传输的下一节点,并保存所述选中的节点的地址至所述预设节点的路由表中;Using the selected node as the next node of the preset node data transmission, and saving the address of the selected node to the routing table of the preset node;
    所述预设节点根据所述路由表中的信息将所述选路数据包发送至所述选中的节点。The preset node sends the routing data packet to the selected node according to information in the routing table.
  6. 如权利要求5所述的数据转发路径选择方法,其特征在于,所述路由表包括多个数据项;其中,任一数据项包括数据转发路径中预设的终止节点的地址和当前节点数据传输的下一个节点的地址。 The data forwarding path selection method according to claim 5, wherein the routing table comprises a plurality of data items; wherein any data item comprises an address of a preset termination node in the data forwarding path and a current node data transmission The address of the next node.
  7. 如权利要求1或5所述的数据转发路径选择方法,其特征在于,所述选路数据包包括源地址、目的地址及下站地址;其中,所述选路数据包的源地址为所述起始节点的地址,所述选路数据包的目的地址为所述终止节点的地址,所述下站地址为所述选中节点的地址。 The data forwarding path selection method according to claim 1 or 5, wherein the routing data packet includes a source address, a destination address, and a lower station address; wherein a source address of the routing packet is the The address of the start node, the destination address of the routing data packet is the address of the terminating node, and the lower station address is the address of the selected node.
  8. 一种数据转发路径选择装置,其特征在于,所述装置包括:A data forwarding path selecting device, the device comprising:
    选路请求模块,用于预设节点向多个与所述预设节点存在直接通信的节点广播选路请求包;a routing request module, configured to: the preset node broadcasts a routing request packet to a plurality of nodes that directly communicate with the preset node;
    选路转发模块,用于若当前节点不是预设的终止节点,则将所述选路请求包中的源地址修改为所述当前节点的地址,继续向与所述当前节点存在直接通信的节点广播选路请求包;a routing forwarding module, configured to modify a source address in the routing request packet to an address of the current node, and continue to directly communicate with the current node if the current node is not a preset termination node Broadcast routing request packet;
    选路响应模块,用于若当前节点是预设的终止节点,则所述终止节点向响应目标发送选路响应包;其中,所述响应目标为向所述终止节点发送所述选路请求包的节点;a routing response module, configured to: if the current node is a preset termination node, send the routing response packet to the response target; wherein the response target is to send the routing request packet to the termination node Node
    选路协商模块,用于当预设节点接收到多个所述选路响应包时,所述预设节点根据多个所述选路响应包进行选路协商;其中,所述选路协商包括计算节点的TTL以及通信通道的信噪比;a routing negotiation module, configured to: when the preset node receives the plurality of routing response packets, the preset node performs routing negotiation according to the plurality of routing response packets; wherein the routing negotiation includes Calculating the TTL of the node and the signal to noise ratio of the communication channel;
    数据发送模块,用于若所述预设节点与选中的节点选路协商成功,则所述预设节点向所述选中的节点发送选路数据包;其中,所述选中的节点为一与所述预设节点存在直接通信的节点。a data sending module, configured to send a routing data packet to the selected node if the preset node successfully negotiates with the selected node routing; wherein the selected node is a The node where the preset node has direct communication exists.
  9. 一种存储介质,其特征在于,所述存储介质包括存储的程序,其中,在所述程序运行时控制所述存储介质所在的设备执行权利要求1~7任一项所述的数据转发路径选择方法。A storage medium, characterized in that the storage medium includes a stored program, wherein the device in which the storage medium is controlled to execute the data forwarding path selection according to any one of claims 1 to 7 when the program is running method.
  10. 一种服务端,其特征在于,包括一个或多个处理器、存储器以及一个或多个程序,其中: A server characterized by comprising one or more processors, a memory, and one or more programs, wherein:
    所述一个或多个程序被存储在所述存储器中,并且被配置为由所述一个或多个处理器执行,所述程序包括用于执行权利要求1~7任一项所述的数据转发路径选择方法。 The one or more programs are stored in the memory and configured to be executed by the one or more processors, the program comprising for performing the data forwarding of any one of claims 1-7 Path selection method.
PCT/CN2018/110007 2017-12-29 2018-10-12 Data forwarding path selection method and device, storage medium and server WO2019128384A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201711486798.5 2017-12-29
CN201711486798.5A CN108123873B (en) 2017-12-29 2017-12-29 Data forwarding path selection method and device, storage medium and server

Publications (1)

Publication Number Publication Date
WO2019128384A1 true WO2019128384A1 (en) 2019-07-04

Family

ID=62232537

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/110007 WO2019128384A1 (en) 2017-12-29 2018-10-12 Data forwarding path selection method and device, storage medium and server

Country Status (2)

Country Link
CN (1) CN108123873B (en)
WO (1) WO2019128384A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111404701A (en) * 2019-12-16 2020-07-10 杭州复杂美科技有限公司 Information broadcasting method, equipment and storage medium

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108123873B (en) * 2017-12-29 2020-10-27 安凯(广州)微电子技术有限公司 Data forwarding path selection method and device, storage medium and server
CN109597830B (en) * 2018-11-22 2023-05-05 创新先进技术有限公司 Data circulation method, device, equipment and medium
CN109617808A (en) * 2019-01-14 2019-04-12 安凯(广州)微电子技术有限公司 A kind of data-optimized transmission method, system and device based on bluetooth Mesh
CN109618321A (en) * 2019-01-30 2019-04-12 深圳众享互联科技有限公司 A kind of bluetooth Mesh network Transmission system and method realized based on routing table
CN111542030A (en) * 2020-04-21 2020-08-14 深圳市中科蓝讯科技股份有限公司 Optimal TTL value calculation method of Bluetooth Mesh, system thereof and computer readable storage medium
CN111711941B (en) * 2020-04-30 2023-10-24 杭州涂鸦信息技术有限公司 Data transmission method, related equipment and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102026098A (en) * 2009-09-16 2011-04-20 索尼株式会社 Communication network as well as routing method and device thereof
CN102695239A (en) * 2012-06-18 2012-09-26 哈尔滨工业大学 Service discovery system applied to embedded platform and service discovery method
CN102769885A (en) * 2011-05-04 2012-11-07 中国移动通信集团广东有限公司 Method for realizing routing in sensor network and sensor network
CN105491508A (en) * 2015-06-30 2016-04-13 汤羽 Networking and routing algorithm based on Bluetooth technology for mobile phone ad hoc communication network CellNet
CN108123873A (en) * 2017-12-29 2018-06-05 安凯(广州)微电子技术有限公司 Data forwarding paths selection method and device, storage medium, server-side

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002534842A (en) * 1998-12-23 2002-10-15 ノキア・ワイヤレス・ルーターズ・インコーポレーテッド Unified routing scheme for ad hoc internetworking

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102026098A (en) * 2009-09-16 2011-04-20 索尼株式会社 Communication network as well as routing method and device thereof
CN102769885A (en) * 2011-05-04 2012-11-07 中国移动通信集团广东有限公司 Method for realizing routing in sensor network and sensor network
CN102695239A (en) * 2012-06-18 2012-09-26 哈尔滨工业大学 Service discovery system applied to embedded platform and service discovery method
CN105491508A (en) * 2015-06-30 2016-04-13 汤羽 Networking and routing algorithm based on Bluetooth technology for mobile phone ad hoc communication network CellNet
CN108123873A (en) * 2017-12-29 2018-06-05 安凯(广州)微电子技术有限公司 Data forwarding paths selection method and device, storage medium, server-side

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
YE, LIOANG: "Ad hoc network routing anti-shake algorithm", CHINA DISSERTATIONS FULL-TEXT DATABASE, INFORMATION & TECHNOLOGY, no. 5, 15 May 2015 (2015-05-15) *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111404701A (en) * 2019-12-16 2020-07-10 杭州复杂美科技有限公司 Information broadcasting method, equipment and storage medium
CN111404701B (en) * 2019-12-16 2022-04-05 杭州复杂美科技有限公司 Information broadcasting method, equipment and storage medium

Also Published As

Publication number Publication date
CN108123873B (en) 2020-10-27
CN108123873A (en) 2018-06-05

Similar Documents

Publication Publication Date Title
WO2019128384A1 (en) Data forwarding path selection method and device, storage medium and server
WO2018199672A1 (en) Network slice-available area information acquisition method
WO2016148458A1 (en) Method for maintaining a persistent miracast session over wireless link
EP2697916A2 (en) Machine-to-machine node erase procedure
WO2014059607A1 (en) Group area management method, device and system
WO2014010992A1 (en) Communication method between content requester and content provider for providing content and real-time streaming content in content name-based content centric network
WO2018233352A1 (en) Data transmission method, device, terminal and computer-readable storage medium
WO2016003177A1 (en) Method and apparatus for increasing communication effectiveness of terminal in power-saving mode
WO2017186018A1 (en) Robot communication method and system
WO2018000787A1 (en) Terminal, and method and system for identifying pseudo base station
WO2015018243A1 (en) Ios device based webpage blocking method and device
WO2015143776A1 (en) Multi-mode power saving multimedia transmission method and system
WO2014019183A1 (en) Method and system for controlling terminal device to access wireless network
WO2016065619A1 (en) Data traffic management method and device
WO2011144126A2 (en) Method, apparatus and system for network device configuration
WO2017012417A1 (en) Control method between multi-screen interactive devices, multi-screen interactive device, and system
WO2019015016A1 (en) Set top box-based coexistence optimization method, device and system for wifi and bluetooth
WO2014073902A1 (en) Method and apparatus for providing web service in wireless communication system
WO2017018782A1 (en) Apparatus and method for transmitting and receiving signals in mesh network
CN101138268A (en) Providing mobility management protocol information to a mobile terminal for performing handover in a mobile communication system
WO2017185279A1 (en) Embedded distributed networking method and system
WO2018184302A1 (en) Data transmission method, system, virtual load balancer and readable storage medium
WO2017133054A1 (en) Instant messaging service invoking method and enterprise service bus server
WO2018110836A1 (en) Electronic device and control method thereof
WO2018076293A1 (en) Method and apparatus for adjusting parameter of multimedia communication, and mobile terminal

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 17/11/2020)

122 Ep: pct application non-entry in european phase

Ref document number: 18894575

Country of ref document: EP

Kind code of ref document: A1