WO2020147081A1 - 一种数据传输方法、相关设备及计算机存储介质 - Google Patents
一种数据传输方法、相关设备及计算机存储介质 Download PDFInfo
- Publication number
- WO2020147081A1 WO2020147081A1 PCT/CN2019/072215 CN2019072215W WO2020147081A1 WO 2020147081 A1 WO2020147081 A1 WO 2020147081A1 CN 2019072215 W CN2019072215 W CN 2019072215W WO 2020147081 A1 WO2020147081 A1 WO 2020147081A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- network node
- transmission
- transmission path
- data
- network
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/12—Shortest path evaluation
Definitions
- This application relates to the field of communications, and in particular to a data transmission method, related equipment and computer storage media.
- Data transmission is one of the key technologies.
- the commonly used network structure is to use the star network structure shown in Figure 1, where the user equipment acts as an edge node. It forms a micro-network in master-slave mode with routing equipment, and the routing equipment and master control equipment form the entire network topology in master-slave mode.
- the networking technology of the star network topology when a routing node fails, the user equipment connected to the routing node will be affected.
- the network has weak self-healing ability and can only use a fixed path for forwarding.
- the transmission path is dynamically adjusted according to the traffic usage, and the bandwidth utilization is low.
- This application provides a data transmission method, related equipment, and computer storage medium, which can dynamically adjust the transmission path according to application scenarios, and has higher bandwidth utilization and stronger network self-healing capabilities.
- a data transmission method is provided, which is applied to a data transmission system.
- the data transmission system includes a first network node and a second network node.
- the data transmission system is characterized in that the network transmission system is still in the first network node.
- a plurality of transmission paths are established between the network node and the second network node, each of the transmission paths includes one or more intermediate network nodes, and the plurality of intermediate network nodes in each transmission path are sequentially Direct communication connection; the method includes: when data transmission between the first network node and the second network node is required, obtaining the current available between the first network node and the second network node The transmission path for transmitting data; selecting the transmission path with the highest transmission efficiency in the transmission path as the target transmission path; and controlling the data transmission through the target transmission path.
- a network terminal device which is set on a first network node of a data transmission system, wherein the data transmission system includes a first network node and a second network node, and the network transmission system is still A plurality of transmission paths are established between the first network node and the second network node, each transmission path includes one or more intermediate network nodes, and a plurality of intermediate network nodes in each transmission path
- the network nodes are in direct communication connection in sequence;
- the network terminal device includes a processor and a communication interface, and the processor is used to: obtain when data transmission between the first network node and the second network node is required The transmission path currently available for data transmission between the first network node and the second network node; select the transmission path with the highest transmission efficiency in the transmission path as the target transmission path; and control the communication interface to pass through all the transmission paths
- the target transmission path performs data transmission.
- a computer-readable storage medium stores a computer program
- the computer program includes program instructions that, when executed by a processor, cause the processor to execute the above One side approach.
- the data transmission method, related equipment, and computer storage medium provided by this application, when data transmission between the first network node and the second network node is required, by acquiring the first network node and the A transmission path currently available for data transmission between the second network nodes is selected, one of the transmission paths with the highest transmission efficiency is selected as the target transmission path, and data transmission is controlled through the target transmission path.
- the network structure provided by this application is not a traditional master-slave mode star network structure, each network node is not only an edge node, but also has the forwarding function of a router, so the data transmission method, related equipment and computer provided by this application are used
- the storage medium can dynamically adjust the transmission path according to the application scenario, with higher bandwidth utilization and stronger network self-healing capabilities.
- Figure 1 is a topological diagram of a traditional star network structure
- FIG. 2 is a schematic flowchart of a data transmission method according to an embodiment of the present application.
- FIG. 3 is a topological diagram of a data transmission network structure provided by an embodiment of the present application.
- FIG. 4 is a topological diagram of a data transmission network structure provided by an embodiment of the present application.
- FIG. 5 is a topological diagram of a data transmission network structure provided by an embodiment of the present application.
- FIG. 6 is a schematic diagram of an interaction process between a first network node A and an intermediate network node B in an application scenario according to an embodiment of the present application;
- FIG. 7 is a schematic flowchart of a data transmission method provided by an embodiment of the present application.
- Fig. 8a is a schematic diagram of a network framework of a data transmission system provided by an embodiment of the present application.
- Fig. 8b is a schematic structural diagram of a network terminal device provided by an embodiment of the present application.
- the data transmission method is applied to a data transmission system
- the data transmission system includes a first network node and a second network node, characterized in that the network
- the transmission system also establishes multiple transmission paths between the first network node and the second network node, each transmission path includes one or more intermediate network nodes, and each transmission path A plurality of intermediate network nodes of the network are directly connected in sequence; the method includes:
- the first network node and the intermediate network node are terminal devices that are provided on each network node in the data transmission system and include a Bluetooth module.
- the second network node is a server or a central control node. It can be understood that, in other embodiments, the second network node may also be a terminal device that includes a Bluetooth module provided on each network node in the data transmission system. Among them, the terminal device including the Bluetooth module may specifically be a Bluetooth Low Energy (BLE) 4.0 device.
- BLE Bluetooth Low Energy
- the first network node and the intermediate network node may be a tablet, a mobile phone terminal, For handheld electronic devices supporting Bluetooth functions such as smart watches, the second network node may be a central control device of the conference system.
- the first data transmitted between the first network node and the second network node may be data sent by other network nodes to the first network node, or may be generated or generated by the first network node itself.
- Stored data For example, when the first network node is the wordpad A1 used by user A in the conference system, the first data may be data generated by user A using wordpad A1, or may be connected to A1 and be B The writing pad B1 used by the user generates and sends data to the writing pad A1.
- the data transmission method provided in this application can be used in any network environment where the range of data transmission is limited or the number of connections to network devices is limited.
- the conference system is only one of the application scenarios. There is no specific limitation.
- the intermediate network node is a terminal device including a Bluetooth module that is used to directly forward data sent by other network nodes through the network, including: an intermediate network node located within the transmission range of the first network node. For receiving data sent by the first network node, wherein the first network node is directly connected to the intermediate network node.
- the intermediate network node that first receives the data sent by the first network node transmits the data through a plurality of intermediate network nodes in sequence according to the connection sequence of the transmission path until it is transmitted to the second network node A directly connected intermediate network node, and the intermediate network node directly connected to the second network node sends the data to the second network node.
- the traditional star network structure includes a central node, a routing node, and an edge node.
- the routing node is the slave device of the central node and the master device of the edge node.
- the data transmission system when the second network node is a server, the data transmission system only includes a central node (server) and multiple network nodes (including intermediate network nodes and first network nodes), and the central node It is the master device of the multiple network nodes, and there is no master-slave relationship between the multiple network nodes.
- Figure 3 is a topological diagram of a data transmission network provided by the present application, where the dark network node 0 can be the central control node as the second network node, and the light network nodes are the first network node and the intermediate network node. After the data generated by the first network node is sent to the second network node through the transmission path, the second network node performs corresponding processing on it.
- each network node as a Bluetooth device can directly establish a connection with the second network node.
- the network node 10 in FIG. 3 can also directly establish a connection with the second network node 0 to send data.
- each network node can only establish Bluetooth connections with less than seven other network nodes. Therefore, when the first network node is far away from the second network node, or the first network node Second, when the number of connections of the network node has reached the maximum upper limit, the data can be sent to other intermediate network nodes and then forwarded multiple times, so as to be delivered to the second network node.
- FIG. 3 is only used for illustration, and the data transmission network provided by the present application may also include more central control nodes, more first network nodes, and more intermediate network nodes, which is not specifically limited here.
- S102A Select a transmission path with the highest transmission efficiency among the transmission paths as a target transmission path, and control data transmission through the target transmission path.
- FIG. 4 is a topology diagram of a Bluetooth networking structure provided by the present application, in which dark network node 0 is the second network node, and light network nodes are the first network node and intermediate network nodes. It can be understood that each of the first network node to the second network node may have one or more transmission paths.
- the network node 9 is the first network node, and for the first network node 9, there are three transmission paths.
- the transmission path with the highest transmission efficiency is the transmission path with the least number of intermediate network nodes.
- the first network node 11 when the network node 11 is the first network node, the first network node 11 has two transmission paths, and the first transmission path includes 6 network nodes, namely 11, 7, 6, 2, 1, 0, the second transmission path includes 5 network nodes, namely 11, 3, 2, 1, 0. Therefore, the first network node 11 chooses to use the second transmission path as the target transmission path for all The transmission of the first data. It can be understood that the fewer intermediate network nodes included in the selected target transmission path, the faster the first data can reach the second network node 0. It should be understood that the above examples are only for illustration and cannot constitute a specific limitation.
- the transmission path with the highest transmission efficiency is the transmission path with the largest number of idle network nodes, where the idle network nodes are network nodes that do not need to send data.
- the first network node 9 when the network node 9 is the first network node, the first network node 9 has two transmission paths, where the first transmission path includes network nodes 9, 3, 2, 1, 0, The two transmission paths include network nodes 9, 10, 4, 1, 0, and the third transmission path includes network nodes 9, 3, 11, 7, 6, 2, 1, 0.
- the Bluetooth module can send a broadcast that it is currently idle to the surrounding directly connected network nodes, assuming that the current network nodes 2, 3, and 4 send to the surrounding that they are currently idle
- the first transmission path includes 2 idle network nodes
- the second transmission path includes 1 idle network node
- the third transmission path includes 2 idle network nodes. Therefore, the most efficient transmission is
- the paths are the first transmission path and the third transmission path, and the first network node 9 can choose to use the first transmission path or the third transmission path as the target transmission path to send the first data to the second network node. It can be understood that the more idle nodes included in the selected target path, the faster the first data can reach the second network node 0, and the higher the transmission efficiency. It should be understood that the above examples are only for illustration and cannot constitute a specific limitation.
- the obtaining the transmission path currently available for data transmission between the first network node and the second network node includes: when the idle state information sent by the idle network node is received, obtaining information including all One or more transmission paths of the idle network node; the selecting a transmission path with the highest transmission efficiency in the transmission path as a target transmission path includes: selecting an intermediate network node in the transmission path that includes the idle network node The transmission path with the least number is used as the target transmission path.
- the first network node 9 when the network node 9 is the first network node, the first network node 9 has two transmission paths, where the first transmission path includes 5 network nodes, namely 9, 3, 2, 1, 0, the second transmission path includes 5 network nodes, which are 9, 10, 4, 1, 0, and the third transmission path includes 8 network nodes, which are 9, 3, 11, 7, and 6, 2, 1, 0.
- the first and second transmission paths include 5 network nodes
- the third transmission path includes 8 network nodes.
- Both the first transmission path and the third transmission path include 2 idle network nodes
- the second transmission path includes 0 idle network nodes.
- the transmission path with the highest transmission efficiency at this time includes idle network nodes with the least number of intermediate network nodes As the target transmission path, that is, the first transmission path, the first network node 9 chooses to use the first transmission path as the target transmission path to send the first data to the second network node.
- the data communication method provided in the present application can dynamically perform network offloading according to current network conditions, and send data to another path with a short path, idle network and less congestion, thereby improving the efficiency of data transmission. It should be understood that the above examples are only for illustration and cannot constitute a specific limitation.
- the acquiring a transmission path currently available for data transmission between the first network node and the second network node further includes: receiving an idle network directly connected to the first network node When the node sends the idle state information, the target idle network node closest to the first network node is determined, where the idle state information includes the location information of each idle node; and one of the target idle network nodes is obtained. Or multiple transmission paths; the selecting the transmission path with the highest transmission efficiency among the transmission paths as the target transmission path includes: selecting the transmission path with the least number of intermediate network nodes among the transmission paths containing the target idle network node The path serves as the target transmission path.
- the first network node 9 has three transmission paths, and the directly connected network nodes of the first network node 9 may be the intermediate network node 3 and the intermediate network node 10, assuming that the intermediate network node 3 is in an idle state , The intermediate network node 3 will send a broadcast that it is currently idle to the surrounding network nodes directly connected, and the first network node 9 will send the first data to the intermediate network node 3 upon receiving the broadcast. , The intermediate network node 3 then obtains one or more transmission paths from the intermediate network node 3 to the second network node 0. At this time, there is only one transmission path, that is, the intermediate network nodes 3, 2, 1, and 0 are forwarded in turn.
- the central control equipment can only be used to reserve channel bandwidth for each routing node in advance, and the use of individual edge nodes is suspended, and no data is generated. In this case, channel resources are wasted.
- the data transmission method provided by this application can use the idle node as a relay intermediate network node to dynamically adjust the path by obtaining the idle state of the surrounding nodes, thereby dynamically performing network offloading, and sending data to another potential Go up a less blocked path.
- the method further includes: in the case of a failure of the intermediate network node in the transmission path, using the previous intermediate network node directly connected to the failed intermediate network node as the first A network node, and re-execute the data transmission method.
- the first network node may perform steps S101 to S102 again to select a new target transmission path without the failed node. Therefore, compared with the traditional method, the data transmission method provided by the present application can dynamically adjust the path according to various needs, and has higher flexibility and network self-healing ability.
- the method further includes: when there are two or more transmission paths with the highest transmission efficiency in the transmission path, acquiring the positioning information of each intermediate network node in each transmission path, wherein, The positioning information of the intermediate network node includes the distance between each intermediate network node and other directly connected network nodes; according to the positioning information, the Dijkstra algorithm is used to select the transmission path with the shortest distance as the target transmission path .
- the Bluetooth device has a position calculation function, and the accuracy can reach 0.5 meters or less. Therefore, optionally, the positioning information can be the calculated and saved distance between each intermediate network node and the connected node when the intermediate network node establishes a Bluetooth connection with other directly connected network nodes.
- the shortest transmission path as the target path can be calculated according to the distance between each node stored in advance.
- the first network node 9 has three transmission paths, where the first transmission path includes 5 intermediate network nodes, namely 9, 3, 2, 1, 0, and the second One transmission path includes 5 intermediate network nodes, which are 9, 10, 4, 1, 0, and the third transmission path includes 8 transmission nodes, which are 9, 3, 11, 7, 6, 2, 1, 0. , Wherein the number of intermediate network nodes included in the first transmission path and the second transmission path are both 5.
- the first network node 9 obtains the positioning information of the nodes on the two transmission paths, thereby obtaining the first network node
- the distance between 9 and the intermediate network node 3 is 2m
- the distance between the intermediate network node 3 and the intermediate network node 2 is 1.5m
- the distance between the intermediate network node 2 and the intermediate network node 1 is 1.2m
- the intermediate network node The distance between 1 and the intermediate network node 0 is 1m
- the distance between the first network node 9 and the intermediate network node 10 is 1.5m
- the distance between the intermediate network node 10 and the intermediate network node 4 is 1m
- the intermediate network node The distance between 4 and the intermediate network node 1 is 4.5m. Therefore, using the Dijkstra algorithm, the shortest transmission path can be selected as the first transmission path, that is to say, the first network node 9, 3, 2, 1, 0 path. It should be understood that the above examples are only for illustration and cannot constitute a specific limitation.
- the method before acquiring the transmission path currently available for data transmission between the first network node and the second network node, the method further includes: when the first data to be transmitted includes command data When, send the first data containing the command data first, and suspend sending other first data that does not contain the command data, where the command data is used to control an intermediate network node on the target transmission path to perform data transmission; When receiving the command confirmation data, resume sending the other first data that does not contain the command data.
- the first network node may also control data transmission through the target transmission path.
- the command data may be the command data sent by the first network node to the second network node.
- WordPad A is the first network node
- the central control device is the second network node.
- board A sends data to the central control device, it can use the target transmission path A1 for data transmission.
- WordPad A there are two types of data on WordPad A that need to be sent to the second network node, one is text data generated by the user using WordPad A, and the other is WordPad A that needs to confirm to the second network node that the target transmission path A1 can transmit data
- WordPad A will first send the command data to the second network node, suspend the transmission of the text data (buffer the text data in WordPad A), and the second network node will receive all
- a command confirmation message is sent to the first network node.
- WordPad A uses the target transmission path A1 to send text data. This embodiment is used to confirm whether the target transmission path can successfully transmit data.
- the command data may also be the command data sent by the first network node to the intermediate network node.
- WordPad A has received the data sent by the second network node using the target transmission path A1. After the transmitted command confirmation message, WordPad A will use the target transmission path A1 to send text data, so WordPad A will generate new command data, which is used to notify all intermediate network nodes in the target transmission path A1 to transmit The data sent by WordPad A, assuming that the target transmission path A1 includes intermediate network nodes B, C, and D, then WordPad A will first send the above new command data to the intermediate network nodes B, C, and D. After the network nodes B, C, and D confirm the command messages, the text data buffered in the wordpad A uses the target transmission path A1 for data transmission.
- the command data can also be data of other control types.
- WordPad A is the first network node, and WordPad A sends data to the central control device.
- the first data can be the text data generated by the user using WordPad A to write
- the first data containing the command data can be the command data of the user using WordPad A to control the brightness of the projector light.
- WordPad B receives these two types of data.
- the command data message for controlling the brightness of the projector's light will be sent to the central control device first, and the text message will be sent after receiving the acknowledgement message containing the confirmation character (Acknowledgement, ACK) returned by the central control device.
- ACK confirmation character
- FIG. 7 is a schematic flowchart of a data transmission method provided by an embodiment of the present application, which is used to further explain the data transmission method provided by the present application.
- the intermediate network node After the intermediate network node obtains the first data, it first confirms whether the first data contains command data. If it contains command data, the first data containing command data is sent first, and the other first data that does not contain command data are sent first. A piece of data is stored in the intermediate network node, and then it is judged whether there are idle nodes around; if it does not contain, it is directly judged whether there are idle nodes around.
- the one with the least number of intermediate network nodes is selected as the target transmission path.
- the Dijkstra algorithm is used to calculate the shortest path as the target transmission path, so that the intermediate network node uses the target transmission path to send the first data to the second network node.
- the current data transmission method between the first network node and the second network node is obtained A transmission path that can be used to transmit data, selecting a transmission path with the highest transmission efficiency among the transmission paths as the target transmission path, and controlling data transmission through the target transmission path. Since the network structure provided by this application is not a traditional master-slave mode star network structure, each network node is not only an edge node, but also has the forwarding function of a router, so the data transmission method provided by this application can be used for application scenarios Dynamically adjust the transmission path, with higher bandwidth utilization and stronger network self-healing capabilities.
- Fig. 8a is a schematic diagram of the framework of a data transmission system provided by the present application.
- the data transmission system 800 may include one or more first network nodes 810, one or more second network nodes 820, and one or more An intermediate network node 830.
- the network transmission system further establishes multiple transmission paths between the first network node 810 and the second network node 820, and each transmission path includes one or more intermediate transmission paths.
- the network node 830, the plurality of intermediate network nodes 820 in each transmission path are directly connected in sequence.
- FIG. 8b is a schematic structural diagram of a network terminal device provided by the present application, wherein the network terminal device is set on the first network node 810 of the data transmission system shown in FIG. 8a, and it can be seen from FIG. 8b that the network terminal
- the device includes a processor 811 and a communication interface 812, where:
- the processor 811 is configured to obtain data transmission between the first network node 810 and the second network node 820 when data transmission between the first network node 810 and the second network node 820 is required The transmission path currently available for data transmission;
- the processor 811 is configured to select the transmission path with the highest transmission efficiency among the transmission paths as the target transmission path;
- the processor 811 is configured to control the communication interface 812 to perform data transmission through the target transmission path.
- the first network node 810 may further include a memory 813.
- the memory 813 is used to store the program code and data of the first network node 810.
- the processor 812 can call the program code in the memory 813 to implement part of the implementation steps described in any of the method embodiments described above with the first network node 810 as the execution subject and/or the implementation of the technology described herein. Other steps.
- the first network node 810 and the intermediate network node 830 are terminal devices that are provided on each network node in the data transmission system and include a Bluetooth module.
- the second network node 820 is a server or a central control node. It can be understood that, in other embodiments, the second network node 820 may also be a terminal device including a Bluetooth module provided on each network node in the data transmission system. Among them, the terminal device including the Bluetooth module may specifically be a Bluetooth Low Energy (BLE) 4.0 device.
- BLE Bluetooth Low Energy
- the first network node and the intermediate network node may be a tablet, a mobile phone terminal, For handheld electronic devices supporting Bluetooth functions such as smart watches, the second network node may be a central control device of the conference system.
- the first data transmitted between the first network node and the second network node may be data sent by other network nodes to the first network node, or may be generated or generated by the first network node itself.
- Stored data For example, when the first network node is the wordpad A1 used by user A in the conference system, the first data may be data generated by user A using wordpad A1, or may be connected to A1 and be B The writing pad B1 used by the user generates and sends data to the writing pad A1.
- the data transmission method provided in this application can be used in any network environment where the range of data transmission is limited or the number of connections to network devices is limited.
- the conference system is only one of the application scenarios. There is no specific limitation.
- the communication interface 812 includes a Bluetooth module, and each network node in the data transmission system is provided with a terminal device including the Bluetooth module. That is, the network node is a terminal device including a Bluetooth module that is used to directly forward data sent by other network nodes through the network, including: an intermediate network node 830 located within the transmission range of the first network node 810 for Receiving data sent by the first network node 810, where the first network node 810 is directly connected to the intermediate network node 830.
- the intermediate network node 830 that is the first to receive the data sent by the first network node 810 transmits the data through multiple intermediate network nodes in sequence according to the connection sequence of the transmission path until it is transmitted to the second network node.
- the traditional star network structure includes a central node, a routing node, and an edge node.
- the routing node is the slave device of the central node and the master device of the edge node.
- the data transmission system only includes a central node (server) and multiple network nodes (including intermediate network nodes and first network nodes).
- the node is the master device of the multiple network nodes, and there is no master-slave relationship between the multiple network nodes.
- Figure 3 is a topological diagram of a data transmission network provided by the present application, where the dark network node 0 can be the central control node as the second network node, and the light network nodes are the first network node and the intermediate network node. After the data generated by the first network node and the intermediate network node are sent to the second network node through the transmission path, the second network node performs corresponding processing on it. It is understandable that each intermediate network node as a Bluetooth device can directly establish a connection with the second network node. For example, the network node 10 in FIG. 3 can also directly establish a connection with the second network node 0 to send data.
- each network node can only establish Bluetooth connections with less than seven other network nodes. Therefore, when the first network node is far away from the second network node, or the first network node Second, when the number of connections of the network node has reached the maximum upper limit, the data can be sent to other intermediate network nodes and then forwarded multiple times, thereby being delivered to the second network node.
- FIG. 3 is only used for illustration, and the data transmission network provided by the present application may also include more central control nodes, more first network nodes, and more intermediate network nodes, which is not specifically limited here.
- FIG. 4 is a topology diagram of a Bluetooth networking structure provided by the present application, in which dark network node 0 is the second network node, and light network nodes are the first network node and intermediate network nodes. It can be understood that each of the first network node to the second network node may have one or more transmission paths.
- the network node 9 is the first network node, and for the first network node 9, there are three transmission paths.
- the transmission path with the highest transmission efficiency is the transmission path with the least number of intermediate network nodes 830.
- the first network node 11 when the network node 11 is the first network node, the first network node 11 has two transmission paths, and the first transmission path includes 6 network nodes, namely 11, 7, 6, 2, 1, 0, the second transmission path includes 5 network nodes, namely 11, 3, 2, 1, 0. Therefore, the first network node 11 chooses to use the second transmission path as the target transmission path for all The transmission of the first data. It can be understood that the fewer intermediate network nodes included in the selected target transmission path, the faster the first data can reach the second network node 0. It should be understood that the above examples are only for illustration and cannot constitute a specific limitation.
- the transmission path with the highest transmission efficiency is the transmission path with the largest number of idle network nodes, where the idle network nodes are network nodes that do not need to send data.
- the first network node 9 when the network node 9 is the first network node, the first network node 9 has two transmission paths, where the first transmission path includes network nodes 9, 3, 2, 1, 0, The two transmission paths include network nodes 9, 10, 4, 1, 0, and the third transmission path includes network nodes 9, 3, 11, 7, 6, 2, 1, 0.
- the Bluetooth module can send a broadcast that it is currently idle to the surrounding directly connected network nodes, assuming that the current network nodes 2, 3, and 4 send to the surrounding that they are currently idle
- the first transmission path includes 2 idle network nodes
- the second transmission path includes 1 idle network node
- the third transmission path includes 2 idle network nodes. Therefore, the most efficient transmission is
- the paths are the first transmission path and the third transmission path, and the first network node 9 can choose to use the first transmission path or the third transmission path as the target transmission path to send the first data to the second network node. It can be understood that the more idle nodes included in the selected target path, the faster the first data can reach the second network node 0, and the higher the transmission efficiency. It should be understood that the above examples are only for illustration and cannot constitute a specific limitation.
- the processor 811 is configured to obtain one or more transmission paths including the idle network node when the idle state information sent by the idle network node is received through the communication interface; the processor 811 It is used to select the transmission path with the least number of intermediate network nodes among the transmission paths including the idle network node as the target transmission path.
- the first network node 9 when the network node 9 is the first network node, the first network node 9 has two transmission paths, where the first transmission path includes 5 network nodes, namely 9, 3, 2, 1, 0, the second transmission path includes 5 network nodes, which are 9, 10, 4, 1, 0, and the third transmission path includes 8 network nodes, which are 9, 3, 11, 7, and 6, 2, 1, 0.
- the first and second transmission paths include 5 network nodes
- the third transmission path includes 8 network nodes.
- Both the first transmission path and the third transmission path include 2 idle network nodes
- the second transmission path includes 0 idle network nodes.
- the transmission path with the highest transmission efficiency at this time includes idle network nodes with the least number of intermediate network nodes As the target transmission path, that is, the first transmission path, the first network node 9 chooses to use the first transmission path as the target transmission path to send the first data to the second network node.
- the data communication method provided in this application can dynamically perform network offloading according to current network conditions, and send data to a path with a short path, idle network and less congestion, thereby improving the efficiency of data transmission. It should be understood that the above examples are only for illustration and cannot constitute a specific limitation.
- the processor 811 is further configured to determine the distance to the first network node when receiving idle state information sent by an idle network node directly connected to the first network node through the communication interface The closest target idle network node, wherein the idle state information includes the location information of each idle node; the processor 811 is further configured to obtain one or more transmission paths that include the target idle network node; the processing The device 811 is configured to select a transmission path with the least number of intermediate network nodes among the transmission paths including the target idle network node as the target transmission path.
- the first network node 9 has three transmission paths, and the directly connected network nodes of the first network node 9 may be the intermediate network node 3 and the intermediate network node 10, assuming that the intermediate network node 3 is in an idle state , The intermediate network node 3 will send its currently idle broadcast to the surrounding directly connected nodes, and the first network node 9 will send the first data to the intermediate network node 3 upon receiving the broadcast.
- the network node 3 then obtains one or more transmission paths from the intermediate network node 3 to the second network node 0. At this time, there is only one transmission path, that is, the intermediate network nodes 3, 2, 1, and 0 are forwarded in turn. It is understandable that the traditional star network structure cannot achieve dynamic adjustment due to the fixed path.
- the central control equipment can only be used to reserve channel bandwidth for each routing node in advance, and the use of individual edge nodes is suspended, and no data is generated. In this case, channel resources are wasted.
- the data transmission method provided by this application can use the idle node as a relay intermediate network node to dynamically adjust the path by acquiring the idle state of the surrounding nodes, thereby dynamically performing network offloading, and sending data to another potential network node. Go up a less blocked path.
- the processor 811 is further configured to, in the case that the intermediate network node 830 in the transmission path fails, use the previous intermediate network node directly connected to the failed intermediate network node as The first network node acquires the target transmission path again and performs data transmission through the target transmission path.
- the first network node 810 may perform steps S101 to S102 again to select a new target transmission path without the failed node. Therefore, compared with the traditional method, the data transmission method provided by the present application can dynamically adjust the path according to various needs, and has higher flexibility and network self-healing ability.
- the processor 811 is further configured to obtain the positioning information of each intermediate network node in each transmission path when there are two or more transmission paths with the highest transmission efficiency in the transmission path, wherein, the positioning information of the intermediate network node includes the distance between each intermediate network node and other directly connected network nodes; the processor 811 is further configured to use Dijkstra (Dijkstra) according to the positioning information. )
- the algorithm selects the shortest transmission path as the target transmission path. It is understandable that the Bluetooth device has a position calculation function, and the accuracy can reach 0.5 meters or less. Therefore, optionally, the positioning information can be the calculated and saved distance between each intermediate network node and the connected node when the intermediate network node establishes a Bluetooth connection with other directly connected network nodes. In the case of the same number of intermediate network nodes, the shortest transmission path as the target path can be calculated according to the distance between each node stored in advance.
- the first network node 9 has three transmission paths, where the first transmission path includes 5 intermediate network nodes, namely 9, 3, 2, 1, 0, and the second One transmission path includes 5 intermediate network nodes, which are 9, 10, 4, 1, 0, and the third transmission path includes 8 transmission nodes, which are 9, 3, 11, 7, 6, 2, 1, 0. , Wherein the number of intermediate network nodes included in the first transmission path and the second transmission path are both 5.
- the first network node 9 obtains the positioning information of the nodes on the two transmission paths, thereby obtaining the first network node
- the distance between 9 and the intermediate network node 3 is 2m
- the distance between the intermediate network node 3 and the intermediate network node 2 is 1.5m
- the distance between the intermediate network node 2 and the intermediate network node 1 is 1.2m
- the intermediate network node The distance between 1 and the intermediate network node 0 is 1m
- the distance between the first network node 9 and the intermediate network node 10 is 1.5m
- the distance between the intermediate network node 10 and the intermediate network node 4 is 1m
- the intermediate network node The distance between 4 and the intermediate network node 1 is 4.5m. Therefore, using the Dijkstra algorithm, the shortest transmission path can be selected as the first transmission path, that is to say, the first network node 9, 3, 2, 1, 0 path. It should be understood that the above examples are only for illustration and cannot constitute a specific limitation.
- the processor 811 is further configured to, before acquiring the transmission path currently available for data transmission between the first network node and the second network node, when the first data transmission is required When a piece of data contains command data, priority is given to controlling the communication interface to send the first data containing the command data, and the sending of other first data not containing the command data is suspended, wherein the command data is used to control target transmission
- the intermediate network node on the path performs data transmission; the processor 811 is further configured to resume sending the other first data that does not contain the command data when the command confirmation data is received by the communication interface.
- the first network node may also control data transmission through the target transmission path.
- the command data may be the command data sent by the first network node 810 to the second network node 820.
- WordPad A is the first network node
- the central control device is the second network node.
- WordPad A sends data to the central control device, it can use the target transmission path A1 for data transmission.
- WordPad A there are two types of data on WordPad A that need to be sent to the second network node, one is text data generated by the user using WordPad A, and the other is WordPad A that needs to confirm to the second network node that the target transmission path A1 can transmit data
- WordPad A will first send the command data to the second network node, suspend the transmission of the text data (buffer the text data in WordPad A), and the second network node will receive all
- a command confirmation message is sent to the first network node.
- WordPad A uses the target transmission path A1 to send text data. This embodiment is used to confirm whether the target transmission path can successfully transmit data.
- the command data may also be the command data sent by the first network node 810 to the intermediate network node 820.
- WordPad A receives the use target transmission path A1 sent by the second network node. After the data transmission command confirmation message, WordPad A will use the target transmission path A1 to send text data, so WordPad A will generate new command data, which is used to notify all intermediate networks in the target transmission path A1 The node transmits the data sent by WordPad A. Assuming that the target transmission path A1 includes intermediate network nodes B, C, and D, then WordPad A will first send the above new command data to intermediate network nodes B, C, and D. After the command confirmation messages to the intermediate network nodes B, C, and D, the text data buffered in the wordpad A uses the target transmission path A1 for data transmission.
- the command data can also be data of other control types.
- WordPad A is the first network node, and WordPad A sends data to the central control device.
- the first data can be the text data generated by the user using WordPad A to write
- the first data containing the command data can be the command data of the user using WordPad A to control the brightness of the projector light.
- WordPad B receives these two types of data.
- the command data message for controlling the brightness of the projector's light will be sent to the central control device first, and the text message will be sent after receiving the acknowledgement message containing the confirmation character (Acknowledgement, ACK) returned by the central control device.
- ACK confirmation character
- FIG. 7 is a schematic flowchart of a data transmission method provided by an embodiment of the present application, which is used to further explain the data transmission method provided by the present application.
- the intermediate network node After the intermediate network node obtains the first data, it first confirms whether the first data contains command data. If it contains command data, the first data containing command data is sent first, and the other first data that does not contain command data are sent first. A piece of data is stored in the intermediate network node, and then it is judged whether there are idle nodes around; if it does not contain, it is directly judged whether there are idle nodes around.
- the one with the least number of intermediate network nodes is selected as the target transmission path.
- the Dijkstra algorithm is used to calculate the shortest path as the target transmission path, so that the intermediate network node uses the target transmission path to send the first data to the second network node.
- the first network node 810 may further include a bus 814.
- the communication interface 811, the processor 812, and the memory 813 can be connected to each other through a bus 814;
- the bus 814 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (Extended Industry Standard Architecture, abbreviated as Peripheral Component Interconnect). EISA) bus, etc.
- the bus 814 can be divided into an address bus, a data bus, a control bus, and so on. For ease of presentation, only one thick line is used in FIG. 8b, but it does not mean that there is only one bus or one type of bus.
- the processor 812 may be constituted by one or more general-purpose processors, such as a central processing unit (Central Processing Unit, CPU).
- the processor can be used to run programs for processing functions in related program codes.
- the processor 812 may be used to run related program codes in the memory 813 to implement the functions of the processor 812 and/or to perform other steps of the technology described herein.
- the communication interface 811 may be a wired interface (such as an Ethernet interface) or a wireless interface (such as a cellular network interface or using a wireless local area network interface) for communicating with other modules or devices.
- the communication interface 811 in the embodiment of the present application may be specifically used to send the first data to the second network node 820.
- the memory 813 may include volatile memory (Volatile Memory), such as random access memory (Random Access Memory, RAM); the memory may also include non-volatile memory (Non-Volatile Memory), such as only Read-Only Memory (ROM), Flash Memory (Flash Memory), Hard Disk Drive (HDD), or Solid-State Drive (SSD); memory can be used to store a set of program codes to facilitate The processor calls the program code stored in the memory to implement the communication interface and/or the function of the processor involved in the embodiment of the present application, which is not limited in the embodiment of the present application.
- volatile memory such as random access memory (Random Access Memory, RAM
- non-Volatile Memory such as only Read-Only Memory (ROM), Flash Memory (Flash Memory), Hard Disk Drive (HDD), or Solid-State Drive (SSD)
- ROM Read-Only Memory
- Flash Memory Flash Memory
- HDD Hard Disk Drive
- SSD Solid-State Drive
- each network node is not only an edge node, but also has the forwarding function of a router. Therefore, the use of the network terminal device provided by this application can target application scenarios. Dynamically adjust the transmission path, with higher bandwidth utilization and stronger network self-healing capabilities.
- a computer-readable storage medium stores a computer program.
- the computer program includes program instructions. When the program instructions are executed by a processor, the present application is implemented. The implementation manner described in any embodiment of the provided data transmission method will not be repeated here.
- the computer-readable storage medium may be the internal storage unit of the terminal described in any of the foregoing embodiments, such as the hard disk or memory of the terminal.
- the computer-readable storage medium may also be an external storage device of the terminal, such as a plug-in hard disk equipped on the terminal, a Smart Media Card (SMC), or a Secure Digital (SD) card , Flash Card, etc.
- the computer-readable storage medium may also include both an internal storage unit of the terminal and an external storage device.
- the computer-readable storage medium is used to store the computer program and other programs and data required by the terminal.
- the computer-readable storage medium can also be used to temporarily store data that has been output or will be output.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
本申请提供了一种数据传输方法、相关设备及计算机存储介质。所述方法包括:当需要在所述第一网络节点和所述第二网络节点之间进行数据传输时,通过获取所述第一网络节点和所述第二网络节点之间当前可用于传输数据的传输路径,选择所述传输路径中传输效率最高的一条传输路径作为目标传输路径,以及控制通过所述目标传输路径进行数据传输。使用本申请提供的数据传输方法、相关设备及计算机存储介质,能够针对应用场景动态调整传输路径,具有更高的带宽利用率、更强的网络自愈能力。
Description
本申请涉及通讯领域,尤其涉及一种数据传输方法、相关设备及计算机存储介质。
随着新一代无线宽带通信技术的发展和产业化进程的展开,以PDA、多媒体手机、平板电脑等为中心的手持多媒体终端得到了广泛的应用,将成为信息技术普及应用的统一平台,它可以支持丰富多彩的各种信息应用,在各个行业如工业、农业、医疗、教育、家庭和个人通信等中得到快速发展。
数据传输是其中的关键技术之一,在传输数据范围有限以及网络设备的连接数量有限时,通常使用的网络结构是使用如图1所示的星型网络结构,其中,用户设备作为边缘节点,与路由设备以主从模式组成一个微网络,路由设备和主控设备再以主从模式组成整个网络拓扑。基于星型网络拓扑的组网技术,在一个路由节点发生故障时,与该路由节点相连的用户设备都会受到影响,网络自愈能力弱,只能使用固定路径进行转发,无法做到根据通道的流量使用情况而动态调整传输路径,带宽利用率低。
发明内容
本申请提供了一种数据传输方法、相关设备及计算机存储介质,能够针对应用场景动态调整传输路径,具有更高的带宽利用率、更强的网络自愈能力。
第一方面,提供了一种数据传输方法,应用于一数据传输系统,所述数据传输系统包括第一网络节点以及第二网络节点,其特征在于,所述网络传输系统还在所述第一网络节点与所述第二网络节点之间建立有多个的传输路径,每一所述传输路径上包括一个或多个中间网络节点,所述每一传输路径中的多个中间网络节点依序直接通信连接;所述方法包括:当需要在所述第一网络节点和所述第二网络节点之间进行数据传输时,获取所述第一网络节点和所述第二网络节点之间当前可用于传输数据的传输路径;选择所述传输路径中传输效率最高的一条传输路径作为目标传输路径;以及控制通过所述目标传输路径进行数据传输。
第二方面,提供了一种网络终端设备,设置于一数据传输系统的第一网络节点上,其中,所述数据传输系统包括第一网络节点以及第二网络节点,所述网络传输系统还在所述第一网络节点与所述第二网络节点之间建立有多个的传输路径,每一所述传输路径上包括一个或多个中间网络节点,所述每一传输路径中的多个中间网络节点依序直接通信连接;所述网络终端设备包括处理器和通信接口,所述处理器用于:所在需要在所述第一网络节点和所述第二网络节点之间进行数据传输时,获取所述第一网络节点和所述第二网络节点之间当前可用于传输数据的传输路径;选择所述传输路径中传输效率最高的一条传输路径作为目标传输路径;以及控制所述通信接口通过所述目标传输路径进行数据传输。
第三方面,提供了一种计算机可读存储介质,所述计算机存储介质存储有计算机程序, 所述计算机程序包括程序指令,所述程序指令当被处理器执行时使所述处理器执行上述第一方面的方法。
基于本申请提供的数据传输方法、相关设备及计算机存储介质,当需要在所述第一网络节点和所述第二网络节点之间进行数据传输时,通过获取所述第一网络节点和所述第二网络节点之间当前可用于传输数据的传输路径,选择所述传输路径中传输效率最高的一条传输路径作为目标传输路径,以及控制通过所述目标传输路径进行数据传输。由于本申请提供的网络结构不是传统的主从模式的星型网络结构,每个网络节点不仅仅是边缘节点,还具有路由器的转发功能,因此使用本申请提供的数据传输方法、相关设备及计算机存储介质,能够针对应用场景动态调整传输路径,具有更高的带宽利用率、更强的网络自愈能力。
为了更清楚地说明本发明实施例的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是一种传统的星型网络结构拓扑图;
图2是本申请一实施例提供的一种数据传输方法的流程示意图;
图3是本申请一实施例提供的一种数据传输网络结构的拓扑图;
图4是本申请一实施例提供的一种数据传输网络结构的拓扑图;
图5是本申请一实施例提供的一种数据传输网络结构的拓扑图;
图6是本申请一实施例提供的一种应用场景下第一网络节点A与中间网络节点B的交互流程示意图;
图7是本申请一实施例提供的一种数据传输方法的流程示意图;
图8a是本申请一实施例提供的一种数据传输系统的网络框架示意图;
图8b是本申请一实施例提供的一种网络终端设备的结构示意图。
下面通过具体实施方式结合附图对本申请作进一步详细说明。在以下的实施方式中,很多细节描述是为了使得本申请能被更好的理解。然而,本领域技术人员可以毫不费力的认识到,其中部分特征在不同情况下是可以省略的,或者可以由其他方法所替代。在某些情况下,本申请相关的一些操作并没有在说明书中显示或描述,这是为了避免本申请的核心部分被过多的描述所淹没。对于本领域技术人员而言,详细描述这些相关操作并不是必要的,他们根据说明书中的描述以及本领域的一般技术知识即可完整了解相关操作。
应当理解,当在本说明书和所附权利要求书中使用术语时,术语“包括”和“包含”指示所描述特征、整体、步骤、操作、元素和组件的存在,但并不排除一个或多个其它特征、整体、步骤、操作、元素、组件和/或其集合的存在或添加。
需要说明的是,在本申请实施例中使用的术语是仅仅出于描述特定实施例的目的,而 非旨在限制本申请。在本申请实施例和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。
图2是本申请提供的一种数据传输方法,其中,所述数据传输方法应用于一数据传输系统,所述数据传输系统包括第一网络节点以及第二网络节点,其特征在于,所述网络传输系统还在所述第一网络节点与所述第二网络节点之间建立有多个的传输路径,每一所述传输路径上包括一个或多个中间网络节点,所述每一传输路径中的多个中间网络节点依序直接通信连接;所述方法包括:
S101:当需要在所述第一网络节点和所述第二网络节点之间进行数据传输时,获取所述第一网络节点和所述第二网络节点之间当前可用于传输数据的传输路径。
在一实施方式中,所述第一网络节点以及中间网络节点是设置于所述数据传输系统中的每一网络节点上包括有蓝牙模块的终端设备。所述第二网络节点为服务器或中央控制节点。可以理解的是,在其他实施例中,所述第二网络节点也可以是设置于所述数据传输系统中的每一网络节点上包括有蓝牙模块的终端设备。其中,包括有蓝牙模块的终端设备具体可以是低功耗蓝牙(Bluetooth Low Energy,BLE)4.0设备,以会议系统为例,所述第一网络节点、中间网络节点可以是写字板、手机终端、智能手表等支持蓝牙功能的手持式电子设备,所述第二网络节点可以是会议系统的中央控制设备。其中,所述第一网络节点和所述第二网络节点之间传输的第一数据可以是其他网络节点发送给所述第一网络节点的数据,也可以是所述第一网络节点自己生成或存储的数据。例如,当所述第一网络节点是会议系统中A用户使用的写字板A1时,所述第一数据可以是A用户使用写字板A1生成的数据,还可以是与A1相连的,且为B用户使用的写字板B1生成并发送至所述写字板A1的数据。应理解,上述举例仅用于说明,本申请提供的数据传输方法可以用在任何一种在传输数据范围有限或者网络设备的连接数量有限的网络环境中,会议系统只是其中一个应用场景,本申请不作具体限定。
在一实施方式中,所述中间网络节点是用于直接转发其它网络节点通过网络发送的数据的包括有蓝牙模块的终端设备,包括:位于所述第一网络节点传输范围内的中间网络节点用于接收所述第一网络节点发送的数据,其中,所述第一网络节点直接连接所述中间网络节点。第一个接收到所述第一网络节点发送的数据的所述中间网络节点按照传输路径的连接顺序将所述数据依次通过多个中间网络节点传递下去,直至传输到与所述第二网络节点直接连接的中间网络节点,所述与所述第二网络节点直接连接的中间网络节点再将所述数据发送至所述第二网络节点。也就是说,传统的星型网络结构中包括中央节点、路由节点以及边缘节点,其中,路由节点是中央节点的从设备,是边缘节点的主设备。而使用本申请提供的数据传输系统,当所述第二网络节点为服务器时,数据传输系统仅包括中央节点(服务器)和多个网络节点(包括中间网络节点和第一网络节点),中央节点是所述多个网络节点的主设备,多个网络节点之间不存在主从关系。例如,图3是本申请提供的一种数据传输网络的拓扑图,其中,深色网络节点0可以是作为第二网络节点的中央控制节点,浅色网络节点为第一网络节点和中间网络节点,第一网络节点产生的数据通过传输路径发送给第二网络节点后,第二网络节点对其进行相应的处理。可以理解的是,作为蓝牙设备的每个网络节点都可以直接与第二网络节点建立连接,例如图3中的网络节点10还可 以直接与第二网络节点0建立连接,进行数据的发送。但是由于蓝牙是短距离通信方式,并且根据蓝牙协议,每个网络节点只能与七个以下的其他网络节点建立蓝牙连接,因此,当第一网络节点与第二网络节点距离较远、或者第二网络节点的连接数量已达最大上限时,可以将数据发送给其他中间网络节点再进行多次的转发,从而送达至第二网络节点。应理解,图3仅用于举例说明,本申请提供的数据传输网络还可以包括更多的中央控制节点、更多的第一网络节点以及更多的中间网络节点,此处不作具体限定。
S102A:选择所述传输路径中传输效率最高的一条传输路径作为目标传输路径,以及控制通过所述目标传输路径进行数据传输。
在一实施方式中,其中,所述传输路径中包括一个或者多个中间网络节点。例如,图4是本申请提供的一种蓝牙组网结构的拓扑图,其中,深色网络节点0为第二网络节点,浅色网络节点为第一网络节点和中间网络节点。可以理解的是,每个第一网络节点到第二网络节点都可以有一个或者多个传输路径,例如,网络节点9为第一网络节点,对于第一网络节点9来说,拥有三条传输路径,可以依次通过网络节点9、3、2、1、0进行转发,从而达到第二网络节点,还可以依次通过网络节点9、10、4、1、0进行转发,从而达到第二网络节点,还可以依次通过网络节点9、3、11、7、6、2、1、0进行转发,从而达到第二网络节点。而网络节点8为第一网络节点时,只有依次通过网络节点8、5、1、0进行转发,因此每个中间网络节点可以拥有一个或者多个传输路径。应理解,上述举例仅用于说明,并不能构成具体限定。
在一实施方式中,所述传输效率最高的传输路径为中间网络节点数量最少的传输路径。仍以图4为例,当网络节点11为第一网络节点时,第一网络节点11有两条传输路径,其中,第一条传输路径包括6个网络节点,分别是11、7、6、2、1、0,第二条传输路径包括5个网络节点,分别是11、3、2、1、0,因此,第一网络节点11选择使用第二条传输路径作为目标传输路径,进行所述第一数据的传输。可以理解的是,选择的目标传输路径包含的中间网络节点越少,所述第一数据就能越快到达所述第二网络节点0。应理解,上述举例仅用于说明,并不能构成具体限定。
在一实施方式中,所述传输效率最高的传输路径为空闲网络节点数量最多的传输路径,其中,所述空闲网络节点为没有需要发送数据的网络节点。仍以图4为例,当网络节点9为第一网络节点时,第一网络节点9有两条传输路径,其中,第一条传输路径包括网络节点9、3、2、1、0,第二条传输路径包括网络节点9、10、4、1、0,第三条传输路径包括网络节点9、3、11、7、6、2、1、0。由于网络节点均为包含蓝牙模块的终端设备,蓝牙模块可以给周围的直接连接的网络节点发送自己当前是空闲状态的广播,假设当前网络节点2、3、4向周围发送了自己当前是空闲状态的广播,此时第一条传输路径包括2个空闲网络节点,第二条传输路径包括1个空闲网络节点,第三条传输路径包括2个空闲网络节点,因此,此时传输效率最高的传输路径为第一条传输路径以及第三条传输路径,第一网络节点9可以选择使用第一条传输路径或者第三条传输路径作为目标传输路径向第二网络节点发送第一数据。可以理解的是,选择的目标路径包含的空闲节点越多,所述第一数据就能越快到达所述第二网络节点0,传输效率就越高。可以应理解,上述举例仅用于说明,并不能构成具体限定。
在一实施方式中,所述获取所述第一网络节点和所述第二网络节点之间当前可用于传输数据的传输路径,包括:接收到空闲网络节点发送的空闲状态信息时,获取包含所述空闲网络节点的一个或多个传输路径;所述选择所述传输路径中传输效率最高的一条传输路径作为目标传输路径,包括:选择包含所述空闲网络节点的所述传输路径中中间网络节点数量最少的一条传输路径作为目标传输路径。
例如,仍以图4为例,当网络节点9为第一网络节点时,第一网络节点9有两条传输路径,其中,第一条传输路径包括5个网络节点,分别是9、3、2、1、0,第二条传输路径包括5个网络节点,分别是9、10、4、1、0,第三条传输路径包括8个网络节点,分别是9、3、11、7、6、2、1、0。假设当前网络节点2、3向周围发送了自己当前是空闲状态的广播,此时第一条、第二条传输路径都包括5个网络节点,第三条传输路径包括8个网络节点,第一条传输路、第三条传输路径都包括2个空闲网络节点,第二条传输路径包括0个空闲网络节点,因此,此时传输效率最高的传输路径是包含空闲网络节点且中间网络节点数量最少的一条传输路径作为目标传输路径,也就是第一条传输路径,第一网络节点9选择使用第一条传输路径作为目标传输路径向第二网络节点发送第一数据。可以理解的是,本申请提供的数据通信方法可以根据当前的网络状况动态地进行网络分流,将数据发送至另一条路径短且网络空闲、更少阻塞的路径上去,提高了数据传输的效率。应理解,上述举例仅用于说明,并不能构成具体限定。
在一实施方式中,所述获取所述第一网络节点和所述第二网络节点之间当前可用于传输数据的传输路径,还包括:接收到与所述第一网络节点直接连接的空闲网络节点发送的空闲状态信息时,确定与所述第一网络节点距离最近的目标空闲网络节点,其中,所述空闲状态信息包括每个空闲节点的定位信息;获取包含所述目标空闲网络节点的一个或者多个传输路径;所述选择所述传输路径中传输效率最高的一条传输路径作为目标传输路径,包括:选择包含所述目标空闲网络节点的所述传输路径中中间网络节点数量最少的一条传输路径作为目标传输路径。
例如,仍以图4为例,第一网络节点9有三条传输路径,第一网络节点9的直接连接的网络节点可以是中间网络节点3和中间网络节点10,假设中间网络节点3处于空闲状态,中间网络节点3会给周围的直接连接的网络节点发送自己当前是空闲状态的广播,第一网络节点9在接收到所述广播的情况下,将所述第一数据发送给中间网络节点3,中间网络节点3再获取中间网络节点3到第二网络节点0的一个或者多个传输路径,此时的传输路径只有一条,也就是依次通过中间网络节点3、2、1、0进行转发。可以理解的是,传统的星型网络结构,由于路径固定,无法做到动态调节,只能使用中央控制设备提前给每一个路由节点预留通道带宽,在个别边缘节点暂停使用,不产生数据的情况下,造成通道资源的浪费。而本申请提供的数据传输方法,通过获取周围节点的空闲状态,可以将空闲的节点作为中继中间网络节点,动态调节路径,从而动态地进行网络分流,将数据发送至另一条潜在的、具有更少阻塞的路径上去。
在一实施方式中,所述方法还包括:在所述传输路径中的中间网络节点出现故障的情况下,以与所述出现故障的中间网络节点直接连接的前一个中间网络节点为所述第一网络节点,并重新执行所述数据传输的方法。也就是说,如果第一网络节点的目标传输路径中 的中间网络节点发生故障,所述第一网络节点可以重新进行步骤S101至S102,从而选出新的没有故障节点的目标传输路径。因此,本申请提供的数据传输方法相比传统方法,可以根据各种需求动态调节路径,具有更高的灵活性以及网络自愈能力。
在一实施方式中,所述方法还包括:当所述传输路径中传输效率最高的传输路径有两个及以上时,获取每条传输路径中每个所述中间网络节点的定位信息,其中,所述中间网络节点的定位信息包括每个中间网络节点与直接连接的其他网络节点之间的距离;根据所述定位信息,使用迪杰斯特拉算法选出距离最短的传输路径作为目标传输路径。可以理解的是,蓝牙设备具有位置计算功能,并且准确度可以达0.5米以下。因此,可选地,定位信息可以是中间网络节点与其他直接连接的网络节点建立蓝牙连接时,计算并保存的每个中间网络节点和建立连接的节点之间的距离,当出现传输路径中的中间网络节点数量相同的情况下,可以根据预先保存的各个节点之间的距离,计算出最短传输路径最为目标路径。
例如,在图5所示的网络结构中,第一网络节点9有三条传输路径,其中,第一条传输路径包括5个中间网络节点,分别是9、3、2、1、0,第二条传输路径包括5个中间网络节点,分别是9、10、4、1、0,第三条传输路径包括8个传输节点,分别是9、3、11、7、6、2、1、0,其中,第一条传输路径和第二条传输路径包括的中间网络节点数都是5个,因此,第一网络节点9获取两条传输路径上节点的定位信息,从而获取到第一网络节点9与中间网络节点3之间的距离为2m,中间网络节点3与中间网络节点2之间的距离为1.5m,中间网络节点2与中间网络节点1之间的距离为1.2m,中间网络节点1与中间网络节点0之间的距离为1m,第一网络节点9与中间网络节点10之间的距离为1.5m,中间网络节点10与中间网络节点4之间的距离为1m,中间网络节点4与中间网络节点1之间的距离为4.5m,因此,使用Dijkstra算法即可选出距离最短的传输路径为第一条传输路径,也就是说,包含第一网络节点9、3、2、1、0的路径。应理解,上述举例仅用于说明,并不能构成具体限定。
在一实施方式中,在所述获取所述第一网络节点和所述第二网络节点之间当前可用于传输数据的传输路径之前,还包括:当需要进行数据传输的第一数据包含命令数据时,优先发送所述包含命令数据的第一数据,并暂停发送不包含所述命令数据的其他第一数据,其中,所述命令数据用于控制目标传输路径上的中间网络节点进行数据传输;在接收到命令确认数据时,恢复发送所述不包含命令数据的其他第一数据。也就是说,所述第一网络节点还可以控制通过目标传输路径进行数据传输。
在一实施方式中,命令数据可以是第一网络节点向第二网络节点发送的命令数据,例如,某会议系统中,写字板A为第一网络节点,中央控制设备为第二网络节点,写字板A向中央控制设备发送数据时,可以使用目标传输路径A1进行数据的传输。假设当前写字板A有两种数据需要发送给第二网络节点,一种是用户使用写字板A产生的文字数据,一种是写字板A需要向第二网络节点确认目标传输路径A1可传输数据的命令数据,那么此时写字板A会先将所述命令数据发送给第二网络节点,暂停所述文字数据的发送(将文字数据缓存在写字板A中),第二网络节点接收到所述命令数据后,向第一网络节点发送命令确认消息,写字板A接收到所述命令确认消息后,使用目标传输路径A1进行文字数据的发送。本实施方式用于确认目标传输路径是否能够成功传输数据。
在另一实施方式中,命令数据还可以是第一网络节点向中间网络节点发送的命令数据,仍以上述例子为例,写字板A接收到了第二网络节点发送的使用目标传输路径A1进行数据传输的命令确认消息后,写字板A将使用目标传输路径A1进行文字数据的发送,因此写字板A会产生新的命令数据,该命令数据用于通知目标传输路径A1中全部的中间网络节点传输写字板A发送的数据,假设目标传输路径A1包含中间网络节点B、C以及D,此时写字板A会先将上述新的命令数据发送给中间网络节点B、C以及D,在接收到中间网络节点B、C以及D的命令确认消息后,在将缓存在写字板A中的文字数据使用目标传输路径A1进行数据的传输。
在另一实施方式中,命令数据还可以是其他控制类的数据,例如在图6所示的某会议系统中,写字板A为第一网络节点,写字板A向中央控制设备发送数据时,那么第一数据可以是用户使用写字板A写字产生的文字数据,而包含命令数据的第一数据可以是用户使用写字板A控制投影仪灯光亮度的命令数据,写字板B在接收到这两种数据后,会优先向中央控制设备发送控制投影仪灯光亮度的命令数据消息,并且在接收到中央控制设备返回的包含确认字符(Acknowledgement,ACK)的确认接收消息后,再进行文字信息的发送。可以理解的是,使用ACK确认消息,可以保证命令类消息发送接收的稳定性,从而提高用户的使用体验。上述举例仅用于说明,并不能构成能具体限定。
请参照图7,图7是本申请一实施例提供的一种数据传输方法的流程示意图,用于对本申请提供的数据传输方法进行进一步的说明。在本实施例中,当中间网络节点获取第一数据后,首先确认第一数据是否包含命令数据,如果包含命令数据,优先发送包含命令数据的第一数据,并将其他不包含命令数据的第一数据存储在所述中间网络节点中,再判断周围是否存在空闲节点;如果不包含则直接判断周围是否存在空闲节点。在周围不存在空闲节点的情况下,获取所述中间网络节点到所述第一第二网络节点的全部传输路径;在周围存在空闲节点的情况下,将所述第一数据报文发送给空闲节点,然后获取所述空闲节点到所述第一第二网络节点的全部传输路径。在所述全部传输路径中,选择中间网络节点数量最少的一条作为目标传输路径,在中间网络节点数量最少的传输路径在一条以上的情况下,根据每两个中间网络节点之间的距离信息,使用Dijkstra算法计算出最短路径作为目标传输路径,使得中间网络节点使用所述目标传输路径向第二网络节点发送所述第一数据。
基于本申请提供的数据传输方法,当需要在所述第一网络节点和所述第二网络节点之间进行数据传输时,通过获取所述第一网络节点和所述第二网络节点之间当前可用于传输数据的传输路径,选择所述传输路径中传输效率最高的一条传输路径作为目标传输路径,以及控制通过所述目标传输路径进行数据传输。由于本申请提供的网络结构不是传统的主从模式的星型网络结构,每个网络节点不仅仅是边缘节点,还具有路由器的转发功能,因此使用本申请提供的数据传输方法,能够针对应用场景动态调整传输路径,具有更高的带宽利用率、更强的网络自愈能力。
图8a是本申请提供的一种数据传输系统的框架示意图,其中,所述数据传输系统800可包括一个或者多个第一网络节点810、一个或者多个第二网络节点820以及一个或者多个中间网络节点830,所述网络传输系统还在所述第一网络节点810与所述第二网络节点 820之间建立有多个的传输路径,每一所述传输路径上包括一个或多个中间网络节点830,所述每一传输路径中的多个中间网络节点820依序直接通信连接。
图8b是本申请提供的一种网络终端设备的结构示意图,其中,所述网络终端设备设置于图8a所示的数据传输系统的第一网络节点810上,由图8b可知,所述网络终端设备包括处理器811和通信接口812,其中,
所述处理器811用于在需要在所述第一网络节点810和所述第二网络节点820之间进行数据传输时,获取所述第一网络节点810和所述第二网络节点820之间当前可用于传输数据的传输路径;
所述处理器811用于选择所述传输路径中传输效率最高的一条传输路径作为目标传输路径;以及
所述处理器811用于控制所述通信接口812通过所述目标传输路径进行数据传输。
可选地,第一网络节点810中还可包括存储器813。该存储器813用于存储第一网络节点810的程序代码和数据。相应地,处理器812可调用存储器813中的程序代码实现如上文中任意所述方法实施例中描述的以第一网络节810点为执行主体的部分实施步骤和/或执行本文所描述的技术的其它步骤。
在一实施方式中,所述第一网络节点810以及中间网络节点830是设置于所述数据传输系统中的每一网络节点上包括有蓝牙模块的终端设备。所述第二网络节点820为服务器或中央控制节点。可以理解的是,在其他实施例中,所述第二网络节点820也可以是设置于所述数据传输系统中的每一网络节点上包括有蓝牙模块的终端设备。其中,包括有蓝牙模块的终端设备具体可以是低功耗蓝牙(Bluetooth Low Energy,BLE)4.0设备,以会议系统为例,所述第一网络节点、中间网络节点可以是写字板、手机终端、智能手表等支持蓝牙功能的手持式电子设备,所述第二网络节点可以是会议系统的中央控制设备。其中,所述第一网络节点和所述第二网络节点之间传输的第一数据可以是其他网络节点发送给所述第一网络节点的数据,也可以是所述第一网络节点自己生成或存储的数据。例如,当所述第一网络节点是会议系统中A用户使用的写字板A1时,所述第一数据可以是A用户使用写字板A1生成的数据,还可以是与A1相连的,且为B用户使用的写字板B1生成并发送至所述写字板A1的数据。应理解,上述举例仅用于说明,本申请提供的数据传输方法可以用在任何一种在传输数据范围有限或者网络设备的连接数量有限的网络环境中,会议系统只是其中一个应用场景,本申请不作具体限定。
在一实施方式中,所述通信接口812包括蓝牙模块,所述数据传输系统中的每一网络节点上设置包括有蓝牙模块的终端设备。也就是说,所述网络节点是用于直接转发其它网络节点通过网络发送的数据的包括有蓝牙模块的终端设备,包括:位于所述第一网络节点810传输范围内的中间网络节点830用于接收所述第一网络节点810发送的数据,其中,所述第一网络节点810直接连接所述中间网络节点830。第一个接收到所述第一网络节点810发送的数据的所述中间网络节点830按照传输路径的连接顺序将所述数据依次通过多个中间网络节点传递下去,直至传输到与所述第二网络节点820直接连接的中间网络节点830,所述与所述第二网络节点820直接连接的中间网络节点830再将所述数据发送至所述第二网络节点820。也就是说,传统的星型网络结构中包括中央节点、路由节点以及边缘 节点,其中,路由节点是中央节点的从设备,是边缘节点的主设备。而使用本申请提供的数据传输系统,当所述第二网络节点820为服务器时,数据传输系统仅包括中央节点(服务器)和多个网络节点(包括中间网络节点和第一网络节点),中央节点是所述多个网络节点的主设备,多个网络节点之间不存在主从关系。例如,图3是本申请提供的一种数据传输网络的拓扑图,其中,深色网络节点0可以是作为第二网络节点的中央控制节点,浅色网络节点为第一网络节点和中间网络节点,第一网络节点、中间网络节点产生的数据通过传输路径发送给第二网络节点后,第二网络节点对其进行相应的处理。可以理解的是,作为蓝牙设备的每个中间网络节点都可以直接与第二网络节点建立连接,例如图3中的网络节点10还可以直接与第二网络节点0建立连接,进行数据的发送。但是由于蓝牙是短距离通信方式,并且根据蓝牙协议,每个网络节点只能与七个以下的其他网络节点建立蓝牙连接,因此,当第一网络节点与第二网络节点距离较远、或者第二网络节点的连接数量已达最大上限时,可以将数据发送给其他中间网络节点再进行多次的转发,从而送达至第二网络节点。应理解,图3仅用于举例说明,本申请提供的数据传输网络还可以包括更多的中央控制节点、更多的第一网络节点以及更多的中间网络节点,此处不作具体限定。
在一实施方式中,其中,所述传输路径中包括一个或者多个中间网络节点830。例如,图4是本申请提供的一种蓝牙组网结构的拓扑图,其中,深色网络节点0为第二网络节点,浅色网络节点为第一网络节点和中间网络节点。可以理解的是,每个第一网络节点到第二网络节点都可以有一个或者多个传输路径,例如,网络节点9为第一网络节点,对于第一网络节点9来说,拥有三条传输路径,可以依次通过网络节点9、3、2、1、0进行转发,从而达到第二网络节点,还可以依次通过网络节点9、10、4、1、0进行转发,从而达到第二网络节点,还可以依次通过网络节点9、3、11、7、6、2、1、0进行转发,从而达到第二网络节点。而对于网络节点8为第一网络节点时,只有依次通过网络节点8、5、1、0进行转发,因此每个中间网络节点可以拥有一个或者多个传输路径。应理解,上述举例仅用于说明,并不能构成具体限定。
在一实施方式中,所述传输效率最高的传输路径为中间网络节点830数量最少的传输路径。仍以图4为例,当网络节点11为第一网络节点时,第一网络节点11有两条传输路径,其中,第一条传输路径包括6个网络节点,分别是11、7、6、2、1、0,第二条传输路径包括5个网络节点,分别是11、3、2、1、0,因此,第一网络节点11选择使用第二条传输路径作为目标传输路径,进行所述第一数据的传输。可以理解的是,选择的目标传输路径包含的中间网络节点越少,所述第一数据就能越快到达所述第二网络节点0。应理解,上述举例仅用于说明,并不能构成具体限定。
在一实施方式中,所述传输效率最高的传输路径为空闲网络节点数量最多的传输路径,其中,所述空闲网络节点为没有需要发送数据的网络节点。仍以图4为例,当网络节点9为第一网络节点时,第一网络节点9有两条传输路径,其中,第一条传输路径包括网络节点9、3、2、1、0,第二条传输路径包括网络节点9、10、4、1、0,第三条传输路径包括网络节点9、3、11、7、6、2、1、0。由于网络节点均为包含蓝牙模块的终端设备,蓝牙模块可以给周围的直接连接的网络节点发送自己当前是空闲状态的广播,假设当前网络节点2、3、4向周围发送了自己当前是空闲状态的广播,此时第一条传输路径包括2个空闲 网络节点,第二条传输路径包括1个空闲网络节点,第三条传输路径包括2个空闲网络节点,因此,此时传输效率最高的传输路径为第一条传输路径以及第三条传输路径,第一网络节点9可以选择使用第一条传输路径或者第三条传输路径作为目标传输路径向第二网络节点发送第一数据。可以理解的是,选择的目标路径包含的空闲节点越多,所述第一数据就能越快到达所述第二网络节点0,传输效率就越高。可以应理解,上述举例仅用于说明,并不能构成具体限定。
在一实施方式中,所述处理器811用于通过所述通信接口接收到空闲网络节点发送的空闲状态信息时,获取包含所述空闲网络节点的一个或多个传输路径;所述处理器811用于选择包含所述空闲网络节点的所述传输路径中中间网络节点数量最少的一条传输路径作为目标传输路径。
例如,仍以图4为例,当网络节点9为第一网络节点时,第一网络节点9有两条传输路径,其中,第一条传输路径包括5个网络节点,分别是9、3、2、1、0,第二条传输路径包括5个网络节点,分别是9、10、4、1、0,第三条传输路径包括8个网络节点,分别是9、3、11、7、6、2、1、0。假设当前网络节点2、3向周围发送了自己当前是空闲状态的广播,此时第一条、第二条传输路径都包括5个网络节点,第三条传输路径包括8个网络节点,第一条传输路、第三条传输路径都包括2个空闲网络节点,第二条传输路径包括0个空闲网络节点,因此,此时传输效率最高的传输路径是包含空闲网络节点且中间网络节点数量最少的一条传输路径作为目标传输路径,也就是第一条传输路径,第一网络节点9选择使用第一条传输路径作为目标传输路径向第二网络节点发送第一数据。可以理解的是,本申请提供的数据通信方法可以根据当前的网络状况动态地进行网络分流,将数据发送至一条路径短且网络空闲、更少阻塞的路径上去,提高了数据传输的效率。应理解,上述举例仅用于说明,并不能构成具体限定。
在一实施方式中,所述处理器811还用于通过所述通信接口接收到与所述第一网络节点直接连接的空闲网络节点发送的空闲状态信息时,确定与所述第一网络节点距离最近的目标空闲网络节点,其中,所述空闲状态信息包括每个空闲节点的定位信息;所述处理器811还用于获取包含所述目标空闲网络节点的一个或者多个传输路径;所述处理器811用于选择包含所述目标空闲网络节点的所述传输路径中中间网络节点数量最少的一条传输路径作为目标传输路径。
例如,仍以图4为例,第一网络节点9有三条传输路径,第一网络节点9的直接连接的网络节点可以是中间网络节点3和中间网络节点10,假设中间网络节点3处于空闲状态,中间网络节点3会给周围的直接连接节点发送自己当前是空闲状态的广播,第一网络节点9在接收到所述广播的情况下,将所述第一数据发送给中间网络节点3,中间网络节点3再获取中间网络节点3到第二网络节点0的一个或者多个传输路径,此时的传输路径只有一条,也就是依次通过中间网络节点3、2、1、0进行转发。可以理解的是,传统的星型网络结构,由于路径固定,无法做到动态调节,只能使用中央控制设备提前给每一个路由节点预留通道带宽,在个别边缘节点暂停使用,不产生数据的情况下,造成通道资源的浪费。而本申请提供的数据传输方法,通过获取周围节点的空闲状态,可以将空闲的节点作为中继中间网络节点,动态调节路径,从而动态地进行网络分流,将数据发送至另一条潜在的、 具有更少阻塞的路径上去。
在一实施方式中,所述处理器811还用于在所述传输路径中的中间网络节点830出现故障的情况下,以与所述出现故障的中间网络节点直接连接的前一个中间网络节点为所述第一网络节点,并重新获取目标传输路径并通过所述目标传输路径进行数据传输。也就是说,如果第一网络节点810的目标传输路径中的中间网络节点发生故障,所述第一网络节点810可以重新进行步骤S101至S102,从而选出新的没有故障节点的目标传输路径。因此,本申请提供的数据传输方法相比传统方法,可以根据各种需求动态调节路径,具有更高的灵活性以及网络自愈能力。
在一实施方式中,所述处理器811还用于当所述传输路径中传输效率最高的传输路径有两个及以上时,获取每条传输路径中每个所述中间网络节点的定位信息,其中,所述中间网络节点的定位信息包括每个中间网络节点与直接连接的其他网络节点之间的距离;所述处理器811还用于根据所述定位信息,使用迪杰斯特拉(Dijkstra)算法选出距离最短的传输路径作为目标传输路径。可以理解的是,蓝牙设备具有位置计算功能,并且准确度可以达0.5米以下。因此,可选地,定位信息可以是中间网络节点与其他直接连接的网络节点建立蓝牙连接时,计算并保存的每个中间网络节点和建立连接的节点之间的距离,当出现传输路径中的中间网络节点数量相同的情况下,可以根据预先保存的各个节点之间的距离,计算出最短传输路径最为目标路径。
例如,在图5所示的网络结构中,第一网络节点9有三条传输路径,其中,第一条传输路径包括5个中间网络节点,分别是9、3、2、1、0,第二条传输路径包括5个中间网络节点,分别是9、10、4、1、0,第三条传输路径包括8个传输节点,分别是9、3、11、7、6、2、1、0,其中,第一条传输路径和第二条传输路径包括的中间网络节点数都是5个,因此,第一网络节点9获取两条传输路径上节点的定位信息,从而获取到第一网络节点9与中间网络节点3之间的距离为2m,中间网络节点3与中间网络节点2之间的距离为1.5m,中间网络节点2与中间网络节点1之间的距离为1.2m,中间网络节点1与中间网络节点0之间的距离为1m,第一网络节点9与中间网络节点10之间的距离为1.5m,中间网络节点10与中间网络节点4之间的距离为1m,中间网络节点4与中间网络节点1之间的距离为4.5m,因此,使用Dijkstra算法即可选出距离最短的传输路径为第一条传输路径,也就是说,包含第一网络节点9、3、2、1、0的路径。应理解,上述举例仅用于说明,并不能构成具体限定。
在一实施方式中,所述处理器811还用于在所述获取所述第一网络节点和所述第二网络节点之间当前可用于传输数据的传输路径之前,当需要进行数据传输的第一数据包含命令数据时,优先控制所述通信接口发送所述包含命令数据的第一数据,并暂停发送不包含所述命令数据的其他第一数据,其中,所述命令数据用于控制目标传输路径上的中间网络节点进行数据传输;所述处理器811还用于在所述通信接口接收到命令确认数据时,恢复发送所述不包含命令数据的其他第一数据。也就是说,所述第一网络节点还可以控制通过目标传输路径进行数据传输。
在一实施方式中,命令数据可以是第一网络节点810向第二网络节点820发送的命令数据,例如,某会议系统中,写字板A为第一网络节点,中央控制设备为第二网络节点, 写字板A向中央控制设备发送数据时,可以使用目标传输路径A1进行数据的传输。假设当前写字板A有两种数据需要发送给第二网络节点,一种是用户使用写字板A产生的文字数据,一种是写字板A需要向第二网络节点确认目标传输路径A1可传输数据的命令数据,那么此时写字板A会先将所述命令数据发送给第二网络节点,暂停所述文字数据的发送(将文字数据缓存在写字板A中),第二网络节点接收到所述命令数据后,向第一网络节点发送命令确认消息,写字板A接收到所述命令确认消息后,使用目标传输路径A1进行文字数据的发送。本实施方式用于确认目标传输路径是否能够成功传输数据。
在另一实施方式中,命令数据还可以是第一网络节点810向中间网络节点820发送的命令数据,仍以上述例子为例,写字板A接收到了第二网络节点发送的使用目标传输路径A1进行数据传输的命令确认消息后,写字板A将使用目标传输路径A1进行文字数据的发送,因此写字板A会产生新的命令数据,该命令数据用于通知目标传输路径A1中全部的中间网络节点传输写字板A发送的数据,假设目标传输路径A1包含中间网络节点B、C以及D,此时写字板A会先将上述新的命令数据发送给中间网络节点B、C以及D,在接收到中间网络节点B、C以及D的命令确认消息后,在将缓存在写字板A中的文字数据使用目标传输路径A1进行数据的传输。
在另一实施方式中,命令数据还可以是其他控制类的数据,例如在图6所示的某会议系统中,写字板A为第一网络节点,写字板A向中央控制设备发送数据时,那么第一数据可以是用户使用写字板A写字产生的文字数据,而包含命令数据的第一数据可以是用户使用写字板A控制投影仪灯光亮度的命令数据,写字板B在接收到这两种数据后,会优先向中央控制设备发送控制投影仪灯光亮度的命令数据消息,并且在接收到中央控制设备返回的包含确认字符(Acknowledgement,ACK)的确认接收消息后,再进行文字信息的发送。可以理解的是,使用ACK确认消息,可以保证命令类消息发送接收的稳定性,从而提高用户的使用体验。上述举例仅用于说明,并不能构成能具体限定。
请参照图7,图7是本申请一实施例提供的一种数据传输方法的流程示意图,用于对本申请提供的数据传输方法进行进一步的说明。在本实施例中,当中间网络节点获取第一数据后,首先确认第一数据是否包含命令数据,如果包含命令数据,优先发送包含命令数据的第一数据,并将其他不包含命令数据的第一数据存储在所述中间网络节点中,再判断周围是否存在空闲节点;如果不包含则直接判断周围是否存在空闲节点。在周围不存在空闲节点的情况下,获取所述中间网络节点到所述第一第二网络节点的全部传输路径;在周围存在空闲节点的情况下,将所述第一数据报文发送给空闲节点,然后获取所述空闲节点到所述第一第二网络节点的全部传输路径。在所述全部传输路径中,选择中间网络节点数量最少的一条作为目标传输路径,在中间网络节点数量最少的传输路径在一条以上的情况下,根据每两个中间网络节点之间的距离信息,使用Dijkstra算法计算出最短路径作为目标传输路径,使得中间网络节点使用所述目标传输路径向第二网络节点发送所述第一数据。
在一实施方式中,第一网络节点810还可以包括总线814。其中,通信接口811、处理器812以及存储器813可以通过总线814相互连接;总线814可以是外设部件互连标准(Peripheral Component Interconnect,简称PCI)总线或扩展工业标准结构(Extended Industry Standard Architecture,简称EISA)总线等。所述总线814可以分为地址总线、数据总线、 控制总线等。为便于表示,图8b中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
可选地,处理器812可以由一个或者多个通用处理器构成,例如中央处理器(Central Processing Unit,CPU)。处理器可用于运行相关的程序代码中处理功能的程序。也就是说,处理器812可用于运行存储器813中的相关程序代码以实现处理器812的功能,和/或用于执行本文所描述的技术的其它步骤。
在一实施方式中,通信接口811可以为有线接口(例如以太网接口)或无线接口(例如蜂窝网络接口或使用无线局域网接口),用于与其他模块或设备进行通信。例如,本申请实施例中通信接口811具体可用于向第二网络节点820发送第一数据。
在一实施方式中,存储器813可以包括易失性存储器(Volatile Memory),例如随机存取存储器(Random Access Memory,RAM);存储器也可以包括非易失性存储器(Non-Volatile Memory),例如只读存储器(Read-Only Memory,ROM)、快闪存储器(Flash Memory)、硬盘(Hard Disk Drive,HDD)或固态硬盘(Solid-State Drive,SSD);存储器可用于存储一组程序代码,以便于处理器调用存储器中存储的程序代码以实现本申请实施例中涉及的通信接口和/或处理器的功能,本申请实施例并不做限定。
基于上述网络终端设备,当需要在所述第一网络节点和所述第二网络节点之间进行数据传输时,通过获取所述第一网络节点和所述第二网络节点之间当前可用于传输数据的传输路径,选择所述传输路径中传输效率最高的一条传输路径作为目标传输路径,以及控制通过所述目标传输路径进行数据传输。由于本申请提供的网络结构不是传统的主从模式的星型网络结构,每个网络节点不仅仅是边缘节点,还具有路由器的转发功能,因此使用本申请提供的网络终端设备,能够针对应用场景动态调整传输路径,具有更高的带宽利用率、更强的网络自愈能力。
在本申请的另一实施例中提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序包括程序指令,所述程序指令被处理器执行时实现本申请提供的数据传输方法的任一实施例中所描述的实现方式,在此不再赘述。
所述计算机可读存储介质可以是前述任一实施例所述的终端的内部存储单元,例如终端的硬盘或内存。所述计算机可读存储介质也可以是所述终端的外部存储设备,例如所述终端上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,所述计算机可读存储介质还可以既包括所述终端的内部存储单元也包括外部存储设备。所述计算机可读存储介质用于存储所述计算机程序以及所述终端所需的其他程序和数据。所述计算机可读存储介质还可以用于暂时地存储已经输出或者将要输出的数据。
需要说明的是,对于前述的各个方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请并不受所描述的动作顺序的限制,因为依据本申请,某一些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本申请所必须的。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。
Claims (20)
- 一种数据传输方法,应用于一数据传输系统,所述数据传输系统包括第一网络节点以及第二网络节点,其特征在于,所述网络传输系统还在所述第一网络节点与所述第二网络节点之间建立有多个的传输路径,每一所述传输路径上包括一个或多个中间网络节点,所述每一传输路径中的多个中间网络节点依序直接通信连接;所述方法包括:当需要在所述第一网络节点和所述第二网络节点之间进行数据传输时,获取所述第一网络节点和所述第二网络节点之间当前可用于传输数据的传输路径;选择所述传输路径中传输效率最高的一条传输路径作为目标传输路径;以及,控制通过所述目标传输路径进行数据传输。
- 根据权利要求1所述的方法,其特征在于,所述传输效率最高的传输路径为中间网络节点数量最少的传输路径。
- 根据权利要求2所述的方法,其特征在于,所述传输效率最高的传输路径为空闲网络节点数量最多的传输路径,其中,所述空闲网络节点为没有需要发送数据的网络节点。
- 根据权利要求1所述的方法,其特征在于,所述网络节点是设置于所述数据传输系统中的每一网络节点上包括有蓝牙模块的终端设备。
- 根据权利要求1所述的方法,其特征在于,在所述获取所述第一网络节点和所述第二网络节点之间当前可用于传输数据的传输路径之前,还包括:当需要进行数据传输的第一数据包含命令数据时,优先发送所述包含命令数据的第一数据,并暂停发送不包含所述命令数据的其他第一数据,其中,所述命令数据用于控制目标传输路径上的中间网络节点进行数据传输;在接收到命令确认数据时,恢复发送所述不包含命令数据的其他第一数据。
- 根据权利要求5所述的方法,其特征在于,所述获取所述第一网络节点和所述第二网络节点之间当前可用于传输数据的传输路径,包括:接收到空闲网络节点发送的空闲状态信息时,获取包含所述空闲网络节点的一个或多个传输路径;所述选择所述传输路径中传输效率最高的一条传输路径作为目标传输路径,包括:选择包含所述空闲网络节点的所述传输路径中中间网络节点数量最少的一条传输路径作为目标传输路径。
- 根据权利要求5所述的方法,其特征在于,所述获取所述第一网络节点和所述第二网络节点之间当前可用于传输数据的传输路径,还包括:接收到与所述第一网络节点直接连接的空闲网络节点发送的空闲状态信息时,确定与所述第一网络节点距离最近的目标空闲网络节点,其中,所述空闲状态信息包括每个空闲 节点的定位信息;获取包含所述目标空闲网络节点的一个或者多个传输路径;所述选择所述传输路径中传输效率最高的一条传输路径作为目标传输路径,包括:选择包含所述目标空闲网络节点的所述传输路径中中间网络节点数量最少的一条传输路径作为目标传输路径。
- 根据权利要求2所述的方法,其特征在于,所述方法还包括:当所述传输路径中中间网络节点数量最少的传输路径有两个及以上时,获取每条传输路径中每个所述中间网络节点的定位信息,其中,所述中间网络节点的定位信息包括每个中间网络节点与直接连接的其他网络节点之间的距离;根据所述定位信息,使用迪杰斯特拉算法选出距离最短的传输路径作为目标传输路径。
- 根据权利要求2至6任一权利要求所述的方法,其特征在于,所述方法还包括:在所述传输路径中的中间网络节点出现故障的情况下,以与所述出现故障的中间网络节点直接连接的前一个中间网络节点为所述第一网络节点,并重新执行所述数据传输的方法。
- 根据权利要求1所述的方法,其特征在于,所述第二网络节点为服务器。
- 一种网络终端设备,其特征在于,所述网络终端设备设置于一数据传输系统的第一网络节点上,其中,所述数据传输系统包括第一网络节点以及第二网络节点,所述网络传输系统还在所述第一网络节点与所述第二网络节点之间建立有多个的传输路径,每一所述传输路径上包括一个或多个中间网络节点,所述每一传输路径中的多个中间网络节点依序直接通信连接;所述网络终端设备包括处理器和通信接口,所述处理器用于:在需要在所述第一网络节点和所述第二网络节点之间进行数据传输时,获取所述第一网络节点和所述第二网络节点之间当前可用于传输数据的传输路径;选择所述传输路径中传输效率最高的一条传输路径作为目标传输路径;以及控制所述通信接口通过所述目标传输路径进行数据传输。
- 根据权利要求11所述的设备,其特征在于,所述传输效率最高的传输路径为中间网络节点数量最少的传输路径。
- 根据权利要求11所述的设备,其特征在于,所述传输效率最高的传输路径为空闲网络节点数量最多的传输路径,其中,所述空闲网络节点为没有需要发送数据的网络节点。
- 根据权利要求11所述的设备,其特征在于,所述通信接口包括蓝牙模块,所述数据传输系统中的每一网络节点上设置包括有蓝牙模块的终端设备。
- 根据权利要求11所述的设备,其特征在于,所述处理器还用于在所述获取所述第一网络节点和所述第二网络节点之间当前可用于传输数据的传输路径之前,当需要进行数据传输的第一数据包含命令数据时,优先控制所述通信接口发送所述包含命令数据的第一数据,并暂停发送不包含所述命令数据的其他第一数据,其中,所述命令数据用于控制目标传输路径上的中间网络节点进行数据传输;所述处理器还用于在所述通信接口接收到命令确认数据时,恢复发送所述不包含命令数据的其他第一数据。
- 根据权利要求11所述的设备,其特征在于,所述处理器用于通过所述通信接口接收到空闲网络节点发送的空闲状态信息时,获取包含所述空闲网络节点的一个或多个传输路径;所述处理器用于选择包含所述空闲网络节点的所述传输路径中中间网络节点数量最少的一条传输路径作为目标传输路径。
- 根据权利要求16所述的设备,其特征在于,所述处理器还用于通过所述通信接口接收到与所述第一网络节点直接连接的空闲网络节点发送的空闲状态信息时,确定与所述第一网络节点距离最近的目标空闲网络节点,其中,所述空闲状态信息包括每个空闲节点的定位信息;所述处理器还用于获取包含所述目标空闲网络节点的一个或者多个传输路径;所述处理器用于选择包含所述目标空闲网络节点的所述传输路径中中间网络节点数量最少的一条传输路径作为目标传输路径。
- 根据权利要求12所述的设备,所述处理器还用于当所述传输路径中中间网络节点数量最少的传输路径有两个及以上时,获取每条传输路径中每个所述中间网络节点的定位信息,其中,所述中间网络节点的定位信息包括每个中间网络节点与直接连接的其他网络节点之间的距离;所述处理器还用于根据所述定位信息,使用迪杰斯特拉算法选出距离最短的传输路径作为目标传输路径。
- 根据权利要求12至17任一权利要求所述的设备,其特征在于,所述处理器还用于在所述传输路径中的中间网络节点出现故障的情况下,以与所述出现故障的中间网络节点直接连接的前一个中间网络节点为所述第一网络节点,并重新获取目标传输路径并通过所述目标传输路径进行数据传输。
- 一种计算机存储介质,所述计算机可读存储介质存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1至10所述的方法。
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201980073521.0A CN113261249A (zh) | 2019-01-17 | 2019-01-17 | 一种数据传输方法、相关设备及计算机存储介质 |
PCT/CN2019/072215 WO2020147081A1 (zh) | 2019-01-17 | 2019-01-17 | 一种数据传输方法、相关设备及计算机存储介质 |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2019/072215 WO2020147081A1 (zh) | 2019-01-17 | 2019-01-17 | 一种数据传输方法、相关设备及计算机存储介质 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2020147081A1 true WO2020147081A1 (zh) | 2020-07-23 |
Family
ID=71613253
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2019/072215 WO2020147081A1 (zh) | 2019-01-17 | 2019-01-17 | 一种数据传输方法、相关设备及计算机存储介质 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN113261249A (zh) |
WO (1) | WO2020147081A1 (zh) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114298431A (zh) * | 2021-12-31 | 2022-04-08 | 锐捷网络股份有限公司 | 一种网络路径选择方法、装置、设备及存储介质 |
CN115297192B (zh) * | 2022-06-17 | 2024-03-12 | 浙江大华技术股份有限公司 | Mesh网络数据传输方法、Mesh网络节点及存储介质 |
CN115002025B (zh) * | 2022-07-21 | 2023-04-18 | 广州百思达数据服务有限公司 | 一种数据安全传输方法、系统及云平台 |
CN115695928B (zh) * | 2022-09-26 | 2024-06-07 | 抖音视界有限公司 | 一种投屏方法、装置、电子设备及存储介质 |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1843005A (zh) * | 2004-03-05 | 2006-10-04 | 西门子公司 | 路由算法中的概率链路选择 |
CN104796334A (zh) * | 2015-04-30 | 2015-07-22 | 无锡市崇安区科技创业服务中心 | 一种数据传输路径选择方法 |
CN105744549A (zh) * | 2016-02-03 | 2016-07-06 | 宇龙计算机通信科技(深圳)有限公司 | 一种传输路径的切换方法、终端和系统 |
CN106714265A (zh) * | 2017-01-05 | 2017-05-24 | 清华大学 | 基于dtn算法的网络节点预测方法和装置 |
US10050866B2 (en) * | 2012-11-30 | 2018-08-14 | International Business Machines Corporation | Parallel top-K simple shortest paths discovery |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102136994B (zh) * | 2010-08-02 | 2014-04-30 | 华为技术有限公司 | 一种建立标签交换路径的方法、系统和节点设备 |
JP5720441B2 (ja) * | 2011-06-30 | 2015-05-20 | 富士通株式会社 | 経路検索プログラム、経路探索装置及び経路探索方法 |
CN109039899B (zh) * | 2018-08-07 | 2020-11-06 | 深圳三角形科技有限公司 | 数据传输方法、系统及计算机可读存储介质 |
-
2019
- 2019-01-17 CN CN201980073521.0A patent/CN113261249A/zh active Pending
- 2019-01-17 WO PCT/CN2019/072215 patent/WO2020147081A1/zh active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1843005A (zh) * | 2004-03-05 | 2006-10-04 | 西门子公司 | 路由算法中的概率链路选择 |
US10050866B2 (en) * | 2012-11-30 | 2018-08-14 | International Business Machines Corporation | Parallel top-K simple shortest paths discovery |
CN104796334A (zh) * | 2015-04-30 | 2015-07-22 | 无锡市崇安区科技创业服务中心 | 一种数据传输路径选择方法 |
CN105744549A (zh) * | 2016-02-03 | 2016-07-06 | 宇龙计算机通信科技(深圳)有限公司 | 一种传输路径的切换方法、终端和系统 |
CN106714265A (zh) * | 2017-01-05 | 2017-05-24 | 清华大学 | 基于dtn算法的网络节点预测方法和装置 |
Also Published As
Publication number | Publication date |
---|---|
CN113261249A (zh) | 2021-08-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP7183416B2 (ja) | 時間依存ネットワーキング通信方法及び装置 | |
WO2020147081A1 (zh) | 一种数据传输方法、相关设备及计算机存储介质 | |
US11528239B2 (en) | Time-sensitive networking communication method and apparatus for configuring virtual switching node | |
EP3577952B1 (en) | Method and system for selection of an access and mobility management function in an access network environment | |
US8711817B2 (en) | Low cost mesh network capability | |
WO2019137125A1 (zh) | 会话管理方法、设备及系统 | |
WO2021136180A1 (zh) | 一种业务处理的方法、装置和系统 | |
CN110557265B (zh) | 一种组播方法及装置 | |
WO2019120073A1 (zh) | 数据传输方法、设备及系统 | |
EP3961999A1 (en) | Method for determining service transmission requirement, apparatus, and system | |
CN110324193A (zh) | 一种终端升级管理方法及装置 | |
WO2020249032A1 (zh) | 通信方法及装置 | |
WO2018053894A1 (zh) | 物联网基于传输速率的接入点切换方法及装置 | |
WO2019041371A1 (zh) | 物联网基于连接数量的路由器切换方法及装置 | |
WO2021174536A1 (zh) | 一种通信方法及相关装置 | |
WO2019015036A1 (zh) | 一种中继器桥接方法和网关 | |
WO2020133491A1 (zh) | 一种能力上报方法及终端设备 | |
WO2019010799A1 (zh) | 一种物联网终端迁移方法和网关 | |
WO2021168813A1 (zh) | 通信方法和通信装置 | |
CN110856213B (zh) | 切换数据传输方式的方法、装置、存储介质及电子设备 | |
CN110708678A (zh) | 一种通信方法及设备 | |
US11375401B2 (en) | Network service device, session management device and operation methods thereof | |
WO2020143605A1 (zh) | 数据传输方法、终端和网络侧设备 | |
WO2021092724A1 (zh) | 设备管理的方法和ble设备 | |
CN103283185A (zh) | 数据通信的优先级设定 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 19910809 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: 19910809 Country of ref document: EP Kind code of ref document: A1 |