Based on interactive slope ratio compared with packet transmission scheduling method and apparatus
Technical field
The present invention relates to wireless communication field, particularly relate to a kind of based on interactive slope ratio compared with packet transmission scheduling method and apparatus.
Background technology
Under the background of energy growing tension, pursue the important goal that higher energy efficiency is Development of Wireless Communications, and the transmission of low energy consumption packet is the key component realizing future wireless system higher-energy efficiency.For to the packet of sizing, transfer rate is the least, and the transmission time is the longest, and corresponding transmission energy consumption is the least.As a example by below will be with AWGN (Additive White Gaussian Noise, white Gaussian noise) transmission channel, in conjunction with Shannon's theorems, conclusions be described.
In given channel width B and noise power spectral density N0In the case of, Shannon's theorems describe channel capacity i.e. up to the relation of transfer rate R and signal power P, be shown below:
Wherein λ is path-loss factor.From above formula it is known that under transfer rate R required, signal power P (R) can be expressed as:
Knowable to above formula, being the packet of l for one to sizing, if transfer rate is R, the required transmission time is l/R, and transmission energy consumption E (R) is:
It can be seen that transfer rate is the least, transmission energy consumption is the lowest, and energy consumption is the underpick mechanism about speed.Except AWGN transmission channel, other channel generally is all set up by this conclusion.Therefore, for individual data bag, it is achieved power save transmission needs to reduce as far as possible transfer rate, i.e. extends the transmission time.But, for the packet that any one is given, transfer rate can not be arbitrarily small, and i.e. the transmission time can not be the longest.On the one hand, packet only arrive after just can transmit, and due to time delay restriction packet must before cut-off time end of transmission;On the other hand, if transmitting certain packet to occupy the plenty of time, packet transmission time subsequently will be made the shortest, this may can increase overall transfer energy consumption on the contrary.For volume of data bag, it is achieved relatively low transmission energy consumption need to be dispatched accordingly in conjunction with packet due in, cut-off time and data package size.
For having different due in and a series of packets varied in size of different cut-off time, it is considered to low energy consumption transmitting and scheduling.Fig. 1 associate cumulation curve gives typical Sample Scenario (hereinafter referred to as problem scenes), cumulative curve includes arrival curve A (t), cut-off curve D (t) and transmission curve C (t), and it respectively describes in the data volume reached, the data volume having been switched off and the data volume transmitted.Data are by packet arrival and cut-off, but press successive bits transmission, and therefore transmission curve and cut-off curve present the rising of discrete ladder, and transmission curve presents in time and is incremented by phenomenon continuously.Obviously, packet can not transmit before arriving, and the data volume i.e. transmitted not can exceed that the data volume having arrived at, and referred to as arrives constraint C (t)≤A (t);Meanwhile, packet must be transmitted complete before cut-off, and the data volume i.e. transmitted cannot be below the data volume having been switched off, referred to as cut-off constraint C (t) >=D (t).
In FIG, transfer rate is equal to the first derivative of transmission curve, i.e. R (t)=C'(t), transfer rate controls scheduling and is equivalent to find an energy-conservation transmission curve, is shown below:
And need full arrival and cut-off to retrain:
The number of note packet is N, and to nth data bag, its due in isCut-off time isData package size is ln.If all packets order by number successively arrives and successively cut-off, it may be assumed that
Wherein,Only represent the cut-off time of last packetThe cut-off time of the most whole transmission, and it is not the due in of a packet, andOnly represent the due in of first packetThe start time of the most whole transmission, and it is not the cut-off time of certain packet.N-th and n+1 packet due in time interval useRepresent, i.e.The time interval of the cut-off time of (n-1)th and nth data bag is usedRepresent, i.e.Between andBetween be likely to be of different sizes, but they meetIt addition,Representing the due in of nth data bag and the time interval between cut-off time, it is the maximum allowable transmission interval of nth data bag.
The note packet point of arrival isPacket cut-off point isWhereinSet A (t) simultaneously and be fight continuity at the packet point of arrival and D (t) at packet cut-off point.Consider a reference point (t between arrival curve and cut-off curveref,Cref), claim reference point and the packet point of arrivalThe slope of line is for arriving slope, and reference point and packet cut-off pointLine slope be cut-off slope.Definition packet due in collection is combined intoPacket cut-off time collection is combined intoDescribing for convenience, if packet due in is the most misaligned with packet cut-off time, i.e. to any 1≤k, n≤N meets(this condition is intended merely to conveniently describe, but is not intended as a restriction of present invention application).Additionally, all due ins of N number of packet and cut-off time constitute setAnd meet t1< t2< ... < t2N, in FIG,
For the problems referred to above scene, typically there is a following two kinds transmission plan:
Prior art one: be transmitted according to the time interval of the cut-off time of packet, this is one packet transmission scheduling strategy the most intuitively, and in suc scheme, each packet just starts transmission after upper packet cut-off, and just pass in this packet cut-off time, i.e. lnData volume existTime in transmission.So, the nth data bag i.e. momentExtremelyTransfer rate can be expressed as shown in following formula.
In the program, the time interval of the cut-off time according to packet is transmitted the algorithm of scheduling and has relatively low complexity, but it does not ensures that relatively low transmission energy consumption, especially in the case of each data packet transmission rates differs greatly, the required gap transmitted between energy consumption and minimum transfer energy consumption is bigger.
Prior art two:
In order to realize lowest energy consumption packet transmission scheduling, M.A.Zafer et al. demonstrates lowest energy consumption transmission curve CoptT () should be as border with A (t) and D (t), with (t1, 0) andThe curve with shortest length for end points.According to the theory that line segment between 2 o'clock is the shortest, lowest energy consumption transmission curve should be made up of a series of line segments, and the end points of each bar line segment is respectively positioned on A (t) and D (t), and adjacent segments is end to end.Realize lowest energy consumption transmitting and scheduling it is crucial that find the starting point of each line segment and the slope starting point of next line segment (terminal of each line segment be exactly in fact).If transmission curve is divided into M span line (i.e. line segment), remember that the starting point of m span line is (Tm,Lm), its slope is transfer rate Rm.The algorithm that implements of lowest energy consumption transmitting and scheduling is given: subfield scape one considers that all packets still have different due ins, but has common cut-off time for following two subfield scape;Subfield scape two considers that all data are surrounded by identical due in, but has different cut-off times.The lowest energy consumption transmission plan of the two subfield scape will be introduced below.
In subfield scape one,AndFor CoptT first span line of (), arranges starting point for (T1,L1)=(t1, 0), connect this point and each packet point of arrival(tn> T1) and calculate each arrival slope, note minimum arrives transfer rate R that slope is the first span line1, the corresponding packet point of arrival is the starting point of terminal that is second span line of the first span line.In like manner, for m span line, connection source (Tm,Lm) and(tn> Tm) each point calculate arrival slope, note minimum slope is the transfer rate of m span line, and the corresponding packet point of arrival is the terminal i.e. starting point of m+1 span line of m span line.Constantly repeat above procedure, until the transmission terminal of last span lineJust whole transmission curve is obtained.This algorithm is specifically described as shown in following formula.
When in Fig. 2 (a) 5 packets, lowest energy consumption transmission curve comprises two span lines, i.e. M=2, and wherein the 1st, 2 packet is as the 1st span line, and the 3rd, 4,5 packet is as the 2nd span line.
In subfield scape two,AndFor CoptT first span line of (), arranges starting point for (T1,L1)=(t1, 0), connect this point and each packet cut-off point(tn> T1) and calculate each cut-off slope, the maximum cut-off slope of note is transfer rate R of the first span line1, corresponding packet cut-off point is the starting point of terminal that is second span line of the first span line.In like manner, for m span line, connection source (Tm,Lm) and(tn> Tm) each point calculate cut-off slope, note greatest gradient is the transfer rate of m span line, and corresponding packet cut-off point is the terminal i.e. starting point of m+1 span line of m span line.Constantly repeat above procedure, until the transmission terminal of last span lineJust whole transmission curve is obtained.This algorithm is specifically described as shown in following formula.
When in Fig. 2 (b) 5 packets, lowest energy consumption transmission curve comprises three span lines, i.e. M=3, and wherein the 1st, 2,3 packet is as the 1st span line, and the 4th and the 5th packet is respectively the 2nd span line and the 3rd span line.
In real system, packet the most all has different due ins and different cut-off times, and therefore the range of application for the lowest energy consumption transmitting and scheduling algorithm of subfield scape one and subfield scape two is narrower.Although the problem scenes that the present invention is directed to is the combination of both the above subfield scape, but the lowest energy consumption transmission curve of problem scenes of the present invention can not be obtained by the lowest energy consumption transmission curve of both subfield scapes.Two seed scenes in Fig. 2 are combined by Fig. 3, during it can be seen that consider to arrive constraint and cut-off constraint at the same time, the lowest energy consumption transmission curve only taking into account the subfield scape one reaching constraint violates cut-off constraint, and only considers that the lowest energy consumption transmission curve of the subfield scape two of cut-off constraint violates arrival constraint.Can find from Fig. 3, actual lowest energy consumption transmission curve does not has clear and definite contacting with the lowest energy consumption transmission curve of subfield scape one and subfield scape two simultaneously yet.
Having different due in and the volume of data bag of different cut-off time for what the present invention considered, prior art two provides a kind of method of geometry finding lowest energy consumption transmission curve: with (t10) it is starting point, first span line of transmission curve is to have minimum slope and hand over A (t) prior to handing over D (t) or having greatest gradient and hand over D (t) prior to handing over the line segment of A (t), the described intersection point first handed over is the terminal of lowest energy consumption transmission curve the first span line, and described slope is the transfer rate of the first span line.The terminal of the first span line is the starting point of the second span line, then, the second span line is performed identical operation and finds terminal.So, just can search for out whole transmission curve.Although the method is geometrically the most directly perceived, but for algorithm realizes, finding the line segment not a duck soup with critical slope, prior art two does not the most provide specific algorithm realization simultaneously.In a word, prior art two does not provide solution to the general scene that the present invention is directed to.
Above prior art two can only realize to be had identical cut-off time for packet or has the situation of identical due in and give lowest energy consumption transmitting and scheduling algorithm, and has different due in and the lowest energy consumption transmitting and scheduling in the case of different cut-off time fails to provide algorithm and realizes for more common of.
Summary of the invention
The present invention provide a kind of based on interactive slope ratio compared with packet transmission scheduling method and apparatus, it is possible to for having different due in and a series of packets varied in size of different cut-off time, it is achieved lowest energy consumption transmission.
For solving above-mentioned technical problem, the present invention provides technical scheme as follows:
On the one hand, the present invention provide a kind of based on interactive slope ratio compared with packet transmission scheduling method, it is characterised in that including:
Step 1: set span line index number m=1, the first span line starting time index z1=1, the first span line starting point
Step 2: set minimum and arrive slopeMaximum cut-off slopeTime index n=zm+1;
Step 3: compare zmWith the size of 2N, if zm< 2N, performs step 4, otherwise, performs step 17;
Step 4: judge tnWhether belong to packet due in setIf so, perform step 5, otherwise, perform step 11;
Step 5: by point (Tm,Lm) andCalculate and arrive slope
Step 6: compareWhether it is less thanIf so, perform step 7, otherwise, perform step 10;
Step 7: update minimum and arrive slopeAnd the time index recording minimum arrival slope point corresponding is
Step 8: compareWhether it is less than or equal toIf so, perform step 9, otherwise, perform step 10;
Step 9: the slope i.e. transfer rate recording m span line isThe starting time index of m+1 span line is Starting point is Update span line index m=m+1, and go to step 2;
Step 10: compare whether n is equal to 2N, if so, performs step 11, otherwise, performs step 16;
Step 11: by point (Tm,Lm) andCalculate cut-off slope
Step 12: compareWhether it is more thanIf so, perform step 13, otherwise, perform step 16;
Step 13: update maximum cut-off slopeAnd the time index recording maximum cut-off slope point corresponding is
Step 14: compareWhether it is more than or equal toIf so, perform step 15, otherwise, perform step 16;
Step 15: the slope i.e. transfer rate recording m span line isM+1 span line starting time index is Starting point is Update span line index m=m+1, and go to step 2;
Step 16: update time index n=n+1, and go to step 4;
Step 17: obtained each span line and transfer rate thereof by above step, carried out the transmission of packet the most accordingly;
Wherein, the due in of each packet, cut-off time, data packet length is the most known before packet arrives.
Corresponding with said method, the present invention provide a kind of based on interactive slope ratio compared with packet transmission scheduling device, including:
First setting module, is used for setting span line index number m=1, the first span line starting time index z1=1, the first span line starting point
Second setting module, is used for setting minimum arrival slopeMaximum cut-off slope
Time index n=zm+1;
First comparison module, is used for comparing zmWith the size of 2N, if zm< 2N, performs judge module, otherwise, performs transport module;
Judge module, is used for judging tnWhether belong to packet due in setIf so, perform the first computing module, otherwise, perform the second computing module;
First computing module, for by point (Tm,Lm) andCalculate and arrive slope
Second comparison module, is used for comparingWhether it is less thanIf so, perform the first more new module, otherwise, perform the 4th comparison module;
First more new module, is used for updating minimum arrival slopeAnd the time index recording minimum arrival slope point corresponding is
3rd comparison module, is used for comparingWhether it is less than or equal toIf so, perform the first logging modle, otherwise, perform the 4th comparison module;
First logging modle, the slope i.e. transfer rate for record m span line isThe starting time index of m+1 span line is Starting point is Update span line index m=m+1, and go to the second setting module;
Whether 4th comparison module, be used for comparing n equal to 2N, if so, performs the second computing module, otherwise, performs new module depth of the night the in of the;
Second computing module, for by point (Tm,Lm) andCalculate cut-off slope
5th comparison module, is used for comparingWhether it is more thanIf so, perform the second more new module, otherwise, perform new module depth of the night the in of the;
Second more new module, is used for updating maximum cut-off slopeAnd the time index recording maximum cut-off slope point corresponding is
6th comparison module, is used for comparingWhether it is more than or equal toIf so, perform the second logging modle, otherwise, perform new module depth of the night the in of;
Second logging modle, the slope i.e. transfer rate for record m span line isM+1 span line starting time index is Starting point is Update span line index m=m+1, and go to the second setting module;
The new module depth of the night in of, is used for updating time index n=n+1, and goes to judge module;
Transport module, for being transmitted packet by span line and the transfer rate thereof obtained after performing with upper module.
On the other hand, the present invention provide a kind of based on interactive slope ratio compared with packet transmission scheduling method, including:
Step 1 ': initialization package index number n=1;
Step 2 ': when nth data wraps inAfter arrival, estimate that the due in of ensuing N-n packet isCut-off time isData package size is all unified to be estimated as lE, wherein,It is spaced for packet average arrival time, dE=E (dn) it is the average admissible transmission time span of packet, lE=E (ln) it is the mean size of packet;
Step 3 ': using the packet of the packet in caching and following N-n estimation as new problem scenes, it is established to curve A (t), cut-off curve D (t), the bag set time of adventCut-off time gathersAnd all due ins and cut-off time setIfMiddle element number is K, and is scheduling the problem scenes that this is new and transmits, including:
Step 31 ': set span line index number m=1 after nth data bag arrives, the first span line starting time index z1=1, the first span line starting point
Step 32 ': set minimum and arrive slopeMaximum cut-off slopeTime index k=zm+1;
Step 33 ': judge tkWhether belong to packet due in setIf so, step 34 is performed ', otherwise, perform step 310 ';
Step 34 ': by point (Tm,Lm) andCalculate and arrive slope
Step 35 ': compareWhether it is less thanIf so, step 36 is performed ', otherwise, perform step 39 ';
Step 36 ': update minimum and arrive slopeAnd the time index recording minimum arrival slope point corresponding is
Step 37 ': compareWhether it is less than or equal toIf so, step 38 is performed ', otherwise, perform step 39 ';
Step 38 ': the slope i.e. transfer rate recording the first span line isThe starting time index of the second span line is Starting point is And go to step 4 ';
Step 39 ': compare whether n is equal to K, if so, perform step 310 ', otherwise, perform step 315 ';
Step 310 ': by point (Tm,Lm) andCalculate cut-off slope
Step 311 ': compareWhether it is more thanIf so, step 312 is performed ', otherwise, perform step 315 ';
Step 312 ': update maximum cut-off slopeAnd the time index recording maximum cut-off slope point corresponding is
Step 313 ': compareWhether it is more than or equal toIf so, step 314 is performed ', otherwise, perform step 315 ';
Step 314 ': the slope i.e. transfer rate recording the first span line isSecond span line starting time index is Starting point is And go to step 4 ';
Step 315 ': update time index k=k+1, and go to step 33 ';
Step 4 ': obtain the m-th span line after nth data bag arrives and transfer rate thereof, and the data in transmission buffer accordingly by above step;
Step 5 ': whether cache emptying before judging current transmission segment endpoint or have new packet to arrive, if so, performing step 6 ', update m=m+1 after otherwise arriving current transmission segment endpoint and perform step 32 ';
Step 6 ': judge whether that caching is emptying before new data packets arrives, if so, perform step 7 ', otherwise perform step 9 ';
Step 7 ': compare whether n is equal to N, if so, EP (end of program), otherwise perform step 8 ';
Step 8 ': suspend transmission, until the moment(n+1)th packet arrives;
Step 9 ': more new data packets index n=n+1 after new data packets arrives, and go to step 2 ';
Wherein, the due in of each packetCut-off timeData package size lnIt was unknown before corresponding data bag arrives, starts most only packet average arrival time intervalAverage admissible transmission time span d of packetE=E (dn), the mean size l of packetE=E (ln) it is known.
Corresponding with said method, the present invention provide a kind of based on interactive slope ratio compared with packet transmission scheduling device, including:
Initialization module, for initialization package index number n=1;
Estimation block, for wrapping in when nth dataAfter arrival, estimate that the due in of ensuing N-n packet isCut-off time is
Data package size is all unified to be estimated as lE, wherein,It is spaced for packet average arrival time, dE=E (dn) it is the average admissible transmission time span of packet, lE=E (ln) it is the mean size of packet;
New scene sets up module, for by the packet in caching and following N-n the packet estimated as new problem scenes, be established to curve A (t), cut-off curve D (t), bag is gathered the time of adventCut-off time gathersAnd all due ins and cut-off time setIfMiddle element number is K, and is scheduling the problem scenes that this is new and transmits, including:
First setup unit, for setting span line index number m=1 after nth data bag arrives, the first span line starting time index z1=1, the first span line starting point
Second setup unit, is used for setting minimum arrival slopeMaximum cut-off slopeTime index k=zm+1;
Judging unit, is used for judging tkWhether belong to packet due in setIf so, perform the first computing unit, otherwise, perform the second computing unit;
First computing unit, for by point (Tm,Lm) andCalculate and arrive slope
First comparing unit, is used for comparingWhether it is less thanIf so, perform the first updating block, otherwise, perform the 3rd comparing unit;
First updating block, is used for updating minimum arrival slopeAnd the time index recording minimum arrival slope point corresponding is
Second comparing unit, is used for comparingWhether it is less than or equal toIf so, perform the first record unit, otherwise, perform the 3rd comparing unit;
First record unit, the slope i.e. transfer rate for record the first span line isThe starting time index of the second span line isStarting point is And go to transport module;
3rd comparing unit, is used for comparing whether n is equal to K, if so, performs the second computing unit, otherwise, performs the 3rd updating block;
Second computing unit, for by point (Tm,Lm) andCalculate cut-off slope
4th comparing unit, is used for comparingWhether it is more thanIf so, perform the second updating block, otherwise, perform the 3rd updating block;
Second updating block, is used for updating maximum cut-off slopeAnd the time index recording maximum cut-off slope point corresponding is
5th comparing unit, is used for comparingWhether it is more than or equal toIf so, perform the second record unit, otherwise, perform the 3rd updating block;
Second record unit, the slope i.e. transfer rate for record the first span line isSecond span line starting time index isStarting point is And go to transport module;
3rd updating block, is used for updating time index k=k+1, and goes to judging unit;
Transport module, for having been obtained the m-th span line after nth data bag arrives and transfer rate thereof by above modules, and the data in transmission buffer accordingly;
Whether the first judge module, cache emptying before judging current transmission segment endpoint or have new packet to arrive, if so, performing the second judge module, updates m=m+1 and perform the second setup unit after otherwise arriving current transmission segment endpoint;
Second judge module, is used for judging whether that caching is emptying before new data packets arrives, and if so, performs comparison module, otherwise performs more new module;
Comparison module, is used for comparing whether n is equal to N, if so, EP (end of program), otherwise performs to wait module;
Wait module, be used for suspending transmission, until the moment(n+1)th packet arrives;
More new module, more new data packets index n=n+1 after arriving in new data packets, and go to estimation block.
Further, described based on interactive slope ratio compared with packet transmission scheduling device be the smart machine with radio communication function, include but not limited to PC, mobile phone or panel computer.
The present invention has a following beneficial effect:
Compared with prior art, the present invention based on interactive slope ratio compared with packet transmission scheduling method in, from the beginning of the starting point of span line, according to setThe order of middle element calculates and arrives slope and cut-off slope, and constantly updates minimum arrival slope and maximum cut-off slope.Meanwhile, minimum arrival slope and maximum cut-off slope are constantly compared.If finding that after certain packet point of arrival have updated minimum arrival slope minimum arrives slope less than or equal to maximum cut-off slope, the line segment that so this minimum arrives slope corresponding is to intersect with D (t) in fact, therefore this span line terminal occurred as soon as before this packet point of arrival.Span line terminal is taken as the packet cut-off point that the most maximum cut-off slope is corresponding, and transfer rate is maximum cut-off slope.If finding that after certain packet cut-off point have updated maximum cut-off slope maximum cut-off slope arrives slope more than or equal to minimum, the line segment that so this maximum cut-off slope is corresponding is and At in fact) intersect, therefore this span line terminal occurred as soon as before this packet cut-off point.Span line terminal is taken as the packet point of arrival that the most minimum arrival slope is corresponding, then transfer rate is minimum arrival slope.Lowest energy consumption transmission can be met according to the transmission of above-mentioned transfer rate.
Accompanying drawing explanation
Fig. 1 is the packet transmission cumulative curve schematic diagram in the present invention;
Fig. 2 is the schematic diagram of the prior art two in the present invention;
Fig. 3 is the prior art two subfield scape one in the present invention and the application limitation schematic diagram of subfield scape two;
Fig. 4 is that technical scheme realizes example;
Fig. 5 be the present invention based on interactive slope ratio compared with the flow chart of packet transmission scheduling method off-line mode;
Fig. 6 be the present invention based on interactive slope ratio compared with the flow chart of packet transmission scheduling method line model;
Fig. 7 is the packet transmission energy consumption comparative graph in the present invention.
Detailed description of the invention
For making the technical problem to be solved in the present invention, technical scheme and advantage clearer, it is described in detail below in conjunction with the accompanying drawings and the specific embodiments.
First, the theoretical basis that introduction the present invention relates to:
According to prior art two, constraint and the lowest energy consumption transmission curve of cut-off constraint is arrived for having, any one span line will be to hand over A (t) prior to having minimum slope (the most now intersection point with A (t) must be a packet point of arrival) most, or be to hand over D (t) prior to having greatest gradient (the most now the intersection point with D (t) must be a packet cut-off point) in the case of handing over A (t) in the case of handing over D (t).The starting point of certain span line given, if terminal the first situation corresponding, is set to So between this span line starting point to the end, maximum cut-off slope is necessarily less than tnThe arrival slope that moment is corresponding, simultaneously as requested between this span line starting point to the end, other arrives slope necessarily more than tnThe arrival slope that moment is corresponding;If terminal correspondence the second situation of span line, it is set toSo between this span line starting point to the end, minimum arrival slope is necessarily more than tnThe cut-off slope that moment is corresponding, simultaneously as requested between this span line starting point to the end, other cut-off slope is necessarily less than tnThe cut-off slope that moment is corresponding.
Analyzing based on above, the present invention relatively obtains lowest energy consumption transmission curve based on interactive slope ratio.Specifically, from the beginning of the starting point of span line, according to setThe order of middle element calculates and arrives slope and cut-off slope, and constantly updates minimum arrival slope and maximum cut-off slope.Meanwhile, minimum arrival slope and maximum cut-off slope are constantly compared.Following two situation can be as the mark judging this span line terminal:
If 1 finds that after certain packet point of arrival have updated minimum arrival slope minimum arrives slope less than or equal to maximum cut-off slope, the line segment that so this minimum arrives slope corresponding is to intersect with D (t) in fact, i.e. violate cut-off constraint, therefore this span line terminal occurred as soon as before this packet point of arrival.According to above analyzing, span line terminal is taken as packet cut-off point corresponding to the most maximum cut-off slope can meet the condition handing over D (t) prior to having greatest gradient in the case of handing over A (t).
If 2 find that after certain packet cut-off point have updated maximum cut-off slope maximum cut-off slope arrives slope more than or equal to minimum, the line segment that so this maximum cut-off slope is corresponding is and At in fact) intersect, i.e. violate arrival constraint, therefore this span line terminal occurred as soon as before this packet cut-off point.According to above analyzing, span line terminal is taken as the most minimum packet point of arrival corresponding to slope that arrive can meet the condition handing over A (t) prior to having minimum slope in the case of handing over D (t).
Therefore, the present invention based on interactive slope ratio compared with packet transmission scheduling method, as it is shown in figure 5, include:
Step 1: set span line index number m=1, the first span line starting time index z1=1, the first span line starting point
Step 2: set minimum and arrive slopeMaximum cut-off slopeTime index n=zm+1;
Step 3: compare zmWith the size of 2N, if zm< 2N, performs step 4, otherwise, performs step 17;
Step 4: judge tnWhether belong to packet due in setIf so, perform step 5, otherwise, perform step 11;
Step 5: by point (Tm,Lm) andCalculate and arrive slope
Step 6: compareWhether it is less thanIf so, perform step 7, otherwise, perform step 10;
Step 7: update minimum and arrive slopeAnd the time index recording minimum arrival slope point corresponding is
Step 8: compareWhether it is less than or equal toIf so, perform step 9, otherwise, perform step 10;
Step 9: the slope i.e. transfer rate recording m span line isThe starting time index of m+1 span line is Starting point is Update span line index m=m+1, and go to step 2;
Step 10: compare whether n is equal to 2N, if so, performs step 11, otherwise, performs step 16;
Step 11: by point (Tm,Lm) andCalculate cut-off slope
Step 12: compareWhether it is more thanIf so, perform step 13, otherwise, perform step 16;
Step 13: update maximum cut-off slopeAnd the time index recording maximum cut-off slope point corresponding is
Step 14: compareWhether it is more than or equal toIf so, perform step 15, otherwise, perform step 16;
Step 15: the slope i.e. transfer rate recording m span line isM+1 span line starting time index is Starting point is Update span line index m=m+1, and go to step 2;
Step 16: update time index n=n+1, and go to step 4;
Step 17: obtained each span line and transfer rate thereof by above step, carried out the transmission of packet the most accordingly;
Wherein, the due in of each packet, cut-off time, data packet length is the most known before packet arrives.
In said method, the sequence number of described each step can not be used for limiting the sequencing of each step, for those of ordinary skill in the art, on the premise of not paying creative work, changes the priority of each step also within protection scope of the present invention.
Technical solution of the present invention implements algorithm flow as shown in Figure 5.At moment tn, only whenOrWhen having renewal, just need they are compared, also it is possible to judge the terminal i.e. starting point of next span line of current transmission section, and in the case of other, jump directly to moment tn+1Do detection further.IfIt is a packet due in, it need to be calculated and arrive slope and judge to updateOn the contrary, it is a packet cut-off time, need to calculate cut-off slope and judge to updateAs n=2N, last time point correspondingIt belongs simultaneously toAndIf therefore arriving the terminal that could not judge span line after slope calculates, also need carry out cut-off slope calculating and detect span line terminal.If now have updatedAfter meet againUpdate condition, will necessarily occurAnd then can determine whether t2NFor the terminal (this is last span line) of current transmission section, and then available z after entering next span line flow processm=2N, algorithm routine terminates.
Compared with prior art, the present invention based on interactive slope ratio compared with packet transmission scheduling method in, from the beginning of the starting point of span line, according to setThe order of middle element calculates and arrives slope and cut-off slope, and constantly updates minimum arrival slope and maximum cut-off slope.Meanwhile, minimum arrival slope and maximum cut-off slope are constantly compared.If finding that after certain packet point of arrival have updated minimum arrival slope minimum arrives slope less than or equal to maximum cut-off slope, the line segment that so this minimum arrives slope corresponding is to intersect with D (t) in fact, therefore this span line terminal occurred as soon as before this packet point of arrival.Span line terminal is taken as the packet cut-off point that the most maximum cut-off slope is corresponding, and transfer rate is maximum cut-off slope.If finding that after certain packet cut-off point have updated maximum cut-off slope maximum cut-off slope arrives slope more than or equal to minimum, the line segment that so this maximum cut-off slope is corresponding is and At in fact) intersect, therefore this span line terminal occurred as soon as before this packet cut-off point.Span line terminal is taken as the packet point of arrival that the most minimum arrival slope is corresponding, then transfer rate is minimum arrival slope.Lowest energy consumption transmission can be met according to the transmission of above-mentioned transfer rate.
For having different due in and 5 packets of different cut-off times in Fig. 3, Fig. 4 gives the present invention and realizes example based on what interactive slope ratio relatively found lowest energy consumption transmission curve.1st step, the starting point of the first span line is set to (T1,L1)=(t1, 0), at packet due in t4DetectDue to xCorresponding to cut-off time t3, the starting point of the second span line is set toAs shown in the 2nd step.Subsequently, at cut-off time t7DetectNowTo just in packet due in t4, therefore arrangeAs shown in the 3rd step.Further, at packet due in t10DetectAndCorresponding to t7, therefore as shown in the 4th stepIt follows that by similar process in the 5th step it can be seen that Finally, at moment t10Find AndWithBoth correspond to moment t10, so far may determine that as whole transmission terminalAs shown in the 6th step.
Corresponding with said method, the present invention provide a kind of based on interactive slope ratio compared with packet transmission scheduling device, including:
First setting module, is used for setting span line index number m=1, the first span line starting time index z1=1, the first span line starting point
Second setting module, is used for setting minimum arrival slopeMaximum cut-off slopeTime index n=zm+1;
First comparison module, is used for comparing zmWith the size of 2N, if zm< 2N, performs judge module, otherwise, performs transport module;
Judge module, is used for judging tnWhether belong to packet due in setIf so, perform the first computing module, otherwise, perform the second computing module;
First computing module, for by point (Tm,Lm) andCalculate and arrive slope
Second comparison module, is used for comparingWhether it is less thanIf so, perform the first more new module, otherwise, perform the 4th comparison module;
First more new module, is used for updating minimum arrival slopeAnd the time index recording minimum arrival slope point corresponding is
3rd comparison module, is used for comparingWhether it is less than or equal toIf so, perform the first logging modle, otherwise, perform the 4th comparison module;
First logging modle, the slope i.e. transfer rate for record m span line isThe starting time index of m+1 span line is Starting point is Update span line index m=m+1, and go to the second setting module;
Whether 4th comparison module, be used for comparing n equal to 2N, if so, performs the second computing module, otherwise, performs new module depth of the night the in of the;
Second computing module, for by point (Tm,Lm) andCalculate cut-off slope
5th comparison module, is used for comparingWhether it is more thanIf so, perform the second more new module, otherwise, perform new module depth of the night the in of the;
Second more new module, is used for updating maximum cut-off slopeAnd the time index recording maximum cut-off slope point corresponding is
6th comparison module, is used for comparingWhether it is more than or equal toIf so, perform the second logging modle, otherwise, perform new module depth of the night the in of;
Second logging modle, the slope i.e. transfer rate for record m span line isM+1 span line starting time index is Starting point is Update span line index m=m+1, and go to the second setting module;
The new module depth of the night in of, is used for updating time index n=n+1, and goes to judge module;
Transport module, for being transmitted packet by span line and the transfer rate thereof obtained after performing with upper module.
With the present invention based on interactive slope ratio compared with packet transmission scheduling method corresponding, the present invention based on interactive slope ratio compared with packet transmission scheduling device, it also is able to for having different due in and a series of packets varied in size of different cut-off time, it is achieved lowest energy consumption is transmitted.
Above description is the packet transmission scheduling for off-line mode, the most each packet reach the momentCut-off timeData package size lnBefore scheduling the most known.But, for line model, before a packet arrives, its due inCut-off timeData package size lnIt is unknown, and packet average arrival time intervalAverage delay license dE=E (dn), and mean size lE=E (ln) it is known.Through simple process, the present invention can be transitioned into line model from off-line mode.
When nth data wraps inAfter moment arrives, for ensuing N-n packet, due in can be estimated asCut-off time can be estimated asTheir size is all unified to be estimated as lE.Then, (nth data bag is comprised for packet known to information in caching, be likely to comprise above other packet not passed) and N-n the packet estimated, use based on interactive slope ratio compared with packet transmission scheduling method obtain ensuing transfer rate.So, existTransfer rate obeys this scheduling result afterwards, until the moment(n+1)th packet arrive or cache emptying till.In the momentNeed to again estimate the due in of N-n-1 packet, cut-off time and size below, and use further based on interactive slope ratio compared with packet transmission scheduling method obtain ensuing transfer rate.Above procedure constantly circulates, and n-th packet does last scheduling after arriving, and by scheduling result transmission until the final moment
Concrete, the present invention based on interactive slope ratio compared with packet transmission scheduling method, as shown in Figure 6, including:
Step 1 ': initialization package index number n=1;
Step 2 ': when nth data wraps inAfter arrival, estimate that the due in of ensuing N-n packet isCut-off time is
Data package size is all unified to be estimated as lE, wherein,It is spaced for packet average arrival time, dE=E (dn) it is the average admissible transmission time span of packet, lE=E (ln) it is the mean size of packet;
Step 3 ': using the packet of the packet in caching and following N-n estimation as new problem scenes, it is established to curve A (t), cut-off curve D (t), the bag set time of adventCut-off time gathersAnd all due ins and cut-off time setIfMiddle element number is K, and is scheduling the problem scenes that this is new and transmits, including:
Step 31 ': set span line index number m=1 after nth data bag arrives, the first span line starting time index z1=1, the first span line starting point
Step 32 ': set minimum and arrive slopeMaximum cut-off slopeTime index k=zm+1;
Step 33 ': judge tkWhether belong to packet due in setIf so, step 34 is performed ', otherwise, perform step 310 ';
Step 34 ': by point (Tm,Lm) andCalculate and arrive slope
Step 35 ': compareWhether it is less thanIf so, step 36 is performed ', otherwise, perform step 39 ';
Step 36 ': update minimum and arrive slopeAnd the time index recording minimum arrival slope point corresponding is
Step 37 ': compareWhether it is less than or equal toIf so, step 38 is performed ', otherwise, perform step 39 ';
Step 38 ': the slope i.e. transfer rate recording the first span line isThe starting time index of the second span line is Starting point is And go to step 4 ';
Step 39 ': compare whether n is equal to K, if so, perform step 310 ', otherwise, perform step 315 ';
Step 310 ': by point (Tm,Lm) andCalculate cut-off slope
Step 311 ': compareWhether it is more thanIf so, step 312 is performed ', otherwise, perform step 315 ';
Step 312 ': update maximum cut-off slopeAnd the time index recording maximum cut-off slope point corresponding is
Step 313 ': compareWhether it is more than or equal toIf so, step 314 is performed ', otherwise, perform step 315 ';
Step 314 ': the slope i.e. transfer rate recording the first span line isSecond span line starting time index is Starting point is And go to step 4 ';
Step 315 ': update time index k=k+1, and go to step 33 ';
Step 4 ': obtain the m-th span line after nth data bag arrives and transfer rate thereof, and the data in transmission buffer accordingly by above step;
Step 5 ': whether cache emptying before judging current transmission segment endpoint or have new packet to arrive, if so, performing step 6 ', update m=m+1 after otherwise arriving current transmission segment endpoint and perform step 32 ';
Step 6 ': judge whether that caching is emptying before new data packets arrives, if so, perform step 7 ', otherwise perform step 9 ';
Step 7 ': compare whether n is equal to N, if so, EP (end of program), otherwise perform step 8 ';
Step 8 ': suspend transmission, until the moment(n+1)th packet arrives;
Step 9 ': more new data packets index n=n+1 after new data packets arrives, and go to step 2 ';
Wherein, the due in of each packetCut-off timeData package size lnIt was unknown before corresponding data bag arrives, starts most only packet average arrival time intervalAverage admissible transmission time span d of packetE=E (dn), the mean size l of packetE=E (ln) it is known.
Fig. 6 give expand to line model based on interactive slope ratio compared with packet transmission scheduling method realize flow process.Under off-line mode, rate controlled scheduling was just fully completed before packet transmits, and line model dispatching is through whole transmitting procedure.After each packet arrives, need again the packet in caching and the packet of estimation not arrived to be established to curve A (t), end curve D (t), packet due in setPacket cut-off time gathersAnd the set of all momentFor the packet in caching, due in changes to current time, and cut-off time remains unchanged, and data packet length changes to the size of part the most to be transmitted.Next packet arrive or cache emptying after, the scheduling result at a upper packet due in is cancelled because not possessing real-time.In order to reduce amount of calculation, use every time based on interactive slope ratio compared with packet transmission scheduling method only need to obtain a span line after just can start to transmit, if after this section of end of transmission next packet do not arrive and cache the most emptying after search again for next span line, as shown in Figure 6.In transmitting procedure, any moment runs into emptying being both needed to of caching and stops, until next packet could be scheduling transmission again after arriving.After n-th bag arrives, if caching emptying, the equal end of transmission of all packets, whole flow process terminates, and now the moment of correspondence is just
When nth data wraps inAfter moment arrives, for ensuing N-n packet, due in can be estimated asCut-off time can be estimated asTheir size is all unified to be estimated as lE.Then, (nth data bag is comprised for packet known to information in caching, be likely to comprise above other packet not passed) and N-n the packet estimated, use based on interactive slope ratio compared with packet transmission scheduling method obtain ensuing transfer rate.So, existTransfer rate obeys this scheduling result afterwards, until the moment(n+1)th packet arrive or cache emptying till.In the momentNeed to again estimate the due in of N-n-1 packet, cut-off time and size below, and use further based on interactive slope ratio compared with packet transmission scheduling method obtain ensuing transfer rate.Above procedure constantly circulates, and n-th packet does last scheduling after arriving, and by scheduling result transmission until the final momentTherefore, the present invention based on interactive slope ratio compared with packet transmission scheduling method can under line model for having different due in and a series of packets varied in size of difference cut-off time, realize lowest energy consumption transmission (it is true that can only infinitely approach lowest energy consumption transmission).
Corresponding with said method, the present invention provide a kind of based on interactive slope ratio compared with packet transmission scheduling device, including:
Initialization module, for initialization package index number n=1;
Estimation block, for wrapping in when nth dataAfter arrival, estimate that the due in of ensuing N-n packet isCut-off time is
Data package size is all unified to be estimated as lE, wherein,It is spaced for packet average arrival time, dE=E (dn) it is the average admissible transmission time span of packet, lE=E (ln) it is the mean size of packet;
New scene sets up module, for by the packet in caching and following N-n the packet estimated as new problem scenes, be established to curve A (t), cut-off curve D (t), bag is gathered the time of adventCut-off time gathersAnd all due ins and cut-off time setIfMiddle element number is K, and is scheduling the problem scenes that this is new and transmits, including:
First setup unit, for setting span line index number m=1 after nth data bag arrives, the first span line starting time index z1=1, the first span line starting point
Second setup unit, is used for setting minimum arrival slopeMaximum cut-off slopeTime index k=zm+1;
Judging unit, is used for judging tkWhether belong to packet due in setIf so, perform the first computing unit, otherwise, perform the second computing unit;
First computing unit, for by point (Tm,Lm) andCalculate and arrive slope
First comparing unit, is used for comparingWhether it is less thanIf so, perform the first updating block, otherwise, perform the 3rd comparing unit;
First updating block, is used for updating minimum arrival slopeAnd the time index recording minimum arrival slope point corresponding is
Second comparing unit, is used for comparingWhether it is less than or equal toIf so, perform the first record unit, otherwise, perform the 3rd comparing unit;
First record unit, the slope i.e. transfer rate for record the first span line isThe starting time index of the second span line isStarting point is And go to transport module;
3rd comparing unit, is used for comparing whether n is equal to K, if so, performs the second computing unit, otherwise, performs the 3rd updating block;
Second computing unit, for by point (Tm,Lm) andCalculate cut-off slope
4th comparing unit, is used for comparingWhether it is more thanIf so, perform the second updating block, otherwise, perform the 3rd updating block;
Second updating block, is used for updating maximum cut-off slopeAnd the time index recording maximum cut-off slope point corresponding is
5th comparing unit, is used for comparingWhether it is more than or equal toIf so, perform the second record unit, otherwise, perform the 3rd updating block;
Second record unit, the slope i.e. transfer rate for record the first span line isSecond span line starting time index isStarting point is And go to transport module;
3rd updating block, is used for updating time index k=k+1, and goes to judging unit;
Transport module, for having been obtained the m-th span line after nth data bag arrives and transfer rate thereof by above modules, and the data in transmission buffer accordingly;
Whether the first judge module, cache emptying before judging current transmission segment endpoint or have new packet to arrive, if so, performing the second judge module, updates m=m+1 and perform the second setup unit after otherwise arriving current transmission segment endpoint;
Second judge module, is used for judging whether that caching is emptying before new data packets arrives, and if so, performs comparison module, otherwise performs more new module;
Comparison module, is used for comparing whether n is equal to N, if so, EP (end of program), otherwise performs to wait module;
Wait module, be used for suspending transmission, until the moment(n+1)th packet arrives;
More new module, indexes n=n+1 for more new data packets after new data packets arrives, and goes to estimation block.
With the present invention based on interactive slope ratio compared with packet transmission scheduling method corresponding, the present invention based on interactive slope ratio compared with packet transmission scheduling device, it also is able to under line model, there are different due in and a series of packets varied in size of different cut-off time, it is achieved lowest energy consumption is transmitted.
Below in conjunction with instantiation, beneficial effects of the present invention is illustrated.
Fig. 7 gives per bit transmission observable index relatively, and correlated condition is set to: channel width B is 1.4MHz, noise power spectral density N0For-174dBm/Hz, path-length is S=1000m, and path loss is λ=28.6+35log10S dB, packet is arrived by Poisson process, the packet interval averages time of adventIt is set to different value, and meansigma methods d of the difference of cut-off time and due according to number of data packets differenceEForTwice, data package size is evenly distributed between 0.5Kbyte to 1.5Kbyte, it is considered to time span T be 10s.It will be seen that along with number-of-packet purpose increases, the energy consumption of per bit also increases.But, in the case of various number of data packets, relative to prior art one, the present invention all can be substantially reduced energy consumption at off-line and line model, and (prior art two simply antithetical phrase scene one and subfield scape two provide lowest energy consumption transmission and realize algorithm, the scene considered for the present invention does not provide algorithm, does not contrasts with the present invention program).
Further, based on interactive slope ratio compared with packet transmission scheduling device be the smart machine with radio communication function, include but not limited to PC, mobile phone or panel computer etc..
Being above the preferred embodiment of the present invention, it is noted that for those skilled in the art, under the premise without departing from the principles of the invention, it is also possible to make some improvements and modifications, these improvements and modifications also should be regarded as protection scope of the present invention.