CN104185035B - One kind builds the Polymera TS Liu Shishige roads equally distributed method of program stream - Google Patents

One kind builds the Polymera TS Liu Shishige roads equally distributed method of program stream Download PDF

Info

Publication number
CN104185035B
CN104185035B CN201410421672.XA CN201410421672A CN104185035B CN 104185035 B CN104185035 B CN 104185035B CN 201410421672 A CN201410421672 A CN 201410421672A CN 104185035 B CN104185035 B CN 104185035B
Authority
CN
China
Prior art keywords
bags
memory block
bag
random number
sum
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.)
Active
Application number
CN201410421672.XA
Other languages
Chinese (zh)
Other versions
CN104185035A (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.)
Xian Jiaotong University
Original Assignee
Xian Jiaotong University
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 Xian Jiaotong University filed Critical Xian Jiaotong University
Priority to CN201410421672.XA priority Critical patent/CN104185035B/en
Publication of CN104185035A publication Critical patent/CN104185035A/en
Application granted granted Critical
Publication of CN104185035B publication Critical patent/CN104185035B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The Polymera TS Liu Shishige roads equally distributed method of program stream is built the present invention relates to one kind, by when the transmission of TS bag is carried out, to need the N roads audio, video data bag for sending to distribute N number of memory block, and stored table packet and integer TS bags in each memory block.And TS bags are total in delivery time counts N number of memory block, TS bag quantity accounts for the percentage of TS bags sum in calculating each memory block, and distributes mutually continuous serial number range as each memory block;A span is produced less than the uniform random number of TS bags sum;Read the TS bags in the correspondence memory block that the random number for producing falls in memory block serial number range and send.Repeat to produce uniform random number, until having sent all TS bags.So as to avoid certain road program from producing the mass data of burst to send, the stability broadcasted is improved, mitigate the audio, video data caching pressure at cable television receiver end.

Description

One kind builds the Polymera TS Liu Shishige roads equally distributed method of program stream
Technical field
Technical field is broadcasted the invention belongs to cable television TS streams, and in particular to one kind builds Polymera TS Liu Shishige roads The equally distributed method of program stream.
Background technology
Can all carry multi-channel program in usual cable television TS streams, however the stream rate of each road program be it is different, End is broadcasted as cable television, it should which the data of Shi Ge roads program are more evenly distributed in the TS of broadcast streams, and avoid certain The transmission mass data of road program burst, can so improve the stability of broadcast, mitigate the audio frequency and video at cable television receiver end Data buffer storage pressure.But at present do not have also be capable of the data of Shi Ge roads program be more evenly distributed in the TS of broadcast stream in Method.
The content of the invention
It is an object of the invention to overcome shortcoming present in above-mentioned prior art, there is provided when one kind builds Polymera TS streams The Shi Ge roads equally distributed method of program stream, the audio, video data caching pressure at cable television receiver end high with stability Small advantage.
To achieve the above object, the present invention uses following technical scheme:Comprise the following steps:
1) it is to need the N roads audio, video data bag for sending to distribute N number of memory block, and stored table packet in each memory block With integer TS bags;
2) TS bags, and the TS bags sum in delivery time counts N number of memory block are sent, TS bag numbers in each memory block are calculated Amount accounts for the percentage of TS bags sum, and is followed successively by the mutually continuous serial number range of each memory block distribution;
3) it is that each memory block distributes uniform random number of the span less than TS bags sum;
4) read step 3) in TS bags in the correspondence memory block that falls in memory block serial number range of random number that produces;
5) forwarding step 4) the TS bags that read, perform step 3 repeatedly afterwards) and step 4), until having sent all TS Bag;
6) step 2 is returned to), the transmission of TS bags in N number of memory block next time is carried out, so repeatedly, until having read all TS bags.
The step 1) in be for the mode of N roads audio, video datas bag distribution N block memory blocks:Front end is built the TS of program Bag is first stored in its affiliated memory headroom, is also to be read from the memory headroom when rear end needs and takes out the TS bags of the road program, its Write the principle for reading and meet the principle of FIFO, and memory headroom be sized to ensure any audio, video data bag all the way TS bags write memory headroom when will not overflow.
The step 2) in N number of memory block TS bags sum be 1000, sum inadequate 1000, then by TS in empty bag memory block Bag number is set to the bag number of missing, and the empty bag of the number is supplied in empty bag memory block so that TS bags sum is 1000.
The step 2) in for each audio, video data bag memory block distribute a continuous serial number range specific method be: The span of the continuous sequence number of generation is identical with the span of random number, so as to ensure the random number of any one generation all Can be identical with the sequence number of program all the way;And for arbitrarily the sequence number quantity of program distribution accounts for percentage of sequence number total quantity etc. all the way Existing TS bag quantity accounts for the percentage of current total TS bags quantity to be sent in the road program current memory space.
The step 3) in TS bags to be sent moment produce a uniform random number method be:In a number Natural number 1,2,3 ... in group by incremental order storage from 1 to N, N, N are TS bags sum, using Microsoft Visual Random number generation function rand in Studio generates random number x1 of the scope from 1 to N, takes out xth 1 in this array Number is used as the uniform random number to be produced;This number is deleted from array, is left N-1 natural number, the 2nd generation is equal Random number x2 of the scope from 1 to N-1 then is generated with rand during even distribution random numbers, the number of xth 2 is made in taking out this array It is the uniform random number to be produced;By that analogy until whole N number of natural numbers in taking-up array.
The step 4) in read step 3) in the correspondence memory that falls in memory block serial number range of random number that produces The specific method of the TS bags in block is:The internal memory with sequence number equal with the random number being currently generated is chosen from all memory blocks Block, reads a TS bag in the memory block of the equal sequence number of random number, as TS bags to be sent.
The present invention has following beneficial effect:Compare prior art, and the present invention is by carrying out a hair for TS bags It is to need the N roads audio, video datas bag for sending to distribute N number of memory block when sending, and stored table packet and whole in each memory block Several TS bags.And TS bags are total in delivery time counts N number of memory block, TS bag quantity accounts for TS bags always in calculating each memory block Several percentage, and as the mutually continuous serial number range of each memory block distribution;A span is produced to be less than TS Wrap the uniform random number of sum;In the correspondence memory block that the random number that reading is produced falls in memory block serial number range TS bags simultaneously send.Repeat to produce uniform random number, until having sent all TS bags.Repeat the hair for carrying out TS bags next time Send.It is capable of the data of Shi Ge roads audio, video data bag to be more evenly distributed in the TS of broadcast streams, so as to avoid certain road program Produce the mass data of burst to send, can so improve the stability of broadcast, mitigate the audio frequency and video number at cable television receiver end According to caching pressure.The method that each road audio, video data bag of traditional poll is transmitted, operation is relatively simple, but is easily caused Code stream audio, video data bag high occupies transmission route for a long time so that code stream low audio, video data bag is presented prominent when sending TS bags Hair property, i.e., do not have TS bags to send, in code stream audio, video data bag high during code stream audio, video data bag high sends TS bags Continuously transmitting for a period of time is carried out again after having sent TS bags, the audio, video data caching pressure of receiving terminal can be so increased.This Invention methods described Shi Ge road audio, video data bags have the chance for sending TS bags in each short time interval, and this is a bit of The TS bags number that time Nei Ge road audio, video data bag can be transmitted depends on the percentage that its TS bag number accounts for TS bags sum, code Stream demand audio, video data bag high can be assigned to more send opportunity, but the low audio, video data bag of code stream demand can also be obtained To the chance for sending.Interval between TS bags transmitted by each road audio, video data bag does not have very big fluctuation.The present invention makes The transmission code stream of get Ge roads audio, video data bag is uniform, so that with the audio, video data that can make cable television receiver end Caching pressure is small.
Brief description of the drawings
Fig. 1 is the schematic diagram of the inventive method.
Specific embodiment
Below in conjunction with the accompanying drawings, the present invention is described in further detail.
Referring to Fig. 1, the present invention is comprised the following steps:
1) it is to need the N roads audio, video data bag for sending to distribute N number of memory block, and stored table packet in each memory block With integer TS bags;For the mode of N roads audio, video data bag distribution N block memory blocks is:The TS bags that front end builds program are first deposited Enter its affiliated memory headroom, be also to be read from the memory headroom when rear end needs and takes out the TS bags of the road program, its write-in is read The principle for going out meets the principle of FIFO, and memory headroom the TS bags for being sized to ensure any bag of audio, video data all the way Will not be overflowed when memory headroom is write;
2) TS bags, and the TS bags sum in delivery time counts N number of memory block are sent, TS bag numbers in each memory block are calculated Amount accounts for the percentage of TS bags sum, and is followed successively by the mutually continuous serial number range of each memory block distribution;TS in N number of memory block Bag sum is 1000, and TS bag numbers in empty bag memory block are then set to sum inadequate 1000 the bag number of missing, and in empty bag memory block In supply the empty bag of the number so that TS bags sum is 1000;
3) it is that each memory block distributes uniform random number of the span less than TS bags sum;In TS to be sent Moment of bag produces the method for a uniform random number to be:Nature in an array by incremental order storage from 1 to N Number 1,2,3 ..., N, N are TS bags sum, are given birth to using the random number generation function rand in Microsoft Visual Studio Random number x1 into scope from 1 to N, takes out the number of xth 1 in this array random as being uniformly distributed of being produced Number;This number is deleted from array, is left N-1 natural number, then one is generated with rand during the 2nd generation uniform random number Random number x2 of the individual scope from 1 to N-1, the number of xth 2 is used as the uniform random number to be produced in taking out this array; By that analogy until whole N number of natural numbers in taking-up array;
4) read step 3) in TS bags in the correspondence memory block that falls in memory block serial number range of random number that produces; The specific method of the TS bags in the correspondence memory block that the random number of generation falls in memory block serial number range is:From all internal memories The memory block with sequence number equal with the random number being currently generated is chosen in block, in the memory block of the equal sequence number of reading random number One TS bag, as TS bags to be sent;
5) forwarding step 4) the TS bags that read, perform step 3 repeatedly afterwards) and step 4), until having sent all TS Bag;
6) step 2 is returned to), the transmission of TS bags in N number of memory block next time is carried out, so repeatedly, until having read all TS bags.
TS:(Transport Stream, transport stream).
Step 4) in random number be finite integer, and be uniform random number, that is, the random number can travel through it All numerical value in span.The equally distributed control accuracy of code stream required for quantity and user according to program sets The span of this random number, 1~1000 span probably corresponds to the time span of 40ms in TS streams.
Include for audio, video data bag memory block distributes a string continuous sequence numbers:
The span of the continuous sequence number of generation should be completely the same with the span of random number, to ensure any The sequence number of one random number Dou Huiyumou roads audio, video data bag memory block of generation is identical.It is certain road audio, video data bag distribution Sequence number quantity account for sequence number total quantity percentage should be equal to the road audio, video data bag memory block in TS bag quantity account for currently The percentage of total TS bags quantity to be sent.When such as random number span is 1 to 1000, in the 1st road audio, video data bag TS bags quantity accounts for the 50% of TS bags total quantity 1000 to be sent in counterfoil, then the 1~500, the 2nd road program of distribution is currently pending for it Send TS bag quantity to account for the 20% of TS bags total quantity 1000 to be sent, then distribute 501~700 for it.If TS bags sum inadequate 1000, TS bag numbers in empty bag memory block are then set to the bag number of missing, and the empty bag of the number is supplied in empty bag memory block so that TS Bag sum is 1000.
The course of work of the invention is:
1) it is that the N roads audio, video data bag to be sent distributes N number of memory block, each memory block can deposit integer TS bags, The audio frequency and video TS bags and table packet of each road program to be sent write respective audio, video data bag memory block;
2) delivery time, TS bags sum is (if sum inadequate 1000, by TS in empty bag memory block in counting N number of memory block Bag number is set to the bag number of missing, and the empty bag of the number is supplied in empty bag memory block so that TS bags sum is 1000), to calculate In each memory block TS bags quantity account for TS bags sum 1000 percentage, and as the continuous serial number range of distribution one, than If the 1st memory block TS bags quantity is 50%, then Allotment Serial Number space 1~500 for it, the 2nd memory block TS bag quantity is 20%, then Allotment Serial Number space 501~700 for it;
3) one span of generation is 1~1000 uniform random number;
4) scold in which memory block serial number range at random, then a TS bag is read in the memory block;
5) the TS bags for reading are sent, 3,4 steps is performed repeatedly, until having sent 1000 TS bags;
6) the 2nd step is returned to, 1000 transmissions of TS bags next time are carried out, so repeatedly, until is transmitted.

Claims (3)

  1. It is 1. a kind of to build the Polymera TS Liu Shishige roads equally distributed method of program stream, it is characterised in that:Including following step Suddenly:
    1) it is to need the N roads audio, video datas bag for sending to distribute N number of memory block, and stored table packet and whole in each memory block Several TS bags;
    2) TS bags, and the TS bags sum in delivery time counts N number of memory block are sent, TS bag quantity is accounted in calculating each memory block The percentage of TS bags sum, and it is followed successively by the mutually continuous serial number range of each memory block distribution;The specific method of distribution is: The span of the continuous sequence number of generation is identical with the span of random number, so as to ensure the random number of any one generation all Can be identical with the sequence number of program all the way;And for arbitrarily the sequence number quantity of program distribution accounts for percentage of sequence number total quantity etc. all the way Existing TS bag quantity accounts for the percentage of current total TS bags quantity to be sent in the road program current memory space;
    3) it is that each memory block distributes uniform random number of the span less than TS bags sum;Specifically, at one Natural number 1,2,3 ... in array by incremental order storage from 1 to N, N, N are TS bags sum, using Microsoft Visual Random number generation function rand in Studio generates random number x1 of the scope from 1 to N, takes out xth 1 in this array Number is used as the uniform random number to be produced;This number is deleted from array, is left N-1 natural number, the 2nd generation is equal Random number x2 of the scope from 1 to N-1 then is generated with rand during even distribution random numbers, the number of xth 2 is made in taking out this array It is the uniform random number to be produced;By that analogy until whole N number of natural numbers in taking-up array;
    4) read step 3) in TS bags in the correspondence memory block that falls in memory block serial number range of random number that produces;Specifically Method is:The memory block with sequence number equal with the random number being currently generated is chosen from all memory blocks, random number phase is read Etc. a TS bag in the memory block of sequence number, as TS bags to be sent;
    5) forwarding step 4) the TS bags that read, perform step 3 repeatedly afterwards) and step 4), until having sent all TS bags;
    6) step 2 is returned to), the transmission of TS bags in N number of memory block next time is carried out, so repeatedly, until having read all TS bags.
  2. 2. the structure Polymera TS Liu Shishige roads according to claim 1 equally distributed method of program stream, its feature Be, the step 1) in for the mode of N roads audio, video datas bag distribution N block memory blocks is:Front end is built the TS bags of program Its affiliated memory headroom is first stored in, is also to be read from the memory headroom when rear end needs and takes out the TS bags of the road program, it is write The principle for entering reading meets the principle of FIFO, and memory headroom be sized to ensure any bag of audio, video data all the way TS bags will not overflow when memory headroom is write.
  3. 3. the structure Polymera TS Liu Shishige roads according to claim 1 equally distributed method of program stream, its feature Be, the step 2) in N number of memory block TS bags sum be 1000, sum inadequate 1000, then by TS bags in empty bag memory block Number is set to the bag number of missing, and the empty bag of the number is supplied in empty bag memory block so that TS bags sum is 1000.
CN201410421672.XA 2014-08-25 2014-08-25 One kind builds the Polymera TS Liu Shishige roads equally distributed method of program stream Active CN104185035B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410421672.XA CN104185035B (en) 2014-08-25 2014-08-25 One kind builds the Polymera TS Liu Shishige roads equally distributed method of program stream

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410421672.XA CN104185035B (en) 2014-08-25 2014-08-25 One kind builds the Polymera TS Liu Shishige roads equally distributed method of program stream

Publications (2)

Publication Number Publication Date
CN104185035A CN104185035A (en) 2014-12-03
CN104185035B true CN104185035B (en) 2017-06-06

Family

ID=51965727

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410421672.XA Active CN104185035B (en) 2014-08-25 2014-08-25 One kind builds the Polymera TS Liu Shishige roads equally distributed method of program stream

Country Status (1)

Country Link
CN (1) CN104185035B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105915941A (en) * 2015-12-25 2016-08-31 乐视云计算有限公司 Audio data encapsulating method and apparatus
CN106815722B (en) * 2016-12-22 2021-05-07 中钞信用卡产业发展有限公司杭州区块链技术研究院 Information processing method and device based on block chain
CN106790143A (en) * 2016-12-28 2017-05-31 桂林龙隐科技有限公司 The self adaptation group deinterleaving method and device of wireless WiFi multi-media broadcasting systems

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6148082A (en) * 1998-01-14 2000-11-14 Skystream Corporation Scrambling and descrambling control word control in a remultiplexer for video bearing transport streams
CN1411280A (en) * 2002-11-21 2003-04-16 北京中科大洋科技发展股份有限公司 Apparatus for making, transmitting and receiving broadcasting type quasi video frequency requested program
CN101790075A (en) * 2010-01-14 2010-07-28 北京东方广视科技股份有限公司 Method and device for sending data
CN101808239A (en) * 2010-03-01 2010-08-18 北京东方广视科技股份有限公司 Method for controlling TS flow broadcasting and device
CN103179436A (en) * 2013-03-14 2013-06-26 北京大学 Multi-program transport stream multiplexing device
CN103796079A (en) * 2013-12-26 2014-05-14 国家广播电影电视总局广播科学研究院 Channel damage simulation method of terrestrial digital TV transmission distribution network

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6148082A (en) * 1998-01-14 2000-11-14 Skystream Corporation Scrambling and descrambling control word control in a remultiplexer for video bearing transport streams
CN1411280A (en) * 2002-11-21 2003-04-16 北京中科大洋科技发展股份有限公司 Apparatus for making, transmitting and receiving broadcasting type quasi video frequency requested program
CN101790075A (en) * 2010-01-14 2010-07-28 北京东方广视科技股份有限公司 Method and device for sending data
CN101808239A (en) * 2010-03-01 2010-08-18 北京东方广视科技股份有限公司 Method for controlling TS flow broadcasting and device
CN103179436A (en) * 2013-03-14 2013-06-26 北京大学 Multi-program transport stream multiplexing device
CN103796079A (en) * 2013-12-26 2014-05-14 国家广播电影电视总局广播科学研究院 Channel damage simulation method of terrestrial digital TV transmission distribution network

Also Published As

Publication number Publication date
CN104185035A (en) 2014-12-03

Similar Documents

Publication Publication Date Title
CN104185035B (en) One kind builds the Polymera TS Liu Shishige roads equally distributed method of program stream
EP2031787A2 (en) FEC transmission processing apparatus and method and program recording medium
CN103888317B (en) A kind of unrelated network redundancy flow removing method of agreement
CN103684666B (en) The method that time-interleaved reconciliation is time-interleaved is realized in NGB-W communication system
CN104104727B (en) Raptor code based large file transmission method
CN104349199B (en) A kind of information synchronization method and device
CN102811221B (en) Push mechanism-based scheduling method of peer-to-peer network live streaming media data package
CN101060374B (en) Turbo coding stream processing device and method
CN106937137A (en) A kind of synchronous method of multi-channel digital audio coding audio-visual
CN101621681B (en) Method and equipment for adjusting video communication quality
CN111193567A (en) Time synchronization method, equipment and storage medium
CN105554517A (en) Method and device for sending video stream
CN103503462B (en) Real-time transcoding method and apparatus
CN103220086B (en) High throughput network coding method in a kind of wireless network
CN101094188B (en) Random test device in advance, and hardware implementation method
CN102802200B (en) Data message sending method and equipment
CN103428544A (en) Transmitting apparatus, transmitting method, receiving apparatus, receiving method, and electronic apparatus
CN101379820B (en) Method and apparatus for forming DVB-H signal with wishful bit rate
CN109995608A (en) Network rate calculation method and device
CN103796079B (en) Channel damage simulation method of terrestrial digital TV transmission distribution network
CN102468902A (en) Method for Turbo coding of rate match/de-rate match in LTE (long term evolution) system
CN102164095B (en) Datagram segmentation and reassembly system and realization method for onboard switching module
CN104936006B (en) A kind of sending method of program information table, apparatus and system
ES2437761T3 (en) Method for processing digital signals for the transmission / reception of a stream of digital signals on a plurality of channels
CN101534172B (en) A realizing device and method of bit interleaving in china mobile multimedia broadcasting

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant