Data transmission method, system and electronic equipmentTechnical Field
The present invention relates to the field of communications, and in particular, to a data transmission method, a data transmission system, and an electronic device.
Background
In the process of data transmission by the data transmission technology, in order to ensure QoS (Quality of service), data transmission is generally implemented in a Virtual Private Network (VPN) form.
However, the existing VPN technology generally only establishes a single data channel for both transmission parties, so that when data transmission is implemented in a VPN manner, if a certain node or certain nodes on the data channel are congested, phenomena such as increased data transmission delay and increased packet loss rate may occur, and further, the rate, stability and reliability of data transmission may be reduced.
Disclosure of Invention
In order to improve the data transmission rate, the data transmission stability and the data transmission reliability, embodiments of the present invention provide a data transmission method, a data transmission system and an electronic device. The technical scheme is as follows:
in a first aspect, a data transmission method is provided, where the method includes:
the data sender determines all transmission paths between the data sender and the data receiver according to the information of the data sender and the data receiver;
the data sender acquires a plurality of transmission paths meeting preset conditions from all the transmission paths;
the data sender sends data to the data receiver through the plurality of transmission paths;
the data receiver receives data from any transmission path meeting preset conditions;
the data receiver judges whether the data is received for the first time; and
and if the data receiver judges that the data is received for the first time, ignoring or discarding the data from other transmission paths.
With reference to the first aspect, in a first possible implementation manner, the determining, by the data sender, all transmission paths between the data sender and the data receiver according to the information of the data sender and the data receiver includes:
and the data sender determines all transmission paths according to all available preset nodes between the data sender and the data receiver detected in real time.
With reference to the first possible implementation manner of the first aspect, in a second possible implementation manner, the acquiring, by the data sender, a plurality of transmission paths that satisfy a preset condition from all the transmission paths includes:
the data sender acquires the network parameters of all the transmission paths; and
the data sender selects a plurality of transmission paths of which the network parameters are less than or equal to a preset value from all the transmission paths;
the network parameters comprise at least one of a packet loss rate, a Round Trip Time (RTT) and jitter of a link.
With reference to the first aspect, in a third possible implementation manner,
the data sender sets identification information of the data, wherein the identification information corresponds to the data and is used for distinguishing the data from other data; and
and the data sender sends the data and the identification information to the data receiver through the plurality of transmission paths.
With reference to the third possible implementation manner of the first aspect, in a fourth possible implementation manner, the determining, by the data receiving side, whether the data is received for the first time includes:
and the data receiver judges whether the data is received for the first time according to the identification information.
In a second aspect, an electronic device is provided, the electronic device comprising:
the first processing module is used for determining all transmission paths between the first processing module and a data receiver according to the information of the data receiver;
the second processing module is used for acquiring a plurality of transmission paths meeting preset conditions from all the transmission paths;
and the sending module is used for sending data to the data receiving party through the plurality of transmission paths.
With reference to the second aspect, in a first possible implementation manner, the first processing module is configured to:
and determining all transmission paths according to all available preset nodes detected between the data receiver and the data receiver in real time.
With reference to the first possible implementation manner of the second aspect, in a second possible implementation manner, the second processing module is configured to:
acquiring network parameters of all the transmission paths; and
selecting a plurality of transmission paths of which the network parameters are smaller than or equal to a preset value from all the transmission paths;
the network parameters comprise at least one of a packet loss rate, a Round Trip Time (RTT) and jitter of a link.
With reference to the second aspect, in a third possible implementation manner,
the electronic equipment further comprises a setting module, a judging module and a judging module, wherein the setting module is used for setting identification information of the data, the identification information corresponds to the data and is used for distinguishing the data from other data; and
the sending module is further configured to send the data and the identification information to the data receiver through the plurality of transmission paths.
In a third aspect, an electronic device is provided, which includes a memory and a processor connected to the memory, wherein the memory is used for storing a set of program codes, and the processor calls the program codes stored in the memory to perform the following operations:
determining all transmission paths between the data receiver and the data receiver according to the information of the data receiver;
acquiring a plurality of transmission paths meeting preset conditions from all the transmission paths;
and sending data to the data receiver through the plurality of transmission paths.
With reference to the third aspect, in a first possible implementation manner, the processor calls the program code stored in the memory to perform the following operations:
and determining all transmission paths according to all available preset nodes detected between the data receiver and the data receiver in real time.
With reference to the first possible implementation manner of the third aspect, in a second possible implementation manner, the processor calls the program code stored in the memory to perform the following operations:
acquiring network parameters of all the transmission paths; and
selecting a plurality of transmission paths of which the network parameters are smaller than or equal to a preset value from all the transmission paths;
the network parameters comprise at least one of a packet loss rate, a Round Trip Time (RTT) and jitter of a link.
With reference to the third aspect, in a third possible implementation manner, the processor calls the program code stored in the memory to further perform the following operations
Setting identification information of the data, wherein the identification information corresponds to the data and is used for distinguishing the data from other data; and
and sending the data and the identification information to the data receiver through the plurality of transmission paths.
In a fourth aspect, a data transmission system is provided, the data transmission system comprising a data transmitting apparatus and a data receiving apparatus, wherein:
the data transmission apparatus includes:
the first processing module is used for determining all transmission paths between the data sending device and the data receiving device according to the information of the data sending device and the data receiving device;
the second processing module is used for acquiring a plurality of transmission paths meeting preset conditions from all the transmission paths;
a sending module, configured to send data to the data receiving apparatus through the plurality of transmission paths;
the data receiving apparatus includes:
the receiving module is used for receiving data from any transmission path meeting preset conditions;
the judging module is used for judging whether the data is received for the first time; and
and the data processing module is used for ignoring or discarding the data sent by other transmission paths when the data is judged to be received for the first time.
With reference to the fourth aspect, in a first possible implementation manner, the first processing module is configured to:
and the data sender determines all transmission paths according to all available preset nodes between the data sender and the data receiver detected in real time.
With reference to the first possible implementation manner of the fourth aspect, in a second possible implementation manner, the second processing module is specifically configured to:
the data sender acquires the network parameters of all the transmission paths; and
the data sender selects a plurality of transmission paths of which the network parameters are less than or equal to a preset value from all the transmission paths;
the network parameters comprise at least one of a packet loss rate, a Round Trip Time (RTT) and jitter of a link.
With reference to the fourth aspect, in a third possible implementation manner,
the data sending device further comprises a setting module, which is used for setting identification information of the data, wherein the identification information corresponds to the data, and the identification information corresponds to the data and is used for distinguishing the data from other data; and
the sending module is further configured to send the data and the identification information to the data receiving apparatus through the plurality of transmission paths.
With reference to the third possible implementation manner of the fourth aspect, in a fourth possible implementation manner,
and judging whether the data is received for the first time or not according to the identification information.
The embodiment of the invention provides a data transmission method, a system and electronic equipment, wherein the data transmission method comprises the following steps: the data sender determines all transmission paths between the data sender and the data receiver according to the information of the data sender and the data receiver; the data sending party obtains a plurality of transmission paths meeting preset conditions from all the transmission paths; a data sender sends data to a data receiver through a plurality of transmission paths; a data receiving party receives data from any transmission path meeting preset conditions; the data receiver judges whether the data is received for the first time; and if the data receiving party judges that the data is received for the first time, ignoring or discarding the data from other transmission paths. Compared with the prior art that data transmission is realized by establishing a single data channel, the phenomena of data transmission delay increase, packet loss rate increase and the like caused by congestion of a certain node or certain nodes on the data channel are avoided, and the data transmission rate, the data transmission stability and the data transmission reliability are improved. In addition, if the data sent by other available preset nodes are received again, the data sent by other available preset nodes are ignored, so that repeated processing of the data is avoided, the data transmission efficiency is improved, the data processing burden of the equipment is reduced, and the processing resources are saved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart of a data transmission method according to an embodiment of the present invention;
fig. 2 is a flowchart of a data transmission method according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a data transmission system according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention provides a data transmission method, which is used for remote data transmission and the like realized by a Virtual Private Network (VPN) technology, wherein in the remote data transmission process, data transfer needs to be realized by a preset intermediate node, wherein the data transmission realized by the VPN technology comprises the following steps: the transmission of control instructions, the transmission of configuration parameters, the transmission of logs and the like; the method in the embodiment of the present invention may also be used in a scenario of transmitting other data, and the specific application scenario is not limited in the embodiment of the present invention.
It is to be noted that, before data Transmission, a TCP (Transmission Control Protocol) connection is established by the data sender and the data receiver through respective Control units, where the TCP connection is established in a manner that the data sender and the data receiver are connected to the same TCP server through respective Control units, and the data sender and the data receiver are connected to the same server group including a plurality of TCP servers through respective Control units, and besides, the specific connection manner is not limited in the embodiments of the present invention; the control unit may be a virtual network card.
An embodiment of the present invention provides a data transmission method, which is shown in fig. 1 and includes:
101. and the data sender determines all transmission paths between the data sender and the data receiver according to the information of the data sender and the data receiver.
Specifically, the data sender determines all transmission paths according to all available preset nodes between the data sender and the data receiver, which are detected in real time.
102. The data sending party obtains a plurality of transmission paths meeting preset conditions from all the transmission paths.
Specifically, a data sending party obtains network parameters of all transmission paths; and
the data sending party selects a plurality of transmission paths of which the network parameters are less than or equal to a preset value from all the transmission paths;
the network parameter includes at least one of a packet loss rate, a round trip time RTT, and jitter of the link.
103. The data transmitting side transmits data to the data receiving side through a plurality of transmission paths.
Specifically, a data sender sets identification information of data, wherein the identification information corresponds to the data and is used for distinguishing the data from other data; and
and the data sender sends the data and the identification information to the data receiver through a plurality of transmission paths.
104. And the data receiving party receives data from any transmission path meeting the preset conditions.
105. The data receiving side judges whether the data is received for the first time.
Specifically, the data receiver judges whether the data is received for the first time according to the identification information.
106. And if the data receiving party judges that the data is received for the first time, ignoring or discarding the data from other transmission paths.
The embodiment of the invention provides a data transmission method, which is characterized in that a plurality of transmission paths meeting preset conditions are obtained from all transmission paths, so that data transmission is realized through the plurality of transmission paths before data transmission. In addition, if the data sent by other available preset nodes are received again, the data sent by other available preset nodes are ignored, so that repeated processing of the data is avoided, the data transmission efficiency is improved, the data processing burden of the equipment is reduced, and the processing resources are saved.
The second embodiment is a data transmission method provided by the embodiment of the present invention, and as shown in fig. 2, the method includes:
201. and the data sender determines all transmission paths between the data sender and the data receiver according to the information of the data sender and the data receiver.
Specifically, the data sender determines all transmission paths according to all available preset nodes between the data sender and the data receiver detected in real time, where the information of the data sender and the data receiver may be an IP address of the data sender, an IP address of the data receiver, or routing information of the data receiver, and the process may be:
because the data is transmitted by taking the data packet as a unit, all available preset nodes between the data sender and the data receiver are detected before each data packet is transmitted, so that all available preset nodes between the data sender and the data receiver are detected in real time.
The process of acquiring all available preset nodes may be as follows:
determining all preset nodes between the data sender and the data receiver according to the information of the data sender and the data receiver;
respectively sending test data to all the preset nodes, and monitoring the Packet Loss Rate (Packet Loss Rate) and the transmission delay of a link between a data sender and each preset node according to the test data;
acquiring preset nodes meeting the following conditions from all the preset nodes as available preset nodes:
the transmission delay is less than or equal to a first preset threshold; or,
the packet loss rate is less than or equal to a second preset threshold.
For example, it is assumed that all available preset nodes between the data sender and the data receiver are detected as F1 and F2 before a certain data packet is sent;
all available preset node changes between the data sender and the data receiver are detected as F1, F2, and F3 before sending the next packet of the packet.
And determining all transmission paths according to all available preset nodes between the data sender and the data receiver detected in real time.
Specifically, a transmission path between the data sender and the data receiver is determined according to the information of all available preset nodes monitored in real time and the information of the data sender and the data receiver.
The information of the preset node may be an IP address of the preset node or routing information of the preset node.
For example, assuming that the data sender is P1 and the data receiver is P2, before sending a certain data packet, all available preset nodes between the data sender and the data receiver are detected as F1 and F2, and all transmission paths between the data sender and the data receiver may be: P1-F1-F2-P2, P1-F1-P2 and P1-F2-P2.
By detecting all available preset nodes between the data sender and the data receiver in real time, the dynamic update of the available preset nodes is realized, so that when a new available preset node appears between the data sender and the data receiver, the data can be transmitted in time through the new node, and the data transmission rate, the data transmission stability and the data transmission reliability are improved.
202. And the data sending party acquires the network parameters of all the transmission paths.
The network parameter includes at least one of a packet loss rate, a round trip time RTT, and jitter of the link.
The process may be obtained by sending test data to all the transmission paths, or may be obtained by other methods.
203. And the data sending party selects a plurality of transmission paths of which the network parameters are less than or equal to a preset value from all the transmission paths.
Specifically, the network parameter is judged to be less than or equal to the preset value by executing at least one of the following operations:
the packet loss rate is less than or equal to a first preset value; or,
the RTT is less than or equal to a second preset value; or,
and the jitter is less than or equal to a third preset value.
In practical applications, the judgment of whether the network parameter is less than or equal to the preset value may be performed through any one of the above operations, or may be performed by combining any two or three of the above operations, so as to further improve the accuracy of the judgment process of whether the network parameter is less than or equal to the preset value.
It should be noted that steps 202 to 203 are processes for acquiring, by the data sender, a plurality of transmission paths satisfying a preset condition from all transmission paths, and besides the manners described in the steps, the processes may be implemented in other manners, and a specific manner is not limited in the embodiment of the present invention.
Because the network parameters of the transmission paths describe the states of the transmission paths, a plurality of transmission paths meeting the preset conditions are obtained from all the transmission paths, the states of the transmission paths are ensured to meet the requirements of data transmission, and the data transmission rate, the data transmission stability and the data transmission reliability are improved.
204. And the data sender sets identification information of the data, wherein the identification information corresponds to the data and is used for distinguishing the data from other data.
And setting identification information corresponding to each data packet of the data, wherein the identification information is used for uniquely indicating the data packet.
By setting the identification information of the data, the repeated processing of the data in the data receiving process is avoided, the data transmission efficiency is improved, the data processing burden of the equipment is reduced, and the processing resources are saved.
205. And the data sender sends the data and the identification information to the data receiver through a plurality of transmission paths.
And respectively sending the data packets containing the data and the identification information to the plurality of transmission paths, so that the plurality of transmission paths send the data packets of the data to a data receiving party.
Illustratively, the sending the data packets containing the data and the identification information to the plurality of transmission paths respectively includes: and respectively sending the data packet containing the data and the identification information and the routing information of the corresponding transmission path to the plurality of transmission paths.
It should be noted that steps 204 to 205 are processes for implementing that the data sending side sends data to the data receiving side through a plurality of transmission paths, and besides the manners described in the steps, the processes may also be implemented in other manners, and the specific manner is not limited in the embodiment of the present invention.
206. And the data receiving party receives data from any transmission path meeting the preset conditions.
Specifically, the data receiver receives data and identification information from any transmission path that meets a preset condition.
207. The data receiving side judges whether the data is received for the first time.
Specifically, the data receiving side determines whether the data is received for the first time according to the identification information, and the process may be,
and judging whether the identification information is the same as the identification information received before, if so, judging that the data is not received for the first time, and if not, judging that the data is received for the first time.
The embodiment of the present invention does not limit the specific determination method.
208. And if the data receiving party judges that the data is received for the first time, ignoring or discarding the data from other transmission paths.
Specifically, the data sent by the other transmission paths meeting the preset condition is deleted.
The embodiment of the invention provides a data transmission method, which is characterized in that a plurality of transmission paths meeting preset conditions are obtained from all transmission paths, so that data transmission is realized through the plurality of transmission paths before data transmission. In addition, if the data sent by other available preset nodes are received again, the data sent by other available preset nodes are ignored, so that repeated processing of the data is avoided, the data transmission efficiency is improved, the data processing burden of the equipment is reduced, and the processing resources are saved. In addition, all available preset nodes between the data sender and the data receiver are detected in real time, so that dynamic updating of the available preset nodes is realized, when new available preset nodes appear between the data sender and the data receiver, data transmission can be realized in time through the new nodes, and the data transmission rate, the data transmission stability and the data transmission reliability are improved. In addition, because the network parameters of the transmission paths describe the states of the transmission paths, a plurality of transmission paths meeting the preset conditions are obtained from all the transmission paths, the states of the transmission paths are ensured to meet the requirements of data transmission, and the data transmission rate, the data transmission stability and the data transmission reliability are improved. In addition, by setting the identification information of the data, the repeated processing of the data in the data receiving process is avoided, the data transmission efficiency is improved, the data processing burden of the equipment is reduced, and the processing resources are saved.
An electronic device provided by the third embodiment of the present invention is shown in fig. 3, and includes:
the first processing module 31 is configured to determine all transmission paths with the data receiver according to the information of the data receiver;
a second processing module 32, configured to obtain multiple transmission paths that meet a preset condition from all the transmission paths;
and a sending module 33, configured to send data to a data receiving side through a plurality of transmission paths.
Optionally, the first processing module 31 is configured to:
and determining all transmission paths according to all available preset nodes between the real-time detection and the data receiver.
Optionally, the second processing module 32 is configured to:
acquiring network parameters of all transmission paths; and
selecting a plurality of transmission paths of which the network parameters are less than or equal to a preset value from all the transmission paths;
the network parameter includes at least one of a packet loss rate, a round trip time RTT, and jitter of the link.
Alternatively to this, the first and second parts may,
the electronic device further comprises a setting module 34, configured to set identification information of the data, where the identification information corresponds to the data and is used to distinguish the data from other data; and
the sending module 33 is further configured to send the data and the identification information to the data receiving side through a plurality of transmission paths.
The embodiment of the invention provides electronic equipment, which can realize data transmission through a plurality of transmission paths by acquiring the transmission paths meeting preset conditions from all the transmission paths, and compared with the prior art that the data transmission is realized by establishing a single data channel, the electronic equipment avoids the phenomena of data transmission delay improvement, packet loss rate increase and the like caused by congestion of a certain node or certain nodes on the data channel, and improves the data transmission rate, the data transmission stability and the data transmission reliability. In addition, if the data sent by other available preset nodes are received again, the data sent by other available preset nodes are ignored, so that repeated processing of the data is avoided, the data transmission efficiency is improved, the data processing burden of the equipment is reduced, and the processing resources are saved.
Fourth embodiment is an electronic device provided by an embodiment of the present invention, and as shown in fig. 4, the electronic device includes a memory 41 and a processor 42 connected to the memory 41, where the memory 41 is configured to store a set of program codes, and the processor 42 calls the program codes stored in the memory 41 to perform the following operations:
determining all transmission paths between the data receiver and the data receiver according to the information of the data receiver;
acquiring a plurality of transmission paths meeting preset conditions from all the transmission paths;
and transmitting the data to a data receiving side through a plurality of transmission paths.
Optionally, the processor 42 calls the program code stored in the memory 41 for performing the following operations:
and determining all transmission paths according to all available preset nodes between the real-time detection and the data receiver.
Optionally, the processor 42 calls the program code stored in the memory 41 for performing the following operations:
acquiring network parameters of all transmission paths; and
selecting a plurality of transmission paths of which the network parameters are less than or equal to a preset value from all the transmission paths;
the network parameter includes at least one of a packet loss rate, a round trip time RTT, and jitter of the link.
Optionally, the processor 42 calls the program code stored in the memory 41 to perform the following operations
Setting identification information of the data, wherein the identification information corresponds to the data and is used for distinguishing the data from other data; and
and sending the data and the identification information to a data receiver through a plurality of transmission paths.
The embodiment of the invention provides electronic equipment, which can realize data transmission through a plurality of transmission paths by acquiring the transmission paths meeting preset conditions from all the transmission paths, and compared with the prior art that the data transmission is realized by establishing a single data channel, the electronic equipment avoids the phenomena of data transmission delay improvement, packet loss rate increase and the like caused by congestion of a certain node or certain nodes on the data channel, and improves the data transmission rate, the data transmission stability and the data transmission reliability. In addition, if the data sent by other available preset nodes are received again, the data sent by other available preset nodes are ignored, so that repeated processing of the data is avoided, the data transmission efficiency is improved, the data processing burden of the equipment is reduced, and the processing resources are saved.
Fifth embodiment is a data transmission system provided in an embodiment of the present invention, and as shown in fig. 5, the system includes a data sending device 51 and a data receiving device 52, where:
the data transmission device 51 includes:
a first processing module 511, configured to determine all transmission paths between the data sending device and the data receiving device according to information of the data sending device and the data receiving device;
a second processing module 512, configured to obtain multiple transmission paths that meet a preset condition from all the transmission paths;
a sending module 513, configured to send data to the data receiving apparatus through a plurality of transmission paths;
the data receiving device 52 includes:
a receiving module 521, configured to receive data from any transmission path that meets a preset condition;
a determining module 522, configured to determine whether the data is received for the first time; and
a data processing module 523, configured to ignore or discard data sent from other transmission paths when the data is determined to be received for the first time.
Optionally, the first processing module 511 is configured to:
and the data sender determines all transmission paths according to all available preset nodes between the data sender and the data receiver detected in real time.
Optionally, the second processing module 512 is specifically configured to:
a data sending party obtains network parameters of all transmission paths; and
the data sending party selects a plurality of transmission paths of which the network parameters are less than or equal to a preset value from all the transmission paths;
the network parameter includes at least one of a packet loss rate, a round trip time RTT, and jitter of the link.
Alternatively to this, the first and second parts may,
the data sending apparatus 51 further includes a setting module 514, configured to set identification information of the data, where the identification information corresponds to the data, and is used to distinguish the data from other data; and
the sending module 513 is further configured to send the data and the identification information to the data receiving apparatus through a plurality of transmission paths.
Optionally, the determining module 522 is specifically configured to:
and judging whether the data is received for the first time or not according to the identification information.
The embodiment of the invention provides a data transmission system, which can realize data transmission through a plurality of transmission paths which meet preset conditions by obtaining the transmission paths from all the transmission paths, and compared with the prior art which realizes data transmission by establishing a single data channel, the data transmission system avoids the phenomena of data transmission delay improvement, packet loss rate increase and the like caused by congestion of a certain node or certain nodes on the data channel, and improves the data transmission rate, the data transmission stability and the data transmission reliability. In addition, if the data sent by other available preset nodes are received again, the data sent by other available preset nodes are ignored, so that repeated processing of the data is avoided, the data transmission efficiency is improved, the data processing burden of the equipment is reduced, and the processing resources are saved.
All the above-mentioned optional technical solutions can be combined arbitrarily to form the optional embodiments of the present invention, and are not described herein again.
It should be noted that: in the electronic device provided in the foregoing embodiment, when executing the data transmission method, only the division of the functional modules is illustrated, and in practical applications, the function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the functions described above. In addition, the data transmission method provided by the above embodiment and the electronic device embodiment belong to the same concept, and specific implementation processes thereof are described in the method embodiment and are not described herein again.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.