CN105245470A - Data transmission method and device - Google Patents

Data transmission method and device Download PDF

Info

Publication number
CN105245470A
CN105245470A CN201510747009.3A CN201510747009A CN105245470A CN 105245470 A CN105245470 A CN 105245470A CN 201510747009 A CN201510747009 A CN 201510747009A CN 105245470 A CN105245470 A CN 105245470A
Authority
CN
China
Prior art keywords
data block
data
sequence number
transmit leg
recipient
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.)
Granted
Application number
CN201510747009.3A
Other languages
Chinese (zh)
Other versions
CN105245470B (en
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.)
Shenzhen Onething Technology Co Ltd
Original Assignee
Shenzhen Onething 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 Shenzhen Onething Technology Co Ltd filed Critical Shenzhen Onething Technology Co Ltd
Priority to CN201510747009.3A priority Critical patent/CN105245470B/en
Publication of CN105245470A publication Critical patent/CN105245470A/en
Application granted granted Critical
Publication of CN105245470B publication Critical patent/CN105245470B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention relates to the field of network communication, and particularly relates to a data transmission method and device. According to the data transmission method provided by the invention, after sending corresponding data blocks in a sending bit map, a sender sends multiple query data packets to query whether a receiver receives all the sent data blocks, and the receiver looks up the sending bit map and sends multiple response data packets to tell the sender whether having received all the data blocks, and if not, which data blocks are not received. After receiving the response data packets, the sender sends the data blocks not received by the receiver. The method provided by the invention is used for avoiding the condition that a large number of confirmation messages are sent in an asymmetric channel in a TCP data transmission process, such that an uplink network of a user is congested and the bandwidth of a downlink network is not fully used.

Description

A kind of data transmission method and device
Technical field
The present invention relates to field of network communication, particularly relate to a kind of data transmission method and device.
Background technology
For nonsymmetric channel, the upstream bandwidth of user is much smaller than the downlink bandwidth of user.Situation about such as downloading, when user downloads, the speed of download is much larger than the speed uploaded.When using Transmission Control Protocol to download, user just sends confirmation message to server, so just has a lot of confirmation messages after receiving every two message segments downloaded.When weak net, will occur after confirmation message is many that uplink network is congested causes confirmation message packet loss.When confirmation message packet loss, up bandwidth there occurs network congestion, and descending bandwidth may not be fully utilized, and if downlink bandwidth is 6M, only used 4M when there is packet loss, 2M is not utilized in addition.In addition, after a lot of confirmation message is lost, user also needs again to send confirmation message, wastes bandwidth.
Summary of the invention
In order to solve the problem of waste bandwidth in above-mentioned nonsymmetric channel data transmission procedure, the present invention proposes a kind of data transmission method and device.
The invention provides a kind of data transmission method, said method comprising the steps of:
Transmit leg is divided into one or more data block the data that will send, and carries out to each data block the sequence number that sequence number label table shows data block, arranges the first transmission status indicator for representing that data block is in the state of transmission to each data block;
Transmit leg is set up and is sent bitmap table, and transmission bitmap table comprises sequence number identifies, each data block described is corresponding first of each data block described and sends status indicator;
Each data block corresponding in described transmission bitmap table sends and preserves by transmit leg, and the first transmission status indicator changing each data block corresponding is the second transmission status indicator, for representing that this data block sends;
Transmit leg judges whether described data block all sends;
If described data block all sends, transmit leg sends each data block whether inquiry packet inquiry recipient receives transmission;
Transmit leg receives the reply data bag sent by recipient, and described reply data bag tells that transmit leg needs the information of the data block sent, and the information of described data block at least comprises the fast sequence number mark of data;
The information of the data block sent as required judges whether the data block needing to send;
If do not need the data block sent, transmit leg deletes the data block of preserving.
Preferably, the information of the data block sent as required judges, the data block sent if necessary, then transmit leg sends the data block of the needs transmission represented in reply data bag.
Preferably, described method also comprises the steps:
Recipient sets up received bit chart, and received bit chart comprises the sequence number of sequence number mark for representing data block of each data block, and the first accepting state mark corresponding to each data block is for representing that data block is in non-accepting state;
Recipient receives the data block that transmit leg sends, and the first accepting state changing respective data blocks is designated the second accepting state mark, for representing that this data block receives;
Recipient judges whether to receive inquiry packet;
If recipient receives inquiry packet, judge the data block whether having maintenance first accepting state to identify in received bit chart;
If do not have the data block that maintenance first accepting state identifies, then recipient sends reply data bag, and described reply data handbag is drawn together and represented that recipient all receives the information of data block.
Preferably, if there is the data block that maintenance first accepting state identifies in received bit chart, then recipient sends reply data bag to transmit leg, and the sequence number mark of the data block of maintenance first accepting state mark drawn together by described reply data handbag.
Preferably, described inquiry packet and described reply data bag send many parts simultaneously.
Present invention also offers a kind of data transmission device, described device comprises transmit leg, described transmit leg comprises: deblocking module, for the data that will send being divided into one or more data block, and the sequence number that sequence number label table shows data block is carried out to each data block, the first transmission status indicator is arranged for representing that data block is in the state of transmission to each data block;
Sending bitmap table module, for setting up transmission bitmap table, sending the first transmission status indicator that sequence number identifies, each data block described is corresponding that bitmap table comprises each data block described;
Data send preserves module, and for each data block corresponding in described transmission bitmap table is sent and preserved, and the first transmission status indicator changing each data block corresponding is the second transmission status indicator, for representing that this data block sends;
First judge module, for judging whether described data block all sends;
Inquiry module, if all sent for described data block, transmit leg sends each data block whether inquiry packet inquiry recipient receives transmission;
Receiver module, for receiving the reply data bag sent by recipient, transmit leg told by described reply data bag, needs the information of the data block sent, and the information of described data block at least comprises the fast sequence number mark of data;
Second judge module, the information for the data block sent as required judges whether the data block needing to send;
Data removing module, if for not needing the data block sent, transmit leg deletes the data block of preserving.
Preferably, described data send preserves module, and also judge the data block sent if necessary for the information of the data block sent as required, then transmit leg sends the data block of the needs transmission represented in reply data bag.
Preferably, described device comprises recipient, and described recipient comprises:
Received bit chart module, for setting up received bit chart, received bit chart comprises the sequence number of sequence number mark for representing data block of each data block, and the first accepting state mark corresponding to each data block is for representing that data block is in non-accepting state;
Data reception module, for receiving the data block that transmit leg sends, and the first accepting state changing respective data blocks is designated the second accepting state mark, for representing that this data block receives;
First judge module, receives inquiry packet for judging whether;
Second judge module, if receive inquiry packet for recipient, judges the data block whether having maintenance first accepting state to identify in received bit chart;
Data transmission blocks, if the data block also for not having maintenance first accepting state to identify in received bit chart, then recipient sends reply data bag, and described reply data handbag is drawn together and represented that recipient all receives the information of data block.
Preferably, if receive the data block having maintenance first accepting state to identify in bitmap table, then recipient sends reply data bag to transmit leg, and the sequence number mark of the data block of maintenance first accepting state mark drawn together by described reply data handbag.
Preferably, described inquiry packet and described reply data bag send many parts simultaneously.
The present invention by above method and apparatus, avoids uplink network in nonsymmetric channel and congested and downlink network bandwidth does not also make full use of situation occurs.Especially when user is from server download data, by data transmission scheme of the present invention, user only needs to send a small amount of reply data bag to server after the inquiry packet receiving server transmission, takes full advantage of downlink network bandwidth, improves the utilance of network.
Accompanying drawing explanation
In order to the technical scheme in the clearer explanation embodiment of the present invention, below the accompanying drawing used required in describing embodiment is briefly described, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is a kind of transmission flow figure of data transmission method transmit leg.
Fig. 2 is the reception flow chart of a kind of data transmission method recipient.
Fig. 3 is the state diagram sending bitmap table and received bit chart in data transmission procedure.
Fig. 4 is the functional block diagram of transmit leg dispensing device.
Fig. 5 is the functional block diagram of recipient's receiving system.
Embodiment
For making the object, technical solutions and advantages of the present invention clearly, below in conjunction with accompanying drawing, the specific embodiment of the present invention is described in further detail.
Fig. 1 is a kind of transmission flow figure of data transmission method transmit leg.Said method comprising the steps of:
Step S11, transmit leg is divided into one or more data block the data that will send, and each data block is carried out to the sequence number of this data block of sequence number mark expression, the first transmission status indicator corresponding to each data block is set for representing that this data block is in the state of transmission.
When the data that will send are very little be not enough to be divided into polylith or when the data that will send be divided into polylith waste the network bandwidth on the contrary time, then the data that will send are sent as a data block; When the data that will send are larger, the data that will send are divided into multiple data block.If when one time piecemeal can not send completely needing the data sent, then carry out piecemeal repeatedly.Data block is carried out sequence number mark and represents the sequence number of this data block, comprise and carry out sequence number mark according to Arabic data, use letter to carry out sequence number mark etc., so that better distinguish each data block.The data sent once are needed to use continuous print sequence number mark.Arranging transmission status indicator corresponding to each data block is the first transmission status indicator, for representing that this data block is in the state of transmission.The transmission status indicator of transmit leg comprises and does not send, sends, and first sends status indicator for not send, and the second transmission status indicator is for send.Can the status indicator that do not send of setting data block be 1, the status indicator sent be 0; Also can the status indicator that do not send of setting data block be yes, the status indicator sent be no etc.In the present embodiment, the first transmission status indicator arranging each data block corresponding is 1, represents and does not send.
Step S12, transmit leg is set up and is sent bitmap table, sends the first transmission status indicator that sequence number identifies, each data block is corresponding that bitmap table comprises each data block.Send bitmap table and comprise two fields, first character section is the sequence number mark of data block, and second field is transmission status indicator corresponding to data block.In the present embodiment, the sequence number mark Arabic numerals of data block identify, data block corresponding first send status indicator be 1.
Step S13, transmit leg sends sending each data block corresponding in bitmap table and preserves, and the first transmission status indicator changing each data block corresponding is the second transmission status indicator, for representing that this data block sends.Transmit leg sends sending each data block corresponding in bitmap table, and preserves each data block sent, and changes the transmission status indicator of the data block that each have sent.The status indicator of the data block that have sent is sent status indicator from first do not send and change to the second transmission status indicator and send.In the present embodiment, the transmission status indicator of the data block of transmission is changed to 0 from 1.
Step S14, transmit leg judges whether described data block all sends.Transmit leg judges whether send each data block corresponding in bitmap table all sends.In the present embodiment, when the status indicator of data block changes to 0 from 1, represent that corresponding data block sends; When the transmission status indicator of data block is 1 always, represent that corresponding data block does not send.
Step S15, transmit leg sends each data block whether many parts of inquiry packet inquiry recipients receive transmission.
Inquiry packet is critical packet, and critical packet also comprises the packet of the non-data class such as packet, the packet of negotiation, the packet of release connection that transmit leg and recipient connect.Critical packet sends many parts simultaneously, as 3 parts or 5 parts etc., avoid the generation of packet drop, when there is packet loss to guarantee that critical packet can allow recipient receive, after recipient receives many parts of same critical packet, only retain portion, other are lost.Transmit leg arranges a timer after sending inquiry packet, and when timer arrives predetermined time, after recipient does not still respond, transmit leg thinks that recipient does not receive inquiry packet, and now sending direction recipient sends many parts of inquiry packets again.
Step S16, transmit leg receives the reply data bag sent by recipient, and transmit leg told by described reply data bag, needs the information of the data block sent.After recipient receives the inquiry packet of transmit leg transmission, send reply data bag to transmit leg.Reply data bag is critical packet, sends many parts simultaneously, as 3 parts or 5 parts etc.Transmit leg told by reply data bag, needs the information of the data block sent.Need the information of the data block sent can be showed by the sequence number mark that data block is corresponding.
Step S17, the information of the data block sent as required judges whether the data block needing to send.If had, perform step S18; If not, step S19 is performed.
Need the information of the data block sent can be showed by the sequence number mark that data block is corresponding.Suppose that the sequence number mark sending data block corresponding in bitmap table is 12 to the maximum.If show the sequence number of data block that needs send in reply data bag to be designated 5, then represent the data block that recipient does not also receive transmit leg completely and sends, also need transmit leg to send sequence number to be designated the data block of 5; Corresponding, if the sequence number showing the data block that needs send in reply data bag is designated the sequence number mark sending data block maximum in bitmap table add 1 again, namely 13, then represent that recipient all have received the data block of transmit leg transmission, recipient's next one wants that the sequence number of the packet received is designated the data of the Next Sequence mark sending maximum sequence number mark in bitmap table.In the present embodiment, the method is used.Also can be if show the sequence number of data block that needs send in reply data bag to be designated 5, then represent the data block that recipient does not also receive transmit leg completely and sends, need transmit leg to send sequence number to be designated the data block of 6; Corresponding, if the sequence number showing the data block that needs send in reply data bag is the sequence number mark sending data block maximum in bitmap table, then represent that recipient all have received the data block of transmit leg transmission, recipient's next one wants that the sequence number of the packet received is designated the data of the Next Sequence mark sending maximum sequence number mark in bitmap table.Need the information of the data block sent can be represented by the sequence number mark that data block is corresponding, additive method also can be used to represent.
Step S18, transmit leg sends the data block of the needs transmission represented in reply data bag.
The sequence number mark of the data block that transmit leg sends according to the needs represented in reply data bag resends corresponding data block, and preserves the data block of the correspondence sent.Judged before preservation, if there has been the data block of the correspondence of preservation, no longer preserve.Then step S15 is performed after being sent.
Step S19, transmit leg deletes the data block of preserving.If show the data block sending correspondence in bitmap table in reply data bag all to receive received side, so delete the data block of the correspondence of preservation when sending.
Fig. 2 is the reception flow chart of a kind of data transmission method recipient.Comprise the following steps:
Step S21, recipient sets up received bit chart, and received bit chart comprises the sequence number mark of each data block, the first accepting state mark that each data block is corresponding.
Recipient sets up received bit chart, and received bit chart comprises two fields, and first character section is the sequence number mark of data block, and second field is accepting state mark corresponding to data block.In the present embodiment, the size of received bit chart is identical with the size sending bitmap table; The sequence number mark of each data block of received bit chart identifies the same with the sequence number of each data block sent in bitmap table.To each data block carry out sequence number mark comprise according to Arabic data carry out sequence number mark, use letter carry out sequence number mark etc.The accepting state mark that each data block is corresponding is set.The accepting state mark of recipient comprises and does not receive, receives, and the first accepting state is designated and does not receive, and the second accepting state is designated and receives.The accepting state that do not receive of setting data block can be designated 0, the accepting state received is designated 1; Also the accepting state that do not receive of setting data block can be designated yes, the accepting state received is designated no etc.In the present embodiment, the first accepting state arranging each data block of recipient corresponding is designated 0, represents and does not receive.
Step S22, recipient receives the data block that transmit leg sends, and the first accepting state changing respective data blocks is designated the second accepting state mark, for representing that this data block receives.Recipient receives the data block that transmit leg sends, and changes the accepting state mark of the data block that each have received.By the accepting state of the data block that have received mark from first accepting state mark do not receive change to second accepting state mark receive.In the present embodiment, the accepting state of the data block of reception mark is changed to 1 from 0, represents and received corresponding data block.
Step S23, recipient judges whether to receive inquiry packet.Recipient judges whether the inquiry packet receiving transmit leg transmission.If recipient receives many parts of same inquiry packets, then only retain first part, lose the same inquiry packet received below.
Step S24, judges the data block whether having maintenance first accepting state to identify in received bit chart.If had, then perform S25; If no, then perform step S26.If there is the data block that maintenance first accepting state identifies in received bit chart, then represent that recipient does not receive the data block of transmit leg transmission completely, may packet loss be produced due to the reason of network or occur other situations.If there is no the data block that maintenance first accepting state identifies in received bit chart, then represent that the accepting state mark of data block corresponding in received bit chart all have changed, never receive to change to and receive, the data block reception side that transmit leg sends all have received.
Step S25, recipient sends many parts of reply data bags to transmit leg, and the sequence number mark of the data block of maintenance first accepting state mark drawn together by described reply data handbag.
If there is the data block that maintenance first accepting state identifies in received bit chart, then represent that recipient does not also receive the data block corresponding to maintenance first accepting state mark, then write the sequence number mark representing that these keep the data block of the first accepting state mark at reply data bag exactly, know when receiving reply data bag to make transmit leg and also need to send which data block.Reply data bag is critical packet, and critical packet also comprises the packet of the non-data class such as packet, the packet of negotiation, the packet of release connection that transmit leg and recipient connect.Critical packet sends many parts simultaneously, as 3 parts or 5 parts etc., avoid the generation of packet drop, when the bad generation packet loss of network condition to guarantee that critical packet can allow the other side receive, after the other side receives many parts of same critical packet, only retain portion, other are lost.
Step S26, recipient sends many parts of reply data bags, and described reply data handbag is drawn together and represented that recipient all receives the information of data block.
Can represent that recipient all receives the information of data block by the sequence number mark of data block.Suppose that the sequence number mark of data block in received bit chart is 12 to the maximum.If there is no the data block that maintenance first accepting state identifies in received bit chart, the sequence number so showing the data block that needs send in reply data bag is designated 13, represent that recipient all have received the data block of transmit leg transmission, recipient's next one wants that the sequence number of the packet received is designated the data of the Next Sequence mark sending maximum sequence number mark in bitmap table.In the present embodiment, the method is used.Also can be that the sequence number showing the data block that needs send in reply data bag is designated 12, then represent that recipient all have received the data block of transmit leg transmission, recipient's next one wants that the sequence number of the packet received is designated the data of the Next Sequence mark sending maximum sequence number mark in bitmap table.Need the information of the data block sent can be represented by the sequence number mark that data block is corresponding, also can use additive method to represent.Reply data bag is critical packet, and critical packet sends many parts simultaneously, as 3 parts or 5 parts etc., avoids the generation of packet drop, and after the other side receives many parts of same critical packet, only retain portion, other are lost.
Fig. 3 is the state diagram sending bitmap table and received bit chart in data transmission procedure.In Fig. 3, a, c, e, g are the transmission bitmap table of transmit leg, and b, d, f, h are the received bit chart of recipient.Send in bitmap table and received bit chart and divided polylith, each block 31 correspondence represents a data block.In each block 31, the sequence number of the data representation data block of a line identifies 32 above, the data representation send/receive status mark 33 below in each block inside bracket.In the present embodiment, send bitmap table identical with the size of received bit chart, the sequence number mark of corresponding data block is the same.The sequence number mark 32 of data block, from 1, carries out label in order with Arabic numerals.The data mode mark 33 of data block represents with 1 and 0.Send transmission status indicator 33 corresponding in bitmap table to comprise the first transmission status indicator and do not send, second send status indicator and send, do not send and represent with 1, sent and represented with 0; Accepting state mark 33 corresponding in received bit chart comprises that the first accepting state mark does not receive, the second accepting state mark receives, has received and has represented with 1, do not received and represent with 0.
Fig. 3-a is the state of the transmission bitmap table before transmit leg does not send data.The sequence number of data block is designated 1 ~ 12, and transmission status indicator corresponding to data block is all 1, represents that the data block of the sequence number mark of data block from 1 to 12 does not all send.
Fig. 3-b is the state of the received bit chart before recipient does not receive data.The sequence number of data block is designated 1 ~ 12, data block corresponding accepting state mark be all 0, represent data block sequence number mark from 1 to 12 data block all do not receive.
Fig. 3-c is the state of the transmit leg transmission bitmap table of transmitting portion data block.The transmission status indicator that the sequence number of data block is designated 1 ~ 3 correspondence changes to 0 from 1, represents that the data block that the sequence number of data block is designated 1 ~ 3 correspondence sends; The transmission status indicator that the sequence number of data block is designated 4 ~ 12 correspondences is still 1, represents that the data block that the sequence number of data block is designated 4 ~ 12 correspondences does not all send.
Fig. 3-d is the state of recipient's received bit chart of receiving unit data block.The accepting state mark that the sequence number of data block is designated 1 ~ 3 correspondence changes to 1 from 0, represents that the data block that the sequence number of data block is designated 1 ~ 3 correspondence receives; The accepting state mark of sequence number mark 4 ~ 12 correspondences of data block is still 0, represents that the data block that the sequence number of data block is designated 4 ~ 12 correspondences does not also receive.
Fig. 3-e is the state that transmit leg has sent the transmission bitmap table of all data blocks.The transmission status indicator that the sequence number of data block is designated 1 ~ 12 correspondence changes to 0 from 1, represents that the data block that the sequence number of data block is designated 1 ~ 12 correspondence sends all.
Fig. 3-f is that recipient all sends and the state of the received bit chart that recipient has partial data block not receive in transmit leg data block.The accepting state mark that the sequence number of data block is designated 1 ~ 3,5,7 ~ 12 correspondences changes to 1 from 0, represents that the data block that the sequence number of data block is designated 1 ~ 3,5,7 ~ 12 correspondences receives; The accepting state mark that the sequence number of data block is designated 4 and 6 correspondences is still 0, represents that the data block that the sequence number of data block is designated 4 and 6 correspondences does not also receive.
Transmit leg sends after all data blocks can send many parts of inquiry packets to recipient, and whether inquiry recipient exists the data block do not received, and sequence number corresponding to the data block do not received is designated how many.Send many parts and inquire that packets are the generations in order to avoid packet drop.
Although inquiry Packet Generation many parts, can still likely there is the situation of many parts of inquiry packets all packet loss, now recipient one inquiry packet does not also receive.Also likely many parts of inquiry packets all receive received side, but the many parts of reply data bag generation packet losses that recipient sends, and transmit leg reply data bag does not all receive.Therefore transmit leg can arrange a timer after sending inquiry packet, when timer is to predetermined time, also do not receive any response of recipient, transmit leg thinks that recipient does not receive inquiry packet, and now sending direction recipient sends many parts of inquiry packets again.
Recipient only may can receive a inquiry packet.Recipient may receive many parts of identical inquiry packets, after receiving many parts of identical inquiry packets, only retains portion, abandoning of other.
After recipient receives inquiry packet, check received bit chart, see if there is maintenance first accepting state mark, namely accepting state is designated the sequence number mark of the data block of the correspondence of 0, if had, the sequence number of the data block of correspondence mark is placed in reply data bag, sends to transmit leg.As the sequence number of data block mark 4 and 6 is placed in reply data bag.
After transmit leg receives reply data bag, look into the sequence number mark seeing if there is the data block that recipient does not receive, the data block reception side that the sequence number as viewed data block is designated 4 and 6 does not receive.Then the data that fast for data sequence number is designated 4 and 6 send to recipient by transmit leg again.Until recipient all have received corresponding data block.
Fig. 3-g is the state that transmit leg has sent the transmission bitmap table of all data blocks.The transmission status indicator that the sequence number of data block is designated 1 ~ 12 correspondence all changes to 0 from 1, represents that the data block that the sequence number of data block is designated 1 ~ 12 correspondence all sends.
Fig. 3-h is the state that recipient all receives the received bit chart of data block.The accepting state mark that the sequence number of data block is designated 1 ~ 12 correspondence all changes to 1 from 0, represents that the data block that the sequence number of data block is designated 1 ~ 12 correspondence all receives.
As can be seen from above scheme, when transmit leg sends sending after data block corresponding in bitmap table all sends the data block whether many parts of inquiry packet inquiry recipients receive all transmissions again, by checking received bit chart and sending many parts of reply data bags, recipient tells whether transmit leg all have received data block, if no, which data block does not receive.The data block that after transmit leg receives reply data bag, transmission and reception side does not receive.The present invention avoids in nonsymmetric channel uplink network by above method and congested and downlink network bandwidth does not also make full use of situation occurs.Especially when user is from server download data, by data transmission method of the present invention, user only needs to send a small amount of reply data bag to server after the inquiry packet receiving server transmission, takes full advantage of downlink network bandwidth, improves the utilance of network.
Fig. 4 is the functional block diagram of transmit leg dispensing device.Dispensing device 40 comprises deblocking module 41, transmission bitmap table module 42, data transmission preservation module 43, first judge module 44, inquiry module 45, data reception module 46, second judge module 47, data removing module 48.
Deblocking module 41, for the data that will send being divided into one or more data block, and each data block being carried out to the sequence number of this data block of sequence number mark expression, the first transmission status indicator arranging each data block corresponding is in as transmission state for illustration of this data block.
When the data that will send are very little be not enough to be divided into polylith or when the data that will send be divided into polylith waste the network bandwidth on the contrary time, then the data that will send are sent as a data block; When the data that will send are larger, the data that will send are divided into multiple data block.If when one time piecemeal can not send completely needing the data sent, then carry out piecemeal repeatedly.Data block is carried out sequence number mark, comprises and carry out sequence number mark according to Arabic data, use letter to carry out sequence number mark etc., so that better distinguish each data block.The data sent once are needed to use continuous print sequence number mark.Arranging transmission status indicator corresponding to each data block is the first transmission status indicator, for representing that this data block is in the state of transmission.The transmission status indicator of transmit leg comprises and does not send, sends, and first sends status indicator for not send, and the first transmission status indicator is for send.Can the status indicator that do not send of setting data block be 1, the status indicator sent be 0; Also can the status indicator that do not send of setting data block be yes, the status indicator sent be no etc.In the present embodiment, the first transmission status indicator arranging each data block corresponding is 1, represents and does not send.
Sending bitmap table module 42, for setting up transmission bitmap table, sending the first transmission status indicator that sequence number identifies, each data block is corresponding that bitmap table comprises each data block.Send bitmap table and comprise two fields, first character section is the sequence number mark of data block, and second field is transmission status indicator corresponding to data block.In the present embodiment, the sequence number mark Arabic numerals of data block identify, data block corresponding first send status indicator be 1.
Data send preserves module 43, and for sending sending each data block corresponding in bitmap table and preserve, and the first transmission status indicator changing each data block corresponding is the second transmission status indicator, for representing that this data block sends.Transmit leg sends sending each data block corresponding in bitmap table, and preserves each data block sent, and changes the transmission status indicator of the data block that each have sent.The status indicator of the data block that have sent is sent status indicator from first do not send and change to the second transmission status indicator and send.In the present embodiment, the transmission status indicator of the data block of transmission is changed to 0 from 1.
First judge module 44, for judging whether described data block all sends.Transmit leg judges whether send each data block corresponding in bitmap table all sends.In the present embodiment, when the transmission status indicator of data block changes to 0 from 1, represent that corresponding data block sends; When the transmission status indicator of data block is 1 always, represent that corresponding data block does not send.
Whether inquiry module 45, receive each data block of transmission for sending many parts of inquiry packet inquiry recipients.
After transmit leg has all sent corresponding data block, transmit leg has sent each data block whether many parts of inquiry packet inquiry recipients receive transmission.Inquiry packet is critical packet, and critical packet also comprises the packet of the non-data class such as packet, the packet of negotiation, the packet of release connection that transmit leg and recipient connect.Critical packet sends many parts simultaneously, as 3 parts or 5 parts etc., avoid the generation of packet drop, when there is packet loss to guarantee that critical packet can allow recipient receive, after recipient receives many parts of same critical packet, only retain portion, other are lost.Transmit leg arranges a timer after sending inquiry packet, and when timer arrives predetermined time, after recipient does not still respond, transmit leg thinks that recipient does not receive inquiry packet, and now sending direction recipient sends many parts of inquiry packets again.
Data reception module 46, for receiving the reply data bag sent by recipient, transmit leg told by described reply data bag, needs the information of the data block sent.After recipient receives the inquiry packet of transmit leg transmission, send reply data bag to transmit leg.Reply data bag is critical packet, sends many parts simultaneously, as 3 parts or 5 parts etc.Transmit leg told by reply data bag, needs the information of the data block sent.Need the information of the data block sent can be showed by the sequence number mark that data block is corresponding.
Second judge module 47, the information for the data block sent as required judges whether the data block needing to send.
Need the information of the data block sent can be showed by the sequence number mark that data block is corresponding.Suppose that the sequence number mark sending data block corresponding in bitmap table is 12 to the maximum.If show the sequence number of data block that needs send in reply data bag to be designated 5, then represent the data block that recipient does not also receive transmit leg completely and sends, also need transmit leg to send sequence number to be designated the data block of 5; Corresponding, if the sequence number showing the data block that needs send in reply data bag is designated the sequence number mark sending data block maximum in bitmap table add 1 again, namely 13, then represent that recipient all have received the data block of transmit leg transmission, recipient's next one wants that the sequence number of the packet received is designated the data of the Next Sequence mark sending maximum sequence number mark in bitmap table.In the present embodiment, the method is used.Also can be if show the sequence number of data block that needs send in reply data bag to be designated 5, then represent the data block that recipient does not also receive transmit leg completely and sends, need transmit leg to send sequence number to be designated the data block of 6; Corresponding, if the sequence number showing the data block that needs send in reply data bag is designated the sequence number mark sending data block maximum in bitmap table, then represent that recipient all have received the data block of transmit leg transmission, recipient's next one wants that the sequence number of the packet received is designated the data of the Next Sequence mark sending maximum sequence number mark in bitmap table.Need the information of the data block sent can be represented by the sequence number mark that data block is corresponding, additive method also can be used to represent.
Data send preserves module 43, also for sending the data block of the needs transmission represented in reply data bag.
The data block sent if necessary, the sequence number mark of the data block that transmit leg sends according to the needs represented in reply data bag resends corresponding data block, and preserves the data block of the correspondence sent.Judged before preservation, if there has been the data block of the correspondence of preservation, no longer preserve.
Data removing module 48, for deleting the data block of preservation.If show the data block sending correspondence in bitmap table in reply data bag all to receive received side, so delete the data block of the correspondence of preservation when sending.
Fig. 5 is the functional block diagram of recipient's receiving system.Receiving system 50 comprises received bit chart module 51, data reception module 52, first judge module 53, second judge module 54, data transmission blocks 55.
Received bit chart module 51, for setting up received bit chart, received bit chart comprises the sequence number mark of each data block, the first accepting state mark that each data block is corresponding.
Recipient sets up received bit chart, and received bit chart comprises two fields, and first character section is the sequence number mark of data block, and second field is accepting state mark corresponding to data block.In the present embodiment, the size of received bit chart is identical with the size sending bitmap table; The sequence number mark of each data block of received bit chart identifies the same with the sequence number of each data block sent in bitmap table.To each data block carry out sequence number mark comprise according to Arabic data carry out sequence number mark, use letter carry out sequence number mark etc.The accepting state mark that each data block is corresponding is set.The accepting state mark of recipient comprises and does not receive, receives, and the first accepting state is designated and does not receive, and the second accepting state is designated and receives.The accepting state that do not receive of setting data block can be designated 0, the accepting state received is designated 1; Also the accepting state that do not receive of setting data block can be designated yes, the accepting state received is designated no etc.In the present embodiment, the first accepting state arranging each data block of recipient corresponding is designated 0, represents and does not receive.
Data reception module 52, recipient receives the data block that transmit leg sends, and the first accepting state changing respective data blocks is designated the second accepting state mark, for representing that this data block receives.Recipient receives the data block that transmit leg sends, and changes the accepting state mark of the data block that each have received.By the accepting state of the data block that have received mark from first accepting state mark do not receive change to second accepting state mark receive.In the present embodiment, the accepting state of the data block of reception mark is changed to 1 from 0, represents and received corresponding data block.
First judge module 53, receives inquiry packet for judging whether.Recipient judges whether the inquiry packet receiving transmit leg transmission.If recipient receives many parts of same inquiry packets, then only retain first part, lose the same inquiry packet received below.
Second judge module 54, for judging the data block that whether has maintenance first accepting state to identify in received bit chart.If there is the data block that maintenance first accepting state identifies in received bit chart, then represent that recipient does not receive the data block of transmit leg transmission completely, may packet loss be produced due to the reason of network or occur other situations.If there is no the data block that maintenance first accepting state identifies in received bit chart, then represent that accepting state mark corresponding in received bit chart all have changed, never receive to change to and receive, the data block reception side that transmit leg sends all have received.
Data transmission blocks 55, for sending many parts of reply data bags to transmit leg, the sequence number mark of the data block of maintenance first accepting state mark drawn together by described reply data handbag.
If there is the data block that maintenance first accepting state identifies in received bit chart, then represent that recipient does not also receive the data block corresponding to maintenance first accepting state mark, then write the sequence number mark representing that these keep the data block of the first accepting state mark at reply data bag exactly, know when receiving reply data bag to make transmit leg and also need to send which data block.Reply data bag is critical packet, and critical packet sends many parts simultaneously, as 3 parts or 5 parts etc., avoids the generation of packet drop.After the other side receives many parts of same critical packet, only retain portion, other are lost.
Data transmission blocks 55, also for sending many parts of reply data bags, described reply data handbag is drawn together and is represented that recipient all receives the information of data block.
Can represent that recipient all receives the information of data block by the sequence number mark of data block.Suppose that the sequence number mark of data block corresponding in received bit chart is 12 to the maximum.If there is no the data block that maintenance first accepting state identifies in received bit chart, the sequence number so showing the data block that needs send in reply data bag is designated 13, represent that recipient all have received the data block of transmit leg transmission, recipient's next one wants the data that the Next Sequence that the sequence number of the packet received is designated the maximum sequence number mark sending correspondence in bitmap table identifies.In the present embodiment, the method is used.Also can be that the sequence number showing the data block that needs send in reply data bag is designated 12, then represent that recipient all have received the data block of transmit leg transmission, recipient's next one wants the data that the Next Sequence that the sequence number of the packet received is designated the maximum sequence number mark sending correspondence in bitmap table identifies.Need the information of the data block sent can be represented by the sequence number mark that data block is corresponding, also can use additive method to represent.Reply data bag is critical packet, and critical packet sends many parts simultaneously, as 3 parts or 5 parts etc., avoids the generation of packet drop.After the other side receives many parts of same critical packet, only retain portion, other are lost.
Can be found out by above device, when transmit leg sends sending after data block corresponding in bitmap table all sends the data block whether many parts of inquiry packet inquiry recipients receive all transmissions again, by checking received bit chart and sending many parts of reply data bags, recipient tells whether transmit leg all have received data block, if no, which data block does not receive.The data block that after transmit leg receives reply data bag, transmission and reception side does not receive.The present invention avoids in nonsymmetric channel uplink network by above device and congested and downlink network bandwidth does not also make full use of situation occurs.Especially when user is from server download data, by data transmission device of the present invention, user only needs to send a small amount of reply data bag to server after the inquiry packet receiving server transmission, takes full advantage of downlink network bandwidth, improves the utilance of network.
In other some embodiments, transmit leg does not arrange timer after sending inquiry packet, but timer is set by recipient, recipient arranges timer after receiving packet, when timer reaches predetermined time, recipient does not still also receive any message of transmit leg, then think that transmit leg may occur packet loss, sends many parts of reply data bags to transmit leg.Also can for arranging timer after transmit leg transmission inquiry packet, recipient also arranges timer after receiving the packet of transmit leg transmission simultaneously, and when occurring to avoid packet drop, both sides need the situation generation waiting for the long period.
In other some embodiments, the sequence number mark sending bitmap table is not identical with the sequence number mark of received bit chart, has corresponding relation to make transmit leg and recipient correct identification be which data blocks between them.The transmission status indicator sending bitmap table also can be set to not identical value with the accepting state accepting bitmap table mark, represent with yes and no respectively as the first transmission status indicator and second sent in bitmap table sends status indicator, the first accepting state mark in received bit chart and the second accepting state mark represent with a and b respectively.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, all any amendments done within the spirit and principles in the present invention, equivalent replacement and improvement etc., all should be included within protection scope of the present invention.

Claims (10)

1. a data transmission method, comprises transmit leg, it is characterized in that:
Transmit leg is divided into one or more data block the data that will send, and carries out to each data block the sequence number that sequence number label table shows data block, arranges the first transmission status indicator for representing that data block is in the state of transmission to each data block;
Transmit leg is set up and is sent bitmap table, and transmission bitmap table comprises sequence number identifies, each data block described is corresponding first of each data block described and sends status indicator;
Each data block corresponding in described transmission bitmap table sends and preserves by transmit leg, and the first transmission status indicator changing each data block corresponding is the second transmission status indicator, for representing that this data block sends;
Transmit leg judges whether described data block all sends;
If described data block all sends, transmit leg sends each data block whether inquiry packet inquiry recipient receives transmission;
Transmit leg receives the reply data bag sent by recipient, and described reply data bag tells that transmit leg needs the information of the data block sent, and the information of described data block at least comprises the fast sequence number mark of data;
The information of the data block sent as required judges whether the data block needing to send;
If do not need the data block sent, transmit leg deletes the data block of preserving.
2. method according to claim 1, is characterized in that: the information of the data block sent as required judges, the data block sent if necessary, then transmit leg sends the data block of the needs transmission represented in reply data bag.
3. method according to claim 1, is characterized in that: described method also comprises the steps:
Recipient sets up received bit chart, and received bit chart comprises the sequence number of sequence number mark for representing data block of each data block, and the first accepting state mark corresponding to each data block is for representing that data block is in non-accepting state;
Recipient receives the data block that transmit leg sends, and the first accepting state changing respective data blocks is designated the second accepting state mark, for representing that this data block receives;
Recipient judges whether to receive inquiry packet;
If recipient receives inquiry packet, judge the data block whether having maintenance first accepting state to identify in received bit chart;
If do not have the data block that maintenance first accepting state identifies, then recipient sends reply data bag, and described reply data handbag is drawn together and represented that recipient all receives the information of data block.
4. method according to claim 3, it is characterized in that: if there is the data block that maintenance first accepting state identifies in received bit chart, then recipient sends reply data bag to transmit leg, and the sequence number mark of the data block of maintenance first accepting state mark drawn together by described reply data handbag.
5. the method according to claim 1-4 any one, is characterized in that, described inquiry packet and described reply data bag send many parts simultaneously.
6. a data transmission device, comprises transmit leg, it is characterized in that:
Deblocking module, for the data that will send being divided into one or more data block, and the sequence number that sequence number label table shows data block is carried out to each data block, the first transmission status indicator is arranged for representing that data block is in the state of transmission to each data block;
Sending bitmap table module, for setting up transmission bitmap table, sending the first transmission status indicator that sequence number identifies, each data block described is corresponding that bitmap table comprises each data block described;
Data send preserves module, and for each data block corresponding in described transmission bitmap table is sent and preserved, and the first transmission status indicator changing each data block corresponding is the second transmission status indicator, for representing that this data block sends;
First judge module, for judging whether described data block all sends;
Inquiry module, if all sent for described data block, transmit leg sends each data block whether inquiry packet inquiry recipient receives transmission;
Receiver module, for receiving the reply data bag sent by recipient, transmit leg told by described reply data bag, needs the information of the data block sent, and the information of described data block at least comprises the fast sequence number mark of data;
Second judge module, the information for the data block sent as required judges whether the data block needing to send;
Data removing module, if for not needing the data block sent, transmit leg deletes the data block of preserving.
7. device according to claim 6, it is characterized in that: described data send preserves module, also judge the data block sent if necessary for the information of the data block sent as required, then transmit leg sends the data block that the needs that represent in reply data bag send.
8. device according to claim 6, comprises recipient, it is characterized in that:
Received bit chart module, for setting up received bit chart, received bit chart comprises the sequence number of sequence number mark for representing data block of each data block, and the first accepting state mark corresponding to each data block is for representing that data block is in non-accepting state;
Data reception module, for receiving the data block that transmit leg sends, and the first accepting state changing respective data blocks is designated the second accepting state mark, for representing that this data block receives;
First judge module, receives inquiry packet for judging whether;
Second judge module, if receive inquiry packet for recipient, judges the data block whether having maintenance first accepting state to identify in received bit chart;
Data transmission blocks, if the data block also for not having maintenance first accepting state to identify in received bit chart, then recipient sends reply data bag, and described reply data handbag is drawn together and represented that recipient all receives the information of data block.
9. device according to claim 8, it is characterized in that: if receive the data block having maintenance first accepting state to identify in bitmap table, then recipient sends reply data bag to transmit leg, and the sequence number mark of the data block of maintenance first accepting state mark drawn together by described reply data handbag.
10. the device according to claim 6-9 any one, is characterized in that, described inquiry packet and described reply data bag send many parts simultaneously.
CN201510747009.3A 2015-11-05 2015-11-05 A kind of data transmission method and device Active CN105245470B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510747009.3A CN105245470B (en) 2015-11-05 2015-11-05 A kind of data transmission method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510747009.3A CN105245470B (en) 2015-11-05 2015-11-05 A kind of data transmission method and device

Publications (2)

Publication Number Publication Date
CN105245470A true CN105245470A (en) 2016-01-13
CN105245470B CN105245470B (en) 2019-05-17

Family

ID=55042975

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510747009.3A Active CN105245470B (en) 2015-11-05 2015-11-05 A kind of data transmission method and device

Country Status (1)

Country Link
CN (1) CN105245470B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105959298A (en) * 2016-06-24 2016-09-21 乐视控股(北京)有限公司 Data transmission method and data transmission device
CN107204936A (en) * 2017-06-21 2017-09-26 北京畅游天下网络技术有限公司 A kind of transmission method of data, device and equipment
WO2019179359A1 (en) * 2018-03-21 2019-09-26 中兴通讯股份有限公司 Data transmission method and device
CN110677220A (en) * 2019-09-09 2020-01-10 无锡江南计算技术研究所 RDMA (remote direct memory Access) message mechanism based on multi-track redundant response and implementation device thereof
CN110875795A (en) * 2018-08-29 2020-03-10 阿里巴巴集团控股有限公司 Data transmission method, device, equipment and storage medium
CN112804028A (en) * 2020-10-22 2021-05-14 北京佳讯飞鸿电气股份有限公司 Data packet transmission method, equipment and storage medium
TWI742131B (en) * 2016-10-28 2021-10-11 香港商阿里巴巴集團服務有限公司 Method and device for upgrading virtual switch

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1520111A (en) * 2003-09-02 2004-08-11 ����ͨѶ�ɷ����޹�˾ Method for transfering data within local area network
CN103647625A (en) * 2013-11-19 2014-03-19 中国科学院计算技术研究所 Link-based data reliable transmission method
CN104104475A (en) * 2013-04-02 2014-10-15 安凯(广州)微电子技术有限公司 Response signal generation method, receiving method and device
EP2285029A4 (en) * 2008-12-30 2015-04-08 State Grid Corp China Sgcc Data transmission method, transmission system and data transmitter

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1520111A (en) * 2003-09-02 2004-08-11 ����ͨѶ�ɷ����޹�˾ Method for transfering data within local area network
EP2285029A4 (en) * 2008-12-30 2015-04-08 State Grid Corp China Sgcc Data transmission method, transmission system and data transmitter
CN104104475A (en) * 2013-04-02 2014-10-15 安凯(广州)微电子技术有限公司 Response signal generation method, receiving method and device
CN103647625A (en) * 2013-11-19 2014-03-19 中国科学院计算技术研究所 Link-based data reliable transmission method

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105959298A (en) * 2016-06-24 2016-09-21 乐视控股(北京)有限公司 Data transmission method and data transmission device
TWI742131B (en) * 2016-10-28 2021-10-11 香港商阿里巴巴集團服務有限公司 Method and device for upgrading virtual switch
CN107204936A (en) * 2017-06-21 2017-09-26 北京畅游天下网络技术有限公司 A kind of transmission method of data, device and equipment
WO2019179359A1 (en) * 2018-03-21 2019-09-26 中兴通讯股份有限公司 Data transmission method and device
CN110875795A (en) * 2018-08-29 2020-03-10 阿里巴巴集团控股有限公司 Data transmission method, device, equipment and storage medium
CN110875795B (en) * 2018-08-29 2022-05-24 阿里巴巴集团控股有限公司 Data transmission method, device, equipment and storage medium
CN110677220A (en) * 2019-09-09 2020-01-10 无锡江南计算技术研究所 RDMA (remote direct memory Access) message mechanism based on multi-track redundant response and implementation device thereof
CN112804028A (en) * 2020-10-22 2021-05-14 北京佳讯飞鸿电气股份有限公司 Data packet transmission method, equipment and storage medium
CN112804028B (en) * 2020-10-22 2023-04-07 北京佳讯飞鸿电气股份有限公司 Data packet transmission method, equipment and storage medium

Also Published As

Publication number Publication date
CN105245470B (en) 2019-05-17

Similar Documents

Publication Publication Date Title
CN105245470A (en) Data transmission method and device
RU2461147C2 (en) Method of processing radio protocol in mobile communication system and mobile communication transmitter
CN102761905B (en) Message treatment method, equipment and system
CN110418376A (en) Data transmission method and device
CN102548019A (en) Common path setup method, common path use method, common path setup system, common path use system, M2M (machine to machine) communication method and M2M communication system
EP2866395B1 (en) Maximum transmission unit negotiation method and data terminal
CN107454679A (en) Handle the device and method that wireless heterogeneous networks link recovery routine
CN102056227B (en) Donor evolved node B, relay node and communication method thereof
CN111565416B (en) Wireless communication method, user equipment, network equipment and communication device
CN101652949A (en) Packet communication method and receiving side device
CN105491686A (en) Data transmission method, network element equipment and communication system
US11812455B2 (en) Response information transmission method, communications device, and network device
CN103581035A (en) Method, device and system for multi-path TCP congestion control
CN107623545A (en) Document transmission method and device
CN109451593A (en) The device and method that processing changes for the carrying kenel of radio bearer
CN108173920A (en) Document transmission method based on LORAWAN
CN104702371A (en) Dual-link data transmission method based on network reliable transmission protocol
CN104796887A (en) Method and device for safely exchanging information
CN110012506B (en) Data transmission method and communication equipment
EP3389196A3 (en) System and method for sending and receiving air traffic network messages using different protocols
CN103974339A (en) Data caching method and device
CN102724710A (en) Protocol data unit (PDU) transmission method and PDU transmission device
CN104767590A (en) Reliable data transmission and control method for serial communication
CN107959947B (en) Data transmission method, device and base station
CN101577945B (en) Transmission method, transmission system and service gateway for error indication parameters in response message

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant