Embodiment
Describe the specific embodiment of the present invention in detail below in conjunction with accompanying drawing.
Fig. 1 is the schematic flow diagram according to the method for dynamic adjusting data block length of the present invention.The processing procedure shown in the left side is carried out at source end (transmitting terminal) among Fig. 1, and the processing procedure shown in the right side is carried out at destination (receiving terminal).Flow chart shown in Figure 1 is actually between source end and the destination, in order to realize the purpose of dynamic adjusting data block length, and the signaling information reciprocal process of carrying out.
At first, the packet switching network that comprises source end and destination is carried out initialization, professional quality of service requirement q and relevant system parameters are set.The initialization procedure of packet switching network and essence of the present invention are irrelevant, and are that those of ordinary skills know.
After the packet switching network initialization, end regular transmitting time in source is stabbed grouping.Promptly in step 101, the source end adopts mode in band or out of band regularly to send the timestamp grouping T that contains timestamp information to destination with frequency f.
After destination is received the timestamp grouping T that includes timestamp information, in step 102, utilization is included in the timestamp information among the timestamp grouping T, and utilizes timestamp grouping T due in time corresponding to stab, and stabs propagation delay time t, the delay variation d of grouping T computing time.
Then, according to propagation delay time t, delay variation d, former data packet length l and professional quality of service requirement q, (d q), judges whether to need to change data packet length to applying control strategy f1 to destination for l, t in step 103.
Propagation delay time t and delay variation d belong to high frequency and change parameter, can not be bigger because of the variation of propagation delay time in a certain data transfer process or delay variation, just change data packet length.On the contrary, should shake as a reference with the mean transit delay in a certain predetermined amount of time, average delay, in conjunction with other parameters, whether decision changes data packet length.Otherwise, may cause data packet length frequently to change, so that influence the stability of a system.
Judgement in the step 103 has two kinds of results.
First kind of judged result is not change data packet length.In this case, do not send any information to the source end, turn back to step 102 state before, destination is waited for from the source rapids and is received new packet.
Second kind of judged result is to change data packet length.In this case, processing procedure proceeds to step 104.
In step 104, promptly change under the situation of data packet length in decision, the optimum length lnew of destination specified data grouping proceeds to step 105 then.
In step 105, new data packet length is included in the packet Req of request change block length, then packet Req is sent to the source end, and wait for replying of source end.
In step 106, after the source end received that request that destination sends changes the packet Req of block length, (l lnew), judged whether to accept to change the request of block length to use home town ruling g.This judgement has two kinds of results.
First kind of judged result is the request that refusal changes block length.In this case, in step 107, the source end sends refusal request responding grouping Ack to destination.
Second kind of judged result is to accept to change the request of block length.In this case, in step 107, the source end sends the respond packet Ack accept request to destination, and from this constantly after the first predetermined time interval t1, execution in step 109.Why waiting for behind the first predetermined time interval t1 just execution in step 109, is in order to guarantee that destination has time enough to receive respond packet Ack and does respective handling according to the content of respond packet Ack.For example, ready for receiving by the packet of new block length encapsulation.
If decision accepts to change the request of block length in the step 106, then in step 109, the source end begins to send the packet with new block length lnew encapsulation.In the packet that is sent, block length changes flag bit and is set.
On the other hand, in step 108, destination is done respective handling according to the respond packet content, as data packet length being set at new length or it being remained unchanged after receiving the respond packet that transmitting terminal returns.Specifically, if the source termination of receiving is subjected to request responding, then destination confirms that the block length of local reception packet will be set at new data packet length lnew constantly from receiving the packet (being the packet that step 109 sends) that first block length change flag bit is set.If receive source end refusal request responding, then destination confirm will the local reception packet block length to remain former data packet length l constant.
In the step 110 corresponding with step 109, destination receive block length change that flag bit is set, with the packet of new data packet length l new encapsulation, the data packet length of using during the legal reception packet in this locality is set to new data packet length l new then.
Fig. 2 is the schematic flow diagram of method shown in Figure 1 under the signaling data packet loss conditions.Step and the step among Fig. 1 among Fig. 2 are roughly the same, and different is the situation of having considered the signaling data packet loss in Fig. 2.For example, the request that sent in step 105 changes after the request grouping Req of block length, and request grouping Req might lose, as shown in Figure 2.In addition, by behind the source end transmission respond packet Ack, respond packet Ack also might lose, as shown in Figure 2 in step 107.In both cases, all make destination after the request grouping Req that has sent request change block length, can not get response, thereby do not reach the purpose of dynamic adjusting data block length.
For this reason, after step 105, described destination monitors the second predetermined time interval t2.If in the second predetermined time interval t2, do not receive any respond packet Ack, then resend the request grouping Req that request changes block length in step 1052.
The source end begins to handle from step 106 after receiving for the first time request grouping Req.The request grouping Req that the source end is received for the first time may be the request grouping Req of destination in step 105 transmission, also may be the request grouping Req that destination resends in step 1052.Those skilled in the art understand that easily the step that resends request grouping Req can be not limited to once.
Identical among step 106 and 107 processing and Fig. 1.
If in the first predetermined time interval t1, the source end is received the request grouping Req (this situation shows that respond packet Ack loses, and destination executed step 1052) from destination once more, and then the source end resends respond packet Ack in step 1072.Those skilled in the art understand that easily the step that resends respond packet Ack can be not limited to once.
Step 108 afterwards, 109,110 with Fig. 1 in identical.
Requirement among Fig. 2, the first predetermined time interval t1 is greater than the second predetermined time interval t2.This requirement had both guaranteed that destination had time enough reception respond packet Ack and (for example does respective handling according to the content of respond packet Ack, ready for receiving by the packet of new block length encapsulation), guaranteed that again the source end can not change the length of packet before receiving the request grouping Req that destination resends because of respond packet Ack loses.
Fig. 3 is according to the method for dynamic adjusting data block length of the present invention schematic flow diagram at receiving terminal.As shown in Figure 3, in step 301, processing procedure begins.In step 302, system parameters is set, comprise professional quality of service requirement q and other parameters.Judge whether to receive the timestamp grouping T that contains timestamp information in step 303 then.If the judged result of step 303 is "Yes", then processing procedure proceeds to step 304; Otherwise, wait in step 303, up to receiving the timestamp grouping T that contains timestamp information.
In step 304, stab propagation delay time t, the delay variation d of grouping T computing time.This step also can comprise mean transit delay and the average delay variation that calculates the timestamp grouping of receiving in the predetermined amount of time.
In step 305, (d q), judges whether to change the length of packet for l, t according to control strategy f1.Identical among criterion and Fig. 1.If the judged result of step 305 is "No", then processing procedure is returned step 303, wait for receiving the next timestamp grouping T that contains timestamp information, otherwise processing procedure proceeds to step 306.
In step 306,, calculate new data packet length lnew according to above-mentioned control strategy.
In step 307, Xiang Yuanduan sends the request grouping Req that contains new data packet length lnew.
In step 308, judge whether to receive respond packet Ack.If the judged result of step 308 is "Yes", then processing procedure proceeds to step 310; Otherwise, proceed to step 309.
In step 309, judge whether to surpass predetermined amount of time, such as the second predetermined time interval t2 shown in Figure 2.If the judged result of step 309 is "Yes", then processing procedure turns back to step 307; Otherwise turn back to step 308.
In step 310, according to the content of respond packet Ack, destination judges whether the source end accepts request, if judged result is a "No", the source end has been refused request, and then processing procedure proceeds to 311; Otherwise proceed to step 312.
In step 311, destination remains unchanged data packet length, returns step 303 afterwards.
In step 312, destination is changed into lnew with data packet length, confirms that perhaps the block length of local reception packet will be set at new data packet length lnew constantly from receiving the packet that first block length change flag bit is set.Afterwards, processing procedure turns back to step 303.
Flow process shown in Figure 3, especially step 307 have been handled the situation that signaling data grouping as shown in Figure 2 (i.e. request grouping Req or respond packet Ack) is lost effectively to 309.
With flow process shown in Figure 3 correspondingly, carry out relatively simple processing procedure at the source end, promptly carry out step 101 shown in Figure 1 earlier, and wait for.If the request of receiving changes the request grouping Req of block length, the step 106 and 107 in the execution graph 1 then, and decision is accepted to change under the situation of request of block length in step 106, execution in step 109 behind the first predetermined time interval t1.Step 101 is periodically carried out with frequency f.And the execution of step 106 and 107 depends on whether the request of destination, request grouping Req lose, whether respond packet Ack loses, many factors such as overtime whether.In the first predetermined time interval t1, receive once more under the situation of request grouping Req, also can carry out step 1072 shown in Figure 2.
Though described embodiments of the present invention in conjunction with the accompanying drawings, those skilled in the art can make various distortion or modification within the scope of the appended claims in this area.