CN100562117C - A kind of code stream scheduling method, device and system - Google Patents

A kind of code stream scheduling method, device and system Download PDF

Info

Publication number
CN100562117C
CN100562117C CN 200710187854 CN200710187854A CN100562117C CN 100562117 C CN100562117 C CN 100562117C CN 200710187854 CN200710187854 CN 200710187854 CN 200710187854 A CN200710187854 A CN 200710187854A CN 100562117 C CN100562117 C CN 100562117C
Authority
CN
China
Prior art keywords
bit
code stream
mask bit
cascade screen
packet
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN 200710187854
Other languages
Chinese (zh)
Other versions
CN101163248A (en
Inventor
邱香膏
赵雷
王泽廷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN 200710187854 priority Critical patent/CN100562117C/en
Publication of CN101163248A publication Critical patent/CN101163248A/en
Application granted granted Critical
Publication of CN100562117C publication Critical patent/CN100562117C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a kind of code stream scheduling method, comprising: corresponding code stream formation of every bit of one-level mask bit is set, and whether has packet with each code stream formation of value representation of described each bit; According to priority order and the described bit place value set, from the one-level mask bit, select current cascade screen position; According to the priority order of code stream formation in the described current cascade screen position, whether each code stream formation in this cascade screen position is met that output condition is judged and will meet the code stream formation output of output condition, upgrade the bit place value corresponding with described code stream formation.The present invention also discloses a kind of code stream scheduling device and system simultaneously.The present invention is by being provided with the state of multistage mask bit indication code flow queue, by mask bit operational processes is carried out in the code stream formation, reduced the amount of calculation that code stream scheduling is handled, can locate rapidly and treat scheduling queue, make the formation of satisfying output condition can obtain scheduling rapidly, improved dispatching efficiency.

Description

A kind of code stream scheduling method, device and system
Technical field
The present invention relates to signal processing technology, particularly relate to a kind of code stream scheduling method, device and system.
Background technology
At present, along with developing rapidly of the communication technology, communication bandwidth is rapid growth constantly also, and the code stream capacity that can carry in communication process is also increasing.In this case, the mode of multithreading and parallel processing has obtained extensive use, wherein how to distribute the order of bandwidth resources, the more reasonably allotment code stream formation that will transmit just to become very important effectively.
Such as, IPQAM (Internet Protocol QuadratureAmplitude Modem as the video request program intermediate member, Internet protocol quadrature amplitude modulation demodulator), be used for receiving the multi-channel video code stream from video server, the code stream that obtains is stored in the middle of the code stream formation, carries out scheduling output again after the necessary processing, the device of said function also extensively is present in the various application scenarios of code stream scheduling, the output scheduling model of this type of dispatching device mainly comprises as shown in Figure 1:
Code stream processing module 101, be used to receive input code flow from video server, temporal information according to clock generating module 102, code stream is stored in respectively in the different code stream formations 103 with the form of packet goes, and add time tag for the packet packet header in each code stream formation according to system requirements, as the sign of this packet output time.
Clock generating module 102, two clock generating modules shown in the figure adopt same system clock source to produce synchronizing signal, be used for time maintenance system in synchronously, dispatching for the control of code stream processing module 101 and output scheduling module 104 provides time reference.
Code stream formation 103 is used for storing the code stream that code stream processing module 101 is sent temporarily, when output condition satisfies, smoothly the packet in the formation is sent to output scheduling module 104.
Output scheduling module 104, be used under the control of the synchronizing clock signals of clock generating module 102, receive the feedback information that buffering area 106 sends, when feedback information represent buffering area 106 less than, and when the output time that inquiry obtains the individual queue in the code stream formation 103 had arrived, the packet that code stream formation 103 is sent outputed to buffering area 106.
Data-modulated module 105 is used to receive the packet of output scheduling module 104 transmissions and it is modulated output.
Whether full data-modulated module 105 further comprises buffering area 106, is used for the packet that buffer memory output scheduling module 104 sends, and return expression buffering area 106 feedback information to output scheduling module 104.
This device may reach 1000 in the time of need dispatching the concurrent code stream peak of processing, at this moment, for the scheduling of packet in these code stream formations bandwidth requirement height not only, and logical relation is very complicated, also need whether arrive for code stream formation 103 output times, whether full or the like the output condition of buffering area 106 judge, have only the code stream formation of satisfying all above-mentioned output conditions to export, for the output that stops of not satisfying output condition, also to take into account the concurrent output of numerous code stream formations simultaneously, avoid occasioning a delay.These are all to having proposed very high requirement with code stream scheduling method.
Existing code stream scheduling method, the packet header time tag of output scheduling module 104 sequential search packet in the middle of numerous code stream formations, compare with the current time in system of output scheduling module 104: if described time tag is littler than the current time in system, the output time that then shows this queuing data bag arrives, and output is dispatched in this code stream formation; Otherwise, represent the output time no show still of this queuing data bag, continue to check next formation, up to all code stream formations of traversal.Whole flow process is a chronomere with 1 millisecond, finishes once complete scheduling flow for every millisecond.The flow chart of this dispatching method comprises as shown in Figure 2:
Step 201: judge whether 1 millisecond of timer arrives,, return step 201 and proceed to judge if the next clock cycle is then waited in the timer no show; If timer arrives, then continue execution in step 202;
Step 202: read current queue information, judge the packet packet header time tag of current queue and the relation of current time in system, if time tag is littler than the current time in system, then the output time of this queuing data bag arrives, and continues execution in step 203; If time tag is bigger than the current time in system, the then output time of this queuing data bag no show still, then execution in step 205;
Step 203: according to the feedback information of data-modulated module, whether the buffering area of judgment data modulation module is full, if still have cushion space, then continues execution in step 204; If buffering area is full, then transfer execution in step 205;
Step 204: the data packet dispatching output with the code stream formation that satisfies condition, continue execution in step 205;
Step 205: in scheduling flow, the number of code stream formation is certain, therefore exists a maximum queue number.Whether the queue number of judging current code stream formation is maximum queue number, if current queue number is less than maximum queue number, expression also has other formations to need to judge, continues execution in step 206; If current queue number equals maximum queue number, expression has proceeded to last formation, execution in step 207;
Step 206: counter number adds 1 with current queue, returns then and continues execution in step 202;
Step 207: this scheduling flow finishes, and system wait scheduling flow next time begins.
As known from the above, the every output of above-mentioned dispatching method once all will travel through all code stream formations, relatively whether each formation satisfies a plurality of output conditions one by one, and the code stream formation that will all meet output condition is exported, therefore along with the increase of number of queues, the algorithm complex of this dispatching method will be exponential growth; Simultaneously, this dispatching method is exported all code stream formations that satisfy condition in deterministic process simultaneously, occurs competition easily and follow-up equipment is impacted, thereby reduce the performance index of code stream.
Summary of the invention
The embodiment of the invention provides a kind of code stream scheduling method and device, can accelerate code stream scheduling speed and improve code stream scheduling efficient.
The embodiment of the invention provides a kind of code stream scheduling system, can accelerate code stream scheduling speed and improve code stream scheduling efficient.
For achieving the above object, technical scheme of the present invention specifically is achieved in that
A kind of code stream scheduling method, this method comprises:
Corresponding code stream formation of every bit of one-level mask bit is set, and whether has packet with each the code stream formation of each bit value representation;
Duplicate the one-level mask bit and obtain the secondary mask bit, according to priority order and the described bit place value set, select specific mask bit data as current cascade screen position from the secondary mask bit, the priority order of described setting is: the bit of mask bit is low more, and priority is high more; Afterwards, continue to carry out:
A) duplicate by current cascade screen position and obtain three cascade screen positions;
B) judge according to each bit place value of three cascade screen positions whether described three each bit of cascade screen position all do not exist packet:
When all there is not packet in three each bit of cascade screen position, further judge according to each bit place value of secondary mask bit whether each bit of secondary mask bit does not all exist packet, if all there is not packet in each bit of secondary mask bit, then carry out next dispatching cycle; If each bit of secondary mask bit is not entirely when existing packet, then A is returned in the next current cascade screen position of this scheduling process of selection from the secondary mask bit);
When three each bit of cascade screen position not entirely when not having packet, priority order according to code stream formation in the described three cascade screen positions, to meet the bit place value of the code stream formation output of output condition and the renewal at different levels mask bits corresponding, return B) with described code stream formation.
A kind of code stream scheduling device, this device comprises: mask bit is provided with module and code stream scheduling module;
Mask bit is provided with module, is used to be provided with corresponding code stream formation of every bit of one-level mask bit, and whether has packet with each the code stream formation of each bit value representation; Duplicate the one-level mask bit and obtain the secondary mask bit, according to priority order and the described bit place value set, from the secondary mask bit, select specific mask bit data as current cascade screen position and send to the code stream scheduling module, the priority order of described setting is: the bit of mask bit is low more, and priority is high more;
The code stream scheduling module receives mask bit the current cascade screen position that module sends is set, and is duplicated by current cascade screen position and obtains three cascade screen positions; Judge according to each bit place value of three cascade screen positions whether described three each bit of cascade screen position all do not exist packet: when all there is not packet in three each bit of cascade screen position, further judge according to each bit place value of secondary mask bit whether each bit of secondary mask bit does not all exist packet, if all there is not packet in each bit of secondary mask bit, then carry out next dispatching cycle; If each bit of secondary mask bit is then selected the next current cascade screen position of this scheduling process from the secondary mask bit not entirely when not having packet, return that execution is described duplicates the step that obtains three cascade screen positions by current cascade screen position; When three each bit of cascade screen position not entirely when not having packet, priority order according to code stream formation in the described three cascade screen positions, to meet the bit place value of the code stream formation output of output condition and the renewal at different levels mask bits corresponding, and return execution and judge according to each bit place value of three cascade screen positions whether described three each bit of cascade screen position all do not exist the step of packet with described code stream formation.
A kind of code stream scheduling system, this system comprises: the code stream formation, code stream scheduling device and data-modulated device, and described code stream scheduling device comprises: mask bit is provided with module and code stream scheduling module;
The code stream formation, be used to store the code stream that receives, accept the code stream scheduling device to the inquiry that whether has packet and each code stream queuing data bag output time in each code stream formation and whether arrive and return identification information, will meet packet in the code stream formation of schedulable condition and send to code stream scheduling module in the code stream scheduling device to the code stream scheduling module in the code stream scheduling device;
Mask bit is provided with module, is used to be provided with corresponding code stream formation of every bit of one-level mask bit, and whether has packet with each the code stream formation of each bit value representation; Duplicate the one-level mask bit and obtain the secondary mask bit, according to priority order and the described bit place value set, from the secondary mask bit, select specific mask bit data as current cascade screen position and send to the code stream scheduling module, the priority order of described setting is: the bit of mask bit is low more, and priority is high more;
The code stream scheduling module receives mask bit the current cascade screen position that module sends is set, and is duplicated by current cascade screen position and obtains three cascade screen positions; Judge according to each bit place value of three cascade screen positions whether described three each bit of cascade screen position all do not exist packet: when all there is not packet in three each bit of cascade screen position, further judge according to each bit place value of secondary mask bit whether each bit of secondary mask bit does not all exist packet, if all there is not packet in each bit of secondary mask bit, then carry out next dispatching cycle; If each bit of secondary mask bit is then selected the next current cascade screen position of this scheduling process from the secondary mask bit not entirely when not having packet, return that execution is described duplicates the step that obtains three cascade screen positions by current cascade screen position; When three each bit of cascade screen position not entirely when not having packet, priority order according to code stream formation in the described three cascade screen positions, the code stream formation that will meet output condition sends to the bit place value that the data-modulated device also upgrades the at different levels mask bits corresponding with described code stream formation, returns execution and judges according to each bit place value of three cascade screen positions whether described three each bit of cascade screen position all do not exist the step of packet;
The data-modulated device, be used for receiving the code stream dispatching device the code stream scheduling module schedules the code stream formation and with its modulation output.
As seen from the above technical solutions, the embodiment of the invention is by being provided with the state of multistage mask bit indication code flow queue, by mask bit operational processes is carried out in the code stream formation, upgrade mask bit information in real time according to the operational processes result again, the double counting process of having handled again after having avoided at every turn all formations being judged under the existing dispatching method, significantly reduce the amount of calculation that code stream scheduling is handled, thereby improved the speed that scheduling is handled, improved dispatching efficiency.
Description of drawings
Fig. 1 is that schematic diagram is formed in the output scheduling of dispatching device in the prior art.
Fig. 2 is a dispatching method schematic flow sheet in the prior art.
Fig. 3 is a code stream scheduling method schematic flow sheet in the embodiment of the invention.
Fig. 4 is that the code stream scheduling device is formed structural representation in the embodiment of the invention.
Fig. 5 is that the code stream scheduling system forms structural representation in the embodiment of the invention.
Embodiment
For making purpose of the present invention, technical scheme and advantage clearer, below with reference to the accompanying drawing embodiment that develops simultaneously, the present invention is described in more detail.
The embodiment of the invention adopts three cascade screen position dispatching methods, redesigned the flow process of code stream scheduling, this method is in a dispatching cycle, by multistage mask bit is set code stream scheduling is carried out in the code stream formation, and according to scheduling result renewal mask bit information, thereby reduced operand, saved computing time.
In the embodiment of the invention, according to the size of code stream flow, can set up 1000 code stream formation buffer memory input code flows at most, these code stream formations are numbered, so formation 0, formation 1 are arranged up to formation 999, add time tag for each code stream formation by system.System is to finish once scheduling the time cycle with 1 millisecond, and in this cycle, all code stream formations that meet schedulable condition can both obtain output.
The secondary mask bit, identical with one-level mask bit number of bits, initial value duplicates from the one-level mask bit.
Current cascade screen position: according to the priority order of setting, from the highest bit of secondary mask bit priority, the number of bits that selection preestablishes length according to (in the embodiment of the invention, be the length of mask bit data---32) as current cascade screen position.
Three cascade screen positions are reflections of current cascade screen position, be the data of one 32 bit therefore, and its initial value duplicate from current secondary mask bit; The formation of each bit representative numbering is identical with the formation numbering of each bit representative of its corresponding current secondary mask bit.
Need to prove, carry out the difference of the hardware and software platform operational capability of code stream scheduling, when the operational capability of hardware platform can be supported in the clock cycle traversal queries to 1000 formations, adopt the secondary mask bit to get final product.Therefore easily understand, the embodiment of the invention only is for the illustrating of a kind of situation of code stream scheduling, and is not to be used to limit range of application of the present invention.
The realization flow of described three cascade screen position dispatching methods comprises as shown in Figure 3:
Step 301: corresponding code stream formation of every bit of one-level mask bit is set, and whether has packet with each code stream formation of value representation of described each bit; Duplicate the one-level mask bit and obtain the secondary mask bit.
Step 302: in the secondary mask bit, select current cascade screen position, and it is duplicated obtain three cascade screen positions according to described priority order.
The method of the current cascade screen of described selection position is: each mask bit data of system comprise the number of bits certificate of fixed number, and example mask bit data as previously mentioned comprises 32 bits.According to priority order from high to low is each selects one not to be that 0 mask bit data are carried out code stream scheduling entirely, after the minimum mask bit data of priority are carried out code stream scheduling, if still have the code stream formation of not finishing scheduling, then return priority the highest be not 0 mask bit data entirely, continuing to repeat to judge and dispatch output procedure all is 0 up to each bit of secondary mask bit.
Step 303: judge whether three cascade screen positions all are 0,, then continue execution in step 304 if be not 0 entirely, otherwise, execution in step 312.
Step 304: in three cascade screen positions, according to priority order, selecting in the three cascade screen positions is not 0 and the highest bit of priority, its corresponding queues is set for treating scheduling queue, and described bit is called the target bits position.
Step 305: the target bits position in the three cascade screen positions is resetted clearly 0.
Step 306: time tag and the current time in system that will treat the packet packet header of scheduling queue compare, judge to treat whether the output time of scheduling queue arrives,, then continue execution in step 307 if output time arrives, if output time does not arrive, then execution in step 312.
Step 307: whether full according to the buffering area in the feedback information judgment data modulation module, if buffering area is full, then execution in step 312, if buffering area still has living space, then execution in step 308.
Step 308: the scheduling queue for the treatment of that will select is exported.
Step 303~step 308 is that the judgement of schedulable condition is carried out in the code stream formation of the bit correspondence of three cascade screen positions, and exports the packet in the code stream formation that meets schedulable condition.
Wherein, the method for the treatment of scheduling queue output that will select in the step 308 comprises two kinds:
A) after a packet in the scheduling queue is treated in output, abandon output power, continue execution in step 309 then;
B) will treat that entire packet output in the scheduling queue finishes after, abandon output power again, continue execution in step 310 then, correspondingly no longer carry out the judgement of step 309.
Step 309: after the scheduling output, judge whether described treating also has the remaining data bag in the scheduling queue, if there is no the remaining data bag then continues execution in step 310, otherwise execution in step 312.
Step 310: when in treating scheduling queue, not having the remaining data bag, will reset clearly 0 with the described bit for the treatment of the one-level mask bit that scheduling queue is corresponding.
Step 311: will reset clearly 0 with the described bit for the treatment of the secondary mask bit that scheduling queue is corresponding, and return and continue execution in step 303.
Step 312: judge whether the secondary mask bit all is 0, if be not 0 entirely, continue execution in step 313, if be 0 all, then execution in step 314.
Step 313: from the secondary mask bit, select the next current cascade screen position of next mask bit data, and return and continue execution in step 302 as this scheduling process.
Step 314: one time scheduling process finishes, and the next round scheduling process is carried out in system wait.
Need to prove, described in the step 304 according to priority order, select three cascade screen positions and be not 0 and the process of the highest bit of priority be specially: by mask bit obtain be not 0 and the process of the highest bit of priority be exactly from the highest bit of priority, find out first bit item for " 1 ", this bit item is treats scheduling queue, and example is as shown in table 2 below:
Mask bit (binary system) The high prioritized bit position
0000 0000 0 (invalid)
0000 0001 0 (effectively)
0000 0010 1
0000 0011 0
0000 0100 2
0000 0101 0
0000 0110 1
0000 0111 0
0000 1000 3
......
Table 2
Treat scheduling queue in the step 308 and dispatch, export and just abandon output power behind the packet, purpose is the chance in order to be scheduled for other formations; Owing to may have a more than packet in the described formation, the code stream formation may also have the remaining data bag to exist after exporting a packet, therefore step 309 further judges whether to exist the remaining data bag, when judging that the remaining data bag does not exist, step 310 just the one-level mask bit target bits bit data of indication code flow queue packet existence is resetted clearly 0 and the corresponding bit position of current cascade screen position reset clearly 0.And when having the remaining data bag to exist in the formation of judgement code stream, do not change the value of the corresponding bit position of I and II mask bit, wait until follow-up continuation output is dispatched in described code stream formation.
Code stream scheduling device in the embodiment of the invention, its structure is formed as shown in Figure 4, and comprising: mask bit is provided with module 401 and code stream scheduling module 402.
Mask bit is provided with module 401, be used to be provided with corresponding code stream formation of every bit of one-level mask bit, and whether described bit exists the identifier of packet for this code stream formation, for example can whether there be packet with the code stream formation of the value representation correspondence of bit, according to priority order and described bit place value or the identifier set, from the one-level mask bit, select current cascade screen position, described mask bit information is sent to code stream scheduling module 402.
Code stream scheduling module 402, receive mask bit the mask bit information that module 401 sends is set, priority order according to code stream formation in the current cascade screen position, whether each code stream formation in this cascade screen position is met that output condition is judged and will meet the code stream formation output of output condition, upgrade the bit place value corresponding with described code stream formation.
Code stream scheduling module 402 comprises that further three cascade screen positions are provided with submodule 403, mask bit updating submodule 404, and schedulable condition is judged submodule 405 and secondary mask bit judgement submodule 406.
Three cascade screen positions are provided with submodule 403, receive mask bit the mask bit information of module 401 transmissions and the mask bit information that secondary mask bit judgement submodule 406 returns are set, and are duplicated by current cascade screen position and obtain three cascade screen positions.
Mask bit updating submodule 404, receive three cascade screen positions the three cascade screen position information that submodule 403 sends are set, from described three cascade screen positions, select target bits position and the corresponding with it scheduling queue for the treatment of, the target bits position is clear 0, and described target bits position and the corresponding with it scheduling queue information for the treatment of are sent to schedulable condition judge submodule 405; The identification information that receiving scheduling condition judgment submodule 405 returns:
If the identification information that the expression schedulable condition satisfies, then scheduling is abandoned output power after exporting a packet treating scheduling queue, and judge further whether this code stream formation exists the remaining data bag, if there is the remaining data bag, then mask bit information is sent to the secondary mask bit and judge submodule 406, receive the next current cascade screen position information that the secondary mask bit judges that submodule 406 returns; If there is not a remaining data bag, the bit of the described I and II mask bit for the treatment of the scheduling queue correspondence is clear 0, and described mask bit information is sent to the secondary mask bit judge submodule 406;
If perhaps represent the identification information that schedulable condition satisfies, scheduling is abandoned output power after exporting the entire packet for the treatment of scheduling queue, the bit of the described I and II mask bit for the treatment of the scheduling queue correspondence is clear 0, and described mask bit information is sent to the secondary mask bit judge submodule 406.
Schedulable condition is judged submodule 405, be used to receive target bits position and the corresponding with it scheduling queue information for the treatment of that mask bit updating submodule 404 sends, when scheduling time of code stream formation in the described formation arrive and buffering area less than the time, return the identification information that two schedulable conditions of expression all satisfy and give mask bit updating submodule 404, if any schedulable condition is satisfied.Then return the ungratified identification information of expression schedulable condition and give mask bit updating submodule 404.
The secondary mask bit is judged submodule 406, and the mask bit information that is used for mask bit updating submodule 404 is sent is judged, if the secondary mask bit is 0, then stops this scheduling flow; If the secondary mask bit is not 0, then getting next secondary mask bit data according to preset rule is current cascade screen position, and described current cascade screen position information is returned to three cascade screen positions submodule 403 is set.
Understand easily; employing bit described in the embodiment of the invention is got 0 value and the represented implication of 1 value; equally also can adopt other means to implement; such as 0 and 1 application rule is swapped round; still can reach identical goal of the invention; being to adopt usually the custom of agreement to give an example described in the literary composition, is not in order to limit the scope of application of the present invention and mode, and the scheme of two kinds of different conditions method for expressing of any employing all should be included within protection scope of the present invention.
Code stream scheduling system in the embodiment of the invention, it forms structure as shown in Figure 5, specifically comprises: code stream formation 501, code stream scheduling device 502 and data-modulated device 503, wherein data-modulated device 503 further comprises buffering area 504.
Code stream formation 501, be used to store the code stream that receives, receive and whether to have the inquiry whether packet and each code stream queuing data bag output time arrive in 502 pairs of each code stream formations of code stream dispatching device and to return identification information to code stream scheduling device 502, the packet that will meet in the formation of schedulable condition sends to code stream scheduling device 502.
Code stream scheduling device 502, whether be used for inquiry code flow queue 501 individual queue exists packet and receives the identification information that returns, generate mask bit, whether arrive and receive the identification information that returns according to the mask bit that generates to code stream formation 501 inquiry individual queue packet output times, the feedback information that whether inquiry buffering area 504 has expired and reception is returned, when described identification information represent that the packet output time arrives and described feedback information represent buffering area 504 less than the time, with meeting the data packet dispatching output of above-mentioned condition in the code stream formation 501 and sending to buffering area 504, upgrade mask bit.
Data-modulated device 503 is used for receiving the packet of code stream dispatching device 502 transmitted stream formations and it is modulated output.
Whether full buffering area 504 is used for the packet that buffer memory code stream scheduling device 502 sends and sends to data-modulated device 503, receive the inquiry of 502 pairs of buffering areas of code stream dispatching device and return feedback information.
Described code stream scheduling device comprises: mask bit is provided with module and code stream scheduling module;
Mask bit is provided with module, be used to be provided with corresponding code stream formation of every bit of one-level mask bit, and whether each the code stream formation of value representation with described each bit exists packet, according to priority order and the described bit place value set, from the one-level mask bit, select current cascade screen position, described mask bit information is sent to the code stream scheduling module;
The code stream scheduling module, receive mask bit the mask bit information that module sends is set, priority order according to code stream formation in the current cascade screen position, whether each code stream formation in this cascade screen position is met that output condition is judged and will meet the code stream formation output of output condition, upgrade the bit place value corresponding with described code stream formation.
From the above, code stream scheduling method and device that the embodiment of the invention adopts, can utilize mask bit to search out rapidly to satisfy the scheduling queue for the treatment of of schedulable condition, and need not travel through all code stream formations at every turn and carry out the judgement of schedulable condition one by one, thereby the speed and the efficient of code stream scheduling have been improved greatly.
The method of the power of exporting is abandoned in, each code stream formation simultaneously behind packet of output, make all code stream formations that the chance of impartial acquisition dateout be arranged, and has realized that each code stream formation is at the balance dispatching of chance aspect that is scheduled.
In addition, just abandon output power behind packet of the each output of this each formation, also make each code stream formation bit stream data in time uniformly dispersed and distributed in the process of whole code stream scheduling output, realized the balance dispatching of each code stream formation in the time aspect, solved under the existing dispatching method, output code flow may be concentrated a large amount of bit stream datas of appearance to indivedual follow-up equipments in a period of time, thereby, the performance index of output code flow have been improved to the scheduling particle issues that follow-up equipment impacts.
Of particular note, code stream scheduling device described in the embodiment of the invention is not represented the concrete module in certain concrete system especially, for example it can be the output scheduling module in the IPQAM system, it also can be intersection multiplexer in the Digital Television or the like, therefore understand easily, in view of the function of the output scheduling correlation module of different system is divided similar substantially, therefore described code stream scheduling device and method has versatility widely, can be applied to the scene that any needs carry out extensive code stream scheduling fully.
At last, be 1 millisecond the dispatching cycle described in the embodiment of the invention, it is a set point, do not represent that this dispatching method can only be the cycle with 1 millisecond, need carry out in advance setting according to the flow size of handling code stream and arithmetic speed toward contact during practical application, concrete be provided with rule and mode and the present invention have nothing to do, and will not give unnecessary details herein.
Therefore should be appreciated that; the above only is preferred embodiment of the present invention; be not to be used to limit spirit of the present invention and protection range, equivalent variations that any those of ordinary skill in the art made or replacement all should be considered as being encompassed within protection scope of the present invention.

Claims (9)

1, a kind of code stream scheduling method is characterized in that, this method comprises:
Corresponding code stream formation of every bit of one-level mask bit is set, and whether has packet with each the code stream formation of each bit value representation;
Duplicate the one-level mask bit and obtain the secondary mask bit, according to priority order and the described bit place value set, select specific mask bit data as current cascade screen position from the secondary mask bit, the priority order of described setting is: the bit of mask bit is low more, and priority is high more; Afterwards, continue to carry out:
A) duplicate by current cascade screen position and obtain three cascade screen positions;
B) judge according to each bit place value of three cascade screen positions whether described three each bit of cascade screen position all do not exist packet:
When all there is not packet in three each bit of cascade screen position, further judge according to each bit place value of secondary mask bit whether each bit of secondary mask bit does not all exist packet, if all there is not packet in each bit of secondary mask bit, then carry out next dispatching cycle; If each bit of secondary mask bit is not entirely when existing packet, then A is returned in the next current cascade screen position of this scheduling process of selection from the secondary mask bit);
When three each bit of cascade screen position not entirely when not having packet, priority order according to code stream formation in the described three cascade screen positions, to meet the bit place value of the code stream formation output of output condition and the renewal at different levels mask bits corresponding, return B) with described code stream formation.
2, code stream scheduling method according to claim 1, it is characterized in that, according to the priority order of code stream formation in the described three cascade screen positions, the method that will meet the bit place value of the code stream formation output of output condition and the renewal at different levels mask bits corresponding with described code stream formation is:
According to the priority order of code stream formation in the described three cascade screen positions, the highest bit of described three cascade screen position medium priorities is set to the target bits position, is set to wait to dispatch the code stream formation with the pairing code stream formation in this target bits position;
When described scheduling time of waiting to dispatch the code stream formation arrive and buffering area less than the time: output is abandoned output power after waiting to dispatch a packet of code stream formation, and the target bits place value is set to expression and does not have packet; Or output is abandoned output power after waiting to dispatch the entire packet of code stream formation, and the bit place value of the I and II mask bit of target bits place value and this code stream formation correspondence is set to expression and does not have packet.
3, code stream scheduling method according to claim 2, it is characterized in that, described output is abandoned output power after waiting to dispatch a packet of code stream formation, if describedly wait to dispatch the code stream formation and do not have residue bag, then the target bits place value is set to expression and further comprises after not having packet: the bit place value of the I and II mask bit of this code stream formation correspondence is set to expression and does not have packet.
4, a kind of code stream scheduling device is characterized in that, this device comprises: mask bit is provided with module and code stream scheduling module;
Mask bit is provided with module, is used to be provided with corresponding code stream formation of every bit of one-level mask bit, and whether has packet with each the code stream formation of each bit value representation; Duplicate the one-level mask bit and obtain the secondary mask bit, according to priority order and the described bit place value set, from the secondary mask bit, select specific mask bit data as current cascade screen position and send to the code stream scheduling module, the priority order of described setting is: the bit of mask bit is low more, and priority is high more;
The code stream scheduling module receives mask bit the current cascade screen position that module sends is set, and is duplicated by current cascade screen position and obtains three cascade screen positions; Judge according to each bit place value of three cascade screen positions whether described three each bit of cascade screen position all do not exist packet: when all there is not packet in three each bit of cascade screen position, further judge according to each bit place value of secondary mask bit whether each bit of secondary mask bit does not all exist packet, if all there is not packet in each bit of secondary mask bit, then carry out next dispatching cycle; If each bit of secondary mask bit is then selected the next current cascade screen position of this scheduling process from the secondary mask bit not entirely when not having packet, return that execution is described duplicates the step that obtains three cascade screen positions by current cascade screen position; When three each bit of cascade screen position not entirely when not having packet, priority order according to code stream formation in the described three cascade screen positions, to meet the bit place value of the code stream formation output of output condition and the renewal at different levels mask bits corresponding, and return execution and judge according to each bit place value of three cascade screen positions whether described three each bit of cascade screen position all do not exist the step of packet with described code stream formation.
5, code stream scheduling device according to claim 4 is characterized in that, described code stream scheduling module comprises: three cascade screen positions are provided with submodule, mask bit updating submodule, schedulable condition judgement submodule and secondary mask bit and judge submodule;
Three cascade screen positions are provided with submodule, receive mask bit the current cascade screen position of module transmission or the current cascade screen position that secondary mask bit judgement submodule returns are set, and are duplicated by current cascade screen position to obtain three cascade screen positions and send to the mask bit updating submodule;
The mask bit updating submodule, receive three cascade screen positions the three cascade screen positions that submodule sends are set, from described three cascade screen positions, select target bits position and corresponding with it code stream formation, the target bits position is updated to the value that there is not packet in expression, and described target bits position and corresponding with it code stream formation are sent to schedulable condition judgement submodule; The identification information that receiving scheduling condition judgment submodule returns, if the identification information that the expression schedulable condition satisfies, abandon output power after then dispatching a packet in a plurality of packets in this code stream formation of output, and three cascade screen positions after will upgrading are sent to secondary mask bit judgement submodule together with the I and II mask bit;
Schedulable condition is judged submodule, be used to receive target bits position and the corresponding with it code stream formation that the mask bit updating submodule sends, when scheduling time of described code stream formation arrive and buffering area less than the time, return identification information that two schedulable conditions of expression all satisfy to the mask bit updating submodule, if any schedulable condition does not satisfy, then return the ungratified identification information of expression schedulable condition and give the mask bit updating submodule;
The secondary mask bit is judged submodule, be used for the three cascade screen positions that the mask bit updating submodule is sent are judged together with the I and II mask bit, if when judging that according to each bit place value of secondary mask bit all there is not packet in each bit of secondary mask bit, then stop this scheduling flow; If each bit of secondary mask bit is not entirely when existing packet, then getting next secondary mask bit data according to preset rule is current cascade screen position, and described current cascade screen position is returned to three cascade screen positions submodule is set.
6, code stream scheduling device according to claim 5, it is characterized in that, described mask bit updating submodule, be further used for receiving three cascade screen positions the three cascade screen positions that submodule sends are set, from described three cascade screen positions, select target bits position and corresponding with it code stream formation, the target bits position is updated to the value that there is not packet in expression, and described target bits position and corresponding with it code stream formation are sent to schedulable condition judgement submodule; The identification information that receiving scheduling condition judgment submodule returns, if the identification information that the expression schedulable condition satisfies, then dispatch the entire packet of output code flow formation, the bit of the I and II mask bit of described code stream formation correspondence is updated to the value that there is not packet in expression, and the mask bits at different levels after will upgrading send to the secondary mask bit and judge submodule.
7, a kind of code stream scheduling system is characterized in that this system comprises: the code stream formation, and code stream scheduling device and data-modulated device, and described code stream scheduling device comprises: mask bit is provided with module and code stream scheduling module;
The code stream formation, be used to store the code stream that receives, accept the code stream scheduling device to the inquiry that whether has packet and each code stream queuing data bag output time in each code stream formation and whether arrive and return identification information, will meet packet in the code stream formation of schedulable condition and send to code stream scheduling module in the code stream scheduling device to the code stream scheduling module in the code stream scheduling device;
Mask bit is provided with module, is used to be provided with corresponding code stream formation of every bit of one-level mask bit, and whether has packet with each the code stream formation of each bit value representation; Duplicate the one-level mask bit and obtain the secondary mask bit, according to priority order and the described bit place value set, from the secondary mask bit, select specific mask bit data as current cascade screen position and send to the code stream scheduling module, the priority order of described setting is: the bit of mask bit is low more, and priority is high more;
The code stream scheduling module receives mask bit the current cascade screen position that module sends is set, and is duplicated by current cascade screen position and obtains three cascade screen positions; Judge according to each bit place value of three cascade screen positions whether described three each bit of cascade screen position all do not exist packet: when all there is not packet in three each bit of cascade screen position, further judge according to each bit place value of secondary mask bit whether each bit of secondary mask bit does not all exist packet, if all there is not packet in each bit of secondary mask bit, then carry out next dispatching cycle; If each bit of secondary mask bit is then selected the next current cascade screen position of this scheduling process from the secondary mask bit not entirely when not having packet, return that execution is described duplicates the step that obtains three cascade screen positions by current cascade screen position; When three each bit of cascade screen position not entirely when not having packet, priority order according to code stream formation in the described three cascade screen positions, the code stream formation that will meet output condition sends to the bit place value that the data-modulated device also upgrades the at different levels mask bits corresponding with described code stream formation, returns execution and judges according to each bit place value of three cascade screen positions whether described three each bit of cascade screen position all do not exist the step of packet;
The data-modulated device, be used for receiving the code stream dispatching device the code stream scheduling module schedules the code stream formation and with its modulation output.
8, code stream scheduling according to claim 7 system is characterized in that described data-modulated device comprises buffering area; Described code stream scheduling module comprises: three cascade screen positions are provided with submodule, mask bit updating submodule, schedulable condition judgement submodule and secondary mask bit and judge submodule;
Three cascade screen positions are provided with submodule, receive mask bit the current cascade screen position of module transmission or the current cascade screen position that secondary mask bit judgement submodule returns are set, and are duplicated by current cascade screen position to obtain three cascade screen positions and send to the mask bit updating submodule;
The mask bit updating submodule, receive three cascade screen positions the three cascade screen positions that submodule sends are set, from described three cascade screen positions, select target bits position and corresponding with it code stream formation, the target bits position is updated to the value that there is not packet in expression, and described target bits position and corresponding with it code stream formation are sent to schedulable condition judgement submodule; The identification information that receiving scheduling condition judgment submodule returns, if the identification information that the expression schedulable condition satisfies, abandon output power after then dispatching a packet in a plurality of packets in this code stream formation of output, and three cascade screen positions after will upgrading are sent to secondary mask bit judgement submodule together with the I and II mask bit;
Schedulable condition is judged submodule, be used to receive target bits position and the corresponding with it code stream formation that the mask bit updating submodule sends, when scheduling time of described code stream formation arrive and buffering area less than the time, return identification information that two schedulable conditions of expression all satisfy to the mask bit updating submodule, if any schedulable condition does not satisfy, then return the ungratified identification information of expression schedulable condition and give the mask bit updating submodule;
The secondary mask bit is judged submodule, be used for the three cascade screen positions that the mask bit updating submodule is sent are judged together with the I and II mask bit, if when judging that according to each bit place value of secondary mask bit all there is not packet in each bit of secondary mask bit, then stop this scheduling flow; If each bit of secondary mask bit is not entirely when existing packet, then getting next secondary mask bit data according to preset rule is current cascade screen position, and described current cascade screen position is returned to three cascade screen positions submodule is set.
Whether full buffering area be used to accept schedulable condition and judge submodule to buffering area inquiry and return feedback information, and the packet that buffer memory mask bit updating submodule sends also sends to the data-modulated device.
9, code stream scheduling device according to claim 8, it is characterized in that, described mask bit updating submodule, be further used for receiving three cascade screen positions the three cascade screen positions that submodule sends are set, from described three cascade screen positions, select target bits position and corresponding with it code stream formation, the target bits position is updated to the value that there is not packet in expression, and described target bits position and corresponding with it code stream formation are sent to schedulable condition judgement submodule; The identification information that receiving scheduling condition judgment submodule returns, if the identification information that the expression schedulable condition satisfies, then dispatch the entire packet of output code flow formation, the bit of the I and II mask bit of described code stream formation correspondence is updated to the value that there is not packet in expression, and one, two and three cascade screen positions after will upgrading send to the secondary mask bit and judge submodule.
CN 200710187854 2007-11-19 2007-11-19 A kind of code stream scheduling method, device and system Expired - Fee Related CN100562117C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 200710187854 CN100562117C (en) 2007-11-19 2007-11-19 A kind of code stream scheduling method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 200710187854 CN100562117C (en) 2007-11-19 2007-11-19 A kind of code stream scheduling method, device and system

Publications (2)

Publication Number Publication Date
CN101163248A CN101163248A (en) 2008-04-16
CN100562117C true CN100562117C (en) 2009-11-18

Family

ID=39298056

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200710187854 Expired - Fee Related CN100562117C (en) 2007-11-19 2007-11-19 A kind of code stream scheduling method, device and system

Country Status (1)

Country Link
CN (1) CN100562117C (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014064486A1 (en) * 2012-10-25 2014-05-01 Pismo Labs Technology Limited A method, device and system to prioritize encapsulating packets in a plurality of logical network connections
US10044628B2 (en) 2016-06-13 2018-08-07 Pismo Labs Technology Limited Methods and systems for receiving and transmitting packets based on priority levels
CN107528789B (en) * 2016-06-22 2020-02-11 新华三技术有限公司 Message scheduling method and device
CN108282415B (en) * 2017-12-29 2022-01-11 超聚变数字技术有限公司 Scheduling method and device
CN112530444B (en) * 2019-09-18 2023-10-03 华为技术有限公司 Audio coding method and device

Also Published As

Publication number Publication date
CN101163248A (en) 2008-04-16

Similar Documents

Publication Publication Date Title
CN101211277B (en) Method of selecting one of execution schedules of guest OS and virtual machine monitor employing the method
CN100562117C (en) A kind of code stream scheduling method, device and system
CN1938992B (en) Method and device for weighted random scheduling
CN109104373A (en) The processing method of network congestion, apparatus and system
CN103823780A (en) Real-time field bus controlling and dispatching method
CN104023408B (en) Scheduler and its data dispatching method based on network multipath footpath parallel transmission
CN106921591A (en) Key business burst processing method in a kind of airborne avionics network
CN106878132A (en) Bus dispatching method based on cycle and priority
CN103235835A (en) Inquiry implementation method for database cluster and device
CN103916269A (en) Method And System For Weighted Fair Queuing
JP2006141028A (en) Gigabit passive optical network strict priority weighted round robin scheduling mechanism
CN102761832A (en) Message distribution method and device
CN109548161A (en) A kind of method, apparatus and terminal device of wireless resource scheduling
CN108055701A (en) A kind of resource regulating method and base station
CN111988345B (en) Information synchronization method and device
CA2399186C (en) Data transfer apparatus and data transfer method
CN100477630C (en) Queue dispatching method and apparatus in data network
CN104618261B (en) Reformation dispatching method in avionics system network
CN112213956B (en) Automatic driving simulation task scheduling method, device, equipment and readable medium
Baziana An approximate protocol analysis with performance optimization for WDM networks
CN106911593A (en) A kind of industrial control network array dispatching method based on SDN frameworks
CN115334010B (en) Query information processing method and device, storage medium and electronic device
CN101238452A (en) A system and method for transmitting data
CN100550831C (en) The gigabit passive optical network strict priority weighted round robin scheduling method and system
US9887928B2 (en) System and method for identifying performance characteristics in asynchronous networks

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20091118

Termination date: 20121119