CN110611644A - Data transmission method and device - Google Patents

Data transmission method and device Download PDF

Info

Publication number
CN110611644A
CN110611644A CN201810623749.XA CN201810623749A CN110611644A CN 110611644 A CN110611644 A CN 110611644A CN 201810623749 A CN201810623749 A CN 201810623749A CN 110611644 A CN110611644 A CN 110611644A
Authority
CN
China
Prior art keywords
packet
data packet
target
data
original
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810623749.XA
Other languages
Chinese (zh)
Inventor
李云鹏
袁庆宁
尹顺军
王艳辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Visionvera Information Technology Co Ltd
Original Assignee
Visionvera Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Visionvera Information Technology Co Ltd filed Critical Visionvera Information Technology Co Ltd
Priority to CN201810623749.XA priority Critical patent/CN110611644A/en
Publication of CN110611644A publication Critical patent/CN110611644A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/0001Systems modifying transmission characteristics according to link quality, e.g. power backoff
    • H04L1/0006Systems modifying transmission characteristics according to link quality, e.g. power backoff by adapting the transmission format
    • H04L1/0007Systems modifying transmission characteristics according to link quality, e.g. power backoff by adapting the transmission format by modifying the frame length
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/18Automatic repetition systems, e.g. Van Duuren systems
    • H04L1/1829Arrangements specially adapted for the receiver end
    • H04L1/1858Transmission or retransmission of more than one copy of acknowledgement message
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4633Interconnection of networks using encapsulation techniques, e.g. tunneling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets

Abstract

The embodiment of the invention provides a data transmission method and a device, wherein the method is applied to first equipment, the first equipment is provided with a plurality of network cards, and the method comprises the following steps: acquiring an original data packet to be sent; splitting the original data packet into a plurality of target data packets; and calling the plurality of network cards to send the plurality of target data packets to second equipment. When the data volume is large, the data can be transmitted by the multiple network cards simultaneously, the processing capacity is improved to reach the upper limit, and the data transmission delay is reduced.

Description

Data transmission method and device
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a data transmission method and a data transmission device.
Background
A network adapter (NIC), also called a network card or a network interface card, is a hardware device for connecting a device and a network, and realizes data transmission by means of the network card no matter twisted pair connection, coaxial cable connection or optical fiber connection.
The network card has the main working principle of sorting data sent to a network cable on a computer, decomposing the data into data packets with proper sizes and sending the data packets to a network.
In order to meet the requirements of daily office, servers and other products, network cards can be divided into 10M network cards, 10/100M adaptive network cards, gigabit (1000M) network cards and the like according to the transmission speed.
At present, a single network card is mostly adopted in the device, all data are uploaded and downloaded through one network card, and when the network flow is increased, the processing capacity of one network card reaches the upper limit and is limited by the physical bandwidth, so that the data transmission delay is easily caused.
Disclosure of Invention
The embodiment of the invention provides a data transmission method and device, and aims to solve the problem that data transmission delay is easily caused when a single network card transmits data.
According to an aspect of the present invention, there is provided a data transmission method, applied in a first device, where the first device is configured with a plurality of network cards, the method including:
acquiring an original data packet to be sent;
splitting the original data packet into a plurality of target data packets;
and calling the plurality of network cards to send the plurality of target data packets to second equipment.
Optionally, the method further comprises:
identifying a data type and volume of the original data packet;
judging whether the data type is a specified type and whether the volume is larger than a preset threshold value; if yes, executing the step of splitting the original data packet into a plurality of target data packets; if not, calling the network cards to send the original data packet to second equipment.
Optionally, the splitting the original data packet into a plurality of target data packets includes:
extracting feature data and original package information to be transmitted from the original data package;
segmenting the feature data into a plurality of segments of candidate data;
packaging the original packet information and each segment of candidate data into a target data packet respectively;
and generating target packet information for the target data packet, and writing the target packet information into the target data packet.
Optionally, the segmenting the feature data into multiple segments of candidate data includes:
determining the segmentation length;
and segmenting a plurality of candidate data which accord with the segmentation length from the feature data.
Optionally, the invoking the plurality of network cards to send the plurality of target data packets to the second device includes:
for each target data packet, inquiring a plurality of data volumes stored in a plurality of task queues corresponding to a plurality of network cards;
selecting a target network card from the network cards according to the data volumes;
writing the target data packet into a task queue corresponding to the target network card, so that the target network card sends the target data packet to second equipment.
Optionally, the method further comprises:
when a retransmission request sent by the second equipment is received, determining a target data packet to be retransmitted;
and calling the plurality of network cards to send the target data packet to second equipment.
According to another aspect of the present invention, there is provided a data transmission method applied in a second device, the method including:
receiving a data packet sent by a first device calling a plurality of network cards;
inquiring the packet type of the data packet;
when the packet type is a target data packet, collecting a plurality of target data packets belonging to the same original data packet;
when the collection is completed, the target data packets are recombined into the original data packet.
Optionally, the collecting a plurality of target packets belonging to the same original packet includes:
extracting target packet information from the target data packet, wherein the target packet information comprises an original packet identifier and a packet number;
counting the real-time number of the target data packets with the same original packet identifier;
judging whether the real-time quantity is the same as the packet quantity;
if yes, determining that the collection is finished;
if not, determining that the collection fails.
Optionally, the reassembling the plurality of target packets into the original packet includes:
extracting original packet information, a plurality of pieces of target packet information and a plurality of pieces of candidate data from a plurality of target data packets, wherein the target packet information comprises packet serial numbers;
recombining the multiple candidate data into characteristic data according to the packet sequence number;
packaging the characteristic data into an original data packet;
and writing the original packet information into the original data packet.
Optionally, the method further comprises:
when the collection fails, determining a target data packet missing from the original data packet;
generating a retransmission request aiming at the target data packet, and sending the retransmission request to the first equipment;
and receiving a target data packet sent by the first equipment by calling a plurality of network cards aiming at the retransmission request.
Optionally, the determining the missing target data packet in the original data packet includes:
extracting target packet information from the target data packets belonging to the same original data packet, wherein the target packet information comprises packet sequence numbers and packet quantity;
calculating missing packet sequence numbers based on the number of packets and the packet sequence numbers;
and determining that the target data packet corresponding to the missing packet sequence number is the missing target data packet.
Optionally, the method further comprises:
and when the collection fails, discarding a plurality of collected target data packets belonging to the same original data packet.
According to another aspect of the present invention, there is provided an apparatus for transmitting data, where the apparatus is applied to a first device, and the first device is configured with a plurality of network cards, the apparatus includes:
the original data packet acquisition module is used for acquiring an original data packet to be sent;
the original data packet splitting module is used for splitting the original data packet into a plurality of target data packets;
and the target data packet sending module is used for calling the network cards to send the target data packets to the second equipment.
Optionally, the method further comprises:
the packet attribute identification module is used for identifying the data type and volume of the original data packet;
the packet attribute judging module is used for judging whether the data type is a specified type and whether the volume is larger than a preset threshold value; if yes, calling the original data packet splitting module, and if not, calling the original data packet sending module;
and the original data packet sending module is used for calling the network cards to send the original data packets to the second equipment.
Optionally, the original packet splitting module includes:
the original data packet extraction submodule is used for extracting the characteristic data to be transmitted and the original packet information from the original data packet;
the characteristic data segmentation submodule is used for segmenting the characteristic data into a plurality of sections of candidate data;
the target data packet packaging sub-module is used for packaging the original packet information and each segment of candidate data into a target data packet respectively;
and the target packet information processing submodule is used for generating target packet information for the target data packet and writing the target packet information into the target data packet.
Optionally, the feature data segmentation sub-module includes:
a segmentation length determination unit for determining a segmentation length;
and the length segmentation unit is used for segmenting a plurality of candidate data which accord with the segmentation length from the feature data.
Optionally, the original data packet sending module includes:
the data volume query submodule is used for querying a plurality of data volumes stored in a plurality of task queues corresponding to a plurality of network cards aiming at each target data packet;
the target network card selection submodule is used for selecting a target network card from the network cards according to the data volumes;
and the target network card sending submodule is used for writing the target data packet into a task queue corresponding to the target network card so that the target network card sends the target data packet to second equipment.
Optionally, the method further comprises:
a retransmission data packet determining module, configured to determine, when a retransmission request sent by the second device is received, a target data packet to be retransmitted;
and the data packet retransmission module is used for calling the network cards to send the target data packet to the second equipment.
According to another aspect of the present invention, there is provided an apparatus for transmitting data, which is applied to a second device, the apparatus including:
the data packet receiving module is used for receiving data packets sent by the first equipment calling the network cards;
the packet type query module is used for querying the packet type of the data packet;
the target data packet collection module is used for collecting a plurality of target data packets belonging to the same original data packet when the packet type is a target data packet;
and the target data packet recombining module is used for recombining the target data packets into the original data packet when the collection is finished.
Optionally, the target data packet collecting module includes:
the first target data packet extraction submodule is used for extracting target packet information from the target data packet, and the target packet information comprises an original packet identifier and a packet number;
the real-time quantity counting submodule is used for counting the real-time quantity of the target data packets with the same original packet identifier;
the quantity judging submodule is used for judging whether the real-time quantity is the same as the packet quantity or not; if yes, the calling completion determining submodule is called, and if not, the calling failure determining submodule is called;
a completion determination submodule for determining completion of collection;
and the failure determination submodule is used for determining the failure of collection.
Optionally, the target packet reassembly module includes:
a second target data packet extraction submodule, configured to extract original packet information, a plurality of pieces of target packet information, and a plurality of pieces of candidate data from a plurality of target data packets, where the target packet information includes a packet sequence number;
the candidate data recombination submodule is used for recombining a plurality of sections of candidate data into feature data according to the packet sequence number;
the original data packet packaging submodule is used for packaging the characteristic data into an original data packet;
and the original packet information writing submodule is used for writing the original packet information into the original data packet.
Optionally, the method further comprises:
a missing data packet determining module, configured to determine a missing target data packet in the original data packet when the collection fails;
a retransmission request processing module, configured to generate a retransmission request for the target data packet and send the retransmission request to the first device;
and the retransmission data packet receiving module is used for receiving the target data packet sent by the first equipment by calling the network cards according to the retransmission request.
Optionally, the missing data packet determining module includes:
a third target data packet extraction submodule, configured to extract target packet information from the target data packet belonging to the same original data packet, where the target packet information includes a packet sequence number and a packet number;
a packet sequence number calculation submodule for calculating missing packet sequence numbers based on the number of packets and the packet sequence numbers;
and the packet sequence number determining submodule is used for determining that the target data packet corresponding to the missing packet sequence number is the missing target data packet.
Optionally, the method further comprises:
and the target data packet discarding module is used for discarding a plurality of collected target data packets belonging to the same original data packet when the collection fails.
The embodiment of the invention has the following advantages:
in the embodiment of the invention, the first device acquires the original data packet to be sent, divides the original data packet into a plurality of target data packets, calls a plurality of network cards to send the plurality of target data packets to the second device, and can transmit the plurality of target data packets through the plurality of network cards when the data volume is large, so that the processing capacity is improved to reach the upper limit, and the data transmission delay is reduced.
Drawings
Fig. 1 is a flow chart illustrating steps of a method for transmitting data according to an embodiment of the present invention;
FIG. 2 is a flow chart illustrating steps of another method for transmitting data according to an embodiment of the present invention;
fig. 3 is a block diagram of a data transmission apparatus according to an embodiment of the present invention;
fig. 4 is a block diagram of another data transmission apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
Referring to fig. 1, a flowchart illustrating steps of a data transmission method according to an embodiment of the present invention is shown, which may specifically include the following steps:
step 101, obtaining an original data packet to be sent.
In a specific implementation, the embodiment of the present invention may be applied to a first device, for example, a set top box, a server, and the like.
The first device is configured with multiple (i.e., two or more) network cards, such as a 4G wireless network card, and so on.
In the process of communicating with the second device, the first device encapsulates data to be sent into an original data packet according to a communication protocol, and waits for sending to the second device.
In order to make those skilled in the art better understand the embodiments of the present invention, because of the numerous communication protocols, TCP (Transmission Control Protocol) is described as an example of the communication Protocol in this specification.
TCP is a "streaming" protocol, a so-called stream, that is a string of data without bounds.
By applying TCP protocol, the package adds a packet head to a segment of data, so that the data package is divided into two parts of packet head and packet body.
The bag head is a structure body with fixed size, wherein, a variable of a member of the structure body represents the length of the bag body, which is an important variable, and other members of the structure body can be defined according to the requirement.
A complete data packet can be correctly split according to the fixed length of the packet header and the variable containing the length of the packet body in the packet header.
In the embodiment of the present invention, if a protocol such as TCP is applied, the original packet (i.e., TCP packet) may refer to one of the packets in the data stream, which belongs to the packet that can form a complete packet.
In one embodiment of the invention, the data type and volume (size) of the original packet may be identified.
Judging whether the data type is a specified type and the volume is larger than a preset threshold value; if yes, go to step 102; if not, calling a plurality of network cards to send the original data packet to the second equipment.
In the embodiment of the invention, the types of data sent by the first device to the second device are numerous, including video data, audio data, operation instructions/responses and the like, and the types of data such as video data are generally large in size, so that the data can be split and transmitted and set as the specified types.
Meanwhile, the volume of the device is judged, if the volume is larger than a preset threshold value, the device is large in volume, split for transmission and directly transmit.
Step 102, splitting the original data packet into a plurality of target data packets.
The original data packet is split into a plurality of (two or more) target data packets, so that the volume of the data packets is reduced, and the transmission efficiency is improved.
In one embodiment of the present invention, step 102 may include the following sub-steps:
and a substep S11, extracting feature data and original package information to be transmitted from the original data package.
The characteristic data to be transmitted may be transmitted content, typically a Body (Body), such as video data, and the original package information is typically recorded in a Header (Header), such as a serial number (seq), an acknowledgement number (ask), a Header length, a reserved bit, an identifier, and the like.
And a substep S12 of segmenting the feature data into multiple segments of candidate data.
In one example, a cut length (e.g., 512K) is determined, and multiple segments of candidate data conforming to the cut length are cut from the feature data.
In this example, the feature data may be equally length-segmented, and each segmented data is a candidate data.
It should be noted that the segmentation length may be a default value, or may be a dynamically calculated value, for example, the segmentation length is determined according to the current network state, and the better the network signal (for example, the lower the delay, the higher the transmission success rate, and the like), the longer the segmentation length, and the like, which is not limited in this embodiment of the present invention.
And a substep S13, encapsulating the original packet information and each segment of candidate data into a target data packet respectively.
For each segment of candidate data, the segment of candidate data can be re-encapsulated into a target data packet together with the original packet information according to the specification of the transmission protocol.
And a substep S14 of generating destination packet information for the destination packet and writing the destination packet information into the destination packet.
For each newly generated destination packet, destination packet information may be generated and written into the corresponding destination packet, such as into a header.
In a specific implementation, the destination packet information may include an original packet identifier, a packet sequence number, and a packet number.
The original packet identifier may identify an original packet to which the target packet belongs.
The packet sequence number may indicate the ordering of the destination packet among a plurality of destination packets into which the original packet was split.
The number of packets may refer to the number of destination packets into which the original packet was split.
Step 103, calling a plurality of network cards to send a plurality of target data packets to a second device.
The first device splits the original data packet into a plurality of target data packets, and then the plurality of target data packets can be sent to the plurality of network cards, and the plurality of network cards simultaneously send the plurality of target data packets to the second device.
The second device reassembles the plurality of destination packets into an original packet and operates according to the communication protocol.
For example, according to the TCP protocol, the original data packet may be reassembled into a complete data packet, such as a data packet carrying video data.
In one embodiment of the present invention, step 103 may comprise the following sub-steps:
and a substep S21, for each target data packet, querying a plurality of data volumes stored in a plurality of task queues corresponding to a plurality of network cards.
And a substep S22 of selecting a target network card from the plurality of network cards according to the plurality of data volumes.
And a substep S23, writing the target data packet into a task queue corresponding to the target network card, so that the target network card sends the target data packet to a second device.
Each network card can be provided with a corresponding task queue, the target device writes a data packet to be sent into the task queue, and the network card extracts the data packet from the task queue and transmits the data packet.
In the embodiment of the present invention, for each target data packet to be sent, the data amount of the data packet stored in the task queue corresponding to each network card, such as the number of data packets, the volume of the data packet, and the like, may be checked, so as to select an appropriate network card as the target network card, write the target data packet into the task queue corresponding to the target network card, and extract the target data packet from the task queue by the target network card, and send the target data packet to the second device.
In one example, a network card with the smallest data amount may be selected from a plurality of network cards as a target network card, and balancing load may be achieved, for example, the number of data packets is the smallest, the volume of the data packets is the smallest, and the like.
In an embodiment of the present invention, when receiving a retransmission request sent by the second device, determining a target data packet to be retransmitted; and calling the plurality of network cards to send the target data packet to second equipment.
In the embodiment of the present invention, if the network signal is poor, which causes transmission failure of some target data packets, at this time, the second device may calculate the target data packets that belong to the same original data packet and are lost, generate a retransmission request, and send the retransmission request to the first device.
When the first device receives the retransmission request, the first device queries a target data packet to be retransmitted from the retransmission request (which can be characterized by an original packet identifier, a packet sequence number, and the like), so that the target data packet to be retransmitted is rewritten into a task queue of the network card and retransmitted to the second device.
In the embodiment of the invention, the first device acquires the original data packet to be sent, divides the original data packet into a plurality of target data packets, calls a plurality of network cards to send the plurality of target data packets to the second device, and can transmit the plurality of target data packets through the plurality of network cards when the data volume is large, so that the processing capacity is improved to reach the upper limit, and the data transmission delay is reduced.
Referring to fig. 2, a flowchart illustrating steps of another data transmission method according to an embodiment of the present invention is shown, which may specifically include the following steps:
step 201, receiving a data packet sent by a first device calling a plurality of network cards.
In a specific implementation, the embodiment of the present invention may be applied to a second device, for example, a set top box, a server, and the like.
The first device is configured with a plurality of network cards, and when the first device communicates with the second device, the first device sends a data packet to the second device through the network cards.
Step 202, querying the packet type of the data packet.
In the embodiment of the invention, the packet type of the data packet comprises an original data packet and a target data packet.
After receiving the data packet, the second device analyzes the data packet, if the data packet only contains the original packet information, the data packet is the original data packet, and if the data packet contains both the original packet information and the target packet information, the data packet is the target data packet.
Step 203, when the packet type is a target data packet, collecting a plurality of target data packets belonging to the same original data packet.
And if the received data packet is the target data packet, dividing the received data packet into a set belonging to the same original data packet to be recombined into the original data packet.
In one embodiment of the present invention, step 203 may comprise the sub-steps of:
and a substep S31 of extracting destination packet information from the destination packet.
The target packet information includes original packet identification and packet number.
And a substep S32, counting the real-time number of the target data packets having the same original packet id.
A substep S33 of determining whether the real-time number is the same as the packet number; if yes, go to substep S33, otherwise go to substep S34.
And a substep S33 of determining that the collection is complete.
And a sub-step S34 of determining that the collection failed.
In the embodiment of the invention, the target data packets belonging to the same original data packet can be collected by searching the target data packets with the same original packet identifier.
And in a certain time, determining that the collection is finished if the real-time quantity of the collected target data packets is the same as the quantity of the packets generated during the splitting of the original data packets, or else, determining that the collection fails.
And 204, when the collection is completed, recombining the target data packets into the original data packets.
If the collection of the target data packet after splitting of a certain original data packet is finished, the target data packet can be recombined into the original data packet.
In one embodiment of the present invention, step 203 may comprise the sub-steps of:
and a substep S41 of extracting the original packet information, the plurality of destination packet information, and the plurality of pieces of candidate data from the plurality of destination packets.
Wherein the destination packet information includes a packet sequence number.
And a substep S42 of reconstructing the plurality of pieces of candidate data into feature data according to the packet sequence numbers.
And a substep S43 of packaging the feature data into an original data packet.
And a substep S44, writing the original packet information into the original data packet.
In the embodiment of the invention, the candidate data in the target data packet are sorted according to the packet sequence number and are recombined into the characteristic data according to the sorting.
The feature data can be encapsulated into the original data packet together with the original packet information again according to the specification of the transmission protocol.
In addition, for the destination packet information, it is discarded.
In one embodiment of the invention, when the collection fails, the target data packet missing from the original data packet is determined.
And generating a retransmission request aiming at the target data packet, and sending the retransmission request to the first equipment.
And receiving a target data packet sent by the first equipment by calling a plurality of network cards aiming at the retransmission request.
In the embodiment of the present invention, if the network signal is poor, which causes transmission failure of some target data packets, at this time, the second device may calculate the lost target data packets belonging to the same original data packet, generate a retransmission request, and send the retransmission request to the first device, and the first device re-invokes the plurality of network cards to re-send the target data packets to the second device.
Further, the first device extracts target packet information from a target data packet belonging to the same original data packet, where the target packet information includes a packet sequence number and a packet number.
The missing packet sequence number is calculated based on the packet number and the packet sequence number, for example, assuming that the packet number is 5, the packet sequence number starts from 1, and each is incremented by 1, including 1, 3, and 4, and the discarded packet sequence number is 2 and 5.
And determining that the target data packet corresponding to the missing packet sequence number is the missing target data packet.
In another embodiment of the present invention, when the collection fails, a plurality of the collected target packets belonging to the same original packet are discarded.
In the embodiment of the present invention, for data of types such as video data, because the processing of the second device is not greatly affected by frame loss and the like, and the requirement on real-time performance is high, if collecting a target data packet split from a certain original data packet fails, the collected target data packet can be directly discarded, so as to discard the original data packet, reduce the frequency of retransmission, and ensure real-time performance.
In the embodiment of the invention, the second device receives the data packet sent by the first device calling the multiple network cards, inquires the packet type of the data packet, collects multiple target data packets belonging to the same original data packet when the packet type is the target data packet, recombines the multiple target data packets into the original data packet when the collection is completed, and can transmit the data packets through the multiple network cards when the data volume is large, so that the processing capacity is improved to reach the upper limit, and the data transmission delay is reduced.
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the illustrated order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments of the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
Referring to fig. 3, a block diagram of a data transmission apparatus according to an embodiment of the present invention is shown, and is applied to a first device, where the first device is configured with a plurality of network cards, and the apparatus may specifically include the following modules:
an original data packet obtaining module 301, configured to obtain an original data packet to be sent;
an original data packet splitting module 302, configured to split the original data packet into a plurality of target data packets;
a target data packet sending module 303, configured to invoke the multiple network cards to send the multiple target data packets to the second device.
In one embodiment of the present invention, further comprising:
the packet attribute identification module is used for identifying the data type and volume of the original data packet;
the packet attribute judging module is used for judging whether the data type is a specified type and whether the volume is larger than a preset threshold value; if yes, calling the original data packet splitting module, and if not, calling the original data packet sending module;
and the original data packet sending module is used for calling the network cards to send the original data packets to the second equipment.
In an embodiment of the present invention, the original packet splitting module 302 includes:
the original data packet extraction submodule is used for extracting the characteristic data to be transmitted and the original packet information from the original data packet;
the characteristic data segmentation submodule is used for segmenting the characteristic data into a plurality of sections of candidate data;
the target data packet packaging sub-module is used for packaging the original packet information and each segment of candidate data into a target data packet respectively;
and the target packet information processing submodule is used for generating target packet information for the target data packet and writing the target packet information into the target data packet.
In an example of the embodiment of the present invention, the feature data segmentation sub-module includes:
a segmentation length determination unit for determining a segmentation length;
and the length segmentation unit is used for segmenting a plurality of candidate data which accord with the segmentation length from the feature data.
In an embodiment of the present invention, the original data packet sending module 303 includes:
the data volume query submodule is used for querying a plurality of data volumes stored in a plurality of task queues corresponding to a plurality of network cards aiming at each target data packet;
the target network card selection submodule is used for selecting a target network card from the network cards according to the data volumes;
and the target network card sending submodule is used for writing the target data packet into a task queue corresponding to the target network card so that the target network card sends the target data packet to second equipment.
In one embodiment of the present invention, further comprising:
a retransmission data packet determining module, configured to determine, when a retransmission request sent by the second device is received, a target data packet to be retransmitted;
and the data packet retransmission module is used for calling the network cards to send the target data packet to the second equipment.
In the embodiment of the invention, the first device acquires the original data packet to be sent, divides the original data packet into a plurality of target data packets, calls a plurality of network cards to send the plurality of target data packets to the second device, and can transmit the plurality of target data packets through the plurality of network cards when the data volume is large, so that the processing capacity is improved to reach the upper limit, and the data transmission delay is reduced.
Referring to fig. 4, a block diagram of another data transmission apparatus according to an embodiment of the present invention is shown, and when the apparatus is applied to a second device, the apparatus may specifically include the following modules:
a data packet receiving module 401, configured to receive a data packet sent by a first device calling multiple network cards;
a packet type query module 402, configured to query the packet type of the data packet;
a target data packet collecting module 403, configured to collect, when the packet type is a target data packet, a plurality of target data packets belonging to the same original data packet;
and a destination packet reassembly module 404, configured to reassemble the destination packets into the original packet when the collection is completed.
In one embodiment of the present invention, the target packet collecting module 403 includes:
the first target data packet extraction submodule is used for extracting target packet information from the target data packet, and the target packet information comprises an original packet identifier and a packet number;
the real-time quantity counting submodule is used for counting the real-time quantity of the target data packets with the same original packet identifier;
the quantity judging submodule is used for judging whether the real-time quantity is the same as the packet quantity or not; if yes, the calling completion determining submodule is called, and if not, the calling failure determining submodule is called;
a completion determination submodule for determining completion of collection;
and the failure determination submodule is used for determining the failure of collection.
In one embodiment of the present invention, the destination packet reassembly module 404 comprises:
a second target data packet extraction submodule, configured to extract original packet information, a plurality of pieces of target packet information, and a plurality of pieces of candidate data from a plurality of target data packets, where the target packet information includes a packet sequence number;
the candidate data recombination submodule is used for recombining a plurality of sections of candidate data into feature data according to the packet sequence number;
the original data packet packaging submodule is used for packaging the characteristic data into an original data packet;
and the original packet information writing submodule is used for writing the original packet information into the original data packet.
In one embodiment of the present invention, further comprising:
a missing data packet determining module, configured to determine a missing target data packet in the original data packet when the collection fails;
a retransmission request processing module, configured to generate a retransmission request for the target data packet and send the retransmission request to the first device;
and the retransmission data packet receiving module is used for receiving the target data packet sent by the first equipment by calling the network cards according to the retransmission request.
In one embodiment of the present invention, the missing data packet determination module includes:
a third target data packet extraction submodule, configured to extract target packet information from the target data packet belonging to the same original data packet, where the target packet information includes a packet sequence number and a packet number;
a packet sequence number calculation submodule for calculating missing packet sequence numbers based on the number of packets and the packet sequence numbers;
and the packet sequence number determining submodule is used for determining that the target data packet corresponding to the missing packet sequence number is the missing target data packet.
In one embodiment of the present invention, further comprising:
and the target data packet discarding module is used for discarding a plurality of collected target data packets belonging to the same original data packet when the collection fails.
In the embodiment of the invention, the second device receives the data packet sent by the first device calling the multiple network cards, inquires the packet type of the data packet, collects multiple target data packets belonging to the same original data packet when the packet type is the target data packet, recombines the multiple target data packets into the original data packet when the collection is completed, and can transmit the data packets through the multiple network cards when the data volume is large, so that the processing capacity is improved to reach the upper limit, and the data transmission delay is reduced.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
The data transmission method and the data transmission device provided by the present invention are described in detail above, and the principle and the implementation of the present invention are explained in the present document by applying specific examples, and the description of the above examples is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A data transmission method is applied to a first device, wherein the first device is configured with a plurality of network cards, and the method comprises the following steps:
acquiring an original data packet to be sent;
splitting the original data packet into a plurality of target data packets;
and calling the plurality of network cards to send the plurality of target data packets to second equipment.
2. The method of claim 1, further comprising:
identifying a data type and volume of the original data packet;
judging whether the data type is a specified type and whether the volume is larger than a preset threshold value; if yes, executing the step of splitting the original data packet into a plurality of target data packets; if not, calling the network cards to send the original data packet to second equipment.
3. The method according to claim 1 or 2, wherein the splitting the original data packet into a plurality of target data packets comprises:
extracting feature data and original package information to be transmitted from the original data package;
segmenting the feature data into a plurality of segments of candidate data;
packaging the original packet information and each segment of candidate data into a target data packet respectively;
and generating target packet information for the target data packet, and writing the target packet information into the target data packet.
4. The method of claim 3, wherein the segmenting the feature data into multiple segments of candidate data comprises:
determining the segmentation length;
and segmenting a plurality of candidate data which accord with the segmentation length from the feature data.
5. The method according to claim 1 or 2, wherein said invoking the plurality of network cards to send the plurality of target packets to the second device comprises:
for each target data packet, inquiring a plurality of data volumes stored in a plurality of task queues corresponding to a plurality of network cards;
selecting a target network card from the network cards according to the data volumes;
writing the target data packet into a task queue corresponding to the target network card, so that the target network card sends the target data packet to second equipment.
6. The method of claim 1 or 2, further comprising:
when a retransmission request sent by the second equipment is received, determining a target data packet to be retransmitted;
and calling the plurality of network cards to send the target data packet to second equipment.
7. A method for transmitting data, applied to a second device, the method comprising:
receiving a data packet sent by a first device calling a plurality of network cards;
inquiring the packet type of the data packet;
when the packet type is a target data packet, collecting a plurality of target data packets belonging to the same original data packet;
when the collection is completed, the target data packets are recombined into the original data packet.
8. The method of claim 7, wherein collecting a plurality of the destination packets belonging to the same original packet comprises:
extracting target packet information from the target data packet, wherein the target packet information comprises an original packet identifier and a packet number;
counting the real-time number of the target data packets with the same original packet identifier;
judging whether the real-time quantity is the same as the packet quantity;
if yes, determining that the collection is finished;
if not, determining that the collection fails.
9. A data transmission apparatus, applied in a first device, where the first device is configured with a plurality of network cards, the apparatus comprising:
the original data packet acquisition module is used for acquiring an original data packet to be sent;
the original data packet splitting module is used for splitting the original data packet into a plurality of target data packets;
and the target data packet sending module is used for calling the network cards to send the target data packets to the second equipment.
10. An apparatus for transmitting data, the apparatus being used in a second device, the apparatus comprising:
the data packet receiving module is used for receiving data packets sent by the first equipment calling the network cards;
the packet type query module is used for querying the packet type of the data packet;
the target data packet collection module is used for collecting a plurality of target data packets belonging to the same original data packet when the packet type is a target data packet;
and the target data packet recombining module is used for recombining the target data packets into the original data packet when the collection is finished.
CN201810623749.XA 2018-06-15 2018-06-15 Data transmission method and device Pending CN110611644A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810623749.XA CN110611644A (en) 2018-06-15 2018-06-15 Data transmission method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810623749.XA CN110611644A (en) 2018-06-15 2018-06-15 Data transmission method and device

Publications (1)

Publication Number Publication Date
CN110611644A true CN110611644A (en) 2019-12-24

Family

ID=68888601

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810623749.XA Pending CN110611644A (en) 2018-06-15 2018-06-15 Data transmission method and device

Country Status (1)

Country Link
CN (1) CN110611644A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112653691A (en) * 2020-12-18 2021-04-13 脸萌有限公司 Data processing method, device, equipment and storage medium
CN114024914A (en) * 2021-10-27 2022-02-08 杭州海康威视数字技术股份有限公司 Video data transmission method and device and electronic equipment
CN115361347A (en) * 2022-08-18 2022-11-18 山东新华医疗器械股份有限公司 Communication method, device and medium of CT (computed tomography) equipment

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101626384A (en) * 2009-08-05 2010-01-13 腾讯科技(深圳)有限公司 Method and system for transmitting data packet based on TPC protocol
CN101753583A (en) * 2010-01-18 2010-06-23 友达光电股份有限公司 Method for data transmission by using network multi-channel
CN102035751A (en) * 2011-01-20 2011-04-27 大唐移动通信设备有限公司 Data transmission method and equipment
CN103841620A (en) * 2012-11-27 2014-06-04 中国石油天然气股份有限公司 Wireless sensor network communication protocol method of automatic cathodic protection data collection system
CN104022852A (en) * 2014-06-25 2014-09-03 北京奇艺世纪科技有限公司 Document transmission method and device
CN104253811A (en) * 2014-01-07 2014-12-31 深圳市华傲数据技术有限公司 Network packet communication method and system
CN104661172A (en) * 2015-01-26 2015-05-27 武汉健坤科技有限公司 Extended data transmission method and extended data transmission system based on Bluetooth low power consumption
CN104811499A (en) * 2015-05-14 2015-07-29 广东中烟工业有限责任公司 Network file transmission optimization method
CN106302589A (en) * 2015-05-27 2017-01-04 腾讯科技(深圳)有限公司 Document transmission method and terminal
CN107483148A (en) * 2017-07-28 2017-12-15 北京北信源软件股份有限公司 Error treating method and device
CN107623545A (en) * 2016-07-15 2018-01-23 中国人民解放军信息工程大学 Document transmission method and device
CN107888511A (en) * 2016-09-29 2018-04-06 北京视联动力国际信息技术有限公司 A kind of implementation method and device of more adapter load balancings
EP3306861A1 (en) * 2015-09-30 2018-04-11 New H3C Technologies Co., Ltd. Cluster communication

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101626384A (en) * 2009-08-05 2010-01-13 腾讯科技(深圳)有限公司 Method and system for transmitting data packet based on TPC protocol
CN101753583A (en) * 2010-01-18 2010-06-23 友达光电股份有限公司 Method for data transmission by using network multi-channel
CN102035751A (en) * 2011-01-20 2011-04-27 大唐移动通信设备有限公司 Data transmission method and equipment
CN103841620A (en) * 2012-11-27 2014-06-04 中国石油天然气股份有限公司 Wireless sensor network communication protocol method of automatic cathodic protection data collection system
CN104253811A (en) * 2014-01-07 2014-12-31 深圳市华傲数据技术有限公司 Network packet communication method and system
CN104022852A (en) * 2014-06-25 2014-09-03 北京奇艺世纪科技有限公司 Document transmission method and device
CN104661172A (en) * 2015-01-26 2015-05-27 武汉健坤科技有限公司 Extended data transmission method and extended data transmission system based on Bluetooth low power consumption
CN104811499A (en) * 2015-05-14 2015-07-29 广东中烟工业有限责任公司 Network file transmission optimization method
CN106302589A (en) * 2015-05-27 2017-01-04 腾讯科技(深圳)有限公司 Document transmission method and terminal
EP3306861A1 (en) * 2015-09-30 2018-04-11 New H3C Technologies Co., Ltd. Cluster communication
CN107623545A (en) * 2016-07-15 2018-01-23 中国人民解放军信息工程大学 Document transmission method and device
CN107888511A (en) * 2016-09-29 2018-04-06 北京视联动力国际信息技术有限公司 A kind of implementation method and device of more adapter load balancings
CN107483148A (en) * 2017-07-28 2017-12-15 北京北信源软件股份有限公司 Error treating method and device

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112653691A (en) * 2020-12-18 2021-04-13 脸萌有限公司 Data processing method, device, equipment and storage medium
CN112653691B (en) * 2020-12-18 2023-04-18 脸萌有限公司 Data processing method, device, equipment and storage medium
CN114024914A (en) * 2021-10-27 2022-02-08 杭州海康威视数字技术股份有限公司 Video data transmission method and device and electronic equipment
CN114024914B (en) * 2021-10-27 2024-03-01 杭州海康威视数字技术股份有限公司 Video data transmission method and device and electronic equipment
CN115361347A (en) * 2022-08-18 2022-11-18 山东新华医疗器械股份有限公司 Communication method, device and medium of CT (computed tomography) equipment

Similar Documents

Publication Publication Date Title
CN101663867B (en) Compression of data packets while maintaining endpoint-to-endpoint authentication
CN106815112B (en) Massive data monitoring system and method based on deep packet inspection
EP3737016A1 (en) Data transmission method, apparatus and system
CN110611644A (en) Data transmission method and device
CN110312147B (en) Method, system and storage medium for service data transmission
CN111211980B (en) Transmission link management method, transmission link management device, electronic equipment and storage medium
US8345657B2 (en) Method and device of transmitting and parsing data in wireless communication network
CN106612284B (en) Streaming data transmission method and device
CN104967502A (en) Data sending method and apparatus, and data receiving method and apparatus
WO2006052117A1 (en) Apparatus and method for compressing headers in a broadband wireless communication system
CN104270684A (en) Video and audio data network transmission system and method oriented to real-time application
CN102412999A (en) Packet capturing based remote fault location method, system and device
CN109120540B (en) Method for transmitting message, proxy server and computer readable storage medium
US8705524B1 (en) Systems and methods for embedding metadata in data packets
WO2015168840A1 (en) Data processing method and apparatus
CN115037700A (en) Complex network data packet transmission method, system, terminal and storage medium
CN111371887A (en) Internet of things log transmission method, client, server, equipment and storage medium
KR100501080B1 (en) A method and system for distinguishing higher layer protocols of the internet traffic
CN1169327C (en) Method for providing preformance reckon at delay untolerant data service time
CN113364698A (en) Bandwidth estimation method, system, electronic device and storage medium
CN108881306B (en) Encrypted flow analysis defense method based on data packet size sequence
CN112350986B (en) Shaping method and system for audio and video network transmission fragmentation
CN105141476B (en) A kind of acquisition methods and device of TCP message error message
CN109584889A (en) Audio frequency transmission method and device and storage medium
CN104717209A (en) RTP message recognition method and device thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination