CN104283650A - High-level data link control data sending method - Google Patents
High-level data link control data sending method Download PDFInfo
- Publication number
- CN104283650A CN104283650A CN201410620117.XA CN201410620117A CN104283650A CN 104283650 A CN104283650 A CN 104283650A CN 201410620117 A CN201410620117 A CN 201410620117A CN 104283650 A CN104283650 A CN 104283650A
- Authority
- CN
- China
- Prior art keywords
- packet
- contract
- project
- data
- giving out
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 116
- 230000005540 biological transmission Effects 0.000 claims description 124
- 238000012856 packing Methods 0.000 claims description 16
- 238000004458 analytical method Methods 0.000 claims description 6
- 238000005538 encapsulation Methods 0.000 claims description 6
- 239000000725 suspension Substances 0.000 claims description 5
- 230000006870 function Effects 0.000 description 3
- 230000000052 comparative effect Effects 0.000 description 2
- 230000003247 decreasing effect Effects 0.000 description 2
- 238000007405 data analysis Methods 0.000 description 1
- 230000008034 disappearance Effects 0.000 description 1
- 239000000203 mixture Substances 0.000 description 1
- 238000005498 polishing Methods 0.000 description 1
- 238000012163 sequencing technique Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L1/00—Arrangements for detecting or preventing errors in the information received
- H04L1/12—Arrangements for detecting or preventing errors in the information received by using return channel
- H04L1/16—Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
- H04L1/1607—Details of the supervisory signal
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/22—Parsing or analysis of headers
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/30—Definitions, standards or architectural aspects of layered protocol stacks
- H04L69/32—Architecture of open systems interconnection [OSI] 7-layer type protocol stacks, e.g. the interfaces between the data link level and the physical level
- H04L69/322—Intralayer communication protocols among peer entities or protocol data unit [PDU] definitions
- H04L69/324—Intralayer communication protocols among peer entities or protocol data unit [PDU] definitions in the data link layer [OSI layer 2], e.g. HDLC
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/50—Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
- Communication Control (AREA)
Abstract
The invention provides an HDLC resending method. The HDLC resending method is applied to a sending terminal. According to the HDLC resending method provided by the invention, when the sending terminal is used for sending a data packet, an added header contains a packet sending sequence and a packet sending type and is used for sending the data packet by virtue of HDLC; when receiving a resending command, the sending terminal directly acquires a data packet to be resent according to the resending command and resends the data packet without judging whether the resending is needed or not, and thus occupied time of the resending process to the sending terminal is shortened, and the speed of sending data by the sending terminal is not influenced. In addition, with the adoption of the HDLC resending method, the packet sending sequence and the packet sending type are added in the data packet only without changing an HDLC chip, and thus the cost of the HDLC can not be increased.
Description
Technical field
The present invention relates to field of information transmission, in particular, relate to a kind of High-Level Data Link Control data transmission method for uplink.
Background technology
HDLC (High-Level Data Link Control, High-Level Data Link Control) be one at Synchronization Network transmitting data, bit-oriented data link layer protocol, there is higher efficiency of transmission, obtain in field of track traffic at present and apply more widely.
But because existing HDLC chip is in running, HDLC data exist certain packet loss phenomenon, cause transfer of data unstable.The high security required due to field of track traffic and reliability, make to need a kind of effective repeating method, to ensure the reliability that HDLC communicates.
In prior art, HDLC repeating method, be based on improve after HDLC chip increase frame interior tally function, transmitting terminal (the HDLC chip after namely improving) adds frame number automatically when sending each frame data, due to feeding back ACK (Acknowledgement when receiving terminal receives data, acknowledge character), then transmitting terminal judges whether to occur packet drop according to the ACK received and this frame number, judgment mode can be calculate transmission frame data amount check according to frame number, and by more consistent with ACK number for this frame data number, if inconsistent, there is packet loss phenomenon, if there is packet loss, resend data.
But employing the method, need at transmitting terminal, the sequence number of these data and the ACK of feedback to be compared, cause retransmission processes more complicated, when sending data and being more, comparison process length consuming time, taking transmitting terminal for a long time, to causing affecting the progress that transmitting terminal sends data, reducing the speed that HDLC transmits data.
Summary of the invention
In view of this, the invention provides a kind of HDLC data transmission method for uplink, solving the existing HDLC chip based on improving, owing to judging whether to occur that the retransmission processes that the calculating of packet drop causes is complicated according to ACK and this frame number, the problem of length consuming time.
For achieving the above object, the invention provides following technical scheme:
A kind of High-Level Data Link Control HDLC data transmission method for uplink, be applied to transmitting terminal, described method comprises:
According to the group bag rule preset, obtain packet to sent data packing; The packet header of described packet comprises the sequence number and to give out a contract for a project type of giving out a contract for a project, described in give out a contract for a project type for normally to give out a contract for a project;
Described packet is sent by HDLC;
When receiving the reissue commands of receiving terminal feedback, obtain packet to be retransmitted according to described reissue commands, the packet header of described packet to be retransmitted comprises the sequence number and to give out a contract for a project type of giving out a contract for a project, described in type of giving out a contract for a project be retransmission packet;
Described packet to be retransmitted is sent by HDLC.
Above-mentioned method, preferably, the group bag rule that described foundation is preset, obtains packet to data packing to be sent and specifically comprises:
By the bottom transmission and reception interface encapsulation of described HDLC in described data to be sent;
According to the frame format preset, described data to be sent are carried out package, obtain packet.
Above-mentioned method, preferably, after obtaining packet, also comprises data packing to be sent:
Packet described in buffer memory is to presetting storage area.
Above-mentioned method, preferably, carries the indication information of packet corresponding to data to be retransmitted in described reissue commands, then describedly obtain packet to be retransmitted according to described reissue commands and comprise:
Resolve described reissue commands, obtain the indication information of packet corresponding to data to be retransmitted;
According to described indication information, obtain the packet corresponding to described indication information from described default storage area;
The type of giving out a contract for a project of carrying in the packet header of described packet being revised as retransmission packet by normally giving out a contract for a project, obtaining packet to be retransmitted.
Above-mentioned method, preferably, described in receive receiving terminal feedback reissue commands after, before obtaining packet to be retransmitted according to described reissue commands, also comprise:
Control current Packet Generation process suspension.
A kind of HDLC data transmission method for uplink, is applied to receiving terminal, comprises:
By the packet that HDLC receiving end/sending end sends, the packet header of described packet comprises give out a contract for a project sequence number and type of giving out a contract for a project;
Analyze described packet, and judge whether to occur packet error of transmission;
If error of transmission, generate reissue commands and feed back transmitting terminal.
Above-mentioned method, preferably, the described packet of described analysis, and judge whether to occur that packet error of transmission comprises:
Resolve described packet, obtain give out a contract for a project sequence number and type of giving out a contract for a project in described packet header;
According to the type of giving out a contract for a project of described packet, judge that described packet is the packet of normally giving out a contract for a project, or the packet retransmitted;
When described packet is the packet of normally giving out a contract for a project, according to the sequence number of giving out a contract for a project in described packet of normally giving out a contract for a project, judges whether to occur packet loss, if so, occur error of transmission;
When described packet is the packet retransmitted, the packet of normally giving out a contract for a project stored in sequence number of giving out a contract for a project in the packet according to described repeating transmission and described receiving terminal judges whether to occur packet loss, if so, occurs error of transmission.
Above-mentioned method, preferably, the described packet of described analysis, and judge whether to occur that packet error of transmission comprises:
Whether the frame format of described packet meets the frame format preset;
If do not met, then there is packet error of transmission.
Above-mentioned method, preferably, also comprises in the packet header of described packet: data length and transmission data, then analyze described packet, and judge whether to occur that packet error of transmission comprises:
Analyze described packet, determine the real data length in described transmission data;
By the data length comparison in described real data length and described packet, obtain comparison result;
When described comparison result represents that described real data length is different with the data length in described packet, data packet transmission mistake.
Above-mentioned method, preferably, described generation reissue commands comprises:
Sequence number of giving out a contract for a project according to the packet received is determined by the sequence number of giving out a contract for a project of the packet of packet loss;
Foundation is by the serial number gencration reissue commands of giving out a contract for a project of the packet of packet loss.
Known via above-mentioned technical scheme, compared with prior art, the invention provides a kind of HDLC data transmission method for uplink, the method is applied to transmitting terminal, comprising: according to the group bag rule preset, obtain packet to sent data packing; The packet header of described packet comprises the sequence number and to give out a contract for a project type of giving out a contract for a project, described in give out a contract for a project type for normally to give out a contract for a project; Described packet is sent by HDLC; When receiving the reissue commands of receiving terminal feedback, obtain packet to be retransmitted according to described reissue commands, the packet header of described packet to be retransmitted comprises the sequence number and to give out a contract for a project type of giving out a contract for a project, described in type of giving out a contract for a project be retransmission packet; Described packet to be retransmitted is sent by HDLC.The HDLC repeating method provided in the present invention, when transmitting terminal sends packet, the packet header of interpolation comprises give out a contract for a project sequence number and type of giving out a contract for a project, and sends described packet by HDLC.When receiving reissue commands, directly obtain packet to be retransmitted according to this reissue commands, and by this data packet retransmission, the need of the judgement retransmitted, decreasing the holding time of retransmission processes to transmitting terminal without the need to carrying out, not affecting the speed that transmitting terminal sends data.Further, adopting the method just to add in packet by sequence number of giving out a contract for a project with type of giving out a contract for a project, without the need to changing HDLC chip, the cost of HDLC can not be increased.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is only embodiments of the 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 the accompanying drawing provided.
Fig. 1 is the flow chart of a kind of HDLC data transmission method for uplink embodiment 1 provided by the invention;
Fig. 2 is the flow chart of a kind of HDLC data transmission method for uplink embodiment 2 provided by the invention;
Fig. 3 is the incidence relation figure of the software encapsulation of a kind of HDLC data transmission method for uplink embodiment 2 provided by the invention;
Fig. 4 is the frame format figure of a kind of HDLC data transmission method for uplink embodiment 2 provided by the invention;
Fig. 5 is the flow chart of a kind of HDLC data transmission method for uplink embodiment 3 provided by the invention;
Fig. 6 is the flow chart of a kind of HDLC data transmission method for uplink embodiment 4 provided by the invention;
Fig. 7 is the flow chart of a kind of HDLC data transmission method for uplink embodiment 5 provided by the invention;
Fig. 8 is the flow chart of a kind of HDLC data transmission method for uplink embodiment 6 provided by the invention;
Fig. 9 is the flow chart of a kind of HDLC data transmission method for uplink embodiment 7 provided by the invention;
Figure 10 is the flow chart of a kind of HDLC data transmission method for uplink embodiment 8 provided by the invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
As Fig. 1 shows the flow chart of a kind of HDLC data transmission method for uplink embodiment 1 provided by the invention, the method is applied to transmitting terminal, and the method realizes especially by following steps:
Step S101: according to the group bag rule preset, obtain packet to sent data packing;
Wherein, this transmitting terminal is preset with group bag rule, according to this group bag rule to sent data packing, and adds packet header in the packet that obtains of packing.
Wherein, the packet header of described data comprises the sequence number and to give out a contract for a project type of giving out a contract for a project, described in give out a contract for a project type for normally to give out a contract for a project.
It should be noted that, because the data comprised in information to be sent are more, a packet can not send, then can be several part by this Data Division, the data packing of each part obtains a packet, adds the sequence number of giving out a contract for a project of the order representing this partial data in this packet.
As, 5 packets are had jointly to send an information, then this information is split as 5 parts, packing obtains 5 packets respectively, add the sequence number of giving out a contract for a project of this packet in the packet header of each packet, according to this sequence number of giving out a contract for a project can determine these 5 Packet Generations for same message and its sequencing.
Step S102: send described packet by HDLC;
Wherein, the packet of having packed is sent by HDLC agreement, to make receiving terminal, this packet is received.
Certainly, in process of transmitting, may be errorless be sent to receiving terminal, also may go wrong in data packet transmission, occur packet loss phenomenon as receiving terminal cannot receive packet, also likely occur other problems in process of transmitting, the packet causing receiving terminal to receive makes a mistake.
Step S103: when receiving the reissue commands of receiving terminal feedback, obtain packet to be retransmitted according to described reissue commands;
Wherein, the packet header of described packet to be retransmitted comprises the sequence number and to give out a contract for a project type of giving out a contract for a project, described in type of giving out a contract for a project be retransmission packet.
Wherein, when receiving terminal can not receive this packet accurately, then transmitting terminal reissue commands can be fed back.
Wherein, after receiving this reissue commands, can resolve this reissue commands, determine to need packet to be retransmitted according to the information of carrying in this reissue commands.
It should be noted that, because this reissue commands is also a kind of special packet of the transmission by HDLC, also carry type of giving out a contract for a project accordingly in this reissue commands middle wrapping head, the type type of giving out a contract for a project is request retransmission bag.
Specifically, resolve the information received (reissue commands), the type of giving out a contract for a project obtained in its packet header is request retransmission bag, then determine that this information is reissue commands, respond this reissue commands, obtain packet to be retransmitted according to this reissue commands.
Step S104: send described packet to be retransmitted by HDLC.
Wherein, data to be retransmitted are sent by HDLC agreement, to make receiving terminal re-start reception to this packet, with the correct data bag polishing to receiving terminal place disappearance when going wrong in step S102 process of transmitting.
To sum up, provide a kind of HDLC data transmission method for uplink in the present embodiment, the method is applied to transmitting terminal, and when transmitting terminal sends packet, the packet header of interpolation comprises give out a contract for a project sequence number and type of giving out a contract for a project, and sends described packet by HDLC.When receiving reissue commands, directly obtain packet to be retransmitted according to this reissue commands, and by this data packet retransmission, the need of the judgement retransmitted, decreasing the holding time of retransmission processes to transmitting terminal without the need to carrying out, not affecting the speed that transmitting terminal sends data.Further, adopting the method just to add in packet by sequence number of giving out a contract for a project with type of giving out a contract for a project, without the need to changing HDLC chip, the cost of HDLC can not be increased.
The flow chart of a kind of HDLC data transmission method for uplink embodiment 2 provided by the invention as shown in Figure 2, the method is applied to transmitting terminal, and the method realizes especially by following steps:
Step S201: by the bottom transmission and reception interface encapsulation of described HDLC in described data to be sent;
Wherein, what software kit provided accepts transmit port with retransmitting function, and this transmitting and receiving terminal confession application layer uses, and HDLC drives layer to provide data transmission and reception port, and this port is for software kit.
Concrete, the incidence relation figure of software encapsulation as shown in Figure 3, comprising: application software 301, software kit 302 and HDLC bottom layer driving bag 303.The transmission and reception interface with retransmitting function that application software calls software kit encapsulation sends data, encapsulates, then call HDLC and drive the receiving end/sending end mouth provided, send final packet by HDLC in software kit to data.
Step S202: according to the frame format preset, described data to be sent are carried out package, obtain packet;
Wherein, in transmitting terminal, be preset with frame format, carry out package according to this frame format to sent data.
Concrete, frame format figure as shown in Figure 4, seq (the H)+seq (L) in this frame format is sequence number of giving out a contract for a project, pkgType is type of giving out a contract for a project, dataLen is data length, data is transmission data.
Wherein, this gives out a contract for a project in type, and 0 expression is normally given out a contract for a project, and 1 represents request retransmission bag, and 2 represent retransmission packets, and other are reserved.
It should be noted that, reissue commands also can adopt this frame format, and to facilitate transmitting terminal to analyze it, wherein, the type of giving out a contract for a project of this reissue commands is 1.
Wherein, the high section of seq (H) to be 64 be data, seq (L) is low section, and the two can merge into one.
Such as data:
0x00?0x00?0x01?0x00?0xaf?0x23?0x32?0x1b?0x00?0x00?0x00?0x0a?0x11?0x120x43?0x35?0x11?0x12?0x43?0x350x11?0x12
Wherein, sequence number of giving out a contract for a project is 0x00000100af23321b, and type of giving out a contract for a project: 0x0000 (normally giving out a contract for a project), data length: 0x000a send data: 0x11 0x12 0x43 0x35 0x11 0x12 0x43 0x35 0x110x12
It should be noted that, the frame format in the present embodiment is the frame format of a standard, is not limited to this, only needs sequence number of giving out a contract for a project, type of giving out a contract for a project in actual enforcement, and data length and these fields of transmission data also can realize.
It should be noted that, after packet is obtained to data packing to be sent, also comprising: packet described in buffer memory is to presetting storage area, and when thinking subsequently received reissue commands, the packet according to this buffer memory generates packet to be retransmitted.
Step S203: send described packet by HDLC;
Step S204: when receiving the reissue commands of receiving terminal feedback, obtain packet to be retransmitted according to described reissue commands;
Step S205: send described packet to be retransmitted by HDLC.
Wherein, step S203-205 is consistent with the step S102-104 in embodiment 1, and the present embodiment repeats no more.
To sum up, a kind of HDLC data transmission method for uplink provided in the present embodiment exists, and according to the group bag rule preset, obtains packet and specifically comprises: by the bottom transmission and reception interface encapsulation of described HDLC in described data to be sent to data packing to be sent; According to the frame format preset, described data to be sent are carried out package, obtain packet.Adopt the method, by the bottom transmission and reception interface encapsulation of HDLC in described data to be sent, send final packet to make can be driven through HDLC according to this HDLC.
As Fig. 5 shows the flow chart of a kind of HDLC data transmission method for uplink embodiment 3 provided by the invention, the method is applied to transmitting terminal, and the method realizes especially by following steps:
Step S501: according to the group bag rule preset, obtain packet to sent data packing;
Step S502: send described packet by HDLC;
Wherein, step S501-502 is consistent with the step S101-102 in embodiment 1, and the application repeats no more.
Step S503: when receiving the reissue commands of receiving terminal feedback, resolving described reissue commands, obtaining the indication information of packet corresponding to data to be retransmitted;
Wherein, the indication information of packet corresponding to data to be retransmitted is carried in reissue commands.
Wherein, this reissue commands adopts the frame format identical with the packet that transmitting terminal sends, and this indication information writes in this form as transmission data.
Concrete, this reissue commands is resolved, can indication information corresponding to transmission data content wherein.
Step S504: according to described indication information, obtains the packet corresponding to described indication information from described default storage area;
Wherein, when sending packet, also this data pack buffer is extremely preset storage area.
Therefore, according to this indication information, from this storage area, obtain the packet corresponding to this indication information.
In concrete enforcement, the sequence number of giving out a contract for a project of multiple packets that information to be sent is corresponding has certain rule, and can determine the sequence number of giving out a contract for a project of a packet according to adjacent packet, therefore this indication information can be the sequence number of giving out a contract for a project of this packet.
Concrete, according to this sequence number of giving out a contract for a project, the packet with identical sequence number of giving out a contract for a project can be searched from storage area.
Certainly, receiving terminal also can according to the data genaration indication information carried in the packet received, the information of the packet that receiving terminal receives is included in this indication information, transmitting terminal determines according to this indication information this information to be sent that this packet is corresponding from storage area, and then determines the packet that receiving terminal does not receive from this information to be sent.
Such as, the information sent when this transmitting terminal is 1-30, information 1-10, information 11-20, information 21-30 organizes bag respectively and sends, information 1-10 is packet 1, information 11-20 is packet 2, information 21-30 is packet 3, after receiving terminal receives packet 1 and packet 2, do not receive packet 3, the data genaration indication information that this receiving terminal carries according to these data, this indication information includes this receiving terminal and receives information 1-20, after transmitting terminal receives this indication information, can determine that the information taken defeat is 21-30 according to this indication information, the packet of the 21-30 information composition in this information to be sent stored from storage area, i.e. packet 3.
Step S505: the type of giving out a contract for a project of carrying in the packet header of described packet being revised as retransmission packet by normally giving out a contract for a project, obtaining packet to be retransmitted;
Wherein, the packet obtained in step S504 is the packet of normally giving out a contract for a project, and for being changed into packet to be retransmitted, the type of giving out a contract for a project in its packet header can be revised as retransmission packet by normally giving out a contract for a project, as being revised as 2 from 0.
Step S506: send described packet to be retransmitted by HDLC.
Wherein, step S506 is consistent with the step S104 in embodiment 1, and the application repeats no more.
To sum up, in a kind of HDLC data transmission method for uplink that the present embodiment provides, the indication information of packet corresponding to data to be retransmitted is carried in this reissue commands, then describedly obtain packet to be retransmitted according to described reissue commands and comprise: resolve described reissue commands, obtain the indication information of packet corresponding to data to be retransmitted; According to described indication information, obtain the packet corresponding to described indication information from described default storage area; The type of giving out a contract for a project of carrying in the packet header of described packet being revised as retransmission packet by normally giving out a contract for a project, obtaining packet to be retransmitted.Adopt the method, according to the indication information of packet corresponding to the data to be retransmitted of carrying in reissue commands, directly can obtain corresponding packet according to this indication information from storage area, type of giving out a contract for a project in this packet header is revised as retransmission packet, this determines that the process of retransmission packet is simple, consuming time short, retransmission processes is rapid.
As Fig. 6 shows the flow chart of a kind of HDLC data transmission method for uplink embodiment 4 provided by the invention, the method is applied to transmitting terminal, and the method realizes especially by following steps:
Step S601: according to the group bag rule preset, obtain packet to sent data packing;
Step S602: send described packet by HDLC;
Wherein, step S601-602 is consistent with the step S101-102 in embodiment 1, and the present embodiment repeats no more.
Step S603: when receiving the reissue commands of receiving terminal feedback, control current Packet Generation process suspension;
Wherein, before performing this repeating transmission, transmitting terminal also needs current Packet Generation process suspension, to ensure preferentially to perform this repeating transmission, makes receiving terminal receive complete correct data content as early as possible.
After repeating transmission completes, continue Packet Generation process.
It should be noted that, be first perform step S603 in the present embodiment, after then performing step S604, but be not limited to this, in actual enforcement, the two can carry out simultaneously.
Step S604: obtain packet to be retransmitted according to described reissue commands;
Step S605: send described packet to be retransmitted by HDLC.
Wherein, step S604-605 is consistent with the step S103-104 in embodiment 1, and the present embodiment repeats no more.
It should be noted that, this transmitting terminal can be provided with transmit control device, and for receiving reissue commands, when it receives this reissue commands, instruction resends package, controls the process resend.
To sum up, a kind of HDLC data transmission method for uplink provided in the present embodiment, described receive receiving terminal feedback reissue commands after, before obtaining packet to be retransmitted according to described reissue commands, also comprise: control current Packet Generation process suspension, to ensure preferentially to perform this repeating transmission, receiving terminal is made to receive complete correct data content as early as possible.
Describe a kind of HDLC data transmission method for uplink that transmitting terminal performs in the embodiment that the invention described above provides in detail, accordingly, present invention also offers a kind of HDLC data transmission method for uplink that receiving terminal end performs, provide specific embodiment below and be described in detail.
As Fig. 7 shows the flow chart of a kind of HDLC data transmission method for uplink embodiment 5 provided by the invention, the method is applied to receiving terminal, and the method realizes especially by following steps:
Step S701: the packet sent by HDLC receiving end/sending end;
Wherein, the packet header of described packet comprises give out a contract for a project sequence number and type of giving out a contract for a project.
Step S702: analyze described packet, and judge whether to occur packet error of transmission;
Wherein, after receiving packet, according to the information of carrying in this logarithmic data bag, judge whether to occur packet error of transmission.
Wherein, this data transmission fault comprises: packet loss and packet make a mistake.
Concrete, the situation of this packet loss can judge according to the sequence number of giving out a contract for a project in the packet header of packet, and this packet makes a mistake and can judge the form of packet.
Step S703: if error of transmission, generates reissue commands and feeds back transmitting terminal.
Wherein, when occurring error of transmission, generating reissue commands according to this mistake, and feeding back to transmitting terminal, resending corresponding packet to make transmitting terminal.
Specific, according to this error of transmission content, generate reissue commands according to the frame format preset.
Wherein, the type of giving out a contract for a project of this reissue commands is 1, i.e. request retransmission bag.
Certainly, step S702, continues to receive follow-up packet for when there is not packet loss in judged result.
To sum up, present embodiments provide a kind of HDLC data transmission method for uplink, comprising: the packet sent by HDLC receiving end/sending end, the packet header of described packet comprises give out a contract for a project sequence number and type of giving out a contract for a project; Analyze described packet, and judge whether to occur packet error of transmission; If error of transmission, generate reissue commands and feed back transmitting terminal.Adopt the method, judge whether to occur error of transmission at receiving terminal place, and reissue commands feedback transmitting terminal is generated when there is error of transmission, ensure that transmitting terminal is without the need to carrying out the judgement the need of retransmitting, decrease the holding time of retransmission processes to transmitting terminal, do not affect the speed that transmitting terminal sends data.
As Fig. 8 shows the flow chart of a kind of HDLC data transmission method for uplink embodiment 6 provided by the invention, the method is applied to receiving terminal, and the method realizes especially by following steps:
Step S801: the packet sent by HDLC receiving end/sending end;
Wherein, step S801 is consistent with the step S701 in embodiment 5, and the present embodiment repeats no more.
Step S802: resolve described packet, obtains give out a contract for a project sequence number and the type of giving out a contract for a project in described packet header;
Wherein, in the packet header of this packet, there are give out a contract for a project sequence number and type of giving out a contract for a project, resolve this packet and can obtain its give out a contract for a project sequence number and type of giving out a contract for a project.
Step S803: according to the type of giving out a contract for a project of described packet, judges that described packet is the packet of normally giving out a contract for a project, or the packet retransmitted;
Wherein, this gives out a contract for a project in type, and 0 expression is normally given out a contract for a project, and 1 represents request retransmission bag, and 2 represent retransmission packets, and other are reserved.
Concrete, when the type of giving out a contract for a project in this packet is 0, then it is the packet of normally giving out a contract for a project; When its type of giving out a contract for a project is in 2, then it is the packet retransmitted.
Step S804: when described packet is the packet of normally giving out a contract for a project, according to the sequence number of giving out a contract for a project in described packet of normally giving out a contract for a project, judges whether to occur packet loss, if so, occurs error of transmission;
Wherein, the sequence number of giving out a contract for a project of multiple packets that same information is corresponding is continuous.
Concrete, when these data are the packet of normally giving out a contract for a project, sequence number of giving out a contract for a project in this packet is compared with the sequence number of giving out a contract for a project of the packet received before, when the two consecutive hours, then think without packet loss, if the two appearance is discontinuous, then occur packet drop, now there is error of transmission, need the packet again transmitting packet loss.
Step S805: when described packet is the packet retransmitted, the packet of normally giving out a contract for a project stored in sequence number of giving out a contract for a project in the packet according to described repeating transmission and described receiving terminal judges whether to occur packet loss, if so, occurs error of transmission;
Wherein, the sequence number of giving out a contract for a project of multiple packets that same information is corresponding is continuous.
Concrete, when these data are the packet retransmitted, the sequence number of giving out a contract for a project in this packet compared with the sequence number of giving out a contract for a project of normally giving out a contract for a project before, when the two consecutive hours, then thinking the packet loss problem that have modified last time, there is not packet loss in this re-transmission.
But the sequence number of giving out a contract for a project in this packet is compared with the sequence number of giving out a contract for a project of normally giving out a contract for a project before, if the two is still discontinuous, then occurs packet drop, now occurs error of transmission, needs the packet again again transmitting packet loss.
Step S806: if error of transmission, the sequence number of giving out a contract for a project according to the packet received is determined by the sequence number of giving out a contract for a project of the packet of packet loss;
Wherein, in integrating step S804 and step S805, determine the process occurring packet loss, can determine by the sequence number of giving out a contract for a project of the packet of packet loss according to the sequence number of giving out a contract for a project of each packet received.
Sequence number of giving out a contract for a project as each packet received is 1,2,4 and 5, according to the continuity of sequence number of giving out a contract for a project, can determine that by the data of giving out a contract for a project of the packet of packet loss be 3.
Step S807: according to by the serial number gencration reissue commands feed back transmitting terminal of giving out a contract for a project of the packet of packet loss.
Wherein, generate reissue commands, carry this in this reissue commands by the sequence number of giving out a contract for a project of the packet of packet loss, as 4 number bags.
Wherein, this reissue commands adopts the frame format preset, concrete, this is write in this reissue commands as transmission data by the sequence number of giving out a contract for a project of the packet of packet loss.
In concrete enforcement, if it is to be retransmitted with regard to rev down process rev etc. to judge there is error of transmission, waiting for that the packet received in retransmission time is then without the need to judging its type of giving out a contract for a project, whether it directly judges continuously according to the packet of normally giving out a contract for a project of wherein give out a contract for a project sequence number and storage.
To sum up, in a kind of HDLC data transmission method for uplink that the present embodiment provides, the described packet of this analysis, and judge whether to occur that packet error of transmission comprises: resolve described packet, obtain give out a contract for a project sequence number and type of giving out a contract for a project in described packet header; According to the type of giving out a contract for a project of described packet, judge that described packet is the packet of normally giving out a contract for a project, or the packet retransmitted; When described packet is the packet of normally giving out a contract for a project, according to the sequence number of giving out a contract for a project in described packet of normally giving out a contract for a project, judges whether to occur packet loss, if so, occur error of transmission; When described packet is the packet retransmitted, the packet of normally giving out a contract for a project stored in sequence number of giving out a contract for a project in the packet according to described repeating transmission and described receiving terminal judges whether to occur packet loss, if so, occurs error of transmission.Adopt the method, judge whether to occur packet loss according to the sequence number of giving out a contract for a project in this packet, determination methods is simple, is easy to realize.
As Fig. 9 shows the flow chart of a kind of HDLC data transmission method for uplink embodiment 7 provided by the invention, the method is applied to receiving terminal, and the method realizes especially by following steps:
Step S901: the packet sent by HDLC receiving end/sending end;
Wherein, step S901 is consistent with the step S701 in embodiment 5, and the present embodiment repeats no more.
Step S902: whether the frame format of described packet meets the frame format preset; If do not met, then there is packet error of transmission;
Wherein, transfer of data is carried out owing to adopting the packet of default frame format form between receiving terminal and transmitting terminal, when breaking down in transmitting procedure, the frame format that receiving terminal can be caused to receive packet does not meet this frame format preset, and now may occur packet error of transmission.
Even if this packet receiving end receives, because its frame format becomes, the data of its internal transmission also can be affected, and therefore, are judged as data packet transmission mistake, need to retransmit this packet.
Step S903: if error of transmission, generates reissue commands and feeds back transmitting terminal.
Wherein, step S903 is consistent with the step S703 in embodiment 5, and the present embodiment repeats no more.
To sum up, in a kind of HDLC data transmission method for uplink that the present embodiment provides, the described packet of this analysis, and judge whether to occur that packet error of transmission comprises: whether the frame format of described packet meets the frame format preset; If do not met, then there is packet error of transmission.Adopt the method, directly judge the frame format of this packet, determination methods is simple, is easy to realize.
As Figure 10 shows the flow chart of a kind of HDLC data transmission method for uplink embodiment 8 provided by the invention, the method is applied to receiving terminal, and the method realizes especially by following steps:
Step S1001: the packet sent by HDLC receiving end/sending end;
Wherein, step S1001 is consistent with the step S701 in embodiment 5, and the present embodiment repeats no more.
Step S1002: analyze described packet, determines the real data length in described transmission data;
Concrete, analyze the packet received, the sequence number of giving out a contract for a project of wherein being carried, type of giving out a contract for a project, the information such as data length and transmission data, obtain its real data length taken to the transmission data analysis in this packet further.
Step S1003: by the data length comparison in described real data length and described packet, obtain comparison result;
Wherein, the data length carried in this packet is the data length that transmitting terminal sends, and its real data length that should take with transmission data is consistent.
Concrete, compared by the data length information that carries in this real data length and packet, obtain comparative result, this comparative result is two kinds: identical or different.
Step S1004: when described comparison result represents that described real data length is different with the data length in described packet, data packet transmission mistake;
Wherein, when real data length with in packet carry data length information different time, show in this transmission of data packets, the transmission data that it carries go wrong, the transmission data that the transmission data and the transmitting terminal that cause receiving terminal to receive send out are different, data packet transmission fault.
Step S1005: if error of transmission, generates reissue commands and feeds back transmitting terminal.
Wherein, step S1005 is consistent with the step S703 in embodiment 5, and the present embodiment repeats no more.
To sum up, in a kind of HDLC data transmission method for uplink that the present embodiment provides, also comprise in the packet header of described packet: data length and transmission data, then analyze described packet, and judge whether to occur that packet error of transmission comprises: analyze described packet, determine the real data length in described transmission data; By the data length comparison in described real data length and described packet, obtain comparison result; When described comparison result represents that described real data length is different with the data length in described packet, data packet transmission mistake.Adopt the method, by the data length comparison of carrying in the real data length sending data in packet and described packet, determination methods is simple, is easy to realization.
In this specification, each embodiment adopts the mode of going forward one by one to describe, and what each embodiment stressed is the difference with other embodiments, between each embodiment identical similar portion mutually see.For the device that embodiment provides, the method provided due to itself and embodiment is corresponding, so description is fairly simple, relevant part illustrates see method part.
To the above-mentioned explanation of provided embodiment, professional and technical personnel in the field are realized or uses the present invention.To be apparent for those skilled in the art to the multiple amendment of these embodiments, General Principle as defined herein can without departing from the spirit or scope of the present invention, realize in other embodiments.Therefore, the present invention can not be restricted to these embodiments shown in this article, but will meet the widest scope consistent with principle provided in this article and features of novelty.
Claims (10)
1. a High-Level Data Link Control HDLC data transmission method for uplink, is characterized in that, is applied to transmitting terminal, and described method comprises:
According to the group bag rule preset, obtain packet to sent data packing; The packet header of described packet comprises the sequence number and to give out a contract for a project type of giving out a contract for a project, described in give out a contract for a project type for normally to give out a contract for a project;
Described packet is sent by HDLC;
When receiving the reissue commands of receiving terminal feedback, obtain packet to be retransmitted according to described reissue commands, the packet header of described packet to be retransmitted comprises the sequence number and to give out a contract for a project type of giving out a contract for a project, described in type of giving out a contract for a project be retransmission packet;
Described packet to be retransmitted is sent by HDLC.
2. method according to claim 1, is characterized in that, the group bag rule that described foundation is preset, and obtains packet specifically comprise data packing to be sent:
By the bottom transmission and reception interface encapsulation of described HDLC in described data to be sent;
According to the frame format preset, described data to be sent are carried out package, obtain packet.
3. method according to claim 1, is characterized in that, after obtaining packet, also comprises data packing to be sent:
Packet described in buffer memory is to presetting storage area.
4. method according to claim 1, is characterized in that, carries the indication information of packet corresponding to data to be retransmitted in described reissue commands, then describedly obtain packet to be retransmitted according to described reissue commands and comprise:
Resolve described reissue commands, obtain the indication information of packet corresponding to data to be retransmitted;
According to described indication information, obtain the packet corresponding to described indication information from described default storage area;
The type of giving out a contract for a project of carrying in the packet header of described packet being revised as retransmission packet by normally giving out a contract for a project, obtaining packet to be retransmitted.
5. method according to claim 1, is characterized in that, described in receive receiving terminal feedback reissue commands after, before obtaining packet to be retransmitted according to described reissue commands, also comprise:
Control current Packet Generation process suspension.
6. a HDLC data transmission method for uplink, is characterized in that, is applied to receiving terminal, comprising:
By the packet that HDLC receiving end/sending end sends, the packet header of described packet comprises give out a contract for a project sequence number and type of giving out a contract for a project;
Analyze described packet, and judge whether to occur packet error of transmission;
If error of transmission, generate reissue commands and feed back transmitting terminal.
7. method according to claim 6, is characterized in that, the described packet of described analysis, and judges whether to occur that packet error of transmission comprises:
Resolve described packet, obtain give out a contract for a project sequence number and type of giving out a contract for a project in described packet header;
According to the type of giving out a contract for a project of described packet, judge that described packet is the packet of normally giving out a contract for a project, or the packet retransmitted;
When described packet is the packet of normally giving out a contract for a project, according to the sequence number of giving out a contract for a project in described packet of normally giving out a contract for a project, judges whether to occur packet loss, if so, occur error of transmission;
When described packet is the packet retransmitted, the packet of normally giving out a contract for a project stored in sequence number of giving out a contract for a project in the packet according to described repeating transmission and described receiving terminal judges whether to occur packet loss, if so, occurs error of transmission.
8. method according to claim 7, is characterized in that, the described packet of described analysis, and judges whether to occur that packet error of transmission comprises:
Whether the frame format of described packet meets the frame format preset;
If do not met, then there is packet error of transmission.
9. method according to claim 6, is characterized in that, also comprises in the packet header of described packet: data length and transmission data, then analyze described packet, and judge whether to occur that packet error of transmission comprises:
Analyze described packet, determine the real data length in described transmission data;
By the data length comparison in described real data length and described packet, obtain comparison result;
When described comparison result represents that described real data length is different with the data length in described packet, data packet transmission mistake.
10. the method according to any one of claim 7-9, is characterized in that, described generation reissue commands comprises:
Sequence number of giving out a contract for a project according to the packet received is determined by the sequence number of giving out a contract for a project of the packet of packet loss;
Foundation is by the serial number gencration reissue commands of giving out a contract for a project of the packet of packet loss.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410620117.XA CN104283650A (en) | 2014-11-05 | 2014-11-05 | High-level data link control data sending method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410620117.XA CN104283650A (en) | 2014-11-05 | 2014-11-05 | High-level data link control data sending method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN104283650A true CN104283650A (en) | 2015-01-14 |
Family
ID=52258169
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410620117.XA Pending CN104283650A (en) | 2014-11-05 | 2014-11-05 | High-level data link control data sending method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104283650A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107864116A (en) * | 2017-06-22 | 2018-03-30 | 平安科技(深圳)有限公司 | Data transmission method, terminal and computer-readable recording medium |
CN109168064A (en) * | 2018-09-17 | 2019-01-08 | 视联动力信息技术股份有限公司 | A kind of synchronous display method and system of electronic data |
CN110351028A (en) * | 2019-07-15 | 2019-10-18 | 联想(北京)有限公司 | A kind of data processing method and device and electronic equipment |
CN114257350A (en) * | 2021-12-31 | 2022-03-29 | 广东省教育研究院 | Transmission quality optimization method, device and transmission system |
CN114374474A (en) * | 2021-12-29 | 2022-04-19 | 苏州摩比信通智能系统有限公司 | Data transmission system and method |
WO2024016279A1 (en) * | 2022-07-21 | 2024-01-25 | Oppo广东移动通信有限公司 | Communication method, apparatus and device, and storage medium, chip, product and program |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN86101893A (en) * | 1985-02-28 | 1986-11-05 | 佳能株式会社 | Data communications equipment |
US20050130663A1 (en) * | 2003-11-28 | 2005-06-16 | Ki-Seob Hong | Apparatus and method for controlling a forward data rate in a mobile communication system |
CN1852265A (en) * | 2006-05-30 | 2006-10-25 | 杭州华为三康技术有限公司 | Method for synchronous frame transmitting on IP network and network apparatus for transmission |
CN101159520A (en) * | 2007-10-29 | 2008-04-09 | 中兴通讯股份有限公司 | Data transmission method |
CN103269260A (en) * | 2013-06-03 | 2013-08-28 | 腾讯科技(深圳)有限公司 | Data transmission method, data receiving terminal, data sending terminal and data transmission system |
-
2014
- 2014-11-05 CN CN201410620117.XA patent/CN104283650A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN86101893A (en) * | 1985-02-28 | 1986-11-05 | 佳能株式会社 | Data communications equipment |
US20050130663A1 (en) * | 2003-11-28 | 2005-06-16 | Ki-Seob Hong | Apparatus and method for controlling a forward data rate in a mobile communication system |
CN1852265A (en) * | 2006-05-30 | 2006-10-25 | 杭州华为三康技术有限公司 | Method for synchronous frame transmitting on IP network and network apparatus for transmission |
CN101159520A (en) * | 2007-10-29 | 2008-04-09 | 中兴通讯股份有限公司 | Data transmission method |
CN103269260A (en) * | 2013-06-03 | 2013-08-28 | 腾讯科技(深圳)有限公司 | Data transmission method, data receiving terminal, data sending terminal and data transmission system |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107864116A (en) * | 2017-06-22 | 2018-03-30 | 平安科技(深圳)有限公司 | Data transmission method, terminal and computer-readable recording medium |
CN109168064A (en) * | 2018-09-17 | 2019-01-08 | 视联动力信息技术股份有限公司 | A kind of synchronous display method and system of electronic data |
CN109168064B (en) * | 2018-09-17 | 2020-09-18 | 视联动力信息技术股份有限公司 | Synchronous display method and system of electronic data |
CN110351028A (en) * | 2019-07-15 | 2019-10-18 | 联想(北京)有限公司 | A kind of data processing method and device and electronic equipment |
CN114374474A (en) * | 2021-12-29 | 2022-04-19 | 苏州摩比信通智能系统有限公司 | Data transmission system and method |
CN114257350A (en) * | 2021-12-31 | 2022-03-29 | 广东省教育研究院 | Transmission quality optimization method, device and transmission system |
WO2024016279A1 (en) * | 2022-07-21 | 2024-01-25 | Oppo广东移动通信有限公司 | Communication method, apparatus and device, and storage medium, chip, product and program |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104283650A (en) | High-level data link control data sending method | |
US9432251B2 (en) | Enhanced acknowledgement and retransmission mechanism | |
US8331269B2 (en) | Method and device for transmitting voice in wireless system | |
RU2011108113A (en) | DEVICE AND METHOD FOR FORMING MAS DATA PROTOCOL MODULE IN WIRELESS COMMUNICATION SYSTEM | |
CN102647252B (en) | A serial communication method | |
CN109905205B (en) | Data sending method, data receiving method, data sending equipment, data receiving equipment, data transmission method and data transmission system | |
CN108322414A (en) | A kind of feedback information transmission method and device | |
CN1852265A (en) | Method for synchronous frame transmitting on IP network and network apparatus for transmission | |
WO2015013959A1 (en) | Method and device for information configuration and data receiving | |
CN103916375B (en) | The encapsulation of hfc plant downlink data multichannel and transmission method | |
CN103973414B (en) | A kind of data transmission method and device | |
CN104780028A (en) | Method and equipment for retransmitting TCP (transmission control protocol) data messages | |
CN105791154A (en) | Data transmission method and device based on UDP (User Datagram Protocol) | |
CN101369879B (en) | Method and apparatus for requesting data retransmission | |
CN101605128B (en) | Method for LINUX master-slave equipment to communicate through Ethernet interface | |
KR20210008300A (en) | System and method for implementing a hybrid automatic repeat request process | |
CN109286574B (en) | Information transmission method, network side equipment and terminal | |
CN106302213A (en) | A kind of method and device of data transmission | |
CN105871512A (en) | Data transmission method and device | |
EP3672189B1 (en) | Data transmission method, device and system | |
CN105227276B (en) | A kind of peer-to-peer network data transmission method based on UDT | |
CN102255713B (en) | Data packets of underwater sound sensor network and transmission method | |
CN103825682B (en) | Efficient and rapid method for transmitting WTB multicast message data | |
CN104396172A (en) | Automatic retransmission processing method, transmitting end device and receiving end device | |
CN101932008A (en) | A method and device for automatic retransmission |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20150114 |
|
RJ01 | Rejection of invention patent application after publication |