Embodiment
To combine the accompanying drawing in the embodiment of the invention below, the technical scheme in the embodiment of the invention is carried out clear, intactly description, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills are not making the every other embodiment that is obtained under the creative work prerequisite, all belong to the scope of the present invention's protection.
Embodiment 1
The embodiment of the invention provides the method for elongated message flow control service dispatch, and as shown in Figure 1, this method comprises:
Step 101 is confirmed the time interval between the message according to preset message regular length and configured bandwidth, and is dispatched the calculating of the actual transmitting time of next message according to the said time interval;
Optional, confirm the actual time of arrival of said current message and the expected time that said current message arrives;
The expected time whether actual time of arrival of judging said current message arrives greater than said current message and message tolerance time of advent value and;
Expected time that arrives greater than said current message when actual time of arrival of said current message and message tolerance time of advent value and the time, the actual transmitting time of confirming said next message is the actual time of arrival of said current message;
When the actual time of arrival of said current message be not more than expected time that said current message arrives and message tolerance time of advent value and the time, whether the actual time of arrival of judging said current message poor greater than expected time of said current message arrival and message tolerance time of advent value;
During expected time that arrives greater than said current message when actual time of arrival of said current message and message tolerance time of advent value poor, the actual transmitting time of confirming said next message is the actual time of arrival of said current message;
When the actual time of arrival of said current message was not more than expected time that said current message arrives and message tolerance time of advent value poor, the actual transmitting time of confirming said next message was the expected time of said current message arrival.
Step 102 is obtained the physical length of the current message that receives, and confirms incremental time according to the said physical length and the said time interval;
Optional, confirm incremental time according to X=L2*T/L1, wherein, X is an incremental time, and L2 is the physical length of the current message that receives, and T is the time interval between the message of confirming, and L1 is the regular length of preset message.
Step 103 is upgraded the expected time that said next message arrives based on said incremental time, and sends said next message based on said actual transmitting time.
Optional, confirm the actual time of arrival of said current message and the expected time that said current message arrives;
Whether the expected time of judging said current message arrival is greater than the said actual time of arrival;
When expected time that said current message arrives during greater than said actual time of arrival, then upgrade expected time that said next message arrives and be reach the said time time and said incremental time and;
When the expected time that said current message arrives is not more than said actual time of arrival, then upgrade expected time that said next message arrives and be expected time that said current message arrives and said incremental time and.
The embodiment of the invention provides a kind of method of elongated message flow control service dispatch; Confirm the time interval between the message through preset message regular length of basis and configured bandwidth, and dispatch the calculating of the actual transmitting time of next message according to the said time interval; Obtain the physical length of the current message that receives, confirm incremental time according to the said physical length and the said time interval; Upgrade the expected time that said next message arrives according to said incremental time, and send said next message according to said actual transmitting time.When dispatching with the dispatching method that leaks bucket based on credit in the prior art; Because scheduling performance is disposed total bandwidth and is influenced; Total configured bandwidth tends to number and decuples the source flux specification, therefore when design specification is confirmed, causes credit to leak the low heterogeneous ratio of resource that bucket expends; When the scheme that the embodiment of the invention provides can be worked as design specification and confirms, consume less resource.
The embodiment of the invention provides a kind of device of elongated message flow control service dispatch, and as shown in Figure 2, this device comprises: computing unit 201, acquiring unit 202, updating block 203;
Computing unit 201 is used for confirming the time interval between the message according to preset message regular length and configured bandwidth, and dispatches the calculating of the actual transmitting time of next message according to the said time interval;
Acquiring unit 202 is used to obtain the physical length of the current message that receives and the expected time that said current message arrives;
Said computing unit 201 also is used for, and confirms incremental time according to the said physical length and the said time interval;
Optional, said computing unit 201 specifically is used for:
Confirm incremental time according to X=L2*T/L1, wherein, X is an incremental time, and L2 is the physical length of the current message that receives, and T is the time interval between the message of confirming, L1 is the regular length of preset message.
Updating block 203 is used for upgrading the expected time that said next message arrives according to said incremental time;
Transmitting element 204 is used for sending said next message according to said actual transmitting time.
The embodiment of the invention provides a kind of device of elongated message flow control service dispatch; Through according to preset message regular length and configured bandwidth, computing unit is confirmed the time interval between the message and is dispatched the calculating of the actual transmitting time of next message according to the said time interval; Acquiring unit obtains the physical length of the current message that receives, and according to the said physical length and the said time interval, said computing unit is confirmed incremental time; Updating block upgrades the expected time that said next message arrives according to said incremental time, and transmitting element sends said next message according to said actual transmitting time.When dispatching with the dispatching method that leaks bucket based on credit in the prior art; Because scheduling performance is disposed total bandwidth and is influenced; Total configured bandwidth tends to number and decuples the source flux specification, therefore when design specification is confirmed, causes credit to leak the low heterogeneous ratio of resource that bucket expends; When the scheme that the embodiment of the invention provides can be worked as design specification and confirms, consume less resource.
Embodiment 2
The embodiment of the invention provides the method for elongated message flow control service dispatch; The application scenarios of present embodiment is: the calculating of dispatching the actual transmitting time of next message takes place with the expected time of upgrading said next message arrival synchronously; The calculating of the actual transmitting time of a message of every scheduling; Then upgrade the expected time that once said next message arrives, as shown in Figure 3, this method comprises:
Step 301 is confirmed the time interval between the message according to preset message regular length and configured bandwidth, and is dispatched the calculating of the actual transmitting time of next message according to the said time interval;
Optional, calculate the time interval between the message according to T=L1*8/M, wherein, T is the time interval between the said message, L1 is preset message regular length, the bandwidth of M configuration;
As shown in Figure 4, the actual time of arrival of current message is Ta (K), and K representes that current message is a K message; The expected time that the current message of confirming arrives is TAT (K), then, judges that whether Ta (K) is greater than [TAT (K)+P]; Wherein, P is a message tolerance time of advent value;
When Ta (K)>[TAT (K)+P], explain that the actual flow that uses when sending current message is lower than configured bandwidth, does not then need limited flow, then the actual transmitting time Ts=Ta (K) of next message;
When Ta (K)≤[TAT (K)+P], explain that the actual flow that uses when sending current message is higher than configured bandwidth, at this moment, continue to judge that whether Ta (K) is greater than [TAT (K)-P];
When Ta (K)>[TAT (K)-P]; Be higher than configured bandwidth though the actual flow that uses when sending current message is described, allow a certain amount of burst, therefore in tolerance based on actual conditions; Do not need limited flow, the then actual transmitting time Ts=Ta (K) of next message this moment;
When Ta (K)≤[TAT (K)-P], explain that the actual flow that uses when sending current message is higher than configured bandwidth, then need limited flow, then the actual transmitting time Ts=TAT (K) of next message is level and smooth with the flow of realizing sending direction.
Step 302 is obtained the physical length of the current message that receives, and confirms incremental time according to the said physical length and the said time interval;
Optional, after the current message that receives, said current message is written in the memory, according to actual transmitting time; Control is read message and is sent from memory, read message from memory after, obtain the physical length of said current message; Confirm incremental time according to X=L2*T/L1, wherein, X is an incremental time; L2 is the physical length of the current message that receives, and T is the time interval between the message of confirming, L1 is the regular length of preset message.
Step 303 is upgraded the expected time that said next message arrives according to said incremental time;
Optional, as shown in Figure 4, confirm the actual time of arrival Ta (K) of said current message, the expected time that said current message arrives is TAT (K);
Judge that whether Ta (K) is greater than [TAT (K)+P];
When Ta (K)>[TAT (K)+P], TAT (K+1)=Ta (K)+X then;
When Ta (K)≤[TAT (K)+P], judge that whether Ta (K) is greater than [TAT (K)-P];
When Ta (K)>[TAT (K)-P], TAT (K+1)=TAT (K)+X then;
When Ta (K)≤[TAT (K)-P], TAT (K+1)=TAT (K)+X then.
Step 304 is sent said next message according to said actual transmitting time.
The embodiment of the invention provides a kind of method of elongated message flow control service dispatch; Confirm the time interval between the message through preset message regular length of basis and configured bandwidth, and dispatch the calculating of the actual transmitting time of next message according to the said time interval; Obtain the physical length of the current message that receives, confirm incremental time according to the said physical length and the said time interval; Upgrade the expected time that said next message arrives according to said incremental time, and send said next message according to said actual transmitting time.The scheme that embodiments of the invention provide is controlled elongated message flow control service dispatch based on time scale, and scheduling accurately; Scheduling performance only depends on the source flux specification; Not disposed total bandwidth influences, and when satisfying scheduling performance, the resource of consumption is less.
The embodiment of the invention provides the method for another kind of elongated message flow control service dispatch; The application scenarios of present embodiment is: the calculating and the asynchronous generation of expected time of upgrading said next message arrival of dispatching the actual transmitting time of next message; And only after obtaining the physical length of said current message, upgrade the expected time that said next message arrives, promptly at expected time reproducting periods not according to the said incremental time that calculates; Can dispatch according to predetermined interval temporarily; Proofread and correct the deviation of scheduling before again after waiting to obtain the message physical length, as shown in Figure 5, this method comprises:
Step 501 is confirmed the time interval between the message according to preset message regular length and configured bandwidth, and is dispatched the calculating of the actual transmitting time of next message according to the said time interval;
As shown in Figure 6, dispatch next message actual transmitting time be calculated as an independent flow process, the loop iteration that is calculated as of actual transmitting time calculates, and promptly calculates Ts (K) one by one;
Need to prove, in the embodiment of the invention calculating of actual transmitting time identical with the calculating of actual transmitting time in the accompanying drawing 4, specifically can with reference in the accompanying drawing 4 about the calculating of actual transmitting time, do not give unnecessary details one by one at this.Need to prove; Difference is that the expected time that current message arrives is respectively TAT (K) and TAT (J) when calculating actual transmitting time among Fig. 6 and Fig. 4; Be that Fig. 4 is that the calculating of dispatching the actual transmitting time of next message takes place with the expected time of upgrading said next message arrival synchronously, promptly Ts (K) is identical with the subscript of TAT (K); Fig. 6 is the calculating and the asynchronous generation of expected time of upgrading said next message arrival of the actual transmitting time of the next message of scheduling, and promptly Ts (K) is different with the subscript of TAT (J).
Step 502 is sent said next message according to the actual transmitting time of said next message;
At this moment; According to the time interval between the preset message regular length calculating message and the actual transmitting time of next message; And send said next message according to the actual transmitting time of next message, and this flow process is an independently flow process, the expected time that said next message arrives is asynchronous fully with upgrading; Be time scheduling arbitrarily before the message physical length is not fed back, the expected time that the next message that calculating obtains arrives is constant.
The calculation procedure of the expected time that next message arrives this moment is:
Confirm the actual time of arrival Ta (K) of said current message, the expected time TAT (J) that current message arrives;
Judge that whether Ta (K) is greater than TAT (J);
When Ta (K)>TAT (J), TAT (J+1)=Tc (K)+T then;
When Ta (K)≤TAT (J), TAT (J+1)=TAT (J)+T then.
Wherein, T is the time interval between the message, and Tc (K) is the overall summary counter of QOS, and the even of simulated time flows.Because of the calculating of the actual transmitting time Ts of next message is serial, when therefore upgrading Ts, Tc just is equivalent to Ta.
Step 503 is obtained the physical length of the current message that receives, and confirms incremental time according to the said physical length and the said time interval;
Optional, confirm incremental time according to X=L2*T/L1, wherein, X is an incremental time, and L2 is the physical length of the current message that receives, and T is the time interval between the message of confirming, and L1 is the regular length of preset message.
Step 504 is upgraded the expected time that said next message arrives according to said incremental time;
Optional, as shown in Figure 7, judge that whether Tc is greater than TAT (J);
When Tc>TAT (J), TAT (J+1)=Tc+X then;
When Tc≤TAT (J), TAT (J+1)=TAT (J)+X then.
From seeing for a long time, if TAT lags behind Tc, transmitted traffic is described greater than configured bandwidth, TAT need increase the accuracy that incremental time guarantees current limliting on the TAT basis; If TAT, explains that actual flow is lower than configuration early than Tc, the TAT renewal needs or not limited flow then to increase and decrease incremental time on the Tc basis;
The incremental time that TAT upgrades is X, promptly revises the TAT increment in proportion according to physical length, and the longer explanation of message transmitted traffic is big more, and then the TAT increment also should increase.
As shown in Figure 8; Can control message according to Ts reads constantly and sends; Only after obtaining the physical length information of message; Just upgrade the expected time that next message arrives, the actual transmitting time of next message is recomputated in the comparison of the expected time TAT of the real time Tc that arrives through next message then and the next message arrival of renewal.
Step 505 is sent said next message according to said actual transmitting time.
For example, the Flow Control of existing 1K bar stream, every traffic specification all is maximum 1Gbps; Then 1k*1Gbps=1Tbps in fact just disposes specification; Professional actual total flow is subject to band width in physical, and professional actual total flow has only 10Gbps, when adopting mode of leaking bucket credit of the prior art to dispatch; Total poll ability of design needs 1Tbps, therefore needs more parallel processing resource; When the time scale mode that adopts the embodiment of the invention to provide; 1k bar stream can a shared group scheduling device continuous productive process, and according to the Time Triggered scheduling events, dispatching only needs greater than the actual total flow 10Gbps of business; The overall performance of design requires significantly to reduce, and the resource cost also can reduce.
The embodiment of the invention provides a kind of method of elongated message flow control service dispatch; Confirm the time interval between the message through preset message regular length of basis and configured bandwidth, and dispatch the calculating of the actual transmitting time of next message according to the said time interval; Obtain the physical length of the current message that receives, confirm incremental time according to the said physical length and the said time interval; Upgrade the expected time that said next message arrives according to said incremental time, and send said next message according to said actual transmitting time.The scheme that embodiments of the invention provide; Control elongated message flow control service dispatch based on time scale, scheduling performance only depends on the source flux specification, and not disposed total bandwidth influences; And the cycle of scheduling does not receive memory to read delayed impact; Can improve scheduling performance significantly, and when design specification was confirmed, the resource of consumption was less.
The embodiment of the invention provides a kind of device of elongated message flow control service dispatch, and as shown in Figure 9, this device comprises: computing unit 901, determination module 9011; First judge module, 9012, the first computing modules, 9013, the second judge modules, 9014, the second computing modules 9015; Acquiring unit 902, control unit 903, updating block 904, determination module 9041; Judge module 9042, the first update module 9043, the second update module 9044, transmitting element 905;
Computing unit 901 is used for confirming the time interval between the message according to preset message regular length and configured bandwidth, and dispatches the calculating of the actual transmitting time of next message according to the said time interval;
Optional, cover half piece 9011 really in the said computing unit 901 is used for confirming actual time of arrival of said current message;
First judge module 9012 in the said computing unit 901, the expected time whether actual time of arrival that is used to judge said current message arrives greater than said current message and message tolerance time of advent value and;
Expected time that arrives greater than said current message when actual time of arrival of said current message and message tolerance time of advent value and the time; First computing module 9013 in the said computing unit 901 is used for confirming that the actual transmitting time of said next message is the actual time of arrival of said current message;
When the actual time of arrival of said current message be not more than expected time that said current message arrives and message tolerance time of advent value and the time; Second judge module 9014 in the said computing unit 901, the expected time whether actual time of arrival that is used to judge said current message arrives greater than said current message and message tolerance time of advent value poor;
During expected time that arrives greater than said current message when actual time of arrival of said current message and message tolerance time of advent value poor; Said first computing module 9013 also is used for, and the actual transmitting time of confirming said next message is the actual time of arrival of said current message;
When the actual time of arrival of said current message is not more than expected time that said current message arrives and message tolerance time of advent value poor; Second computing module 9015 in the said computing unit 901 is used for confirming that the actual transmitting time of said next message is the expected time that said current message arrives.
Acquiring unit 902 is used to obtain the physical length of the current message that receives;
Said computing unit 901 also is used for, and confirms incremental time according to the said physical length and the said time interval;
Said computing unit 901 specifically is used for: confirm incremental time according to X=L2*T/L1, wherein, X is an incremental time, and L2 is the physical length of the current message that receives, and T is the time interval between the message of confirming, L1 is the regular length of preset message.
Need to prove that the calculating of dispatching the actual transmitting time of next message takes place with the expected time of upgrading said next message arrival synchronously; Perhaps, dispatch the calculating and the asynchronous generation of expected time of upgrading said next message arrival of the actual transmitting time of next message;
Control unit 903; Be used for when the calculating of the actual transmitting time of the next message of scheduling with upgrade expected time that said next message arrives when taking place synchronously; The expected time that once said next message arrives is then upgraded in the calculating of the actual transmitting time of a message of every scheduling;
When the calculating of the actual transmitting time of the next message of scheduling during with the expected time asynchronous generation of upgrading that said next message arrives; Said control unit 903 also is used for; Only after obtaining the physical length of said current message, upgrade the expected time that said next message arrives according to the said incremental time that calculates.
Updating block 904 is used for upgrading the expected time that said next message arrives according to said incremental time;
Optional, cover half piece 9041 really in the said updating block 904 is used for confirming the actual time of arrival of said current message and the expected time that said current message arrives;
Judge module 9042 in the said updating block 804, be used to judge expected time that whether expected time that said current message arrives arrive greater than said actual time of arrival or said current message and said message tolerance time of advent value and;
Expected time that arrives greater than said actual time of arrival or said current message when expected time that said current message arrives and said message tolerance time of advent value and the time; First update module 9043 in the said updating block 904, then upgrade expected time that said next message arrives and be reach the said time time and said incremental time and;
When the expected time that said current message arrives be not more than expected time that said actual time of arrival or said current message arrive and said message tolerance time of advent value and the time; Second update module 9044 in the said updating block 904, then be used to upgrade expected time that said next message arrives and be expected time that said current message arrives and said incremental time and.
Transmitting element 905 is used for sending said next message according to said actual transmitting time.
The embodiment of the invention provides a kind of device of elongated message flow control service dispatch; Through according to preset message regular length and configured bandwidth, computing unit is confirmed the time interval between the message and is dispatched the calculating of the actual transmitting time of next message according to the said time interval; Acquiring unit obtains the physical length of the current message that receives, and according to the said physical length and the said time interval, said computing unit is confirmed incremental time; Updating block upgrades the expected time that said next message arrives according to said incremental time, and transmitting element sends said next message according to said actual transmitting time.When the scheme that the embodiment of the invention provides can be worked as design specification and confirms, consume less resource.
The above; Be merely embodiment of the present invention, but protection scope of the present invention is not limited thereto, any technical staff who is familiar with the present technique field is in the technical scope that the present invention discloses; Can expect easily changing or replacement, all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion by said protection range with claim.