Embodiment
Introduce the concrete working method of data flow control method of the present invention in detail below in conjunction with accompanying drawing 6,7.
Fig. 6 is the present invention is provided with thresholding to buffer a schematic diagram.
Wherein, data are temporarily stored in the buffer after entering buffer successively by the right side from left to right.Simultaneously, the data that are temporarily stored in high order end are exported from buffer, offer application program or superstructure.Along with the high order end data are constantly exported from buffer, the data on right side flow left successively.The just constantly fluctuation in such dynamic process of the occupancy volume of buffer.
In the present invention, in order to reach the purpose of data traffic control, buffer is provided with 4 thresholdings, is followed successively by Upper threshold (Max Up Threshold), Upper threshold (Upper Threshold), Lower Threshold (Downer Threshold) and Lower Threshold (Max Down Threshold) by the occupancy volume order from high to low of correspondence.
Wherein, the value of Upper threshold should be lower than the actual heap(ed) capacity of buffer, generally can be made as 90% of heap(ed) capacity.Upper threshold is lower than Upper threshold, is generally 60%~70% of heap(ed) capacity.Lower Threshold is lower, can be 10% of heap(ed) capacity.The value of Lower Threshold between between Lower Threshold and Upper threshold, thereby the higher resume data transmission as early as possible that helps of its setting can be generally 40% of heap(ed) capacity.After being provided with 4 thresholdings, just can the data flow be controlled according to the relation between buffer current data occupancy volume and 4 thresholdings.Concrete controlled step is with reference to figure 7.
When the buffer occupancy volume was low, when for example being lower than Upper threshold, system works was in the normal condition shown in the step 10.At this moment transfer of data is not made the data flow restriction, the peak of perhaps controlling the data flows and allowing into system.
Then, execution in step 20 judges that whether data occupancy volume in the buffer surpasses Upper threshold.In case the data occupancy volume has surpassed Upper threshold, system changes step 50 immediately over to.Otherwise, carry out determining step 30.
In step 30, judge whether the buffer occupancy volume has surpassed Upper threshold.If surpass, system enters step 40.Otherwise rotate back into step 10, work on the normal transmission state.
Enter step 40 as system, the current data occupancy volume is between Upper threshold and Upper threshold so.This explanation: on the one hand, buffer can also receive new data, therefore needn't end the transmission of data; On the other hand, also should not continue normal operating conditions, otherwise finally can cause the termination of transfer of data.Therefore after entering step 40, system reportedly is input into the row restriction according to the control algolithm logarithm, by reducing data traffic, prevents that the buffer occupancy volume from surpassing Upper threshold and causing transfer of data to end.Simultaneously, reduce data traffic and also help making the buffer occupancy volume to drop under the Upper threshold, make system get back to the normal transmission state.
In step 40, the control algolithm that reduces data traffic can be simple static control, as controls the data flows and be certain fixed value.But more preferably use dynamic control algolithm, adopt the data traffic control algolithm that changes, for example reduce the data traffic of data gradually along with the raising of buffer occupancy volume.Specifically can adopt various linearities or nonlinear algorithm controlled, will be introduced in more detail in the practical application later.
If system has entered step 50, show that the buffer occupancy volume has surpassed Upper threshold, the remaining space of buffer is few, must end the transmission of data immediately, and just the restricting data flow is 0.Can prevent that so just data from continuing transmission and can not enter buffer, finally causes to be dropped and to require re-transmission.Simultaneously, because maximum upper limit is lower than the actual heap(ed) capacity of buffer, therefore, the data of having sent before the System Halt can enter buffer, can not be dropped.
After system enters abort state 50, show that data traffic is excessive, therefore need to end transmission, wait for the cache restoring ability to work.Then change determining step 60 over to.
In step 60, judge whether the buffer occupancy volume is lower than Lower Threshold.If do not satisfy condition, show that after the System Halt transfer of data occupancy volume of buffer is still high, can't resume data transmission.Therefore rebound step 50 continues to keep abort state.
If the buffer occupancy volume has been lower than Lower Threshold, showing can resume data transmission.But because that Lower Threshold is provided with is higher, therefore need further execution in step 70, judge whether to be lower than Lower Threshold.If surpass Lower Threshold, in resume data transmission, still to the data data traffic be limited, avoid that the data occupancy volume increases too fast in the buffer.Concrete steps are as follows.
In step 70, judge whether the buffer occupancy volume is lower than Lower Threshold.If be lower than Lower Threshold, show that buffer has recovered ability to work fully, can rotate back into step 10 immediately, with the unrestricted normal condition work of data traffic.If the buffer occupancy volume surpasses Lower Threshold, then enter step 80.
In step 80, system reportedly is input into the row restriction according to the control algolithm logarithm when carrying out transfer of data, progressively increase data traffic, and it is too fast to prevent that the buffer occupancy volume from increasing.
The control algolithm of institute's foundation can be identical with the algorithm of use in the step 40 in the step 80, also can be different.When two kinds of control algolithms not simultaneously, what claim to use in the step 40 is first control algolithm, what use in the step 80 is second control algolithm.
For preventing that data occupancy volume in the buffer from surpassing Upper threshold, carries out determining step 90.In case the data occupancy volume has surpassed Upper threshold, system enters step 50 immediately, ends transfer of data.Otherwise, jump back to determining step 70, judge whether the buffer occupancy volume is lower than Lower Threshold.
In the method for the invention, " surpassing " can be understood as " greater than ", also can be understood as " more than or equal to "; " be lower than " and can be understood as " less than ", also can be understood as " smaller or equal to ".
More than be exactly data flow control method of the present invention, the data traffic when using first control algolithm control buffer occupancy volume higher can be kept the transmission and the exchange of data effectively, and the minimizing system enters the possibility of abort state.Simultaneously, the data traffic when using second control algolithm that transfer of data is recovered is controlled, thereby has shortened the stand-by period after the transfer of data termination greatly, and a kind of data traffic controlling mechanism that has flexibility and robustness (Robust) concurrently is provided.In addition, data flow control method of the present invention can be applicable to various transfer of data or switching systems with buffer (Buffer) structure.
Below just introduce the application of data flow control method of the present invention in multiple different pieces of information transmission or switching system in conjunction with the accompanying drawings in detail.
First application example of the present invention is the application in the transfer of data on the media access control layer (MAC) in 3G (Third Generation) Moblie (3GPP) system.
In the radio network controller (RNC) of new generation of wireless mobile communication system, data flow control method be one important and also have the decision meaning technical problem.Especially in the MAC layer, the data flow control method between MAC-d logic entity and MAC-c/sh logic entity.Its major function is: in down link, data in the proprietary logic channel (Dedicated Traffic Channel DTCH/ Dedicated Control Channel DCCH) on the MAC-d logic entity among the SRNC (main RNC) through Iur protocol interface (connecting interface between RNC), are stablized, are sent to efficiently, as far as possible glibly on the Common transport channel on the MAC-c/sh logic entity the DRNC (from RNC) (forward direction inserts transmission channel FACH/ downlink sharied signal channel DSCH); Perhaps in same RNC, directly be sent on the MAC-c/sh through the data traffic controlling mechanism by MAC-d without the Iur interface.
In this example, be primarily aimed in the MAC layer of RNC, between MAC-d entity and the MAC-c/sh entity, in down link, be mapped to the data traffic control problem that will occur when forward direction inserts transmission channel (FACH) by dedicated logical channel (DTCH/DCCH).Especially between different RNCs, data after the Iur interface is handled, are imported the situation of the FACH channel of MAC-c/sh among the DRNC by the proprietary logic channel (DTCH/DCCH) of MAC-d among the SRNC into.In same RNC, the proprietary logic channel (DTCH/DCCH) of data from MAC-d maps directly to the FACH channel among the MAC-c/sh, and the situation that need not to handle through the Iur interface is identical for data flow control method, only is that data message and data traffic control information are directly transmitted between MAC-d and MAC-c/sh without the Iur interface.
Fig. 8 is exactly the data flow transmission schematic diagram between the MAC-c/sh among MAC-d and the DRNC among the SRNC.Flow in the process of MAC-c/sh among the DRNC at data flow MAC-d from SRNC, other data of same priority in the transmission buffer device 110 of the interior different user of MAC-d among the SRNC, through the Iur interface, under the control of flow control methods, flow among the DRNC of appointment and have in the transmission buffer device 120 of respective priority in the MAC-c/sh.
Fig. 9 holds the work schematic diagram of certain user's transmission buffer device 110 for SRNC among Fig. 8.This transmission buffer device 110 is arranged in the MAC-d logic entity of SRNC end.From the data flow of proprietary logic channel (DTCH/DCCH) under the control of MAC-d controller, through transmission channel kinds switch and C/T multiplexing/after priority is provided with, according to the height difference of priority, trigger in the transmission buffer device 110 of constantly data being sent into corresponding each priority at each.And wait at the next one and triggering constantly, data are sent among the MAC-c/sh by this buffer 110.Wherein, according to protocol parameter, priority be provided with that number is the highest can be 15.The data capacity size of this buffer 110 can be set in a transmission triggers constantly, maximum PDU (protocol Data Unit) number of transmission and the product of maximum PDU capacity, and promptly each triggers the maximum data capacity that constantly can transmit.In real work, for guaranteeing the job stability of buffer 110, its capacity can be stipulated more biggerly.
Figure 10 is the work schematic diagram of the transmission buffer device 120 of DRNC end among Fig. 8.After the processing of data flow from the buffer 110 in the SRNC end MAC-d logic entity, enter in the MAC-c/sh layer of DRNC end through the Iur protocol interface.Under the control of MAC-c/sh controller, through TCIF multiplexing/UE Id is multiplexing, at last the difference according to priority enters in the transmission buffer device 120 that has respective priority among the MAC-c/sh.In addition, in order to support subsequently sequential/priority operation and TFC to select to handle, corresponding to each transmission buffer device 120, all be provided with an auxiliary cache device (not showing on the figure), this auxiliary cache device is used for storing number and the capacity of the SDU (service data unit) of the data flow that enters into transmission buffer device 120.The structure of the transmission buffer device 120 of each priority correspondence as shown in Figure 6 among the MAC-c/sh.
Though in said system, number of users, priority and data traffic thereof have unpredictability separately, by adopting data flow control method of the present invention, can effectively avoid more abandoning and retransmitting the appearance of probability.
In the 3GPP agreement, stipulated that the message mechanism of standard is transmitted and relevant various parameters and the state information of data traffic control.For example, in the Iur interface, can adopt FACH FLOW CONTROL and FACH CAPACITY REQUEST message to being used for transmitting the control frame that comprises the data traffic Control Parameter.In FACH FLOW CONTROL control frame, the setting that length is 8 parameters C redits has only stipulated not have the transmission restriction when its value is 0, is then to end transmission at 255 o'clock, and other value can be defined by user oneself.Therefore can utilize FACH FLOW CONTROL control frame to realize control method of the present invention by oneself definition Credits value.
Concrete control method is:
For transmitting terminal (MAC-d of SRNC):
At new data delivery time, transmitting terminal will send a control frame information FACH CAPACITY REQUEST to receiving terminal, informs the size of the capacity register that receiving terminal oneself needs, and waits for that DRNC sends FACH FLOW CONTROL control frame.Wherein, the form of FACH CAPACITY REQUEST control frame and FACH FLOW CONTROL control frame sees the following form 1 and table 2.
The form of table one FACH CAPACITY REQUEST control frame
The form of table two FACH FLOW CONTROL control frame
If in the stand-by period of regulation, receive FACH FLOW CONTROL control frame, enter (a), otherwise enter (b).
(a) according to the information in the FACH FLOW CONTROL control frame, the number of the PDU of MAC-d among the SRNC that decision will send; (b) send a FACH CAPACITY REQUEST to receiving terminal.According to this control frame structure, comprise the transmission capacity requirement in the transmission request, and demand is for sending the minimum value of capacity.
Wherein, the above-mentioned stand-by period can determine according to different system.As a concrete example, can be made as M * TTI (Transmission Time Interval), and parameter M can be set as the case may be by product designer.
For receiving terminal (MAC-c/sh of DNRC),, receive the capacity occupancy volume Q that the current cache device is observed in triggering constantly at each with reference to figure 7 and aforementioned flow process.
Execution in step 20, whether the data volume of differentiating this Q value+reception is greater than Upper threshold (Max Up Threshold).
If jump to step 50; If not, then jump to step 30.
Step 30, whether the data volume of differentiating this Q value+reception is greater than Upper threshold (Upper Threshold).
If then execution in step 40, according to the computation rule of introducing later, send FACH FLOW CONTROL control frame, with the transmission number of the SDU of the Credits parameter adjustment MAC-c/sh in this frame to the current MAC-d that uses this buffer; If not, then execution in step 10, proceed to send and receive according to original various parameters.Then return 20.
Enter step 50, send a Credit value and be 0 FACH FLOW CONTROL control frame, end transfer of data to the current MAC-d that uses this buffer; Write down termination information simultaneously, form sees the following form 3.
Table 3
Step 60 judges that whether this Q value is less than Lower Threshold (Downer Threshold), if then enter step 70; If not, then jump to step 50.
Step 70, judge that whether this Q value is less than Lower Threshold (Max Down Threshold), if, then according to termination information (according to table 3 format record), send a Credit value and be 255 FACH FLOW CONTROL control frame (according to table 2 format record) and use the MAC-d of this buffer to all, enter step 10, MAC-d resends data;
If not, enter step 80,,, send FACH FLOWCONTROL control frame, adjust the transmission number of the SDU of MAC-c/sh among the DRNC to the current MAC-d that uses this buffer according to the computation rule that provides according to the termination information of record in the table 3.
Wherein, the regulation rule of the SDU number of MAC-c/sh is in the step 40 of use and 80:
Under the identical condition of each user's of supposition priority level, estimate the transmission capacity that each user can have according to formula (1).
Wherein:
Q
Max: the available heap(ed) capacity of buffer promptly equals Upper threshold;
Q
Cur: the current occupied capacity of buffer;
m
Ind: the operable amount of capacity of the user of current this buffer of use;
N: the number of users of current this buffer of use.
The number of the SDU that can transmit according to the capacity estimation of the SDU of this capacity and transmission then, send this information to transmitting terminal by the Credits parameter in the FACHFLOW CONTROL control frame at last, be used for controlling the size of the data capacity that transmitting terminal should send.
All thresholdings are by the designed size of buffer and the relevant concrete parameter setting of system.As an example, we provide the quantification of this each parameter of data traffic control algolithm and set.Q
MaxSet according to the concrete condition of product by product designer.For guaranteeing certain redundancy, setting Max Up Threshold is 0.9 * Q
MaxAnd Max Down Thresho1d is 0.1 * Q
MaxUpper Threshold is 0.6 * Q in the second order thresholding
MaxAnd Downer Threshold is 0.4 * Q
Max
Like this, just utilized the rule that provides among the 3GPP fully, neatly, avoided as far as possible in sending data procedures, control information frequent between the MAC-d of SRNC and the MAC-c/sh of DRNC exchanges.This method sends solicited message FACH CAPACITYREQUEST and only just enables when new data delivery time or system set again, has reduced the exchange of control information, help improving control algolithm complexity, improve the stability of system;
In concrete the application, can also algorithm and each threshold value of above-mentioned data traffic control be changed, thereby be applicable to different systems.
For example can adopt the control algolithm of step, for example: 0.6Q
Max<Q
Cur<0.7Q
MaxThe time,
0.7Q
Max<Q
Cur<0.8Q
MaxThe time,
0.8Q
Max<Q
Cur<0.9Q
MaxThe time,
Also can adopt with Q
CurIncrease, m
IndBe other algorithms such as parabola algorithm that parabola descends, even adopt state algorithm, for example the specified data flow is less than 5% of capacity register in the unit transmission time.
Further, step 40 can be used different control algolithms respectively with 80.For example, the algorithm shown in the step 40 use formula (1) is as first control algolithm, and step 80 uses above-mentioned state algorithm as second control algolithm.
In addition, each threshold value also can make a change.For example setting Max Up Threshold is 0.85 * Q
MaxAnd Min DownThreshold is 0.2 * Q
MaxUpper Threshold is 0.7 * Q in the second order thresholding
MaxAnd Downer Threshold is 0.5 * Q
MaxAs long as satisfy Upper threshold>Upper threshold>Lower Threshold>Lower Threshold.
Second application example of the present invention is in the queuing mechanism of ISDN (Integrated Services Digital Network) switching technology.
Isdn switch is to finish exchange according to the information of letter head and basic cell.Isdn switch uses the letter head how to decide forwarding information.The ISDN exchange has two basic characteristics: the statistic multiplexing between cell switching and each virtual connections.For solving the competition of cell to transfer resource, must rank to cell, go up from the time each cell is separated.Use Circuit-switched thought, ISDN is presented as time-division switching in exchange, and realizes by the buffer memory queuing mechanism.Basic queue machine is shaped on three kinds: input queue, output work queue and central authorities' queuing.
We are with the embodiment of central queuing mechanism as our caching mechanism.As shown in figure 11.
Therefrom we find out that its buffer queue also must solve the congested problem of formation.Can use control method as shown in Figure 7 for this reason.
When the buffer occupancy volume was low, when for example being lower than Upper threshold, system works was in the normal condition shown in the step 10.At this moment transfer of data is not made the data flow restriction, the peak of perhaps controlling the data flows and allowing into system.
Then, execution in step 20 judges that whether data occupancy volume in the buffer surpasses Upper threshold.In case the data occupancy volume has surpassed Upper threshold, system enters step 50 immediately.Otherwise, carry out determining step 30.
In step 30, judge whether the buffer occupancy volume has surpassed Upper threshold.If surpass, system enters step 40.Otherwise get back to step 10, work on the normal transmission state.
After system enters abort state 50, carry out determining step 60.
In the step 60, judge whether the buffer occupancy volume is lower than Lower Threshold.If do not satisfy condition, rebound step 50.If the buffer occupancy volume has been lower than Lower Threshold, further execution in step 70 judges whether to be lower than Lower Threshold.If be lower than Lower Threshold, get back to step 10 immediately, with the unrestricted normal condition work of data traffic.If the buffer occupancy volume surpasses Lower Threshold, then enter step 80.
In step 80, system reportedly is input into the row restriction according to the control algolithm logarithm, and carries out determining step 90.
Other two kinds of queuing policys also can use such buffer queue mechanism to finish the data traffic control of Network Transmission equally, block in case locking system produces.
The data traffic control that the 3rd application examples of the present invention is ATM (asynchronous transfer mode) switching fabric.
Buffering strategy or queuing policy are important contents in the atm switching fabric design, and it mainly comprises buffering set-up mode, the quantity of buffer, the access control of formation and the management of buffer.And how to be the effective reasonably problem of thresholding of buffer design with regard to comprising in the management of buffer.As shown in figure 12.
Therefore, use concrete control method of the present invention effectively to address the above problem.
When the buffer occupancy volume was low, system works was in the normal condition shown in the step 10.At this moment transfer of data is not made the data flow restriction, the peak of perhaps controlling the data flows and allowing into system.
Then, execution in step 20 judges that whether data occupancy volume in the buffer surpasses Upper threshold.In case the data occupancy volume has surpassed Upper threshold, system enters step 50 immediately.Otherwise, carry out determining step 30.
In step 30, judge whether the buffer occupancy volume has surpassed Upper threshold.If surpass, system enters step 40.Otherwise get back to step 10, work on the normal transmission state.
After system enters abort state 50, carry out determining step 60.
In the step 60, judge whether the buffer occupancy volume is lower than Lower Threshold.If do not satisfy condition, rebound step 50.If the buffer occupancy volume has been lower than Lower Threshold, further execution in step 70 judges whether to be lower than Lower Threshold.If be lower than Lower Threshold, get back to step 10 immediately, with the unrestricted normal condition work of data traffic.If the buffer occupancy volume is higher than Lower Threshold, then enter step 80.
In step 80, system reportedly is input into the row restriction according to the control algolithm logarithm, and carries out determining step 90.
Below describe embodiments of the present invention and multiple concrete application in conjunction with the accompanying drawings in detail, these descriptions and accompanying drawing only are for thought of the present invention, content and application are described.For those skilled in the art in the present technique field, it is conspicuous making variations and modifications according to content described above, therefore, all can not break away from the spirit and scope of the present invention.Protection range of the present invention is as the criterion with the record of claim.