Summary of the invention
In view of this, the present invention provides a kind of resource allocation methods based on the TD-SCDMA system, can reduce the wasting of resources of the less business of signaling and data volume.
For solving the problems of the technologies described above, technical scheme of the present invention is achieved in that
A kind of resource allocation methods based on the TD-SCDMA system, this method comprises:
A, confirm resource collection to be allocated;
B, confirm the current total quantity of treating the idling-resource unit that the dispatching priority formation needs;
C, according to the determined current total quantity of treating the idling-resource unit of dispatching priority formation needs, confirm difform available resource block;
D, according to determined difform available resource block, in resource collection to be allocated, choose the resource requirement piece, and the resource requirement piece distributed to the user.
The method of confirming resource collection to be allocated described in the steps A is:
A1, in resource pool; Search for unappropriated code channel in each time slot successively according to time-slot sequence; Obtain all the idling-resource unit in the resource pool, each idling-resource unit is the code channel of a pair of continuous spreading factor SF=16 in the unappropriated time slot in resource pool;
A2, be several Resource Block to be allocated with all idling-resource dividing elements, said several Resource Block to be allocated constitute resource collection to be allocated, and wherein, it is different and the sign indicating number Taoist monastic name is continuous to form the time slot of several idling-resource unit of a Resource Block to be allocated.
Confirm described in the step B that the current method of the total quantity of the idling-resource unit that the dispatching priority formation needs of treating comprises:
B1, calculate the passed bit number of every pair of SF=16 code channel of each time slot:
Wherein, Bits_Per_SlotCode is the passed bit number of every pair of SF=16 code channel of each time slot, Slot
NumBe the total quantity of time slot, Code
NumBe the total quantity of the logarithm of code channel, RTBS is the transmission block size that the user recommends;
B2, according to the passed bit number of every pair of SF=16 code channel of said each time slot, calculate the current total quantity of treating the idling-resource unit that the dispatching priority formation needs:
Wherein, SlotCode
NumBe the current total quantity of treating the idling-resource unit that the dispatching priority formation needs, PQ_BufferSize is the current priority query's buffer data size size to be allocated of waiting to transfer.
RTBS described in the step B1 reports according to channel quality indicator (CQI) and obtains.
Step B2 further comprises: when
Result of calculation when being not integer, confirm SlotCode according to following method
NumValue:
For the little business of data volume, will
The result who rounds up is as SlotCode
NumValue;
For the big business of data volume, will
The result who rounds downwards is as SlotCode
NumValue;
For retransfer scheduling,, then will if first the biography is the little business of data volume
The result who rounds up is as SlotCode
NumValue, if first the biography is the big business of data volume, then will
The result who rounds downwards is as SlotCode
NumValue.
Comprise according to the method for confirming difform available resource block described in the step C:
C1, the setting first time slot variable Slot
Available, Slot
AvailableBe taken to Slot from 1 respectively
MaxThe time, calculate respectively
Wherein, Code
AvailableBe second code channel to number variable, Slot
MaxBe the maximum timeslot number of active user's support and the smaller value in the idle timeslot number, then obtain many group (Slot
Available, Code
Available), then with Slot
AvailableBe regarded as the length of rectangle, with Code
AvailableBe regarded as the wide of rectangle, then obtain a plurality of difform available resource block, each available resource block be shaped as (Slot
Available, Code
Available);
C2, calculate the pairing Slot of each available resource block
AvailableAnd Code
AvailableProduct, according to product order from big to small all difform available resource block are sorted, and all difform available resource block that sorted are deposited in the preset tabulation.
Step C1 further comprises: when
Result of calculation when being not integer, confirm Code according to following method
AvailableValue:
For the little business of data volume, will
The result who rounds up is as Code
AvailableValue;
For the big business of data volume, will
The result who rounds downwards is as Code
AvailableValue;
For retransfer scheduling,, then will if first the biography is the little business of data volume
The result who rounds up is as Code
AvailableValue, if first the biography is the big business of data volume, then will
The result who rounds downwards is as Code
AvailableValue.
In resource collection to be allocated, choose the resource requirement piece described in the step D, and the method that the resource requirement piece is distributed to the user comprised:
The available resource block that ranks the first in D1, the said tabulation of selection;
Whether there be the to be allocated Resource Block identical with shape in D2, the said resource collection to be allocated of search with the available resources block size of up-to-date selection; If; Resource Block to be allocated that then will be identical with shape with the available resources block size of up-to-date selection is as the resource requirement piece, and execution in step D11; Otherwise, execution in step D3;
D3, whether search exists the zone of the available resource block that can hold up-to-date selection in the Resource Block to be allocated of the maximum of said resource collection to be allocated; And do not searched for the All Ranges in the maximum Resource Block to be allocated; If; The zone of then in the Resource Block to be allocated of the maximum of said resource collection to be allocated, selecting a non-selected mistake is as current region, then execution in step D4; Otherwise, execution in step D7;
If the available resource block of the available resource block of the up-to-date selection of D4 for ranking the first in the tabulation, then direct execution in step D5; Otherwise whether the size of judging in the maximum Resource Block to be allocated the maximum rectangular area that except that current region remaining area is included greater than the size of the rectangular area of being write down, if, execution in step D5 then, otherwise, execution in step D3 returned;
D5, the record relative position of said current region in the Resource Block to be allocated of said maximum and the size and the shape of said current region, and said relative position and the size and the shape deletion of record before;
In the Resource Block to be allocated of D6, the said maximum of record except that said current region the size of the included maximum rectangular area of remaining area, and will before the size of the included maximum rectangular area of the said remaining area that writes down delete, return step D3 then;
D7, according to the tabulation in order, select next available resource block;
The pairing first time slot variable Slot of available resource block of D8, the up-to-date selection of judgement
AvailableWith second code channel to number variable Code
AvailableProduct whether equal the pairing first time slot variable Slot of available resource block that selects apart from nearest last time of current time
AvailableWith second code channel to number variable Code
AvailableProduct, if then return execution in step D2; Otherwise, execution in step D9;
D9, judge whether to record the relative position of said current region in the Resource Block to be allocated of maximum and the size and the shape of current region, if, execution in step D10 then; Otherwise, return and carry out D2;
D10, according to the relative position of current region in the Resource Block to be allocated of maximum and the size and the shape of current region of said record, in the Resource Block to be allocated of said maximum, select the Resource Block corresponding as the resource requirement piece with said current region;
D11, the resource requirement piece is distributed to the user, and upgrade resource pool.
The method of upgrading resource pool described in the step D11 comprises: in resource pool, mark at the resource requirement piece that has distributed, be used for expression and take.
To sum up; According to technical scheme provided by the present invention; Make full use of scattered code channel resource in time interval resource and each time slot, reduced resource fragmentation, further improve resource utilization; Reduced and sent the signaling and the professional wasting of resources of small data quantity, improved open ended maximum number of user in the system simultaneously.
And technical scheme provided by the present invention can be according to the time slot and the code channel of traffic carrying capacity flexible allocation needs, and the resource allocation granularity is more careful, the diversified service resources demand of the system that is adapted to.
Embodiment
For making the object of the invention, technical scheme and advantage clearer, below with reference to the accompanying drawing embodiment that develops simultaneously, scheme according to the invention is done to specify further.
Fig. 1 is the flow chart of the embodiment of a kind of resource allocation methods based on the TD-SCDMA system provided by the present invention.As shown in Figure 1, this method may further comprise the steps:
Step 101 is confirmed resource collection to be allocated.
The method of confirming resource collection to be allocated comprises:
Step 1011; In resource pool; Search for unappropriated code channel in each time slot successively according to time-slot sequence, obtain all the idling-resource unit in the resource pool, each idling-resource unit is the code channel of a pair of continuous SF=16 in the unappropriated time slot in resource pool.
The idling-resource unit is a unappropriated resource in the resource pool, and the idling-resource unit is the code channel of two continuous SF=16 in the time slot.
Step 1012; With all idling-resource dividing elements is several Resource Block to be allocated; Said several Resource Block to be allocated constitute resource collection to be allocated, and wherein, the time slot of several idling-resource unit of a Resource Block to be allocated of composition is different and the sign indicating number Taoist monastic name is continuous.
A Resource Block to be allocated is formed in the idling-resource unit that time slot is different and the sign indicating number Taoist monastic name is continuous; Therefore; All idling-resource unit in the resource pool can be divided into several Resource Block to be allocated; Resource Block to be allocated is put into resource collection to be allocated, and the size of the Resource Block to be allocated in the resource collection to be allocated (i.e. the summation of idle Resource Unit in Resource Block to be allocated) can not be identical, so resource collection to be allocated must comprise the Resource Block to be allocated of a maximum.
Step 102 is confirmed the current total quantity of treating the idling-resource unit that dispatching priority formation (PQ) needs.
The method of confirming comprises:
Step 1021, calculate the passed bit number of every pair of SF=16 code channel of each time slot according to following formula:
Bits_Per_SlotCode is the passed bit number of every pair of SF=16 code channel of each time slot, Slot
NumBe the total quantity of time slot, Code
NumBe the total quantity of the logarithm of code channel, RTBS is the transmission block size that the user recommends, and RTBS reports according to channel quality indication (CQI) and obtains, and wherein, the concrete grammar that CQI reports is the method for prior art, no longer details here.
Step 1022, calculate the current total quantity of waiting to dispatch the idling-resource unit that the PQ formation needs according to following formula:
SlotCode
NumBe the current total quantity of waiting to dispatch the idling-resource unit that the PQ formation needs, PQ_BufferSize is the current PQ formation buffer data size size to be allocated of waiting to dispatch.
In addition, if
Result of calculation when being not integer, then round up or down according to the matching principle of single resource allocation, will round the result as SlotCode
NumValue, wherein, the stock numbers of the implication that rounds up or down according to the matching principle of single resource allocation for confirming by business dissimilar to distribute to the user specify as follows:
The first, for the little business of data volume, signaling and semi-persistent scheduling (SPS) business for example is a prerequisite with the resource units waste of minimum, gives the desired data amount definitely to guarantee, that is to say, the result that will round up is as SlotCode
NumValue.
The second, the business big to data volume, for example normal dynamic dispatching services and assurance bit rate (GBR) scheduling are prerequisite not waste Resource Unit as far as possible, give the desired data amount maximum transmission, that is to say, will round the result downwards as SlotCode
NumValue.
The 3rd, to retransfer scheduling, the Resources allocation amount is the same with first biography, that is to say, if first the biography is the little business of data volume, then carries out according to above-mentioned first kind of situation, is the big business of data volume if head passes, and then carries out according to above-mentioned second kind of situation.
Step 103 according to the determined current total quantity of treating the idling-resource unit of dispatching priority formation needs, is confirmed difform available resource block.
Need to prove that the determined difform available resource block of this step is the fast all possible shape of resource of finally distributing for the user.
The method of confirming difform available resource block comprises:
Step 1031 is set the first time slot variable Slot
Available, Slot
AvailableBe taken to Slot from 1 respectively
MaxThe time, calculate respectively
Wherein, Code
AvailableBe second code channel to number variable, Slot
MaxBe the maximum timeslot number of active user's support and the smaller value in the idle timeslot number, then obtain many group (Slot
Available, Code
Available), then with Slot
AvailableBe regarded as the length of rectangle, with Code
AvailableBe regarded as the wide of rectangle, then obtain a plurality of difform available resource block, each available resource block be shaped as (Slot
Available, Code
Available).
The maximum timeslot number that the active user supports confirms that according to user's grade idle timeslot number is the unappropriated timeslot number of current residual in advance, get less in this two one as Slot
Max, Slot
MaxSize equal many group (Slot
Available, Code
Available) total quantity, also equal the total quantity of a plurality of difform available resource block.
In addition, if
Result of calculation when being not integer, then round up or down according to the matching principle of single resource allocation, will round the result as Code
AvailableValue, specify as follows:
The first, for the little business of data volume, signaling and semi-persistent scheduling (SPS) business for example, the result that will round up is as Code
AvailableValue.
The second, the business big to data volume, for example normal dynamic dispatching services and assurance bit rate (GBR) scheduling will round the result downwards as Code
AvailableValue.
The 3rd, to retransfer scheduling,, then carry out according to above-mentioned first kind of situation if first the biography is the little business of data volume, if first the biography is the big business of data volume, then carry out according to above-mentioned second kind of situation.
Step 1032 is calculated the pairing Slot of each available resource block
AvailableAnd Code
AvailableProduct, according to product order from big to small all difform available resource block are sorted, and all difform available resource block that sorted are deposited in the preset tabulation.
Step 104 according to determined difform available resource block, is chosen the resource requirement piece, and the resource requirement piece is distributed to the user in resource collection to be allocated.
Fig. 2 is the flow chart of step 104 among the embodiment of a kind of resource allocation methods based on the TD-SCDMA system provided by the present invention, and as shown in Figure 2, step 104 comprises the steps:
Step 1041, the available resource block that ranks the first in the selective listing (is Slot
AvailableAnd Code
AvailableThe available resource block that product is maximum).
Step 1042; Search for and whether have the to be allocated Resource Block identical with shape in the resource collection to be allocated with the available resources block size of up-to-date selection; If; Resource Block to be allocated that then will be identical with shape with the available resources block size of up-to-date selection is as the resource requirement piece, and execution in step 1051; Otherwise, execution in step 1043.
When first time during execution in step 1042; The available resource block of up-to-date selection is the available resource block that ranks the first in the step 1041; If exist and the available resources block size of up-to-date selection and the Resource Block to be allocated that shape is mated fully in the resource collection to be allocated, then Resource Block to be allocated directly distributed to the user.
Step 1043; Whether search exists the zone of the available resource block that can hold up-to-date selection in the Resource Block to be allocated of the maximum of resource collection to be allocated; And do not searched for the All Ranges in the maximum Resource Block to be allocated; If the zone of then selecting a non-selected mistake is as current region, execution in step 1044 then; Otherwise, execution in step 1047.
Can the available resource block of up-to-date selection be regarded as first rectangle, maximum Resource Block to be allocated is regarded as second rectangle, and this step is judgement: if attempt first rectangle is put within second rectangle; Judge whether second rectangle can hold first rectangle; If can hold, have a plurality of positions that can hold, travel through all positions; Execution in step 1044 then behind every position of selecting non-selected mistake before; If traveled through all positions, but arbitrary position that second rectangle does not have to hold first rectangle, and then execution in step 1047.
Step 1044, if the available resource block of the available resource block of up-to-date selection for ranking the first in the tabulation, then execution in step 1045; Otherwise whether the size of judging in the maximum Resource Block to be allocated the maximum rectangular area that except that current region remaining area is included greater than the size of the rectangular area of being write down, if then execution in step 1045, otherwise, return execution in step 1043.
In this step; If the available resource block of the available resource block of up-to-date selection for ranking the first in the tabulation; Then skips steps 1044; Direct execution in step 1045, if not the available resource block that ranks the first, the size of then judging in the maximum Resource Block to be allocated the maximum rectangular area that except that current region remaining area is included whether greater than the rectangular area of being write down greatly.
Above-mentioned basis for estimation be the surplus resources maximization principle; The principle of surplus resources maximization principle is: supposing has several zones to satisfy the shape and the size requirements of up-to-date available resource block on the maximum Resource Block to be allocated; Suppose that certain zone is chosen to be current region; The shape and the size of current region and up-to-date available resource block are mated fully; Surplus resources in the maximum Resource Block to be allocated except that current region is not necessarily a complete rectangular block, selects maximum in a surplus resources complete rectangular block, the size of the rectangular block of more current selection and the rectangular block that is write down before.
The size of rectangular area is the total quantity of included idling-resource unit, rectangular area.
Step 1045, the record relative position of current region in the Resource Block to be allocated of maximum and the size and the shape of current region, and said relative position and the size and the shape deletion of record before.
If carry out for the first time this step, before record before the zone selected relative position and the size in the Resource Block to be allocated of maximum be shaped as sky, then an executive logging operation needn't be carried out deletion action.
In addition, the purpose of record foregoing is to be used for subsequent step to confirm as the resource requirement piece that the user distributes according to final record in this step.
Step 1046, in the maximum Resource Block to be allocated of record except that current region the size of the included maximum rectangular area of remaining area, and will before the size of the included maximum rectangular area of the said remaining area that writes down delete, return step 1043 then.
If carry out for the first time this step, the size of the included maximum rectangular area of remaining area is a sky the zone of selecting before before removing in the Resource Block to be allocated of the maximum of record, and then an executive logging is operated, and needn't carry out deletion action.
In addition, the purpose of record foregoing is to be used for size that step 1044 judges in the maximum Resource Block to be allocated the maximum rectangular area that except that current region remaining area is included whether greater than the size of the rectangular area of being write down in this step.
The size of the maximum rectangular area that relative position and the remaining area of step 1045 and step 1046 pair current region in the Resource Block to be allocated of maximum is included is all upgraded; Institute's content recorded finally be in the maximum Resource Block to be allocated except that current region during the included maximum rectangular area maximum of remaining area, the size of the maximum rectangular area that relative position, size and shape and the remaining area of current region in the Resource Block to be allocated of maximum is included.
Step 1047 according to the order in the tabulation, is selected next available resource block.
Step 1048 is judged the pairing first time slot variable Slot of available resource block of up-to-date selection
AvailableWith second code channel to number variable Code
AvailableProduct whether equal the pairing first time slot variable Slot of available resource block that selects apart from nearest last time of current time
AvailableWith second code channel to number variable Code
AvailableProduct, if then return execution in step 1042; Otherwise, execution in step 1049.
Step 1049 judges whether to record the relative position of current region in the Resource Block to be allocated of maximum and the size and the shape of current region, if then execution in step 1050; Otherwise, return and carry out 1042.
Step 1050 according to the relative position of current region in the Resource Block to be allocated of maximum and the size and the shape of current region of said record, selects the Resource Block corresponding with current region as the resource requirement piece in the Resource Block to be allocated of maximum.
Step 1051 is distributed to the user with the resource requirement piece, and upgrades resource pool.
The method of upgrading resource pool comprises: in resource pool, mark at the resource requirement piece that has distributed, be used for expression and take.
So far, this flow process finishes.
In addition; When being the user's of Resources allocation new PQ formation (promptly before another PQ queue assignment resource of user) for this reason Resources allocation; Because distributing to the Resource Block of the different PQ formations of same user must be continuously, thus can with the PQ formation and this user of resource to be allocated all the PQ formation of Resources allocation regard an integral body as and carry out resource allocation.That is to say, the PQ formation of resource to be allocated and this user all the buffer data size of the PQ formation of Resources allocation add together as the PQ_BufferSize in the formula (2), correspondingly, SlotCode
NumFor all total quantitys of the idling-resource unit that needs of the PQ formation of Resources allocation of the PQ formation of resource to be allocated and this user, if the size of all Resource Block to be allocated in the resource collection to be allocated is all less than SlotCode
NumSize; Then do not give user's new queue assignment resource; Otherwise, with the PQ formation of resource to be allocated and this user all the PQ formation of Resources allocation regard an integral body as and carry out according to the step in 104, that is to say; For the PQ formation of resource to be allocated and this user all the PQ formation of Resources allocation all distributed resource, the PQ formation of Resources allocation is as the criterion with the resource of up-to-date distribution.
To sum up, in the present invention, make full use of scattered code channel resource in time interval resource and each time slot; Reduced resource fragmentation; Further improve resource utilization, reduced and sent the signaling and the professional wasting of resources of small data quantity, improved open ended maximum number of user in the system simultaneously.
And technical scheme provided by the present invention can be according to the time slot and the code channel of traffic carrying capacity flexible allocation needs, and the resource allocation granularity is more careful, the diversified service resources demand of the system that is adapted to.
The above is merely preferred embodiment of the present invention, is not to be used to limit protection scope of the present invention.All within spirit of the present invention and principle, any modification of being done, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.