Invention content
Based on this, it is necessary in view of the above technical problems, provide a kind of efficient signal automatic retransmission request method and dress
It sets.
A kind of signal automatic retransmission request method, the method includes:
Obtain initial order caching window parameter;
When receiving PDU, according to the initial order caching window parameter, whether current PDU sequence numbers are detected in just
In beginning order caching window;
According to current PDU sequence numbers whether in situation in initial order caching window and default more new strategy, institute is updated
State initial order caching window parameter;
When caching the empty time in the updated initial order caching window more than preset time threshold, cached
It washes away.
In one of the embodiments, the initial order caching window parameter include initial order caching window size, just
Beginning order caching window initial position with initial order caching window end position, the current PDU sequence numbers of basis whether in just
Situation and default more new strategy, update the initial order caching window parameter in beginning order caching window, including:
When current PDU sequence numbers are in initial order caching window, the initial order caching window end position is changed
For the current PDU sequence numbers, update the initial order caching window initial position be the current PDU sequence numbers with it is described just
Beginning order caching window size difference adds 1;
When current PDU sequence numbers are not in initial order caching window, the initial order caching window start bit is changed
It is set to the current PDU sequence numbers and adds 1 with the initial order caching window size difference, update the initial order caching window
End position is the current PDU sequence numbers.
In one of the embodiments, after the initial order caching window parameter of acquisition, further include:
PDU reception state feedback data is created, the PDU reception states feedback data is used to mark using kinds of characters
Whether PDU is properly received.
The establishment PDU reception state feedback data in one of the embodiments, including:
Bit map is created, whether the bit map using binary-coded notches PDU for being properly received.
In one of the embodiments, according to the initial order caching window parameter, detect whether current PDU sequence numbers are located
In in initial order caching window, further include before:
When it is PDU fragments to receive PDU, PDU reception states are labeled as being not successfully received;
The PDU fragments are cached in initial order caching window;
When all PDU fragments of PDU are cached to the initial order caching window, by PDU reception states be labeled as at
Work(receives.
It is described in one of the embodiments, to be more than when caching the empty time in the updated initial order caching window
When preset time threshold, carrying out cache-flush includes:
When currently not receiving PDU, the sequence number to not receiving PDU currently corresponds in the initial order caching window
Position carries out timing;
It is when timing time is more than preset time threshold, the newer initial order caching window initial position is secondary more
It is newly the current sequence number for not receiving PDU, is updated to the newer initial order caching window end position is secondary
It is described that currently not receiving the sum of the sequence number of PDU and described initial order caching window size subtracts 1.
A kind of signal automatic retransmission request method, the method includes:
Obtain the initial frame feedback information for sending and caching window parameter, and obtaining receiving terminal transmission;
According to the frame feedback information, the PDU not received is put into retransmission queue, by the PDU received from retransmit team
It is deleted in row;
When reaching data delivery time, retransmission queue data are sent, and are sent successively pending in initial transmission caching window
The PDU sent;
When PDU sends time-out or number of retransmissions is more than threshold value, PDU is deleted from retransmission queue, and initial send is set
Caching window start bit moves backward, until next frame feedback information is the corresponding sequence numbers of PDU not received.
The acquisition is initial in one of the embodiments, sends before caching window parameter, further includes:
When PDU to be sent is first data packet of connection, it is described that initial position in initial transmission caching window, which is arranged,
PDU corresponding sequences number to be sent, it is that the initial transmission caches start bit in window that the initial transmission, which caches end position in window,
It sets and subtracts 1 with initially the sum of transmission caching window size.
A kind of signal automatic repeat request device, described device include:
Acquisition module is received, for obtaining initial order caching window parameter;
Detection module, for when receiving PDU, according to the initial order caching window parameter, detecting current PDU sequences
Number whether in the initial order caching window;
Update module, for whether being in situation in initial order caching window according to current PDU sequence numbers and presetting more
New strategy updates the initial order caching window parameter;
Cache-flush module, for when caching the empty time in the updated initial order caching window more than presetting
Between threshold value when, carry out cache-flush.
A kind of signal automatic repeat request device, described device include:
Acquisition module is sent, window parameter is cached for obtaining initial send, and obtains the frame feedback that receiving terminal feedback is sent
Information;
First processing module, for according to the frame feedback information, being characterized as the frame feedback information not receive correspondence
PDU be put into retransmission queue, be characterized as the frame feedback signal to have received corresponding PDU and be deleted from retransmission queue;
Sending module for when reaching transmission data delivery time, sending retransmission queue data, and is sent initial successively
Send PDU to be sent in caching window;
Second processing module, for when PDU sends time-out or number of retransmissions is more than threshold value, by the PDU from retransmission queue
It deletes, and the initial caching window start bit that sends is set and is moved backward, until next frame feedback information is the PDU not received
Corresponding sequence number.
Above-mentioned signal automatic retransmission request method and device, receiving terminal and transmitting terminal obtain respectively initial caching window ginseng respectively
Number transmits/receives PDU sequence numbers and initial caching window according to current, and update initially caches window during real-time transmission/reception PDU
Parameter, and based on updated initial caching window parameter and PDU sequence numbers currently are transmitted/received, in receiving terminal, Washing machine is set
System is arranged retransmission queue deleting mechanism in transmitting terminal, can effectively clear up the abnormal data in retransmission processes, and it is right for a long time to avoid
The retransmission processes and confirmation message of data lose the abnormal conditions brought, and efficiently realize signal automatic repeat request, it is ensured that network
Communication quality and efficiency.
Specific implementation mode
It is with reference to the accompanying drawings and embodiments, right in order to make the object, technical solution and advantage of the application be more clearly understood
The application is further elaborated.It should be appreciated that specific embodiment described herein is only used to explain the application, not
For limiting the application.
Signal automatic retransmission request method provided by the present application, specifically can be applied in TDMA system, as shown in Figure 1
In TDMA frame structure, its ACK (Acknowledgement confirms character) state is fed back according to each packet, since time delay is shorter
(data are completed to carry out transmission back within a frame period), and number of users is more, the time interval resource for distributing to each user has very much
Limit (overall delay divided by the available time slot resource that number of users is each user), needs to compress the relevant control information of ACK, using this
On the one hand ARQ functions of retransmission may be implemented in application, on the one hand also ensure the time delay and handling capacity of user, number of users.In reality
In, the application is applied in application environment as shown in Figure 2.Wherein, transmitting terminal obtains initial send and caches window parameter, and
The PDU not received is put into retransmission queue by the frame feedback information for obtaining receiving terminal feedback according to frame feedback information, will have been connect
The PDU of receipts is deleted from retransmission queue, when reaching the transmission data moment, sends retransmission queue data, and send successively initial
PDU to be sent in caching window is sent to delete the PDU from retransmission queue when PDU sends time-out or number of retransmissions is more than threshold value
It removes, and the initial caching window start bit that sends is set and is moved backward, the corresponding sequence numbers of PDU are not received until next;Meanwhile
Receiving terminal obtains initial order caching window parameter and, according to initial order caching window parameter, detects current PDU when receiving PDU
Whether whether sequence number is in initial order caching window, according to current PDU sequence numbers in situation in initial order caching window
And default more new strategy, initial order caching window parameter is updated, when caching cavity in updated initial order caching window
Between be more than preset time threshold when, carry out cache-flush.
As shown in figure 3, a kind of signal automatic retransmission request method, method include:
S220:Obtain initial order caching window parameter.
Initial order caching window refers to the caching window that receiving terminal and transmitting terminal are negotiated to be formed in the starting stage (powering on booting)
Mouthful, initial order caching window is used for the data (PDU) that temporal cache receives.Initial order caching window parameter includes mainly initial
Window initial position SendStart, initial caching window final position SendEnd and initial caching window size SendSize are cached,
Wherein SendSize=SendEnd-SendStart+1.Initial caching window initial position refers to that receiving terminal is receiving first
The position of data (PDU) storage, the initial window size that caches refers to the initial caching maximum allowable data cached size of window single.It is non-
Necessary, the initial window size that caches could be provided as 60.
S240:When receiving PDU, according to initial order caching window parameter, whether current PDU sequence numbers are detected in just
In beginning order caching window.
Receiving terminal receives the PDU from transmitting terminal, and when receiving a PDU, which is 1, receiving terminal
First PDU is stored into the initial position into initial order caching window, as time goes by, receiving terminal receives more and more
PDU, when receiving n-th PDU, the corresponding Serial No. N of n-th PDU, according to initial order caching window parameter, inspection
N-th PDU sequence numbers are surveyed whether also in initial order caching window, that is, judging in initial order caching window whether to also have position
It sets storage and works as n-th PDU.For example, when receiving some PDU, its Serial No. 61, initial order caching window parameter are identified
In initial order caching window size be 60, at this point, current PDU sequence numbers 61 are not in initial order caching window;For another example, it receives
When to another PDU, its Serial No. 30 is identified, at this point, current PDU sequence numbers 30 are in initial order caching window.
S260:According to current PDU sequence numbers whether in situation in initial order caching window and default more new strategy, more
New initial order caching window parameter.
For current PDU sequence numbers whether in the initial order caching window different situations, using it is default it is different by the way of
Update initial order caching window parameter.Specifically, single initial order caching window can only cache the PDU of limited quantity, i.e., its
The interior PDU sequence numbers that can only store limited quantity, however in transmitting terminal and receiving terminal normal course of communications, receiving terminal receives
PDU quantity is more and more, and therefore, it is necessary to be updated to initial order caching window parameter.
In one of the embodiments, according to current PDU sequence numbers whether in the initial order caching window situation and
Default more new strategy, updates initial order caching window parameter, including:When current PDU sequence numbers are in initial order caching window
When, it is current PDU sequence numbers to change initial order caching window end position, and it is current to update initial order caching window initial position
PDU sequence numbers add 1 with initial order caching window size difference;When current PDU sequence numbers are not in initial order caching window
When, it is that current PDU sequence numbers and initial order caching window size difference add 1 to change initial order caching window initial position, more
New initial order caching window end position is current PDU sequence numbers.If current PDU sequence numbers are in initial order caching window,
Show that current PDU can be cached in time to initial order caching window, it is current PDU to update end position in initial order caching window
Sequence number, initial position are that end position (current PDU sequence numbers) and initial order caching window size difference add 1, i.e.,
RevEnd=SN, RevStart=RevEnd-RevSize+1.If current PDU sequence numbers are not in initial order caching window,
Show that current PDU can not be cached to the initial order caching window, it is current PDU sequences to update initial order caching window end position
Number, it is that current PDU sequence numbers add 1, i.e. RevEnd=SN with initial order caching window size difference to update its initial position,
RevStart=SN-RevSize+1.
S280:When caching the empty time in updated initial order caching window more than preset time threshold, delayed
It deposits and washes away.
It refers to not having data buffer storage to enter in some position to cache cavity, causes cavity.The caching empty time refers to some
Position exist caching cavity time, specifically, can since some position occur caching cavity position timing, until should
Caching empty situation in position disappears.In practical applications, data are continually sending over, in the order caching of receiving terminal
Window can only cache a certain amount of data, the i.e. data of this window siaz sizes, receiving only in this window
PDU just thinks for effective data, data must be kept in transmission process it is effective with it is coherent, data are continually transmitted across
Come, need to handle always, if initial order caching window does not update, be always maintained at it is constant if can be filled up sooner or later by data, this
Sample, which is said, causes subsequent data that can not fall into caching window, a large amount of invalid datas occurs, it would therefore be desirable to be carried out to caching window
Update, in order to ensure the continuity of data, needs the constantly update sliding backward of order caching window, works as hair during newer
There are when cavity position in existing order caching window, if being always maintained at wait state, then caching window will block here, Wu Faji
Continuous update, therefore, it is necessary to carry out flush operation to it.
Initial order caching window is continuously updated after step S260, constantly has PDU to be sent to caching in the caching window,
There may be the non-receiving ends PDU to be successfully received, for the PDU not being successfully received, corresponding sequence number will be initial
Occur caching cavitation in order caching window, such as the PDU of sequence number SN=10 is not successfully received, then it is updated initial
It corresponds to the positions SN=10 in order caching window to be stored in without corresponding data always, in the empty state of caching, timing initially caches window
Time existing for middle caching cavity carries out cache-flush when the caching empty time being more than preset time threshold.Cache-flush is
The cavity position in the presence of the successful reception PDU not received is skipped, not continuing waiting for PDU in currently processed layer receives confirmation, connects
It receives and handles follow-up PDU, the data for being marked with cavity position are sent to upper layer (such as application layer) to carry out ARQ confirmations, are subtracted
Few unnecessary delay waits for, and improves ARQ efficiency.
Above-mentioned signal automatic retransmission request method, receiving terminal and transmitting terminal obtain respectively initial caching window parameter, root respectively
PDU sequence numbers and initial caching window are transmitted/received according to current, update initially caches window parameter during real-time transmission/reception PDU,
And based on updated initial caching window parameter and PDU sequence numbers currently are transmitted/received, wash away mechanism in receiving terminal setting,
Retransmission queue deleting mechanism is arranged in transmitting terminal, can effectively clear up the abnormal data in retransmission processes, avoids for a long time to data
Retransmission processes and confirmation message lose the abnormal conditions brought, efficiently realize signal automatic repeat request, it is ensured that network communication
Quality and efficiency.
As shown in figure 4, further including after step S220 in one of the embodiments,:
S230:PDU reception state feedback data is created, PDU reception state feedback data is used to mark using kinds of characters
Whether PDU is properly received.
In receiving terminal for whether being properly received PDU situations and being recorded, PDU reception state feedback data is created, at this
For each PDU (PDU sequence numbers), with different character markings, whether it is successfully received respectively in data.Kinds of characters is specific
Can be that two different characters mark successful reception and are not successfully received two kinds of situations respectively.More specifically, Ke Yishi
It is marked using binary code 0 and 1, such as can be not successfully received with 0 label, be properly received using 1 label, vice versa.
In practical applications, create bit map, in bit map, using 0 label PDU be not successfully received, using 1 label PDU at
Work(receives.Currently there is the PDU of SN=10 to be sent to receiving terminal from transmitting terminal, receiving terminal is when receiving the PDU, in bit map
It is middle that SN=10 corresponding positions are labeled as 1;For another example currently there is the slave transmitting terminal of SN=30 to be sent to receiving terminal, receiving terminal does not receive
To the PDU, SN=30 corresponding positions are labeled as 0 in bit map.
As shown in figure 4, step S280 includes in one of the embodiments,:
S282:When and when not receiving current PDU, to current PDU sequence numbers correspond in initial order caching window position into
Row timing.
S284:It is when timing time is more than preset time threshold, newer initial order caching window initial position is secondary
Be updated to current PDU sequence numbers, by newer initial order caching window end position it is secondary be updated to current PDU sequence numbers with just
The sum of beginning order caching window size subtracts 1.
Inside order caching window RevStart and RevEnd, there is the cavity that SN is located at RevStart≤SN≤RevEnd
When situation (not receiving the PDU), to the positions SN carry out timing, if it is more than timer T1 to change the position, then it is assumed that need into
Row order caching is washed away, if receiving the PDU packets of the positions SN, timing stops.Flush operation includes:First, by RevStart
It is set as RevStart=SN;Later, the corresponding position from RevEnd+1 to RevStart+RevSize-1 in bitmap is arranged
It is 0;Finally, RevEnd is set to RevEnd=RevStart+RevSize-1.In practical applications, delay when in current receive
When there is caching cavity situation in the position for depositing SN=4 in window, in order to ensure order caching window can continue to slide backward, update,
Set the initial position for caching window to SN=4, caching window end position is next SN for cavity occur, or works as caching window
The sum of preceding PDU sequence numbers and initial order caching window size subtract 1.It needs to carry out more caching window before carrying out washing away action
Newly, to keep data effectively and coherent reception.
In one of the embodiments, according to initial order caching window parameter, whether current PDU sequence numbers are detected in just
In beginning order caching window, further include before:
When it is PDU fragments to receive PDU, PDU reception states are labeled as being not successfully received;In initial order caching window
Middle caching PDU fragments;When all PDU fragments of PDU are cached to initial order caching window, PDU reception states are labeled as
It is properly received.
The PDU data that receiving terminal receives may be a complete PDU packet, it is also possible to be a PDU fragment, when connecing
When receiving complete PDU packets, you can by PDU reception states labeled as successful reception;When receiving PDU fragments, due to single PDU
It may be made of multiple PDU fragments, when receiving PDU fragments, need to be labeled as being not successfully received by PDU reception states, PDU
Fragment continues in order caching to order caching window, until all PDU fragments of the PDU are successfully cached to initial order caching
When in window, by PDU reception states labeled as successful reception.
For further explain in detail signal automatic retransmission request method of the present invention applied to receiving terminal technical solution and
Its effect will use concrete application example that explanation is unfolded below.In concrete application example, following steps are specifically included:
1, receiving-transmitting sides consult the initial position of caching window size and PDU sequence numbers when communicating beginning.
2, a bit map, length RevSize are established, first bit represents the positions RevStart, the last one
Bit represents RevEnd endings, and setting all bits of bitmap are 0, indicate that all PDU in reception window do not have correctly received.
3, when the PDU packets received are the first PDU packet entirely connected, if the Serial No. SN of the PDU packets, setting
RevEnd=SN, and RevStart=RevEnd-RevSize+1 is enabled, skip to step 5;
If when first packet that the Bao Buwei 4, received is entirely connected, the Serial No. SN of the PDU packets skips to step 5.
If the sequence number SN of the PDU 5, received is fallen in current order caching window, the positions SN in bitmap are arranged
It is 1;If it is PDU fragments to receive, it will be set to 0 on the positions SN of the correspondence PDU of the fragment in bitmap, and put it into
In fragment cache memory, after only all fragments of the PDU all have correctly received fragment cache memory, SN is just set to 1.
If the sequence number SN of the PDU 6, received is fallen outside current order caching window, operation includes:A) by bitmap from
The corresponding position of RevEnd+1 to SN-1 is set to 0;B) RevStart is set to RevStart=SN-RevSize+1;C) will
RevEnd is set as RevEnd=SN;D) the corresponding positions SN in bitmap are set to 1.
If 7, RevEnd is numbered more than PDU, modulo operation is carried out.
8, according to bitmap, the feedback information of aggregate frame is set up, is sent on reversed time interval resource.
9, the buffer area cavity in order caching will wash away caching if there is time-out.When order caching window
Inside RevStart and RevEnd, there is the empty situation (not receiving the PDU) that SN is located at RevStart≤SN≤RevEnd
When, timing is carried out to the positions SN, if the position is more than timer T1, then it is assumed that need progress order caching to wash away, if receiving
The PDU packets of the positions SN, then timing stop;
10, flush operation includes:A) RevStart is set to RevStart=SN;B) by bitmap from RevEnd+1 to
The corresponding position of RevStart+RevSize-1 is set to 0;C) RevEnd is set to RevEnd=RevStart+RevSize-1.
As shown in figure 5, a kind of signal automatic retransmission request method, method include:
S420:Obtain the initial frame feedback information for sending and caching window parameter, and obtaining receiving terminal transmission.
In transmitting terminal, be provided with it is initial send caching window, and transmitting terminal can also obtain in real time receiving terminal feedback frame it is anti-
Feedforward information carries transmitting terminal in frame feedback information and sends the data whether PDU is successfully received.Specifically, initial to send
It includes that initially transmission caching window initial position, initial send cache window end position and initially transmission caching window to cache window parameter
Size.
S440:According to frame feedback information, the PDU not received is put into retransmission queue, by the PDU received from retransmit team
It is deleted in row.
The data whether PDU receives are carried in frame feedback information, and according to frame feedback information, the PDU not received is put
Enter in retransmission queue, carry out retransmission operation, the PDU received is deleted from retransmission queue, the data without retransmitting is avoided to account for
Use the communication resource.It should be pointed out that the corresponding PDU of reception deleted from retransmission queue here may be to have carried out
The PDU being successfully received after retransmission operation.
S460:When reaching data delivery time, retransmission queue data are sent, and send initial send in caching window successively
PDU to be sent.
When transmitting terminal needs transmission data, transmitting terminal will initially be sent in caching window in PDU and retransmission queue to be sent
The data (needing the PDU retransmitted) retransmitted are needed to be sent to receiving terminal.It specifically, can be from head of the queue mark for PDU to be sent
Show that symbol position SN starts corresponding PDU and starts, and by head of the queue indications position+1, continues to send subsequent data, can at most send out
Until the PDU for being sent to SN=SendEnd.
S480:When PDU sends time-out or number of retransmissions is more than threshold value, PDU is deleted from retransmission queue, and is arranged initial
It sends caching window start bit to move backward, until next initial caching window frame feedback information that sends is that the PDU not received is corresponded to
Sequence number.
Transmitting terminal during transmission data (including PDU in completely new PDU and retransmission queue), when discovery, some PDU is sent
When time-out or number of retransmissions are more than threshold value, show that the PDU is an abnormal data, which is deleted from retransmission queue, so as to
Follow-up PDU can normally be sent.Specifically, can judge to send time-out according to frame feedback signal, when transmitting terminal is when long
Between do not receive some sequence number PDU be properly received feedback information, then judge that its sends time-out, count PDU pairs of each sequence number
The number of retransmissions answered, when timing PDU sends time-out or counts number of retransmissions and be more than threshold value, by corresponding PDU from retransmission queue
It deletes.Meanwhile moving backward the initial caching window start bit that sends, until next frame feedback information is not receive PDU correspondences
Sequence number.
Above-mentioned signal automatic retransmission request method, receiving terminal and transmitting terminal obtain respectively initial caching window parameter, root respectively
PDU sequence numbers and initial caching window are transmitted/received according to current, update initially caches window parameter during real-time transmission/reception PDU,
And based on updated initial caching window parameter and PDU sequence numbers currently are transmitted/received, wash away mechanism in receiving terminal setting,
Retransmission queue deleting mechanism is arranged in transmitting terminal, can effectively clear up the abnormal data in retransmission processes, avoids for a long time to data
Retransmission processes and confirmation message lose the abnormal conditions brought, efficiently realize signal automatic repeat request, it is ensured that network communication
Quality and efficiency.
Before obtaining initial transmission caching window parameter in one of the embodiments, further include:
When PDU to be sent is first data packet of connection, it is to be sent that initial position in initial transmission caching window is set
PDU corresponding sequences number, initially end position is that initial position is delayed with initial send in initial transmission caching window in transmission caching window
It deposits the sum of window size and subtracts 1.
When transmitting terminal need send a PDU, Serial No. SN, determine whether first data packet of the connection, if
It is that then setting is initial sends caching window initial position SendStart=SN, setting head of the queue indications=SN;Setting is initial to be sent
Cache window end position SendEnd=SendStart+SendSize-1;If it is not, being then directly entered step S420.
The initial caching window parameter that sends includes that initial send caches window size in one of the embodiments, obtains and receives
Before the frame feedback information for holding feedback, further include:
Receiving terminal frame record of feedback information table is created, the length of receiving terminal frame record of feedback information table is cached with initial send
Window size is identical.
One transmission window feedback states record sheet of setting, length SendSize send in window feedback states record sheet and adopt
It characterizes receiving terminal respectively with kinds of characters and is properly received and is not successfully received two states.It is non-essential, binary system may be used
Code 0 and 1 characterizes.More specifically, 0 is both configured to when can reinitialize in the transmission window feedback states record sheet, indicates hair
All transmission datas in window are sent all not receive confirmation.
Further to explain in detail the technical solution and its effect of above-mentioned signal automatic retransmission request method, will adopt below
It is described in detail with specific application example.Above-mentioned signal automatic retransmission request method is applied to transmitting terminal in concrete application example,
It specifically includes step:
1, when transmitting terminal needs to send a PDU, Serial No. SN, determine whether first of connection packet, if so,
Step 2) is skipped to, if not first packet, then skip to step 4).
2, SendStart=SN, setting head of the queue indications=SN are set;SendEnd=SendStart+ is set
SendSize-1。
3, one transmission window feedback states record sheet is set, length SendSize, the transmission window feeds back shape when initialization
It is both configured to 0 in state record sheet, indicates to send all transmission datas in window and does not all receive confirmation.
4, when reaching data delivery time, transmitting terminal sends data and the head of the queue indications position retransmitted in data queue
It sets SN and starts corresponding PDU, and by head of the queue indications position+1, continue to send subsequent data, SN=at most can be transmitted
Until the PDU of SendEnd.
5, aggregate frame feedback information is received, 1 is set to corresponding to SN numbers in the transmission window feedback states record sheet of transmitting terminal,
And the data that the re-transmission of 0 needs is denoted as in aggregate frame feedback information are put into retransmission queue;If in aggregate frame feedback information
The SN for indicating the PDU having had correctly received is the SN in retransmission queue, then deletes it from retransmission queue.
6, setting SendStart is moved backward, and is 0 until first SN numbers corresponding transmission window feedback states record sheet
Until position, it sets SendStart to SN numbers;SN in retransmission queue is numbered into the retransmission frame less than SendStart from weight
It passes and is deleted in queue;SendEnd=SendStart+SendSize-1 is set.
7, transmitting terminal is not receiving when being properly received feedback information of some SN sequence number PDU for a long time, that is, is more than timing
When device T2, or it is more than limitation to retransmit transmission times, then deletes it from retransmission queue, and SendStart is arranged and moves back
It is dynamic, until the corresponding transmission window feedback states record sheet of first SN number (and not being current No. SN) is 0.
If 8, the data sent are the fragment of some PDU, send window feedback states record sheet and do not differentiate between fragment, still press
The state whether having correctly received is safeguarded according to entire PDU, and 0 correspondence SN is denoted as in aggregate frame feedback information if receiving
All fragments of PDU are put into and are retransmitted in data queue.
Transmitting terminal when sending data, will be safeguarded and send caching window state table, and caching window starting position is sent
SendStart, end position SendEnd, SendSize are the length for caching window, are 64 in this specific embodiment.Transmitting terminal is tieed up
The retransmission queue for protecting data sends window initial position, and the number that needs are retransmitted according to the state-maintenance of the feedback of aggregate frame
Be put into retransmission queue according to frame, the positions data frame SN that have sent in window sent using head-signed, send next time from
Head-signed starts taking-up data frame and is sent.Transmitting terminal after transmission data, does not do transmission window initial position any for the first time
It safeguards, after the feedback information for only receiving aggregate frame, can just change the starting and ending position for sending window.
As shown in fig. 6, a kind of signal automatic repeat request device, device include:
Acquisition module 520 is received, for obtaining initial order caching window parameter;
Detection module 540, for when receiving PDU, according to initial order caching window parameter, detecting current PDU sequences
Number whether in the initial order caching window;
Update module 560, for whether being in situation in initial order caching window according to current PDU sequence numbers and presetting
More new strategy updates initial order caching window parameter;
Cache-flush module 580, for when caching the empty time in updated initial order caching window more than presetting
Between threshold value when, carry out cache-flush.
Above-mentioned signal automatic repeat request device, receiving terminal and transmitting terminal obtain respectively initial caching window parameter, root respectively
PDU sequence numbers and initial caching window are transmitted/received according to current, update initially caches window parameter during real-time transmission/reception PDU,
And based on updated initial caching window parameter and PDU sequence numbers currently are transmitted/received, wash away mechanism in receiving terminal setting,
Retransmission queue deleting mechanism is arranged in transmitting terminal, can effectively clear up the abnormal data in retransmission processes, avoids for a long time to data
Retransmission processes and confirmation message lose the abnormal conditions brought, efficiently realize signal automatic repeat request, it is ensured that network communication
Quality and efficiency.
Initial order caching window parameter includes initial order caching window size, initially connects in one of the embodiments,
Caching window initial position and initial order caching window end position are received, update module 560 is additionally operable to be in when current PDU sequence numbers
When in initial order caching window, it is current PDU sequence numbers to change initial order caching window end position, updates initial order caching
Window initial position is that current PDU sequence numbers add 1 with initial order caching window size difference;When current PDU sequence numbers are not in
When in initial order caching window, it is current PDU sequence numbers and initial order caching window to change initial order caching window initial position
Mouth dimension difference adds 1, and it is current PDU sequence numbers to update initial order caching window end position.
Above-mentioned signal automatic repeat request device further includes in one of the embodiments,:
Feedback data creation module, for creating PDU reception state feedback data, PDU reception state feedback data is used for
Whether it is properly received using kinds of characters label PDU.
Feedback data creation module is specifically used for creating bit map in one of the embodiments, and bit map is used for
Whether it is properly received using binary-coded notches PDU.
When cache-flush module 580 is additionally operable to when and does not receive current PDU in one of the embodiments, to current
PDU sequence numbers correspond to position in initial order caching window and carry out timing;When timing time is more than preset time threshold, will update
Initial order caching window initial position it is secondary be updated to current PDU sequence numbers, by newer initial order caching window stop bits
It sets secondary the sum of the current PDU sequence numbers and initial order caching window size of being updated to and subtracts 1.
Detection module 540 is additionally operable to, when it is PDU fragments to receive PDU, PDU be received in one of the embodiments,
Status indication is to be not successfully received;PDU fragments are cached in initial order caching window;When all PDU fragments of PDU cache to
When initial order caching window, by PDU reception states labeled as successful reception.
As shown in fig. 7, a kind of signal automatic repeat request device, device include:
Acquisition module 620 is sent, caches window parameter for obtaining initial send, and it is anti-to obtain the frame that receiving terminal feedback is sent
Feedforward information;
First processing module 640, for according to frame feedback information, frame feedback information being characterized as not receive corresponding PDU
It is put into retransmission queue, is characterized as the frame feedback signal to have received corresponding PDU and be deleted from retransmission queue;
Sending module 660, for when reaching transmission data delivery time, sending retransmission queue data, and send successively
It is initial to send PDU to be sent in caching window;
Second processing module 680, for when PDU send time-out or number of retransmissions be more than threshold value when, by the PDU from retransmit team
Row are deleted, and the initial caching window start bit that sends is arranged and moves backward, until next frame feedback information is PDU pair not received
The sequence number answered.
Above-mentioned signal automatic repeat request device, receiving terminal and transmitting terminal obtain respectively initial caching window parameter, root respectively
PDU sequence numbers and initial caching window are transmitted/received according to current, update initially caches window parameter during real-time transmission/reception PDU,
And based on updated initial caching window parameter and PDU sequence numbers currently are transmitted/received, wash away mechanism in receiving terminal setting,
Retransmission queue deleting mechanism is arranged in transmitting terminal, can effectively clear up the abnormal data in retransmission processes, avoids for a long time to data
Retransmission processes and confirmation message lose the abnormal conditions brought, efficiently realize signal automatic repeat request, it is ensured that network communication
Quality and efficiency.
Above-mentioned signal automatic repeat request device further includes in one of the embodiments,:
Initial module rises for initial send in caching window when PDU to be sent is first data packet of connection, to be arranged
Beginning position PDU corresponding sequences number to be sent, it is initially to send initial position in caching window that initial transmission, which caches end position in window,
Subtract 1 with initial the sum of the caching window size that sends.
Initial module is additionally operable to create receiving terminal frame record of feedback information table, receiving terminal frame in one of the embodiments,
The length of record of feedback information table is identical as initial transmission caching window size.
Each technical characteristic of above example can be combined arbitrarily, to keep description succinct, not to above-described embodiment
In each technical characteristic it is all possible combination be all described, as long as however, the combination of these technical characteristics be not present lance
Shield is all considered to be the range of this specification record.
The several embodiments of the application above described embodiment only expresses, the description thereof is more specific and detailed, but simultaneously
It cannot therefore be construed as limiting the scope of the patent.It should be pointed out that coming for those of ordinary skill in the art
It says, under the premise of not departing from the application design, various modifications and improvements can be made, these belong to the protection of the application
Range.Therefore, the protection domain of the application patent should be determined by the appended claims.