Data transmission method and apparatus, electronic device, and storage medium
By obtaining path information at the execution node and dividing the data packets, and transmitting them proportionally and synchronously to multiple lower-level nodes, the problem of low cross-node transmission efficiency in the link network is solved, and the data transmission time is reduced and the efficiency is improved.
Patent Information
- Application Number
- CN202210707467.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-21
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2042-06-21
AI Technical Summary
In a link network built by multiple devices, the efficiency of cross-node data transmission is low. The existing technology requires that complete data be transmitted between nodes and then transmitted to the next node by the intermediate node.
The execution node obtains the path information of multiple transmission paths, determines the data packet allocation ratio of the lower-level nodes, divides the data to be sent into multiple data packets and sends them to multiple lower-level nodes synchronously in proportion. The target node receives and verifies the data packets.
Effectively reduce cross-node data transmission time, improve cross-node transmission efficiency, and ensure data transmission accuracy and low power consumption design.
Smart Images

Figure CN115038125B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of wireless communication technologies, and in particular to a data transmission method, device, electronic device, and storage medium. Background Art
[0002] The sliding window mechanism can be used to achieve rapid data transmission between point-to-point devices. However, in a link network built by multiple devices, cross-node data transmission requires that the complete data be transmitted between nodes and then transmitted to the next node by the intermediate node, resulting in low data transmission efficiency. Summary of the Invention
[0003] The present invention aims to solve at least one of the technical problems existing in the prior art. To this end, the present invention proposes a data transmission method to improve data transmission efficiency.
[0004] According to a data transmission method according to an embodiment of the first aspect of the present invention, the method is applied to an execution node, and the method includes:
[0005] Acquiring path information of multiple transmission paths between the execution node and the target node;
[0006] Determining the number of transmission paths between each of the plurality of subordinate nodes of the execution node and the target node based on the path information of the plurality of transmission paths;
[0007] Determining, based on the number of transmission paths, data packet allocation ratios corresponding to the plurality of lower-level nodes;
[0008] The data to be sent by the execution node is divided into a plurality of data packets, and the plurality of data packets are synchronously sent to the plurality of lower-level nodes respectively according to the data packet allocation ratio.
[0009] According to the data transmission method of an embodiment of the present invention, the data to be sent of the execution node is proportionally distributed to multiple transmission paths for synchronous transmission. The data transmission time decreases accordingly as the number of paths increases, which can effectively reduce the data transmission time across nodes and improve the transmission efficiency of cross-node transmission.
[0010] According to one embodiment of the present invention, after acquiring the path information of the multiple transmission paths between the execution node and the target node, and before synchronously sending the multiple data packets to the multiple lower-level nodes according to the data packet allocation ratio, the method further includes:
[0011] determining, based on the path information of the plurality of transmission paths, at least one of a data volume threshold of the to-be-sent data and a transmission duration threshold of the data packet;
[0012] At least one of the data volume threshold and the transmission duration threshold is sent to the target node.
[0013] According to one embodiment of the present invention, determining the data amount threshold of the to-be-sent data based on the path information of the multiple transmission paths includes:
[0014] Determining, based on the path information of the multiple transmission paths, the number of paths of the multiple transmission paths and the number of nodes of a target path, wherein the target path is the path with the largest number of nodes among the multiple transmission paths;
[0015] The data amount threshold is determined based on the number of paths of the multiple transmission paths and the number of nodes of the target path.
[0016] According to one embodiment of the present invention, determining the transmission duration threshold of the data packet based on the path information of the multiple transmission paths includes:
[0017] Determining the number of nodes of a target path based on the path information of the multiple transmission paths, the target path being the path with the largest number of nodes among the multiple transmission paths;
[0018] The transmission time threshold is determined based on the number of nodes on the target path.
[0019] According to one embodiment of the present invention, dividing the data to be sent by the execution node into multiple data packets includes:
[0020] Dividing the data to be sent into N first data segments, where N is a positive integer greater than 1;
[0021] Obtaining N first data packets based on the N first data segments;
[0022] Divide each first data segment into two halves, front and back, and combine the back half of the i-th first data segment with the first half of the i+1-th first data segment to obtain N second data segments, and combine the first half of the 1st first data segment with the second half of the Nth first data segment, where i is a positive integer from 1 to N;
[0023] Based on the N second data segments, N second data packets are obtained.
[0024] According to a second aspect of an embodiment of the present invention, a data transmission method is applied to a target node, and the method includes:
[0025] receiving a plurality of data packets transmitted between the execution node and the target node via a plurality of transmission paths, wherein the number of data packets transmitted by each transmission path in the plurality of transmission paths is the same;
[0026] Target data is determined based on the plurality of data packets.
[0027] According to the data transmission method of the embodiment of the present invention, the target node can receive data packets one after another without waiting for the intermediate node to receive all the data, which greatly reduces the data transmission time across nodes and effectively improves the transmission efficiency of cross-node transmission.
[0028] According to one embodiment of the present invention, determining the target data based on the multiple data packets includes: verifying N first data packets in the multiple data packets, where N is a positive integer greater than 1;
[0029] Determine whether the first data packet passes verification, and cache the first data segment of the first data packet as the target data in a receiving buffer of the target node.
[0030] According to one embodiment of the present invention, after verifying the N first data packets among the multiple data packets, the method further includes:
[0031] Determine a target data packet that fails verification among the N first data packets;
[0032] The second data segment of the second data packet corresponding to the first data segment of the target data packet is extracted, the first data segment of the target data packet is supplemented, and the supplemented data segment is cached in the receiving buffer as the target data.
[0033] According to one embodiment of the present invention, before receiving the multiple data packets transmitted between the execution node and the target node via the multiple transmission paths, the method further includes:
[0034] receiving a data volume threshold sent by the execution node;
[0035] Determining a data capacity of a receiving buffer of the target node based on the data volume threshold;
[0036] and / or,
[0037] receiving a transmission duration threshold sent by the execution node;
[0038] Based on the transmission time threshold, determination time information of when the target node receives the multiple data packets is determined.
[0039] According to a data transmission device according to an embodiment of a third aspect of the present invention, the device is applied to an execution node, and the device includes:
[0040] An acquisition module, configured to acquire path information of multiple transmission paths between the execution node and the target node;
[0041] a first processing module, configured to determine, based on the path information of the plurality of transmission paths, the number of transmission paths between each of the plurality of subordinate nodes of the execution node and the target node;
[0042] A second processing module is configured to determine, based on the number of transmission paths, data packet allocation ratios corresponding to the plurality of lower-level nodes;
[0043] The third processing module is used to divide the data to be sent by the execution node into multiple data packets, and synchronously send the multiple data packets to the multiple lower-level nodes respectively according to the data packet allocation ratio.
[0044] According to a fourth aspect of the present invention, a data transmission device is applied to a target node and includes:
[0045] a receiving module, configured to receive a plurality of data packets transmitted along a plurality of transmission paths between an execution node and the target node, wherein the number of data packets transmitted along each of the plurality of transmission paths is the same;
[0046] The fourth processing module is configured to determine target data based on the multiple data packets.
[0047] According to an embodiment of the fifth aspect of the present invention, an electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, it implements any one of the above-mentioned data transmission methods.
[0048] According to the sixth aspect of the present invention, a non-transitory computer-readable storage medium stores a computer program, which, when executed by a processor, implements any of the above-described data transmission methods.
[0049] The computer program product according to the seventh aspect of the present invention includes a computer program, which implements any of the above-mentioned data transmission methods when executed by a processor.
[0050] The above one or more technical solutions in the embodiments of the present invention have at least one of the following technical effects:
[0051] The execution node divides the data to be sent in the sending window into multiple data packets, and sends them synchronously to multiple subordinate nodes of the execution node. Then, multiple subordinate nodes transmit multiple data packets to the target node. Through multi-path transmission, the data in the execution node sending window is transmitted synchronously and dispersedly. The execution node does not need to send all the data to the intermediate node in full, which can effectively reduce the data transmission time across nodes and improve the transmission efficiency of cross-node transmission.
[0052] Furthermore, the execution node notifies the target node of two key parameters: the data volume threshold of the data to be sent and the transmission time threshold of the data packet. The target node then determines the data capacity of the receiving buffer and the determination time information for receiving multiple data packets and other transmission parameters based on the data volume threshold of the data to be sent and the transmission time threshold of the data packet.
[0053] Furthermore, the execution node processes the data to be sent in segments to obtain two types of data packets, namely the first data packet and the second data packet, which can effectively ensure the accuracy of data transmission between the execution node and the target node.
[0054] Additional aspects and advantages of the present invention will be set forth in part in the description which follows and, in part, will be obvious from the description which follows, or may be learned by practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0056] Figure 1 This is one of the flowcharts of the data transmission method provided by an embodiment of the present invention;
[0057] Figure 2 is a schematic diagram of transmission paths of multiple data packets provided by an embodiment of the present invention;
[0058] Figure 3 This is one of the structural diagrams of the data packet provided by the embodiment of the present invention;
[0059] Figure 4 This is the second structural diagram of the data packet provided by the embodiment of the present invention;
[0060] Figure 5 This is a second flow chart of the data transmission method provided by an embodiment of the present invention;
[0061] Figure 6 This is one of the structural diagrams of the data transmission device provided by an embodiment of the present invention;
[0062] Figure 7 This is a second structural diagram of the data transmission device provided by an embodiment of the present invention;
[0063] Figure 8 It is a structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0064] The following embodiments of the present invention are described in further detail with reference to the accompanying drawings and examples. The following examples are used to illustrate the present invention but are not intended to limit the scope of the present invention.
[0065] In the description of the embodiments of the present invention, it should be noted that the terms “first”, “second” and “third” are used for descriptive purposes only and should not be understood as indicating or implying relative importance.
[0066] In the description of this specification, the reference terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" mean that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the embodiment of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art can combine and combine different embodiments or examples described in this specification and features of different embodiments or examples without contradiction.
[0067] The sliding window is a data transmission mechanism. The sliding window is divided into a sending window and a receiving window. The sending window is used to send data, and the receiving window is used to receive data. Devices that can communicate with each other have a sending window and a receiving window.
[0068] When using the sliding window mechanism for data transmission, the sending window in the sliding window will maximize the use of the connection interval to transmit data, which can achieve rapid data transmission between point-to-point devices. However, in a link network built by multiple devices, cross-node data transmission requires that the complete data be transmitted between nodes, and then transmitted from the intermediate node to the next node, resulting in low data transmission efficiency.
[0069] It should be noted that in a link network formed by interconnected nodes, the execution node is the node that sends data, and the target node is the node that receives data. There are multiple intermediate nodes between the execution node and the target node. The execution node and the target node transmit data through the intermediate nodes, and each node corresponds to a device.
[0070] Bluetooth Low Energy (BLE) can effectively reduce Bluetooth power consumption and cost while maintaining the same communication range. It is widely used in wearable devices and IoT devices. It is low-cost, small in size and highly compatible. Data can also be transmitted between Bluetooth Low Energy devices through a sliding window mechanism.
[0071] The following combination Figures 1 to 4A data transmission method according to an embodiment of the present invention is described, wherein the method is applied to an execution node.
[0072] In the embodiment of the present invention, the devices corresponding to the execution node, the intermediate node, and the target node may be low-power Bluetooth devices.
[0073] like Figure 1 As shown, the data transmission method of the embodiment of the present invention includes steps 110 to 140. The execution subject of the method can be the controller of the device corresponding to the execution node, or the cloud, or the edge server.
[0074] Step 110: Obtain path information of multiple transmission paths between the execution node and the target node.
[0075] There are multiple intermediate nodes between the execution node and the target node. The execution node and the target node transmit data through the intermediate nodes. The transmission path refers to the link that connects the execution node to the target node through the intermediate nodes.
[0076] In actual execution, the execution node can connect to the target node through an intermediate node, for example Figure 2 As shown, node A is the execution node, node B is the target node, and node A transmits data to node B through node C, an intermediate node.
[0077] Execution nodes can be connected to target nodes through multiple intermediate nodes, e.g. Figure 2 As shown, node A is the execution node, node B is the target node, and node A transmits data to node B through node D, node F, and node G in sequence.
[0078] In this embodiment, there are multiple intermediate nodes between the execution node and the target node. Accordingly, there are multiple transmission paths between the execution node and the target node.
[0079] In this step, path information of multiple transmission paths between the execution node and the target node is obtained, wherein the path information includes information such as the number of multiple transmission paths between the execution node and the target node, the number of intermediate nodes on each transmission path, and device information of the intermediate nodes on each transmission path.
[0080] In actual execution, the execution node may obtain path information of multiple transmission paths between the execution node and the target node by traversing multiple transmission paths leading to the target node.
[0081] Step 120 : Based on the path information of the multiple transmission paths, determine the number of transmission paths between each of the multiple subordinate nodes of the execution node and the target node.
[0082] The subordinate node of the execution node refers to the node in the transmission path from the execution node to the target node, to which the execution node is directly connected. That is, the execution node and the subordinate node do not need to transmit data through other intermediate nodes, and the execution nodes output data to the subordinate nodes of the execution node.
[0083] For example, Figure 2 As shown, node A is the execution node, node B is the target node, and there are three transmission paths from node A to node B, namely: node A-node C-node B, node A-node D-node E-node B, and node A-node D-node F-node G-node B.
[0084] Among them, node A is directly connected to node C and node D, and node C and node D are called subordinate nodes of node A.
[0085] In this step, the number of transmission paths between each of the multiple subordinate nodes of the execution node and the target node can be determined based on the path information of the multiple transmission paths from the execution node to the target node.
[0086] In this embodiment, when the subordinate node is directly connected to the target node, there is only one transmission path between the subordinate node and the target node; when the subordinate node is connected to the target node through other intermediate nodes, there may be one or more transmission paths between the subordinate node and the target node.
[0087] For example, Figure 2 As shown, node A is the execution node, node B is the target node, and node C and node D are subordinate nodes of node A.
[0088] Node C is directly connected to Node B, and there is only one transmission path; Node D is connected to Node B through three intermediate nodes: Node E, Node F, and Node G. There are two transmission paths between Node D and Node B: Node D-Node E-Node B and Node D-Node F-Node G-Node B.
[0089] Step 130: Determine the data packet allocation ratios corresponding to the plurality of lower-level nodes based on the number of transmission paths.
[0090] In this step, the data packet allocation ratio corresponding to the multiple subordinate nodes is determined according to the number of transmission paths of each subordinate node in the multiple subordinate nodes of the execution node, that is, the data packet allocation ratio of each subordinate node in the multiple subordinate nodes is determined.
[0091] In this embodiment, the data packet allocation ratio corresponding to each subordinate node is the ratio of the number of transmission paths between the subordinate node and the target node to the total number of transmission paths between multiple subordinate nodes and the target node.
[0092] For example, Figure 2 As shown, node A is the execution node, node B is the target node, node C and node D are subordinate nodes of node A, there are two transmission paths between node D and node B, and there is one transmission path between node C and node B.
[0093] Among them, the data packet allocation ratio corresponding to node D is 2 / (1+2), and the data packet allocation ratio corresponding to node C is 1 / (1+2).
[0094] Step 140: Divide the data to be sent by the execution node into multiple data packets, and synchronously send the multiple data packets to multiple lower-level nodes according to the data packet allocation ratio.
[0095] In actual execution, the data to be sent can be divided according to the number of multiple transmission paths between the execution node and the target node. For example, if there are M transmission paths between the execution node and the target node, the data to be sent can be divided into M×N data packets, where N is a positive integer greater than 0.
[0096] In this step, the data to be sent in the sending window of the execution node is divided into multiple data packets, and the multiple data packets obtained by dividing the data to be sent are sent to the corresponding lower-level nodes according to the data packet allocation ratio corresponding to each lower-level node.
[0097] In this embodiment, the execution node divides the data to be sent in the sending window into multiple data packets, and sends them synchronously to multiple subordinate nodes of the execution node. The multiple subordinate nodes then transmit the multiple data packets to the target node. Through multi-path transmission, the data in the execution node sending window is dispersed and synchronously transmitted. The execution node does not need to send all the data in full to the intermediate node, which can effectively reduce the data transmission time across nodes and improve the transmission efficiency of cross-node transmission.
[0098] It can be understood that the data of the execution node sending window is transmitted in a dispersed and synchronous manner, and the data transmission time decreases accordingly as the number of paths increases. For example, the execution node sending window needs to send 10Mb of data, which is transmitted at a speed of 1Mb / s. When there are 2 transmission paths, it takes 5s to complete the data transmission. When there are 5 transmission paths, it takes 2s to complete the data transmission.
[0099] A specific embodiment is described below.
[0100] like Figure 2 As shown, node A is the execution node, node B is the target node, node C and node D are subordinate nodes of node A, there are two transmission paths between node D and node B, and there is one transmission path between node C and node B.
[0101] There are three transmission paths from node A to node B. The data to be sent in the sending window of node A can be divided into six data packets.
[0102] According to the data packet allocation ratio corresponding to node D is 2 / (1+2), and the data packet allocation ratio corresponding to node C is 1 / (1+2), node A sends 4 of the 6 data packets to node D according to the data packet allocation ratio of 2 / (1+2), and sends the remaining 2 data packets to node C according to the data packet allocation ratio of 1 / (1+2).
[0103] Node A sends data packet 1 to node C, and synchronously sends data packets 2 and 3 to node D. Then node A sends data packet 4 to node C, and synchronously sends data packets 5 and 6 to node D, and so on, until the multiple data packets obtained by dividing the data to be sent are sent.
[0104] It can be understood that when node D sends data to node B, node D can be used as an execution node, node E, node F and node G are intermediate nodes from node D to node B, the two subordinate nodes of node D are node E and node F, and there are two transmission paths between node D and node B, and node E and node F correspond to one transmission path respectively.
[0105] In this embodiment, node D sends 2 of the 4 data packets to node E according to a data packet distribution ratio of 1 / 2, and simultaneously sends the other 2 data packets to node F.
[0106] According to the data transmission method provided by an embodiment of the present invention, the data to be sent of the execution node is proportionally distributed to multiple transmission paths for synchronous transmission. The data transmission time decreases accordingly as the number of paths increases, which can effectively reduce the data transmission time across nodes and improve the transmission efficiency of cross-node transmission.
[0107] It can be understood that in the link network composed of the execution node, intermediate node and target node corresponding to the low-power Bluetooth device, the data to be sent by the execution node is proportionally distributed to multiple transmission paths for synchronous transmission, ensuring the low-power design of data transmission while effectively improving the transmission efficiency of cross-node transmission.
[0108] The data transmission method applied to the execution node, after obtaining the path information of multiple transmission paths between the execution node and the target node in step 110, and before synchronously sending the multiple data packets to the multiple lower-level nodes according to the data packet distribution ratio in step 140, further includes:
[0109] Determining at least one of a data volume threshold of data to be sent and a data packet transmission time threshold based on path information of the plurality of transmission paths;
[0110] sending at least one of the data amount threshold and the transmission duration threshold to the target node.
[0111] The data amount threshold of the data to be sent refers to the maximum length of data to be sent in the sending window of the execution node, and the data amount threshold of the data to be sent represents the maximum capacity of the sending window of the execution node.
[0112] The transmission duration threshold of the data packet refers to the transmission duration of the data packet with the longest transmission duration among the multiple data packets output by the execution node, and the transmission duration of the data packet represents the maximum duration required for the multiple data packets of the execution node to be transmitted to the target node in a scattered manner.
[0113] In this embodiment, the two key parameters, the data amount threshold of the data to be sent and the transmission duration threshold of the data packet, are determined according to the path information of the multiple transmission paths between the execution node and the target node, the number of nodes on each transmission path, and the device information of the nodes on each transmission path.
[0114] The execution node informs the target node of the two key parameters, the data amount threshold of the data to be sent and the transmission duration threshold of the data packet, and the target node determines the data capacity of the receiving buffer and the transmission parameters such as the determination time information of the multiple data packets according to the data amount threshold of the data to be sent and the transmission duration threshold of the data packet.
[0115] The calculation process of the two key parameters, the data amount threshold of the data to be sent and the transmission duration threshold of the data packet, is described below.
[0116] Firstly, the data amount threshold of the data to be sent is determined based on the path information of the multiple transmission paths.
[0117] In this embodiment, the number of paths of the multiple transmission paths and the number of nodes of the target path are determined based on the path information of the multiple transmission paths, and the target path is the path with the largest number of nodes in the multiple transmission paths.
[0118] The data amount threshold is determined based on the number of paths of the multiple transmission paths and the number of nodes of the target path.
[0119] The execution node divides the data to be sent into multiple data packets and transmits them to the target node through the multiple transmission paths. The more the transmission paths between the execution node and the target node, the larger the data amount that can be sent by the sending window of the execution node, that is, the data amount threshold of the data to be sent is proportional to the number of transmission paths between the execution node and the target node.
[0120] It can be understood that the number of intermediate nodes on each transmission path is different, and the number of intermediate nodes through which the data packet is transmitted on each transmission path is different. In order to ensure the accuracy of data packet transmission, ensure the effectiveness of data transmission, and prevent packet loss during intermediate node transmission, the size of the data amount of the data packet transmitted on each transmission path is limited according to the number of intermediate nodes, that is, the data amount threshold of the data to be sent is inversely proportional to the number of nodes of the path with the most nodes in the plurality of transmission paths.
[0121] In actual execution, the formula: data amount threshold of data to be sent = number of paths of the plurality of transmission paths / node number of the target path x first target value can be applied. The unit of the data amount threshold of the data to be sent can be bytes (Bytes).
[0122] The first target value can be a value obtained according to experimental data, and the first target value is a positive integer greater than 0. In the process of data transmission based on Bluetooth low energy, the value range of the first target value can be 200 to 400. The first target value in the above formula can ensure the accuracy of data packet transmission on the target path and effectively prevent packet loss during intermediate node transmission.
[0123] For example, node A is an execution node, and node B is a target node. Node A has three transmission paths to node B. The target path is node A-node D-node F-node G-node B, and the target path has five nodes.
[0124] The data amount threshold of the data to be sent = 3 / 5 x 256 (Bytes). In actual execution, the data amount threshold of the data to be sent needs to be rounded. It can be rounded up to 154 (Bytes), or it can be rounded down to 153 (Bytes), or it can be rounded according to the rules of rounding.
[0125] Secondly, based on the path information of the plurality of transmission paths, the transmission duration threshold of the data packet is determined.
[0126] In this embodiment, based on the path information of the plurality of transmission paths, the number of nodes of the target path is determined. The target path is the path with the most nodes in the plurality of transmission paths.
[0127] Based on the number of nodes of the target path, the transmission duration threshold is determined.
[0128] It can be understood that the execution node divides the data to be sent into multiple data packets, and transmits them synchronously to the target node through multiple transmission paths. The number of data packets transmitted on each transmission path is the same, and the transmission speed of each transmission path is not much different. The transmission time threshold of the data packet depends on the target path with the largest number of nodes. That is, when the target path with the largest number of nodes completes the transmission of the data packet, the other transmission paths also complete the transmission of the data packet.
[0129] It should be noted that when each transmission path transmits a data packet, the transmission duration includes the transmission duration of the data between nodes and the residence time of the data at a node.
[0130] The duration of data transmission between nodes, that is, the connection interval between nodes, refers to the unit communication time between nodes.
[0131] In this embodiment, the transmission time threshold of the data packet is proportional to the node connection interval and the number of nodes on the target path.
[0132] In actual implementation, the formula can be applied: data packet transmission time threshold = total node connection intervals of the target path + number of nodes of the target path × second target value, and the unit of the data packet transmission time threshold can be milliseconds (ms).
[0133] Among them, the second target value is used to represent the length of time that data stays at the node. The second target value can be set and changed by each node and is related to the physical performance of each node in data processing.
[0134] For example, node A is the execution node, node B is the target node, there are three transmission paths from node A to node B, the target path is node A-node D-node F-node G-node B, and the target path has a total of 5 nodes.
[0135] The transmission time threshold of the data packet = (connection interval AD + connection interval DF + connection interval FG + connection interval GB) + 5 × 8, the second target value is 8, and the residence time of each node is the same.
[0136] In step 140 of the data transmission method, the data to be sent by the execution node is divided into multiple data packets, including:
[0137] Divide the data to be sent into N first data segments, where N is a positive integer greater than 1;
[0138] Obtaining N first data packets based on the N first data segments;
[0139] each first data segment is divided into two half data segments, the latter half data segment of the i-th first data segment is combined with the former half data segment of the (i+1)-th first data segment to obtain N second data segments, the former half data segment of the 1st first data segment is combined with the latter half data segment of the N-th first data segment, and i is a positive integer from 1 to N;
[0140] Based on the N second data segments, N second data packets are obtained.
[0141] In this embodiment, the to-be-sent data of the execution node sending window is divided into N first data segments, a corresponding serial number is identified for each first data segment, a corresponding check code is calculated, and the first data segments are combined into a first data packet.
[0142] It can be understood that in the N first data packets obtained by encapsulating the N first data segments divided from the to-be-sent data, each first data packet includes node source address, node target address, data ID of the to-be-sent data, single packet frame serial number, first data segment, upper frame data check code, and lower frame data check code.
[0143] Each first data packet can be regarded as a frame of data, the node source address refers to the address of the execution node, the node target address refers to the address of the target node, the data ID of the to-be-sent data refers to the first data packet being encapsulated from which to-be-sent data of the execution node sending window, and the single packet frame serial number refers to the serial number of the first data packet in the N first data packets.
[0144] In this embodiment, the N first data packets are obtained by encapsulating the N first data segments divided from the to-be-sent data, and each first data segment in the N first data segments is divided into two half data segments, the latter half data segment of the i-th first data segment is combined with the former half data segment of the (i+1)-th first data segment to obtain N second data segments.
[0145] For example, the latter half data segment of the 2nd first data segment is combined with the former half data segment of the 3rd first data segment to obtain a second data segment, the latter half data segment of the 3rd first data segment is combined with the former half data segment of the 4th first data segment to obtain another second data segment, and so on.
[0146] It should be noted that in actual execution, the former half data segment of the 1st first data segment is combined with the latter half data segment of the N-th first data segment for the first and last two first data segments.
[0147] In this embodiment, each first data segment in the N first data segments is divided into two half data segments, combined to obtain N second data segments, and further encapsulated according to the N second data segments to obtain N second data packets.
[0148] It is understandable that each second data packet also includes information such as the node source address, node destination address, data ID of the data to be sent, single packet frame number, second data segment, upper frame data check code and lower frame data check code.
[0149] In actual implementation, when the first data packet and the second data packet are encapsulated, check codes may be generated in different ways to improve the security of the data packets.
[0150] In this embodiment, the multiple data packets obtained by dividing the data to be sent in the execution node sending window include N first data packets and N second data packets.
[0151] A specific embodiment is described below.
[0152] like Figure 4 The three first data packets obtained by dividing the data to be sent in the sending window of the execution node are: the first data packet 411 of the first frame, the first data packet 412 of the third frame, and the first data packet 413 of the fifth frame.
[0153] The three second data packets obtained by dividing the data to be sent are: the first data packet 421 of the second frame, the first data packet 422 of the fourth frame, and the first data packet 423 of the sixth frame.
[0154] like Figure 3 The figure shows the data structure of the first data packet 412 of the third frame. 1 frame chechksum310 is the check code of the first data packet 411 of the first frame. 5 frames chechksum330 is the check code of the first data packet 411 of the fifth frame. The first data segment cd320 of the first data packet 412 of the third frame is divided into two halves of data.
[0155] The first half data c of the first data segment of the first data packet 412 of the third frame and the second half data b of the first data segment of the first data packet 411 of the first frame constitute the second data segment bc of the first data packet 421 of the second frame, and so on.
[0156] In actual execution, when the data to be sent in the execution node sending window is divided into N first data segments, the upper odd sequence number can be identified, and the check codes of the previous odd frame and the next odd frame can be calculated at the same time, and they are combined into a first data packet, wherein the upper frame check code of the first data packet 411 of the first frame and the lower frame check code of the first data packet 413 of the last frame, the fifth frame, are 0.
[0157] In this embodiment, each first data segment is divided into two segments, the front and back segments. The back half data and the first half data of the next odd frame together form the even frame data, that is, the second data segment. The last even frame data is the back half data of the last odd frame and the first half data of the first odd frame data, that is, the first half data of the first first data segment and the back half data of the Nth first data segment.
[0158] Calculate the check code of the last even frame data and the next even frame, and combine them into a second data packet, wherein the upper frame check code of the first data packet 421 of the first even frame 2 and the lower frame check code of the first data packet 423 of the last even frame 6 are -1, marked as F.
[0159] In this embodiment, N first data packets and N second data packets are synchronously sent to each lower-level node according to the data packet allocation ratio of each lower-level node, and then each lower-level node transmits these data packets to the target node.
[0160] The following combination Figure 5 A data transmission method according to an embodiment of the present invention is described, wherein the method is applied to a target node.
[0161] like Figure 5 As shown, the data transmission method of the embodiment of the present invention includes steps 510 and 520. The execution subject of the method can be the controller of the device corresponding to the target node, or the cloud, or the edge server.
[0162] Step 510: Receive multiple data packets transmitted between the execution node and the target node via multiple transmission paths, where the number of data packets transmitted by each transmission path in the multiple transmission paths is the same.
[0163] In this embodiment, the target node receives multiple data packets sent by the execution node according to the above data transmission method.
[0164] A specific embodiment is described below.
[0165] like Figure 2 As shown, node A is the execution node, node B is the target node, node C and node D are subordinate nodes of node A, there are two transmission paths between node D and node B, and there is one transmission path between node C and node B.
[0166] There are three transmission paths from node A to node B. The data to be sent in the sending window of node A can be divided into six data packets.
[0167] According to the data packet allocation ratio corresponding to node D is 2 / (1+2), and the data packet allocation ratio corresponding to node C is 1 / (1+2), node A sends 4 of the 6 data packets to node D according to the data packet allocation ratio of 2 / (1+2), and sends the remaining 2 data packets to node C according to the data packet allocation ratio of 1 / (1+2).
[0168] Node A sends data packet 1 to node C, and synchronously sends data packets 2 and 3 to node D. Then node A sends data packet 4 to node C, and synchronously sends data packets 5 and 6 to node D, and so on, until the multiple data packets obtained by dividing the data to be sent are sent.
[0169] Node B receives data packets 1 and 4 sent by node C, and data packets 2, 3, 5, and 6 sent by node D through two transmission paths.
[0170] Step 520: Determine target data based on multiple data packets.
[0171] In this step, after receiving multiple data packets, the target node extracts data segments contained in the multiple data packets and caches the extracted data segments as target data in a receiving buffer of the target node.
[0172] It is understandable that after the target node completes data extraction of all data packets, the target data obtained by combining all data segments is the same as the data to be sent in the sending window of the execution node, so as to complete the data transmission between the execution node and the target node.
[0173] According to the data transmission method provided by an embodiment of the present invention, the execution node transmits the data to be sent to the target node in a dispersed and synchronous manner through multi-path transmission. The target node can receive data packets one after another without waiting for the intermediate node to receive all the data, which greatly reduces the data transmission time across nodes and effectively improves the transmission efficiency of cross-node transmission.
[0174] The above data transmission method includes, at step 520:
[0175] Verifying N first data packets among the multiple data packets, where N is a positive integer greater than 1;
[0176] It is determined that the first data packet passes verification, and the first data segment of the first data packet is cached as target data in a receiving buffer of the target node.
[0177] It is understandable that after receiving multiple data packets, the execution node will verify the multiple data packets to determine the authenticity and sequence of the multiple data packets. If the verification is passed, the data segments in the data packets will be extracted to determine the target data.
[0178] In this embodiment, the execution node divides the first data segment into two halves, encapsulates them to obtain N first data packets, divides the first data segment into two halves, obtains the second data segment, encapsulates them to obtain N second data packets, and synchronously and dispersedly transmits the N first data packets and the N second data packets to the target node through multiple transmission paths.
[0179] The target node receives N first data packets and N second data packets, first verifies the N first data packets, and caches the first data segments of the first data packets that pass the verification in a receiving buffer of the target node.
[0180] In actual implementation, the target node may compare the check codes of adjacent first data packets among the N first data packets to verify the first data packets and determine the order of the N first data packets.
[0181] For example, Figure 4 As shown, the upper frame check code of the first data packet 411 of the first frame is checked to see if it is 0, and the lower frame check code of the first data packet 413 of the fifth frame is checked to see if it is 0, so as to determine the first and last two first data packets.
[0182] In this embodiment, the first data packet that fails the check among N first data packets is determined as the target data packet, the second data segment of the second data packet corresponding to the first data segment of the target data packet is extracted, the first data segment of the target data packet is supplemented, and the supplemented data segment is cached in the receiving buffer as the target data.
[0183] It can be understood that the first data segment of the target data packet is divided into two halves of data, the front half of the data of the target data packet and the second half of the data of the first data packet before the target data packet are combined into a second data segment, which is encapsulated into a second data packet. Correspondingly, the second half of the data of the target data packet and the first half of the data of the first data packet after the target data packet are combined into another second data segment, which is encapsulated into another second data packet.
[0184] According to the first data segment of the target data packet, the corresponding second data packet is determined, the second data segment of the second data packet is extracted to supplement the first data segment of the target data packet, and the supplemented data segment is cached in the receiving buffer, so that the receiving buffer of the target node can buffer the complete data to be sent by the execution node, thereby ensuring the accuracy of data transmission between the execution node and the target node.
[0185] Before step 510, the data transmission method further includes:
[0186] The threshold value for the amount of data sent by the receiving execution node;
[0187] Determine the data capacity of the receiving buffer of the target node based on the data volume threshold;
[0188] and / or,
[0189] Receive the transmission time threshold sent by the execution node;
[0190] Based on the transmission time threshold, the decision time information of the target node receiving multiple data packets is determined.
[0191] In this embodiment, before the target node receives multiple data packets, the execution node negotiates with the target node, and the execution node notifies the target node of two key parameters: the data volume threshold of the data to be sent and the transmission time threshold of the data packet. The target node then determines the data capacity size of the receiving buffer and the judgment time information for receiving multiple data packets based on the data volume threshold of the data to be sent and the transmission time threshold of the data packet.
[0192] The data volume threshold of the data to be sent represents the maximum capacity of the execution node's sending window to send data. The target node determines the data capacity of the receiving buffer based on the data volume threshold of the data to be sent to avoid insufficient capacity of the receiving buffer, which may lead to data congestion or packet loss.
[0193] The transmission duration of a data packet represents the maximum time required for multiple data packets from the execution node to be transmitted to the target node in a dispersed manner. The target node determines the judgment time information for receiving multiple data packets based on the transmission duration of the data packet to judge the validity of the data packet currently received by the target node, determine whether to send data transmission interruption, and provide timely feedback to ensure the data transmission quality between the execution node and the target node.
[0194] Two data transmission devices provided in embodiments of the present invention are described below. The two data transmission devices described below and the two data transmission methods described above can be referenced to each other.
[0195] like Figure 6 As shown, the embodiment of the present invention provides a data transmission device applied to an execution node, including:
[0196] An acquisition module 610 is configured to acquire path information of multiple transmission paths between an execution node and a target node;
[0197] A first processing module 620 is configured to determine the number of transmission paths between each of the plurality of subordinate nodes of the execution node and the target node based on the path information of the plurality of transmission paths;
[0198] The second processing module 630 is configured to determine the data packet allocation ratios corresponding to the plurality of lower-level nodes based on the number of transmission paths;
[0199] The third processing module 640 is configured to divide the data to be sent by the execution node into a plurality of data packets, and synchronously send the plurality of data packets to a plurality of lower-level nodes respectively according to a data packet allocation ratio.
[0200] According to the data transmission device provided in an embodiment of the present invention, the data to be sent of the execution node is proportionally distributed to multiple transmission paths for synchronous transmission. The data transmission time is correspondingly reduced as the number of paths increases, which can effectively reduce the data transmission time across nodes and improve the transmission efficiency of cross-node transmission.
[0201] In some embodiments, the first processing module 620 is further configured to determine at least one of a data volume threshold of the data to be sent and a data packet transmission time threshold based on the path information of the plurality of transmission paths;
[0202] At least one of the data volume threshold and the transmission time threshold is sent to the target node.
[0203] In some embodiments, the first processing module 620 is further configured to determine the number of paths of the multiple transmission paths and the number of nodes of the target path based on the path information of the multiple transmission paths, where the target path is the path with the largest number of nodes among the multiple transmission paths;
[0204] A data volume threshold is determined based on the number of paths of the multiple transmission paths and the number of nodes of the target path.
[0205] In some embodiments, the first processing module 620 is further configured to determine the number of nodes of a target path based on the path information of the multiple transmission paths, where the target path is the path with the largest number of nodes among the multiple transmission paths;
[0206] The transmission time threshold is determined based on the number of nodes on the target path.
[0207] In some embodiments, the third processing module 640 is configured to divide the data to be sent into N first data segments, where N is a positive integer greater than 1;
[0208] Obtaining N first data packets based on the N first data segments;
[0209] Divide each first data segment into two halves, front and back, and combine the back half of the i-th first data segment with the first half of the i+1-th first data segment to obtain N second data segments, and combine the first half of the 1st first data segment with the second half of the Nth first data segment, where i is a positive integer from 1 to N;
[0210] Based on the N second data segments, N second data packets are obtained.
[0211] like Figure 7 As shown, the embodiment of the present invention provides a data transmission device applied to a target node, including:
[0212] a receiving module 710 configured to receive a plurality of data packets transmitted along a plurality of transmission paths between an execution node and a target node, wherein each of the plurality of transmission paths transmits the same number of data packets, wherein the plurality of data packets are data packets sent by the execution node based on the aforementioned data transmission method applied to the execution node;
[0213] The fourth processing module 720 is configured to determine target data based on the multiple data packets.
[0214] According to the data transmission device provided by an embodiment of the present invention, the execution node transmits the data to be sent to the target node in a dispersed and synchronous manner through multi-path transmission. The target node can receive data packets one after another without waiting for the intermediate node to receive all the data, which greatly reduces the data transmission time across nodes and effectively improves the transmission efficiency of cross-node transmission.
[0215] In some embodiments, the fourth processing module 720 is configured to verify N first data packets among the multiple data packets, where N is a positive integer greater than 1;
[0216] It is determined that the first data packet passes verification, and the first data segment of the first data packet is cached as target data in a receiving buffer of the target node.
[0217] In some embodiments, the fourth processing module 720 is further configured to determine a target data packet that fails verification among the N first data packets;
[0218] The second data segment of the second data packet corresponding to the first data segment of the target data packet is extracted, the first data segment of the target data packet is supplemented, and the supplemented data segment is cached in the receiving buffer as the target data.
[0219] In some embodiments, the receiving module 710 is further configured to receive a data volume threshold sent by the execution node;
[0220] The fourth processing module 720 is further configured to determine a data capacity of a receiving buffer of the target node based on a data volume threshold;
[0221] In some embodiments, the receiving module 710 is further configured to receive a transmission duration threshold sent by an execution node;
[0222] The fourth processing module 720 is further configured to determine, based on the transmission duration threshold, the determination time information of the target node receiving the multiple data packets.
[0223] Figure 8 An example of a physical structure diagram of an electronic device is shown below. Figure 8As shown, the electronic device can include a processor 810, a communications interface 820, a memory 830, and a communications bus 840, wherein the processor 810, the communications interface 820, and the memory 830 complete mutual communication through the communications bus 840. The processor 810 can invoke a logical instruction in the memory 830 to execute a data transmission method applied to an execution node, the method including: obtaining path information of a plurality of transmission paths between the execution node and a target node; determining, based on the path information of the plurality of transmission paths, a number of transmission paths between each of a plurality of subordinate nodes of the execution node and the target node; determining, based on the number of transmission paths, a data packet allocation ratio corresponding to each of the plurality of subordinate nodes; dividing to-be-sent data of the execution node into a plurality of data packets, and synchronously sending the plurality of data packets to the plurality of subordinate nodes according to the data packet allocation ratio;
[0224] Or, executing a data transmission method applied to a target node, the method including: receiving a plurality of data packets transmitted through a plurality of transmission paths between an execution node and the target node, the number of data packets transmitted through each of the plurality of transmission paths being the same;
[0225] Determining target data based on the plurality of data packets.
[0226] In addition, the logical instruction in the memory 830 described above can be implemented in the form of a software functional unit and sold or used as an independent product, and can be stored in a computer-readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or part of the technical solutions can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a plurality of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various program code storage media.
[0227] Furthermore, the present invention also provides a computer program product, the computer program product including a computer program, the computer program being storable on a non-transitory computer-readable storage medium, and when the computer program is executed by a processor, the computer is capable of executing the data transmission method applied to an execution node provided by each of the above-mentioned method embodiments, the method including: obtaining path information of multiple transmission paths between the execution node and the target node; determining, based on the path information of the multiple transmission paths, the number of transmission paths between each of the multiple subordinate nodes of the execution node and the target node; determining, based on the number of transmission paths, the data packet allocation ratio corresponding to each of the multiple subordinate nodes; dividing the data to be sent by the execution node into multiple data packets, and synchronously sending the multiple data packets to the multiple subordinate nodes respectively according to the data packet allocation ratio;
[0228] Alternatively, the data transmission method applied to the target node provided by each of the above method embodiments is executed, the method including:
[0229] receiving a plurality of data packets transmitted by a plurality of transmission paths between an execution node and a target node, wherein the number of data packets transmitted by each transmission path in the plurality of transmission paths is the same;
[0230] Based on the multiple data packets, target data is determined.
[0231] On the other hand, an embodiment of the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the data transmission method applied to an execution node provided in each of the above embodiments, the method comprising: obtaining path information of multiple transmission paths between the execution node and a target node; determining, based on the path information of the multiple transmission paths, the number of transmission paths between each of multiple subordinate nodes of the execution node and the target node; determining, based on the number of transmission paths, a data packet allocation ratio corresponding to each of the multiple subordinate nodes; dividing the data to be sent by the execution node into multiple data packets, and synchronously sending the multiple data packets to the multiple subordinate nodes respectively according to the data packet allocation ratio;
[0232] Alternatively, the data transmission method provided by each of the above method embodiments and applied to a target node is executed, the method comprising: receiving a plurality of data packets transmitted between the execution node and the target node via a plurality of transmission paths, wherein the number of data packets transmitted by each of the plurality of transmission paths is the same;
[0233] Based on the multiple data packets, target data is determined.
[0234] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.
[0235] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, or of course, by hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the existing technology can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or certain parts of the embodiments.
[0236] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.
[0237] The above embodiments are intended to illustrate the present invention only and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the embodiments, it should be understood by those skilled in the art that various combinations, modifications, or equivalent substitutions of the technical solutions of the present invention do not depart from the spirit and scope of the technical solutions of the present invention and should be encompassed by the scope of the claims of the present invention.
Claims
1. A data transmission method, characterized in that: The method is applied to an execution node and includes: Acquiring path information of multiple transmission paths between the execution node and the target node; Determining the number of transmission paths between each of the plurality of subordinate nodes of the execution node and the target node based on the path information of the plurality of transmission paths; Determining, based on the number of transmission paths, data packet allocation ratios corresponding to the plurality of subordinate nodes; the data packet allocation ratio corresponding to each of the subordinate nodes being a ratio of the number of transmission paths between the subordinate node and the target node to the total number of transmission paths between the plurality of subordinate nodes and the target node; Dividing the data to be sent by the execution node into a plurality of data packets, and synchronously sending the plurality of data packets to the plurality of subordinate nodes respectively according to the data packet allocation ratio; After acquiring the path information of the multiple transmission paths between the execution node and the target node, and before synchronously sending the multiple data packets to the multiple lower-level nodes according to the data packet allocation ratio, the method further includes: determining, based on the path information of the plurality of transmission paths, at least one of a data volume threshold of the to-be-sent data and a transmission duration threshold of the data packet; Sending at least one of the data volume threshold and the transmission duration threshold to the target node; Among them, the data volume threshold is used to instruct the target node to determine the data capacity of the receiving buffer of the target node; the transmission time threshold is used to instruct the target node to determine the determination time information of the target node receiving the multiple data packets.
2. The data transmission method according to claim 1, wherein: The determining, based on the path information of the plurality of transmission paths, a data amount threshold of the to-be-sent data includes: Determining, based on the path information of the multiple transmission paths, the number of paths of the multiple transmission paths and the number of nodes of a target path, wherein the target path is the path with the largest number of nodes among the multiple transmission paths; The data amount threshold is determined based on the number of paths of the multiple transmission paths and the number of nodes of the target path.
3. The data transmission method according to claim 1, wherein: The determining, based on the path information of the plurality of transmission paths, a transmission duration threshold of the data packet includes: Determining the number of nodes of a target path based on the path information of the multiple transmission paths, the target path being the path with the largest number of nodes among the multiple transmission paths; The transmission time threshold is determined based on the number of nodes on the target path.
4. The data transmission method according to any one of claims 1 to 3, characterized in that: The step of dividing the data to be sent by the execution node into a plurality of data packets includes: Dividing the data to be sent into N first data segments, where N is a positive integer greater than 1; Obtaining N first data packets based on the N first data segments; Divide each first data segment into two halves, front and back, and combine the back half of the i-th first data segment with the first half of the i+1-th first data segment to obtain N second data segments, and combine the first half of the 1st first data segment with the second half of the Nth first data segment, where i is a positive integer from 1 to N; Based on the N second data segments, N second data packets are obtained.
5. A data transmission method, characterized in that: The method is applied to a target node, and includes: receiving a plurality of data packets transmitted between the execution node and the target node via a plurality of transmission paths, wherein the number of data packets transmitted by each transmission path in the plurality of transmission paths is the same; determining target data based on the plurality of data packets; The execution node sends multiple data packets in the following manner: Acquiring path information of multiple transmission paths between the execution node and the target node; Determining the number of transmission paths between each of the plurality of subordinate nodes of the execution node and the target node based on the path information of the plurality of transmission paths; Determining, based on the number of transmission paths, data packet allocation ratios corresponding to the plurality of subordinate nodes; the data packet allocation ratio corresponding to each of the subordinate nodes being a ratio of the number of transmission paths between the subordinate node and the target node to the total number of transmission paths between the plurality of subordinate nodes and the target node; Dividing the data to be sent by the execution node into a plurality of data packets, and synchronously sending the plurality of data packets to the plurality of subordinate nodes respectively according to the data packet allocation ratio; Before receiving the plurality of data packets transmitted through the plurality of transmission paths between the execution node and the target node, the method further includes: receiving a data volume threshold sent by the execution node, wherein the data volume threshold is determined based on path information of the multiple transmission paths; Determining a data capacity of a receiving buffer of the target node based on the data volume threshold; and / or, receiving a transmission time threshold sent by the execution node, wherein the transmission time threshold is determined based on path information of the multiple transmission paths; Based on the transmission time threshold, determination time information of when the target node receives the multiple data packets is determined.
6. The data transmission method according to claim 5, characterized in that: The determining target data based on the multiple data packets includes: Verifying N first data packets among the multiple data packets, where N is a positive integer greater than 1; Determine whether the first data packet passes verification, and cache the first data segment of the first data packet as the target data in a receiving buffer of the target node.
7. The data transmission method according to claim 6, characterized in that: After verifying the N first data packets among the multiple data packets, the method further includes: Determine a target data packet that fails verification among the N first data packets; The second data segment of the second data packet corresponding to the first data segment of the target data packet is extracted, the first data segment of the target data packet is supplemented, and the supplemented data segment is cached in the receiving buffer as the target data.
8. A data transmission device, characterized in that: The device is applied to an execution node, and includes: An acquisition module, configured to acquire path information of multiple transmission paths between the execution node and the target node; a first processing module, configured to determine, based on the path information of the plurality of transmission paths, the number of transmission paths between each of the plurality of subordinate nodes of the execution node and the target node; a second processing module, configured to determine, based on the number of transmission paths, data packet allocation ratios corresponding to the plurality of subordinate nodes; the data packet allocation ratio corresponding to each subordinate node being a ratio of the number of transmission paths between the subordinate node and the target node to the total number of transmission paths between the plurality of subordinate nodes and the target node; A third processing module is configured to divide the data to be sent by the execution node into a plurality of data packets, and synchronously send the plurality of data packets to the plurality of subordinate nodes respectively according to the data packet allocation ratio; The first processing module is further configured to: determining, based on the path information of the plurality of transmission paths, at least one of a data volume threshold of the to-be-sent data and a transmission duration threshold of the data packet; Sending at least one of the data volume threshold and the transmission duration threshold to the target node; Among them, the data volume threshold is used to instruct the target node to determine the data capacity of the receiving buffer of the target node; the transmission time threshold is used to instruct the target node to determine the determination time information of the target node receiving the multiple data packets.
9. A data transmission device, characterized in that: The device is applied to a target node, and includes: a receiving module, configured to receive a plurality of data packets transmitted along a plurality of transmission paths between the execution node and the target node, wherein the number of data packets transmitted along each of the plurality of transmission paths is the same; a fourth processing module, configured to determine target data based on the multiple data packets; The execution node sends multiple data packets in the following manner: Acquiring path information of multiple transmission paths between the execution node and the target node; Determining the number of transmission paths between each of the plurality of subordinate nodes of the execution node and the target node based on the path information of the plurality of transmission paths; Determining, based on the number of transmission paths, data packet allocation ratios corresponding to the plurality of subordinate nodes; the data packet allocation ratio corresponding to each of the subordinate nodes being a ratio of the number of transmission paths between the subordinate node and the target node to the total number of transmission paths between the plurality of subordinate nodes and the target node; Dividing the data to be sent by the execution node into a plurality of data packets, and synchronously sending the plurality of data packets to the plurality of subordinate nodes respectively according to the data packet allocation ratio; The receiving module is further configured to receive a data volume threshold value sent by the execution node; the data volume threshold value is determined based on the path information of the multiple transmission paths; The fourth processing module is further configured to determine a data capacity of a receiving buffer of the target node based on the data volume threshold; and / or, The receiving module is further configured to receive a transmission time threshold sent by the execution node; the transmission time threshold is determined based on the path information of the multiple transmission paths; The fourth processing module is further configured to determine, based on the transmission duration threshold, determination time information of when the target node receives the plurality of data packets.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the data transmission method according to any one of claims 1 to 7 is implemented.
11. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the data transmission method according to any one of claims 1 to 7 is implemented.
12. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the data transmission method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Data transfer system and method
CN106452660A
Data transmission method and device, equipment and readable storage medium
CN108738078A
Data transmission method and related apparatus
WO2020211682A1