Channel width method of adjustment based on dynamic channel allocation
Technical field
The present invention relates to the dynamic channel bandwidth that carries out between each portable terminal in same cellular cell and distribute, be specifically related to set up, call out and stop and scene is set up, called out and stop or the triggering channel width adjustment of scene when switching according to the adjustment of periodicity channel width and the bid of relative coding complexity when switching at bid.
Background technology
The original video data of uncompressed comprises mass data, is difficult to transmit on the existing channel bandwidth.In mobile video communication and digital video TV, need be with it compression before transmission of video.But video compression usually diminishes, compare mostly to some extent before video quality after the compression and the compression and descend, to between video quality after the compression and limited channel width, obtain a suitable balance point, just need be in a video sequence the limited coding resource of reasonable distribution between different coding object or a plurality of video sequence.Existing channel width method of adjustment at a plurality of video sequences is the design of multi-path digital TV signal, digital television signal has that number of channels is fixed, longer duration and the abundant characteristics of scene, scene is switched rare relatively in mobile video communication, the total number of users of mobile video communication is unfixing, and duration length is indefinite, so the channel width method of adjustment that digital television signal relates to can not directly be diverted the mobile video communication field.
Summary of the invention
Be not suitable for being applied in problem in the mobile video communication field in order to solve the current channel width method of adjustment that designs for digital television signal, the present invention proposes a kind of channel width method of adjustment based on dynamic channel allocation.
Method of the present invention is:
The handling process that the base station end detects a portable terminal bid when setting up is: upgrade the average channel bandwidth at the base station end, and each portable terminal of broadcast announcement, the channel width weight that newly-established calling is enjoyed is 1;
Handling process when the base station end detects portable terminal bid and stops is: upgrade the average channel bandwidth at the base station end, obtain the channel resource that calling discharged of termination simultaneously, and the portable terminal of these channel resource mean allocation to other, upgrade the channel width weight of each portable terminal according to the principle of mean allocation, notify each portable terminal with the average channel bandwidth and the channel width weight that obtain at last;
Handling process when the base station end detects scene and switches is: the handling process when detecting a portable terminal bid and stop according to the base station end is earlier upgraded average channel bandwidth and average bandwidth weighting, handling process when detecting a portable terminal bid and set up according to the base station end is again upgraded the average channel bandwidth once more, notifies each portable terminal with the average channel bandwidth and the channel width weight that obtain at last;
Handling process when termination and scene switching are not set up, called out to bid is: at portable terminal, PSNR (Peak Signal-to-Noise Ratio in update cycle after each frame compression of record, Y-PSNR), update cycle, each portable terminal sent to the base station with the mean P SNR in this update cycle when finishing; At the base station end, receive the mean P SNR of each portable terminal, calculate the mean P SNR that obtains whole portable terminals, and the mean P SNR of described whole portable terminals is broadcast to each portable terminal; At each portable terminal, calculate mean P SNR of this portable terminal and the ratio of the mean P SNR of whole portable terminals, and adjust the channel width weight of this portable terminal according to described ratio.
The detection method that scene is switched is: before coding one frame, at portable terminal, compare MB (Macro Block at first one by one, macro block) difference between present frame and the former frame brightness value, and then obtain BH (Block Histogram difference, macro-block level brightness histogram difference) value between two frames, based on whether occurrence scene switching of the ratio in judgement of the average BH value of coded frame in described BH value and the current scene, if described ratio, is then judged occurrence scene greater than 2.5 and is switched; If described ratio is less than or equal to 2.5, judge that then not having scene to switch takes place.
The channel width weight step of updating of portable terminal is among the present invention:
Step a1, the calling of setting up base station and portable terminal;
Step a2, Initial Channel Assignment bandwidth weighting are 1;
Step a3, judge whether to receive the parameter update order, if, execution in step a4 then; If not, execution in step a5 then;
Step a4, renewal average channel bandwidth and channel width weight, execution in step a12 then;
Step a5, judge whether call out to stop, if, execution in step a6 then; If not, execution in step a7 then;
The channel width of step a6, release busy;
Step a7, judge whether that occurrence scene switches, if, execution in step a8 then; If not, execution in step a9 then;
Step a8, Initial Channel Assignment bandwidth weighting are 1, then execution in step a12;
Step a9, judge whether to arrive the update cycle, if, execution in step a10 then; If not, execution in step a12 then;
Step a10, calculate mean P SNR, and send to the base station, then execution in step a11;
Step a11, receive the mean P SNR of whole portable terminals of base station broadcast, upgrade the channel width weight of this portable terminal;
Step a12, coding present frame;
The PSNR of step a13, calculating and record present frame returns execution in step a3.
The channel width weight step of updating of base station is among the present invention:
Step b1, detection number of users calculate the average channel bandwidth, and all subscriber channel bandwidth weighting of initialization are 1;
Step b2, judge whether that bid stops, if, execution in step b3 then; If not, execution in step b4 then;
Step b3, renewal average channel bandwidth and channel width weight, execution in step b4 then;
Step b4, judge whether that bid sets up, if, execution in step b5 then; If not, execution in step b6 then;
Step b5, renewal average channel bandwidth, execution in step b6 then;
Step b6, judge whether that occurrence scene switches, if, execution in step b7 then; If not, execution in step b8 then;
Step b7, renewal average channel bandwidth and channel width weight, execution in step b8 then;
Step b8, judge whether to arrive the update cycle, if then carry out b9; If not, then return execution in step b2;
Step b9, receive the mean P SNR of each portable terminal, calculate and broadcast the mean P SNR of whole portable terminals, return execution in step b2.
Advantage of the present invention: periodically update the channel width weight, reduced the realization cost that channel width is adjusted, by special parameter update scheme, call setup is being arranged, when calling out termination and scene switching generation, guaranteeing the validity and the fairness of resource allocation.
Description of drawings
Fig. 1 is the interior mobile video communication network diagram of a cellular cell that the present invention is suitable for; Fig. 2 is the relevant data interaction schematic diagram of Rate Control between portable terminal and the base station in the channel width method of adjustment provided by the present invention, wherein "---→ " represent the video data that each portable terminal sends to the base station end in the Rate Control, the base station end is to the control information of each portable terminal transmission in " → " expression Rate Control; Fig. 3 is the flow chart of the channel width weight step of updating of portable terminal in the channel width method of adjustment provided by the present invention; Fig. 4 is the flow chart of the channel width weight step of updating of base station end in the channel width method of adjustment provided by the present invention.
Embodiment
Embodiment one:
In the described channel width method of adjustment of present embodiment be based on dynamic channel allocation:
The handling process that the base station end detects a portable terminal bid when setting up is: upgrade the average channel bandwidth at the base station end, and each portable terminal of broadcast announcement, the channel width weight that newly-established calling is enjoyed is 1;
Handling process when the base station end detects portable terminal bid and stops is: upgrade the average channel bandwidth at the base station end, obtain the channel resource that calling discharged of termination simultaneously, and the portable terminal of these channel resource mean allocation to other, upgrade the channel width weight of each portable terminal according to the principle of mean allocation, notify each portable terminal with the average channel bandwidth and the channel width weight that obtain at last;
Handling process when the base station end detects scene and switches is: the handling process when detecting a portable terminal bid and stop according to the base station end is earlier upgraded average channel bandwidth and average bandwidth weighting, handling process when detecting a portable terminal bid and set up according to the base station end is again upgraded the average channel bandwidth once more, notifies each portable terminal with the average channel bandwidth and the channel width weight that obtain at last;
Handling process when termination and scene switching are not set up, called out to bid is: at portable terminal, PSNR (Peak Signal-to-Noise Ratio in update cycle after each frame compression of record, Y-PSNR), update cycle, each portable terminal sent to the base station with the mean P SNR in this update cycle when finishing; At the base station end, receive the mean P SNR of each portable terminal, calculate the mean P SNR that obtains whole portable terminals, and the mean P SNR of described whole portable terminals is broadcast to all portable terminals; At each portable terminal, calculate mean P SNR of this portable terminal and the ratio of the mean P SNR of whole portable terminals, and adjust the channel width weight of this portable terminal according to described ratio.
The detection method that scene is switched is: before coding one frame, at portable terminal, compare MB (Macro Block at first one by one, macro block) difference between present frame and the former frame brightness value, and then obtain BH (Block Histogram difference, macro-block level brightness histogram difference) value between two frames, based on whether occurrence scene switching of the ratio in judgement of the average BH value of coded frame in described BH value and the current scene, if described ratio, is then judged occurrence scene greater than 2.5 and is switched; If described ratio is less than or equal to 2.5, judge that then not having scene to switch takes place.
The channel width weight step of updating of portable terminal is in the present embodiment:
Step a1, the calling of setting up base station and portable terminal;
Step a2, Initial Channel Assignment bandwidth weighting are 1;
Step a3, judge whether to receive the parameter update order, if, execution in step a4 then; If not, execution in step a5 then;
Step a4, renewal average channel bandwidth and channel width weight, execution in step a12 then;
Step a5, judge whether call out to stop, if, execution in step a6 then; If not, execution in step a7 then;
The channel width of step a6, release busy;
Step a7, judge whether that occurrence scene switches, if, execution in step a8 then; If not, execution in step a9 then;
Step a8, Initial Channel Assignment bandwidth weighting are 1, then execution in step a12;
Step a9, judge whether to arrive the update cycle, if, execution in step a10 then; If not, execution in step a12 then;
Step a10, calculate mean P SNR, and send to the base station, then execution in step a11;
Step a11, receive the mean P SNR of whole portable terminals of base station broadcast, upgrade the channel width weight of this portable terminal;
Step a12, coding present frame;
The PSNR of step a13, calculating and record present frame returns execution in step a3.
The channel width weight step of updating of base station is in the present embodiment:
Step b1, detection number of users calculate the average channel bandwidth, and all subscriber channel bandwidth weighting of initialization are 1;
Step b2, judge whether that bid stops, if, execution in step b3 then; If not, execution in step b4 then;
Step b3, renewal average channel bandwidth and channel width weight, execution in step b4 then;
Step b4, judge whether that bid sets up, if, execution in step b5 then; If not, execution in step b6 then;
Step b5, renewal average channel bandwidth, execution in step b6 then;
Step b6, judge whether that occurrence scene switches, if, execution in step b7 then; If not, execution in step b8 then;
Step b7, renewal average channel bandwidth and channel width weight, execution in step b8 then;
Step b8, judge whether to arrive the update cycle, if then carry out b9; If not, then return execution in step b2;
Step b9, receive the mean P SNR of each portable terminal, calculate and broadcast the mean P SNR of whole portable terminals, return execution in step b2.
Whole portable terminals in the present embodiment refer to the whole portable terminals in a cellular cell.