CN104378444B - For by host-host protocol log data link method - Google Patents

For by host-host protocol log data link method Download PDF

Info

Publication number
CN104378444B
CN104378444B CN201410708183.2A CN201410708183A CN104378444B CN 104378444 B CN104378444 B CN 104378444B CN 201410708183 A CN201410708183 A CN 201410708183A CN 104378444 B CN104378444 B CN 104378444B
Authority
CN
China
Prior art keywords
frame
data
message segment
application layer
layer
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.)
Expired - Fee Related
Application number
CN201410708183.2A
Other languages
Chinese (zh)
Other versions
CN104378444A (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.)
University of Electronic Science and Technology of China
Original Assignee
University of Electronic Science and Technology of China
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 University of Electronic Science and Technology of China filed Critical University of Electronic Science and Technology of China
Priority to CN201410708183.2A priority Critical patent/CN104378444B/en
Publication of CN104378444A publication Critical patent/CN104378444A/en
Application granted granted Critical
Publication of CN104378444B publication Critical patent/CN104378444B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Communication Control (AREA)

Abstract

The invention discloses a kind of method being used for by host-host protocol in log data link, the host-host protocol includes application layer, the link layer under the application layer and the physical layer under the link layer;This method comprises the following steps:The link layer receives the application layer message segment that application layer forwarding comes, the application layer message segment is divided into some segments, some segments are encapsulated into respectively in the payload of at least one link layer data frame again, the link layer data frame is forwarded into the physical layer afterwards completes data transfer by it.The inventive method improves the efficiency and handling capacity of logging data transmission system.

Description

For by host-host protocol log data link method
Technical field
It is more particularly to a kind of to be used for by host-host protocol in log data link the present invention relates to logging data transmission system field The method of transmitting data.
Background technology
Network log well mainly by downhole toolbus link, the spread of the rumours link, terrestrial links network three parts composition, completes ground Downhole instrument is transmitted under the acquisition control order of face, and the data that downhole instrument is gathered are uploaded to ground control centre.Transmission Data mainly include the data that descending data command and downhole sensor gather.The data volume of usual down order is relatively low, more More is upstream sensor data.Terrestrial links network generally use Fast Ethernet, downhole toolbus generally use scene Controlling bus.The spread of the rumours chain route long range logging cable and the terminal device structure at both ends.By cable length, material-structure, work The factors such as environment limit, and the effective band of the signal of communication on cable is generally within 200KHz, more than common telephone wire, double Twisted wire, the transmission bandwidth of coaxial cable are also narrow.In order to improve the availability of frequency spectrum, effective method a kind of at present is to use COFDM methods are modulated demodulation to the signal in passband, and using the technology of FEC Error Corrections of Coding.But the spread of the rumours link is upper Downstream rate is still relatively low, and dissymmetry ratio is larger.The spread of the rumours cable is disturbed influence greatly, and link has random loss and burst Packet loss, the round-trip delay length of link.
In order that easily interconnected between ground network equipment and each logger, the spread of the rumours of existing well logging network Link layer protocol has the proprietary protocol using CAN, PPP or customization.CAN protocol packaging efficiency is very low.Ppp protocol is not supported Transmitting, its reliability can only be completed by upper-layer protocol.Traditional stopping variable, rollback N steps agreement, common ARQ associations The efficiency of transmission of view is low, is not suitable for the spread of the rumours link.TCP/IP procotol or proprietary protocol is used on link layer. The whole message segment of end-to-end re-transmission of Transmission Control Protocol will waste network bandwidth resources, while ACK can cause the extruding of narrow band link, Increase data transfer delay.Therefore, the deficiency of these methods is that part is that protocol hierarchy is more, each protocol function is single, total Protocol stack is more complicated, and the bandwidth resources and storage resource expense additionally taken are larger.Overall efficiency and handling capacity are relatively low, are not suitable for Diversified logger integrates.
The content of the invention
It is an object of the invention to overcome the above-mentioned deficiency in the presence of prior art, there is provided a kind of data transmission efficiency and The higher method being used for by host-host protocol in log data link of handling capacity.
In order to realize foregoing invention purpose, the technical solution adopted by the present invention is:One kind is used to survey by host-host protocol The method of well data link transmitting data, the host-host protocol include application layer, the link layer under the application layer And the physical layer under the link layer;This method comprises the following steps:
The link layer receives the application layer message segment that application layer forwarding comes, and the application layer message segment is divided into some small Section, then some segments are encapsulated into the payload of at least one link layer data frame respectively, afterwards by the link Layer data frame is forwarded to the physical layer and completes data transfer by it.
Preferably, the data of reception are added header encapsulation into the application layer message segment, the application by the application layer Layer message segment includes stem HeaderS and loads the payload PayloadS of the data, wherein the stem HeaderS bags Include following field:
Flag:Identification field, start for indicating a message segment first dielectric;
Lens:Length field, for indicating the length of message load in application layer message segment;
Tools ID:Logger number field, the numbering for identifying instrument indicate data source in the instrument of the numbering Device;
Seq:Message segment sequence number, for representing the message segment sequence number where data frame;
Checksum:Verification and, for calculate message segment verification and.
Preferably, the link layer data frame includes following field:
HeaderF:Link layer data frame stem;
PayloadF:Payload, the payload frame maximum length of link layer data frame are designated as MTU;
FCS:Frame check and, frame data are verified using physical layer FEC code.
Preferably, the link layer data frame stem HeaderF includes following field:
Type:Frame type field, 2 bits are taken, for identifying the type of frame, is divided into data frame, single acknowledgement frame, sends Band acknowledgement frame, the type of signaling frame four;
Seq, message segment sequence number, for representing the message segment sequence number where data frame;
Lenf, loaded length, represent present frame in payload length;
Id, frame number, represent grouping serial number of the present frame in message segment;
Frag tail frames mark, and when taking 0, expression is not the last frame of current message section;When taking 1, present frame is tail The last frame of frame, i.e. current message section;
AckBitArray, negative acknowledgment NACK each acknowledgement bit position, take N number of bit, sequentially correspond to frame number altogether, when A wherein bit is 0, represents that corresponding data frame does not have receiving end to receive, and when the bit is 1, represents that receiving terminal has received pair The data frame answered.
Preferably, the link layer directly obtains the supplemental characteristic of the application layer and/or the physical layer.
Further, the supplemental characteristic comprises at least the sequence number of the application layer message segment, upstream rate of physical layer, descending One of speed, up packet loss, descending packet loss, signal to noise ratio.
Preferably, when the transmitting terminal on log data link sends data, the link layer currently should what is received It is divided into the encapsulation of one or more data frame with layer message segment and is subsequently sent to the physical layer, if what is sent is current application First data frame of layer message segment, then start and remove overtime timer first scheduled time of setting, in the described first pre- timing In, if all data frames of current application layer message segment have been sent, retain all data of current application layer message segment Frame is set to all data frames of removing current application layer message segment after zero until first scheduled time.
Preferably, after the transmitting terminal receives the NACK acknowledgement frames that the receiving terminal on log data link is sent, The confirmation hyte of NACK acknowledgement frames is extracted, if a certain bit for confirming hyte is 0, shows the frame with its position correspondence Number the non-receiving end of data frame of the current application floor message segment be properly received, it is necessary to transmitting terminal retransmits the data frame, this When transmitting terminal link layer start remove overtime timer set second scheduled time, within second scheduled time, retransmit The data frame that the non-receiving end of the current application layer message segment is properly received, if it exceeds second scheduled time or Predetermined number of retransmissions, the still non-receiving end of data frame that the non-receiving end of the current application layer message segment is properly received It is properly received, then removes all data frames of the current application layer message segment and second scheduled time is reset to zero.
Preferably, when the receiving terminal on log data link receives data, the receiving terminal receives in the given time To after all data frames of the current application layer message segment, the complete current application layer message segment is given to the application Layer forwarding, otherwise carry out confirming to send NACK acknowledgement frames according to confirmation strategy.
Further, the receiving terminal carries out confirming that sending NACK acknowledgement frames is specially according to confirmation strategy:
During the link layer generation NACK acknowledgement frames of receiving terminal, the bit of hyte will be confirmed corresponding to the data frame received Position is 1, and the bit position by confirmation hyte corresponding to unreceived data frame is 0, is finally packaged into NACK acknowledgement frames, is returned to The transmitting terminal of data frame;
The data of the loss of transmitting terminal re-transmission are not still received after receiving terminal sends NACK acknowledgement frames in pre-determined number Frame, then all data frames of the current application layer message segment are all removed.
Compared with prior art, beneficial effects of the present invention:The present invention uses three layers of physical layer, link layer and application layer The host-host protocol of structure is simplified, devises the link layer that agreement is simplified, is that ground network and downhole instrument network struction are transparent Tunnel path, link layer realize the transmission data tried one's best, and total protocol stack is simpler, the bandwidth resources of occupancy and storage Resource overhead is smaller, and overall efficiency and handling capacity are higher, and suitable for the transmission of different underground buses, data transfer has preferable Reliability.
Brief description of the drawings:
Fig. 1 is the structural representation in the embodiment of the present invention.
Fig. 2 is packet format and encapsulation schematic diagram in the embodiment of the present invention;
Fig. 3 is the cross-layer parameter acquiring schematic diagram in the embodiment of the present invention;
Fig. 4 is that the transmitting terminal in the embodiment of the present invention sends data flowchart;
Fig. 5 is the flow chart for the NACK acknowledgement frames that the transmitting terminal processing in the embodiment of the present invention receives;
Fig. 6 is that the receiving terminal in the embodiment of the present invention receives data flowchart;
Fig. 7 is the schematic diagram of the receiving terminal generation NACK acknowledgement frames in the embodiment of the present invention.
Embodiment
With reference to embodiment, the present invention is described in further detail.But this should not be interpreted as to the present invention The scope of above-mentioned theme is only limitted to following embodiment, all models that the present invention is belonged to based on the technology that present invention is realized Enclose.
The present invention's is used for by host-host protocol in the method for log data link, the transmission protocol package Include application layer, the link layer under the application layer and the physical layer under the link layer;This method includes Following steps:
The link layer receives the application layer message segment that application layer forwarding comes, and the application layer message segment is divided into some small Section, then some segments are encapsulated into the payload of at least one link layer data frame respectively, afterwards by the link Layer data frame is forwarded to the physical layer and completes data transfer by it.
Preferably, the data of reception are added header encapsulation into the application layer message segment, the application by the application layer Layer message segment includes stem HeaderS and loads the payload PayloadS of the data, wherein the stem HeaderS bags Include following field:
Flag:Identification field, start for indicating a message segment first dielectric;
Lens:Length field, for indicating the length of message load in application layer message segment;
Tools ID:Logger number field, the numbering for identifying instrument indicate data source in the instrument of the numbering Device;
Seq:Message segment sequence number, for representing the message segment sequence number where data frame;
Checksum:Verification and, for calculate message segment verification and.
Preferably, the link layer data frame includes following field:
HeaderF:Link layer data frame stem;
PayloadF:Payload, the payload frame maximum length of link layer data frame are designated as MTU;
FCS:Frame check and, frame data are verified using physical layer FEC code.
Preferably, the link layer data frame stem HeaderF includes following field:
Type:Frame type field, 2 bits are taken, for identifying the type of frame, is divided into data frame, single acknowledgement frame, sends Band acknowledgement frame, the type of signaling frame four;
Seq, message segment sequence number, for representing the message segment sequence number where data frame;
Lenf, loaded length, represent present frame in payload length;
Id, frame number, represent grouping serial number of the present frame in message segment;
Frag tail frames mark, and when taking 0, expression is not the last frame of current message section;When taking 1, present frame is tail The last frame of frame, i.e. current message section;
AckBitArray, negative acknowledgment NACK each acknowledgement bit position, take N number of bit, sequentially correspond to frame number altogether, when A wherein bit is 0, represents that corresponding data frame does not have receiving end to receive, and when the bit is 1, represents that receiving terminal has received pair The data frame answered.
Preferably, the link layer directly obtains the supplemental characteristic of the application layer and/or the physical layer.
Further, the supplemental characteristic comprises at least the sequence number of the application layer message segment, upstream rate of physical layer, descending One of speed, up packet loss, descending packet loss, signal to noise ratio.
Preferably, when the transmitting terminal on log data link sends data, the link layer currently should what is received It is divided into the encapsulation of one or more data frame with layer message segment and is subsequently sent to the physical layer, if what is sent is current application First data frame of layer message segment, then start and remove overtime timer first scheduled time of setting, in the described first pre- timing In, if all data frames of current application layer message segment have been sent, retain all data of current application layer message segment Frame is set to all data frames of removing current application layer message segment after zero until first scheduled time.
Preferably, after the transmitting terminal receives the NACK acknowledgement frames that the receiving terminal on log data link is sent, The confirmation hyte of NACK acknowledgement frames is extracted, if a certain bit for confirming hyte is 0, shows the frame with its position correspondence Number the non-receiving end of data frame of the current application floor message segment be properly received, it is necessary to transmitting terminal retransmits the data frame, this When transmitting terminal link layer start remove overtime timer set second scheduled time, within second scheduled time, retransmit The data frame that the non-receiving end of the current application layer message segment is properly received, if it exceeds second scheduled time or Predetermined number of retransmissions, the still non-receiving end of data frame that the non-receiving end of the current application layer message segment is properly received It is properly received, then removes all data frames of the current application layer message segment and second scheduled time is reset to zero.
Preferably, when the receiving terminal on log data link receives data, the receiving terminal receives in the given time To after all data frames of the current application layer message segment, the complete current application layer message segment is given to the application Layer forwarding, otherwise carry out confirming to send NACK acknowledgement frames according to confirmation strategy.
Further, the receiving terminal carries out confirming that sending NACK acknowledgement frames is specially according to confirmation strategy:
During the link layer generation NACK acknowledgement frames of receiving terminal, the bit of hyte will be confirmed corresponding to the data frame received Position is 1, and the bit position by confirmation hyte corresponding to unreceived data frame is 0, is finally packaged into NACK acknowledgement frames, is returned to The transmitting terminal of data frame;
The data of the loss of transmitting terminal re-transmission are not still received after receiving terminal sends NACK acknowledgement frames in pre-determined number Frame, then all data frames of the current application layer message segment are all removed.
The spread of the rumours well logging link is the key component in well logging network, is to restrict downhole instrument network with terrestrial net network to lead to The bottleneck link of letter.For the spread of the rumours link(That is log data link)The characteristics of, the present invention is using the host-host protocol simplified, design Link layer protocol, bandwidth consumption is reduced using the packet format simplified, using without confirm, the pattern of negative acknowledgment reduces descending chain The pressure of the bandwidth on road, improves the utilization rate of bottleneck link, and the cross-layer HARQ mechanism of design improves the data transfer between agreement Efficiency and the real-time of transmission.
For the uplink bandwidth that makes full use of of maximum possible, the amount of gulping down decline is told caused by confrontation link packet lost by corruption, Reduce the complexity of network protocol stack.The present invention simplifies structure using three layers of physical layer, link layer and application layer, devises essence The link layer protocol of letter, it is ground network and the transparent tunnel path of downhole instrument network struction, suitable for different underground buses Transmission, data transfer has preferable reliability.Wherein, link layer realizes the transmission data tried one's best.Link layer is assisted Discussing content includes packet data format, obtains cross-layer parameter, the transmission flow of transmitting terminal and retransmission process flow, receiving terminal really Recognize some such as handling process, timeout treatment, caching and queue management compositions.
With reference to a specific embodiment explanation present invention:Referring to Fig. 1, logging remote transmission link connection ground network and well Lower instrument network, mainly by the data transfer of downhole logging instruments collection to ground-based computer equipment.Survey in the present embodiment The downhole end of transmitting terminal the spread of the rumours of well data link, receiving terminal are the ground surface end of the spread of the rumours.Contain transmit queue per one end TxQueue, receiving queue RxQueue, link layer protocol software section composition, often holding also includes application layer transponder and physical layer Up and down layer entity of the Coded modems as link layer.The spread of the rumours ground surface end also accesses ground network, the downhole end of the spread of the rumours Also access downhole network.For the ease of illustrating the implementation process of link layer protocol involved in the present invention, the spread of the rumours downhole end is made For data sending terminal, the spread of the rumours ground surface end is as data receiver, naturally it is also possible on the contrary.
Each field parameter selection is as follows in application layer message segment:Identify Flag and take 4 bytes, value is fixation 0x5A5A5A5A;Length Lens takes 2 bytes.Instrument code T ools ID take 2 bytes;Message segment sequence number Seq takes 2 Individual byte, for representing the message segment sequence number where data frame.Verification and Checksum take 2 bytes, using CRC-16(It is more Xiang Shiwei x16+x12+x5+1)Verify for the verification that calculates message segment and.The maximum message segment segment length MSS of payload is set to 1500 bytes.Therefore, the maximum length of application layer App message segments is 1512 bytes.
For each field parameter in addition to Type is defined, remaining selection is as follows in link-layer frame:Message segment sequence number Seq takes 2 bytes, for representing the message segment sequence number where data frame, when framing encapsulates, Seq directly obtains from application layer message segment Take, and be filled into isl frame;Loaded length Lenf takes 7 bits;Frame number Id takes 4 bits;Tail frame flag F rag is accounted for With 1 bit.
AckBitArray length N is 14. i.e. 14 bits of occupancy.The maximum length MTU of payload is 108 words Section.FCS frame checks and, frame data are verified using physical layer RS codes, altogether take 16 bytes, maximum can 8 words of error correction Section.Isl frame is 128 bytes of regular length, except stem and frame check and in addition to, when inadequate 108 byte of payload, not enough Part needs any filling(Padding), fill and gather enough 108 bytes.
Logging remote transmission cable adopts single or multicore sheathed cable, and modem uses COFDM, and upstream rate about exists 200 ~ 1150Kbps scopes, downstream rate is about in 0.6 ~ 110Kbps scopes.Bit error rate p controls are less than 10-5Scope.
The spread of the rumours downhole end and the spread of the rumours ground surface end are realized using TI C6415 DSP, include the COFDM modulation /demodulation of physical layer Device, link layer and application layer etc., the embodiment is specifically described below.
Protocol data form and encapsulation:Because the physical layer of logging remote transmission link uses COFDM modulation systems, with FEC Coding, and the narrow feature of downlink bandwidth, it is thus identified that the length of frame should be as far as possible short, the quantity of caused acknowledgement frame is as far as possible few. Based on this, the packet format of three layer protocols is combined with link layer protocol, application layer message segment is divided into shorter segment, often Individual segment is encapsulated into the payload of isl frame.Application layer message segment contains the fields such as length, sequence number, the stem of isl frame The fields such as containing type, sequence number, frame number.Packet data format and its encapsulation process are as shown in Figure 2.
Each explanation of field is as follows in application layer message segment:
Flag:Identification field, start for indicating a message segment first dielectric.
Lens:Length field, for indicating the length of message load in application layer message segment.
Tools ID:Logger number field, for identifying the numbering of instrument, and then indicate data source in the numbering Instrument.
Seq:Message segment sequence number, for representing the message segment sequence number where data frame.
Checksum:Verification and, for calculate message segment verification and.
PayloadS is payload, and maximum message segment segment length is designated as MSS.
The frame structure of link layer contains up to seven fields, different according to type different frame type.
Type frame type fields, 2 bits are taken, for identifying the type of frame, is divided into data frame, single acknowledgement frame, sends Four types such as band acknowledgement frame, signaling frame.Type value indicates the type of frame.
As Type=10B, it is piggybacking frame, contains type Type, sequence number Seq, length Lenf, frame number Id, tail frame Flag F rag, confirmation Ack, confirm hyte AckBitsArray, and the load data PayloadF carried.
As Type=01B, it is single data frame, contains type Type, sequence number Seq, length Lenf, frame number Id, tail frame Five fields such as flag F rag, and the load data PayloadF carried.
As Type=10B, for stem containing type+sequence number+confirmation hyte of single acknowledgement frame, single acknowledgement frame is not taken Band load data.Face the confirmation of downhole data section received with being particularly suitable for.
It is signaling frame as Type=11B, user's transmitting-receiving two-end interacts physical channel parameters.
Seq, message segment sequence number, for representing the message segment sequence number where data frame.
Lenf, loaded length, represent the length of the interior payload of present frame.
Id, frame number, represent grouping serial number of the present frame frame in message segment.
Frag tail frames mark, and when taking 0, expression is not the last frame of current message section;When taking 1, present frame is tail Frame, it is exactly the last frame of current message section.
AckBitArray, negative acknowledgment NACK each acknowledgement bit position, take N number of bit, sequentially correspond to frame number altogether.When A wherein bit is 0, represents that corresponding data frame does not have receiving end to receive, and when being 1 for the bit, represents that receiving terminal has received Corresponding data frame.
PayloadF payload portions, the payload frame maximum length of isl frame are designated as MTU.
FCS frame checks and, frame data are verified using physical layer FEC code.
Cross-layer parameter acquisition procedure:Referring to Fig. 3, link layer mainly obtains the message segment sequence number Seq of application layer, and thing Manage the upstream rate R of layerup, downstream rate Rdwn, up packet loss Dup, descending packet loss DdwnEtc. parameter.Obtain these parameters master It is used for the encapsulation of link-layer frame and data sends and prepared.Sequence number is obtained out of application layer data packet, is directly filled into chain The sequence-number field of the stem of road layer data frame.The SRTT that the up-downgoing speed of physical layer is used to just slightly calculate message segment comes and goes Time, for timeout treatment.Because the two-way time of link layer is more stable, SRTT is not the two-way time of frame transmission, but Based on the two-way time of message transmissions, that is, the two-way time that one maximum message segment section of complete transmission needs.
The message segment of transmitting terminal removes overtime timer RTO (Remove Time-Out), the message segment of receiving terminal waits Overtime timer WTO (Waiting Time-Out) will be modified retransmission time out according to the change of packet loss.
Transmitting terminal flow:Serial number Seq application layer message segment is divided into one or more number by the link layer of transmitting terminal According to frame, and it is put into hair queue TxQueue.If TxQueue is not sky, the transmission inquired about between link layer and physical layer is delayed TxBuffer is deposited, if TxBuffer has vacant, taking-up data frame, which is sequentially sent into, from TxQueue hair queues is sent to caching In TxBuffer.If the frame sent is the first frame of serial number Seq message segment, starts and remove overtime timer RTO (Seq), then by RTO (Seq) it is put into RTO list.Under normal circumstances, α times that timer RTO is SRTT is removed, that is, is set First scheduled time, RTO (Seq) are that transmission sequence number is the scheduled time corresponding to Seq message segment, and α is overtime contraction-expansion factor.When When TxBuffer does not have vacant, then pause is sent, and is sent again after waiting TxBuffer to have clearance spaces.Send the stream of data frame Journey is as indicated at 4.
The link layer of transmitting terminal periodically detects the value of each RTO in RTO lists.When RTO (Seq) value is zero When, serial number Seq all isl frames will be removed into release out of TxQueue, and stop and remove RTO (Seq).
After transmitting terminal receives acknowledgement frame, the confirmation hyte AckBitArray of test serial number Seq and acknowledgement frame is extracted.Such as Fruit confirms that a certain bit of hyte is 1, shows that receiving end is properly received with the frame of its position correspondence frame number, otherwise table The frame of bright corresponding frame number is not received, it is necessary to which transmitting terminal retransmits the frame, and is by the removal timer RTO (Seq) of transmitting terminal α times of SRTT.If first time retransmission sequence number be Seq message segment in any frame, then by number of retransmissions RTN (Seq)= 0, otherwise RTN (Seq) is accumulated once.For the data frame for needing to retransmit using retransmitting immediately, maximum retransmission is designated as MRTN.When When number of retransmissions RTN (Seq) exceedes maximum retransmission MRTN, the report of serial number Seq in transmit queue TxQueue is stored in All data frames of literary section will be removed, while and be stopped and removed RTO (Seq).Transmitting terminal receives the processing stream after acknowledgement frame Journey is as shown in Figure 5.When the increase of the physical layer bit error rate, that is, packet loss increase.When packet loss often increases by 10 times, RTO also with 1 times of increase, so as to increase the probability of re-transmission, improves the reliability of data transfer.
Receiving terminal handling process:After receiving terminal receives data frame, sequence number Seq, frame number Id, the tail frame mark of the frame are extracted Frag, and it is put into receiving queue RxQueue.Receive when the first frame received in the message segment that frame belongs to current or for the first time In message segment during any frame, then start and receive waiting timer WTO (Seq), and insert WTO list.WTO (Seq) is set to β times of SRTT, β are spreading factor, that is, set for second scheduled time.Scan the frame of all serial number Seq-1 in receiving queue Frame number it is whether continuous, when frame number is continuous and message segment Seq is complete, then gives message segment to application layer software forwarding, otherwise send out Send NACK acknowledgement frames.
When the last frame (Frag=1) in the message that the data frame received is serial number Seq, scan in receiving queue Whether all serial number Seq frames are continuous.When frame number is continuous and message segment Seq is complete, then giving message segment to application layer software turns Hair, otherwise according to confirming that strategy is confirmed, send NACK acknowledgement frames.
Above-mentioned receiving terminal handles the flow of frame in RxQueue as indicated with 6.
When generating NACK acknowledgement frames, receiving queue RxQueue is scanned, has received the ratio that hyte is confirmed corresponding to frame number Special position is 1, and it is 0 not receive frame number corresponding to the bit position of hyte.NACK acknowledgement frames finally are packaged into, are returned to data frame Transmitting terminal, its process are anticipated as shown with 7.
When receiving terminal sends NACK acknowledgement frames for the first time to serial number Seq message segments, number ATN (Seq)=0 is confirmed, it is no Then ATN (Seq)=ATN (Seq)+1.Maximum confirms that number is designated as MATN.As ATN (Seq)>During MATN, still do not receive complete Loss data frame, then by receiving queue all serial number Seq message segment data frame all discharge.
In addition, when receiving terminal removes incomplete message segment from receiving queue RxQueue or has been submitted to application layer , it is necessary to check in RxQueue whether also have other data frames when whole message segment.If RxQueue is without remaining data Frame, then a serial number Seq+1 full negative acknowledgment NACK frames are sent to transmitting terminal, i.e., it confirms hyte all 0, restarts WTO (Seq+1), and insert in WTO lists.When clearing up RxQueue end frames, actively send NACK (Seq+1) is receiving terminal In order to avoid last message segment that transmitting terminal is sent is lost.
Each WTO value in the detection WTO lists of the link layer software cycle of receiving terminal.When WTO (Seq) value When being zero, if all data frames of serial number Seq message segment can not form complete message segment, by these data frames from Release is removed in RxQueue, and stops and removes WTO (Seq).
Receiving terminal is forwarded the complete message segment received.When multiple message segments need forwarding, according to report The incremental order of literary sequence number is sequentially forwarded.When the message of big sequence number has been complete message, and the message of low sequence number is still Not complete to receive, then delay forwards big sequence number message, until small sequence number message receives complete or announces to abandon small sequence number message.
The invention has the advantages that:The downlink bandwidth that the frame structure simplified has adapted to logging remote transmission link is narrow, asymmetric The characteristics of ratio is big, the utilization rate of transfer resource is improved, reduce consumption of the acknowledgement frame to downlink bandwidth, reduce the pressure of acknowledgement frame Wait of the contracting effect to upstream data.Maximum packaging efficiency is slightly above existing TCP/IP/EoDSL agreements and TCP/IP/PPP Protocol encapsulation mode, far above CAN packaged type.
Strict independent layering can increase the difficulty and expense of the transmitting of data, such as, chain is estimated by upper-layer protocol The speed and packet loss on road, then need to count two-way time and frame losing quantity, then estimated, this will increase convergence time, increase Add protocol software expense, and the estimated value of these indexs and actual value are slightly in error.The present invention simplifies association using cross layer design View, link layer can directly obtain the physical layer parameters such as speed, packet loss, signal to noise ratio, and utilize these parameters, calculate frame and message The two-way time SRTT of section, the type of packet loss is distinguished, directly, flexibly perceive the state of physical layer, reduced and retransmit and drop The complexity of the low protocol software.
It is FEC and ARQ that procotol, which tackles error code and the major way of packet loss,.The present invention sets up meter separately using cross-layer, by chain Road frame and the COFDM of physical layer share FEC so as to EDC error detection and correction, improve the anti-error code capacity of link layer.ARQ uses frame acknowledgment It is combined with message segment acknowledgement, avoids full message segment from retransmitting, reduces data transfer delay.Based on NACK negative acknowledgments, transmitting terminal Not actively Retransmission timeout.
When transmitting terminal does not receive message segment or do not receive complete message segment, the frame transmission to the message segment of loss is negative Confirm NACK, receiving terminal does not send positive confirmation ACK to the message segment having had successfully received.Each of confirmation hyte refers in NACK Whether bright corresponding frame has successfully received.The consumption that negative acknowledgment reduces downlink bandwidth is only sent, reduces traditional acknowledgement frame Up wait is tackled in delay caused by compression effect.
The embodiment of the present invention is described in detail above in conjunction with accompanying drawing, but the present invention is not restricted to Embodiment is stated, in the case of the spirit and scope of claims hereof are not departed from, those skilled in the art can do Go out various modifications or remodeling.

Claims (1)

  1. A kind of 1. method being used for by host-host protocol in log data link, it is characterised in that the transmission Agreement includes application layer, the link layer under the application layer and the physical layer under the link layer;The party Method comprises the following steps:
    The link layer receives the application layer message segment that application layer forwarding comes, and the application layer message segment is divided into some segments, Some segments are encapsulated into respectively in the payload of at least one link layer data frame again, afterwards by the link number of plies The physical layer is forwarded to according to frame, and data transfer is completed by it;
    The link layer directly obtains the supplemental characteristic of the application layer and/or the physical layer, and the supplemental characteristic at least wraps Include the sequence number of application layer message segment, the upstream rate of physical layer, downstream rate, up packet loss, descending packet loss, signal to noise ratio its One of;
    The application layer includes the data of reception plus header encapsulation into the application layer message segment, the application layer message segment The stem HeaderS and payload PayloadS for loading the data, wherein the stem HeaderS includes following field:
    Flag:Identification field, start for indicating a message segment first dielectric;
    Lens:Length field, for indicating the length of message load in application layer message segment;
    Tools ID:Logger number field, the numbering for identifying instrument indicate data source in the instrument of the numbering;
    Seq:Message segment sequence number, for representing the message segment sequence number where data frame;
    Checksum:Verification and, for calculate message segment verification and;
    The link layer data frame includes following field:
    HeaderF:Link layer data frame stem;
    PayloadF:Payload, the payload frame maximum length of link layer data frame are designated as MTU;
    FCS:Frame check and, frame data are verified using physical layer FEC code;
    Wherein, the link layer data frame stem HeaderF includes following field:
    Type:Frame type field, 2 bits are taken, for identifying the type of frame, be divided into data frame, single acknowledgement frame, incidentally true Recognize frame, the type of signaling frame four;
    Seq, message segment sequence number, for representing the message segment sequence number where data frame;
    Lenf, loaded length, represent present frame in payload length;
    Id, frame number, represent grouping serial number of the present frame in message segment;
    Frag tail frames mark, and when taking 0, expression is not the last frame of current message section;When taking 1, present frame is tail frame, i.e., The last frame of current message section;
    AckBitArray, negative acknowledgment NACK each acknowledgement bit position, take N number of bit, sequentially correspond to frame number, when wherein altogether One bit is 0, represents that corresponding data frame does not have receiving end to receive, and when the bit is 1, expression receiving terminal has received corresponding Data frame;
    When the transmitting terminal on log data link sends data, the current application layer message segment that the link layer will receive divides The physical layer is subsequently sent into the encapsulation of one or more data frame, if what is sent is the of current application layer message segment One data frame, then start and remove overtime timer first scheduled time of setting, within first scheduled time, if currently should Sent with all data frames of layer message segment, then retained all data frames of current application layer message segment until described first The scheduled time is set to all data frames that current application layer message segment is removed after zero;
    After the transmitting terminal receives the NACK acknowledgement frames that the receiving terminal on log data link is sent, extraction NACK confirms The confirmation hyte of frame, if a certain bit for confirming hyte is 0, show described current with the frame number of its position correspondence The non-receiving end of data frame of application layer message segment is properly received, it is necessary to transmitting terminal retransmits the data frame, now the chain of transmitting terminal Road floor, which starts, removes overtime timer second scheduled time of setting, within second scheduled time, retransmits the current application The data frame that the non-receiving end of layer message segment is properly received, if it exceeds second scheduled time or predetermined re-transmission time Number, the still non-receiving end of data frame that the non-receiving end of the current application layer message segment is properly received are properly received, then Remove all data frames of the current application layer message segment and second scheduled time is reset to zero;
    When on log data link receiving terminal receive data when, the receiving terminal receive in the given time it is described currently should After all data frames of layer message segment, give complete current application layer message segment to the application layer and forward, otherwise according to Confirm that strategy carries out confirming to send NACK acknowledgement frames;Wherein, the receiving terminal carries out confirming that transmission NACK is true according to confirmation strategy Recognizing frame is specially:During the link layer generation NACK acknowledgement frames of receiving terminal, hyte will be confirmed corresponding to the data frame received Bit position is 1, and the bit position by confirmation hyte corresponding to unreceived data frame is 0, is finally packaged into NACK acknowledgement frames, It is returned to the transmitting terminal of data frame;Transmitting terminal re-transmission is not still received after receiving terminal sends NACK acknowledgement frames in pre-determined number The data frame of loss, then all data frames of the current application layer message segment are all removed.
CN201410708183.2A 2014-11-27 2014-11-27 For by host-host protocol log data link method Expired - Fee Related CN104378444B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410708183.2A CN104378444B (en) 2014-11-27 2014-11-27 For by host-host protocol log data link method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410708183.2A CN104378444B (en) 2014-11-27 2014-11-27 For by host-host protocol log data link method

Publications (2)

Publication Number Publication Date
CN104378444A CN104378444A (en) 2015-02-25
CN104378444B true CN104378444B (en) 2018-03-27

Family

ID=52557090

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410708183.2A Expired - Fee Related CN104378444B (en) 2014-11-27 2014-11-27 For by host-host protocol log data link method

Country Status (1)

Country Link
CN (1) CN104378444B (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106713415B (en) * 2016-11-14 2019-11-22 北京邮电大学 A kind of data transmission method and system
CN107864135A (en) * 2017-11-07 2018-03-30 山东网智物联网科技有限公司 The realization device of Internet of Things communication means, device and Internet of Things Network Communication
CN107864199A (en) * 2017-11-07 2018-03-30 山东网智物联网科技有限公司 The realization device of Internet of Things communication means, device and Internet of Things Network Communication
CN107580076A (en) * 2017-11-07 2018-01-12 山东网智物联网科技有限公司 Internet of Things communication means and device
CN110121850B (en) * 2017-12-05 2022-05-31 深圳市汇顶科技股份有限公司 Data transmission method, transmitting terminal equipment and receiving terminal equipment
CN111182487B (en) * 2018-11-09 2022-06-03 杭州海康威视数字技术股份有限公司 Data sending method, data receiving method and device
CN110401962B (en) * 2019-08-13 2020-04-24 翱捷科技(深圳)有限公司 LoRaWAN system and method for automatically adjusting length of data message
CN111510199B (en) * 2020-04-20 2022-01-04 中国人民解放军火箭军工程大学 Code modulation method and system in satellite mobile communication
CN111835472B (en) * 2020-06-29 2023-07-28 国网思极紫光(青岛)微电子科技有限公司 Data communication method, data communication device and data communication system
CN113556619B (en) * 2021-07-15 2024-04-19 广州市奥威亚电子科技有限公司 Device and method for link transmission and method for link reception
CN114629599B (en) * 2022-03-10 2023-12-19 深圳市云语科技有限公司 Method for confirming message of real-time transmission protocol

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103581228A (en) * 2012-07-26 2014-02-12 深圳市生基科技有限公司 Method and system for device communication in Internet of Things

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6335933B1 (en) * 1999-05-21 2002-01-01 Broadcom Homenetworking, Inc. Limited automatic repeat request protocol for frame-based communication channels
CN100428745C (en) * 2006-07-28 2008-10-22 华为技术有限公司 Data transmitting method and apparatus

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103581228A (en) * 2012-07-26 2014-02-12 深圳市生基科技有限公司 Method and system for device communication in Internet of Things

Also Published As

Publication number Publication date
CN104378444A (en) 2015-02-25

Similar Documents

Publication Publication Date Title
CN104378444B (en) For by host-host protocol log data link method
CN104780119B (en) A kind of packet loss position and detection method based on SCPS TP
EP2237492B1 (en) System and method for retransmitting packets over a network of communication channels
CN104202414B (en) Method for reliable transmission based on UDP
US7203167B2 (en) Data flow control method
US8402343B2 (en) Reliable packet cut-through
US8064461B2 (en) Method and apparatus for TCIP/IP data transfer over a wireless network
CN104486051B (en) A kind of data repeating method and device
US20010036154A1 (en) Communication device and communication control method using lower layer data transmission order control at upper layer
CN107395522B (en) Loss treating method based on Transmission Control Protocol and computer readable storage medium
AU9344601A (en) Hybrid arq with parallel packet transmission
CN101662350B (en) Method for reporting packet process result in a mobile communication system
WO2000072498A1 (en) Limited automatic repeat request protocol for frame-based communication channels
CN107204834A (en) A kind of control method of the express network transmitting based on UDT agreements
CN103647625B (en) Link-based data reliable transmission method
EP1198917B1 (en) Method and system for data reception acknowledgement
CN103414692A (en) High real-time spacecraft data transmission method based on priorities
CN107634823A (en) The data transmission method of transmission control protocol based on network code
CN104184568B (en) The data transmission method and system of communication system
CN103825689B (en) Delay determinacy message retransmission method with local cache
WO2004012381A1 (en) Automatic retransmit request protocol for channels with time-varying capacity
CN1917472A (en) Transmission system and method for radio link protocol
CN108183767A (en) A kind of method for reliable transmission suitable for space DTN networks
CN105119695A (en) Space file transmission method based on quick negative acknowledgement (NAK)
CN107046452A (en) A kind of data high bandwidth high reliability transport method

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
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20180327

Termination date: 20181127

CF01 Termination of patent right due to non-payment of annual fee