CN104185035A - Method for achieving uniform distribution of all paths of program code streams in construction process of multiple program TS streams - Google Patents

Method for achieving uniform distribution of all paths of program code streams in construction process of multiple program TS streams Download PDF

Info

Publication number
CN104185035A
CN104185035A CN201410421672.XA CN201410421672A CN104185035A CN 104185035 A CN104185035 A CN 104185035A CN 201410421672 A CN201410421672 A CN 201410421672A CN 104185035 A CN104185035 A CN 104185035A
Authority
CN
China
Prior art keywords
bag
memory block
random number
memory
road
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.)
Granted
Application number
CN201410421672.XA
Other languages
Chinese (zh)
Other versions
CN104185035B (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 invention relates to a method for achieving uniform distribution of all paths of program code streams in the construction process of multiple program TS streams. When TS packages are transmitted at a time, N memory blocks are allocated to N paths of audio/video data packages needing to be transmitted, and list information and the integral number of TS packages are stored in each memory block. The total number of the TS packages in the N memory blocks is counted at the transmitting moment, the percentage of the number of the TS packages in each memory block on the total number of the TS packages is calculated, and a range of consecutive serial numbers is allocated for each memory block according to the corresponding percentage; an uniform distribution random number with the value range smaller than the total number of the TS packages is generated; the TS package, with the generated random falling into the memory block serial number range, in the corresponding memory block is read and transmitted. Uniform distribution random numbers are generated repeatedly until all the TS packages are transmitted. Thus, sudden mass data transmission in a certain path of program is avoided, the stability of broadcasting is improved, and the audio/video data caching pressure at the receiving end of a cable television is relieved.

Description

A kind of equally distributed method of structure Polymera TS Liu Shishige road program stream
Technical field
The invention belongs to the cable TV TS technical field of spreading, be specifically related to a kind of equally distributed method of structure Polymera TS Liu Shishige road program stream.
Background technology
Conventionally in cable TV TS stream, all can carry multi-channel program, yet the stream rate of each road program is different, as cable TV, broadcast end, should Shi Ge road joint destination data comparatively be evenly distributed in the TS stream of broadcast, and the transmission mass data of avoiding certain road program to happen suddenly, can improve the stability of broadcast like this, alleviate the audio, video data buffer memory pressure of cable TV receiving terminal.But also there is not at present the method in the TS stream that can Shi Ge road joint destination data be comparatively evenly distributed in broadcast.
Summary of the invention
The object of the invention is to overcome the shortcoming existing in above-mentioned prior art, provide a kind of structure Polymera TS Liu Shishige road program stream equally distributed method, there is stability high, the little advantage of audio, video data buffer memory pressure of cable TV receiving terminal.
For achieving the above object, the present invention is by the following technical solutions: comprise the following steps:
1) be the N road audio, video data need sending N the memory block that be responsible for assigning, and in each memory block, stored table packets of information and an integer TS wrap;
2) send TS bag, and in N memory block of delivery time statistics TS bag sum, calculate in each memory block TS bag quantity and account for TS and wrap total percentage, and be followed successively by each memory block and distribute mutual continuous serial number range;
3) for distributing a span to be less than TS, each memory block wraps total uniform random number;
4) read step 3) in the TS that drops in the correspondence memory piece in memory block serial number range of the random number that produces wrap;
5) forwarding step 4) TS that reads bag, repeatedly perform step 3 afterwards) and step 4), until send all TS, wrap;
6) get back to step 2), carry out the transmission of TS bag in N memory block next time, so repeatedly, until read all TS bags.
Described step 1) in for audio, video data the be responsible for assigning mode of N piece memory block in N road is: the TS bag that front end is built to program first deposits memory headroom under it in, when the TS bag of this road program need to be taken out in rear end, be also to read from this memory headroom, it writes the principle that the principle of reading meets first-in first-out, and the size of memory headroom can guarantee when the TS of any road audio, video data bag wraps in write memory space all can not overflow.
Described step 2) in, TS bag adds up to 1000 in N memory block, and sum is inadequate 1000, sky is wrapped to TS bag number in memory block and is made as the bag number of disappearance, and in sky bag memory block, supply the sky bag of this number, TS is wrapped and add up to 1000.
Described step 2) in, for each audio, video data bag memory block distributes the concrete grammar of a continuous serial number range, be: the span of the continuous sequence number of generation is identical with the span of random number, thereby guarantee that the sequence number that the random number of any one generation can both Yu Yi road program is identical; And the percentage that accounts for sequence number total quantity for the sequence number quantity of any road program distribution equals the percentage that existing TS bag quantity in the current memory headroom of this road program accounts for current total TS bag quantity to be sent.
Described step 3) in, in the method that will send a uniform random number of moment generation of TS bag, be: in an array, by incremental order, deposit the natural number 1 from 1 to N, 2,3, N, N is TS bag sum, utilizes random number generation function rand in Microsoft Visual Studio to generate the random number x1 of a scope from 1 to N, takes out in this array x1 number as the uniform random number that will produce; From array, delete this number, remaining N-1 natural number, the random number x2 from 1 to N-1 by scope of rand generation while producing uniform random number the 2nd time, takes out in this array x2 number as the uniform random number that will produce; By that analogy until take out whole N natural numbers in array.
Described step 4) concrete grammar that the random number producing read step 3 in) drops on the TS bag in the correspondence memory piece in memory block serial number range is: from all memory blocks, choose and have the memory block that equates sequence number with the random number of current generation, read a TS bag in the memory block that random number equates sequence number, as TS bag to be sent.
The present invention has following beneficial effect: the prior art of comparing, and the present invention is by when carrying out the transmission of TS bag, the N road audio, video data sending for needs N the memory block that be responsible for assigning, and in each memory block, stored table packets of information and an integer TS wrap.And in N memory block of delivery time statistics TS bag sum, calculate in each memory block TS bag quantity and account for TS and wrap total percentage, and distribute mutual continuous serial number range as each memory block; Producing a span is less than TS and wraps total uniform random number; Reading the TS that the random number of generation drops in the correspondence memory piece in memory block serial number range wraps and sends.Repeat to produce uniform random number, until send all TS bags.Repeat again the transmission of TS bag next time.Data that can Shi Ge road audio, video data bag are comparatively evenly distributed in the TS stream of broadcast, thereby the mass data of avoiding certain road program to produce burst sends, can improve the stability of broadcast like this, alleviate the audio, video data buffer memory pressure of cable TV receiving terminal.The method that each road audio, video data bag of traditional poll sends, operate comparatively simple, but easily cause the audio, video data bag that code stream is high to occupy for a long time transmission route, while making the low audio, video data bag of code stream send TS bag, present sudden, during sending TS bag, the high audio, video data bag of code stream do not have TS bag to send, after the high audio, video data bag of code stream sends TS bag, carry out again the continuous transmission of a period of time, can strengthen like this audio, video data buffer memory pressure of receiving terminal.The method of the invention Shi Ge road audio, video data wraps in each short time interval to be had and sends the chance that TS wraps, the TS bag number that this short time Nei Ge road audio, video data Bao Suoneng sends depends on that its TS bag number accounts for TS and wraps total percentage, the audio, video data bag that code stream demand is high can be assigned to more send opportunity, but the low audio, video data bag of code stream demand also can obtain the chance sending.Interval between the TS bag that each road audio, video data bag sends does not have very large fluctuation.The transmission code stream that the invention enables each road audio, video data bag is uniformly, thereby have, can make the audio, video data buffer memory pressure of cable TV receiving terminal little.
Accompanying drawing explanation
Fig. 1 is the schematic diagram of the inventive method.
Embodiment
Below in conjunction with accompanying drawing, the present invention is described in further detail.
Referring to Fig. 1, the present invention includes following steps:
1) be the N road audio, video data need sending N the memory block that be responsible for assigning, and in each memory block, stored table packets of information and an integer TS wrap; For audio, video data the be responsible for assigning mode of N piece memory block in N road is: the TS bag that front end is built to program first deposits memory headroom under it in, when the TS bag of this road program need to be taken out in rear end, be also to read from this memory headroom, it writes the principle that the principle of reading meets first-in first-out, and the size of memory headroom can guarantee when the TS of any road audio, video data bag wraps in write memory space all can not overflow;
2) send TS bag, and in N memory block of delivery time statistics TS bag sum, calculate in each memory block TS bag quantity and account for TS and wrap total percentage, and be followed successively by each memory block and distribute mutual continuous serial number range; In N memory block, TS bag adds up to 1000, and sum is inadequate 1000, sky is wrapped to TS bag number in memory block and is made as the bag number of disappearance, and in sky bag memory block, supply the sky bag of this number, makes TS bag add up to 1000;
3) for distributing a span to be less than TS, each memory block wraps total uniform random number; The method that produces a uniform random number in the moment that will send TS bag is: in an array, by incremental order, deposit the natural number 1 from 1 to N, 2,3, N, N is TS bag sum, utilizes random number generation function rand in Microsoft Visual Studio to generate the random number x1 of a scope from 1 to N, takes out in this array x1 number as the uniform random number that will produce; From array, delete this number, remaining N-1 natural number, the random number x2 from 1 to N-1 by scope of rand generation while producing uniform random number the 2nd time, takes out in this array x2 number as the uniform random number that will produce; By that analogy until take out whole N natural numbers in array;
4) read step 3) in the TS that drops in the correspondence memory piece in memory block serial number range of the random number that produces wrap; The concrete grammar that the random number producing drops on the TS bag in the correspondence memory piece in memory block serial number range is: from all memory blocks, choose and have the memory block that equates sequence number with the random number of current generation, read a TS bag in the memory block that random number equates sequence number, as TS bag to be sent;
5) forwarding step 4) TS that reads bag, repeatedly perform step 3 afterwards) and step 4), until send all TS, wrap;
6) get back to step 2), carry out the transmission of TS bag in N memory block next time, so repeatedly, until read all TS bags.
TS:(Transport Stream, transport stream).
Step 4) random number in is limited integer, and is uniform random number, and namely this random number can travel through all numerical value in its span.According to the quantity of program and the equally distributed control precision of the needed code stream of user, set the span of this random number, the time span of 40ms in 1~1000 the general corresponding TS stream of span.
For distributing a string continuous sequence number, audio, video data bag memory block comprises:
The continuous sequence number generating span should be in full accord with the span of random number, identical to guarantee the sequence number of random number Dou Huiyumou road audio, video data bag memory block of any one generation.The percentage that the sequence number quantity that Wei Mou road audio, video data is responsible for assigning accounts for sequence number total quantity should equal the percentage that TS bag quantity in this road audio, video data bag memory block accounts for current total TS bag quantity to be sent.Such as random number span is 1 to 1000 o'clock, in the 1st road audio, video data bag memory block, TS bag quantity accounts for 50% of TS bag total quantity 1000 to be sent, distribute for it 1~500, the current TS bag quantity to be sent of the 2nd road program accounts for 20% of TS bag total quantity 1000 to be sent, distributes for it 501~700.If TS bag sum is inadequate 1000, sky is wrapped to TS bag number in memory block and be made as the bag number of disappearance, and in sky bag memory block, supply the sky bag of this number, make TS bag add up to 1000.
The course of work of the present invention is:
1) the N road audio, video data sending for wish N the memory block that be responsible for assigning, each memory block can be deposited an integer TS bag, and the audio frequency and video TS that wish sends Ge road program wraps and shows packets of information and writes audio, video data bag memory block separately;
2) delivery time, add up TS bag sum (if sum inadequate 1000 in N memory block, sky is wrapped to TS in memory block and wrap the bag number that number is made as disappearance, and in sky bag memory block, supply the sky bag of this number, make TS bag add up to 1000), calculate TS bag quantity in each memory block and account for the percentage that TS wraps sum 1000, and as continuous serial number range of distribution, such as the 1st memory block TS bag quantity is 50%, Allotment Serial Number space 1~500 for it, the 2nd memory block TS bag quantity is 20%, Allotment Serial Number space 501~700 for it;
3) produce a uniform random number that span is 1~1000;
4) which memory block serial number range is random number drop in, in this memory block, reads a TS bag;
5) send the TS bag reading, repeatedly carry out 3,4 steps, until send 1000 TS bags;
6) get back to the 2nd step, carry out the transmission of 1000 TS bags next time, so repeatedly, until be transmitted.

Claims (6)

1. build the equally distributed method of Polymera TS Liu Shishige road program stream, it is characterized in that: comprise the following steps:
1) be the N road audio, video data need sending N the memory block that be responsible for assigning, and in each memory block, stored table packets of information and an integer TS wrap;
2) send TS bag, and in N memory block of delivery time statistics TS bag sum, calculate in each memory block TS bag quantity and account for TS and wrap total percentage, and be followed successively by each memory block and distribute mutual continuous serial number range;
3) for distributing a span to be less than TS, each memory block wraps total uniform random number;
4) read step 3) in the TS that drops in the correspondence memory piece in memory block serial number range of the random number that produces wrap;
5) forwarding step 4) TS that reads bag, repeatedly perform step 3 afterwards) and step 4), until send all TS, wrap;
6) get back to step 2), carry out the transmission of TS bag in N memory block next time, so repeatedly, until read all TS bags.
2. the equally distributed method of structure Polymera TS Liu Shishige road program stream according to claim 1, it is characterized in that, described step 1) in for audio, video data the be responsible for assigning mode of N piece memory block in N road is: the TS bag that front end is built to program first deposits memory headroom under it in, when the TS bag of this road program need to be taken out in rear end, be also to read from this memory headroom, it writes the principle that the principle of reading meets first-in first-out, and the size of memory headroom can guarantee when the TS of any road audio, video data bag wraps in write memory space all can not overflow.
3. the equally distributed method of structure Polymera TS Liu Shishige road program stream according to claim 1, it is characterized in that, described step 2) in, in N memory block, TS bag adds up to 1000, sum inadequate 1000, sky is wrapped to TS in memory block and wrap the bag number that number is made as disappearance, and in sky bag memory block, supply the sky bag of this number, make TS bag add up to 1000.
4. the equally distributed method of structure Polymera TS Liu Shishige road program stream according to claim 1, it is characterized in that, described step 2) in, for each audio, video data bag memory block distributes the concrete grammar of a continuous serial number range, be: the span of the continuous sequence number of generation is identical with the span of random number, thereby guarantee that the sequence number that the random number of any one generation can both Yu Yi road program is identical; And the percentage that accounts for sequence number total quantity for the sequence number quantity of any road program distribution equals the percentage that existing TS bag quantity in the current memory headroom of this road program accounts for current total TS bag quantity to be sent.
5. the equally distributed method of structure Polymera TS Liu Shishige road program stream according to claim 1, it is characterized in that, described step 3) in, in the method that will send a uniform random number of moment generation of TS bag, be: in an array, by incremental order, deposit the natural number 1 from 1 to N, 2,3, N, N is TS bag sum, utilize random number generation function rand in Microsoft Visual Studio to generate the random number x1 of a scope from 1 to N, take out in this array x1 number as the uniform random number that will produce; From array, delete this number, remaining N-1 natural number, the random number x2 from 1 to N-1 by scope of rand generation while producing uniform random number the 2nd time, takes out in this array x2 number as the uniform random number that will produce; By that analogy until take out whole N natural numbers in array.
6. the equally distributed method of structure Polymera TS Liu Shishige road program stream according to claim 1, it is characterized in that, described step 4) concrete grammar that the random number producing read step 3 in) drops on the TS bag in the correspondence memory piece in memory block serial number range is: from all memory blocks, choose and have the memory block that equates sequence number with the random number of current generation, read a TS bag in the memory block that random number equates sequence number, as TS bag to be sent.
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 true CN104185035A (en) 2014-12-03
CN104185035B 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)

Cited By (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
CN106790143A (en) * 2016-12-28 2017-05-31 桂林龙隐科技有限公司 The self adaptation group deinterleaving method and device of wireless WiFi multi-media broadcasting systems
CN106815722A (en) * 2016-12-22 2017-06-09 中钞信用卡产业发展有限公司北京智能卡技术研究院 Information processing method and device based on block chain

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

Cited By (4)

* 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
CN106815722A (en) * 2016-12-22 2017-06-09 中钞信用卡产业发展有限公司北京智能卡技术研究院 Information processing method and device based on block chain
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

Also Published As

Publication number Publication date
CN104185035B (en) 2017-06-06

Similar Documents

Publication Publication Date Title
CN105376613B (en) A kind of fast channel switching method, server and IPTV system
EP2031787A2 (en) FEC transmission processing apparatus and method and program recording medium
CN104185035A (en) Method for achieving uniform distribution of all paths of program code streams in construction process of multiple program TS streams
CN101699869A (en) Advanced-VSB system (A-VSB)
CN108111531B (en) Method and device for enhancing video live broadcast quality
CN106331704A (en) Video code rate control method and video coding device
CN105409176A (en) Transmitting apparatus, receiving apparatus and signal processing method thereof
CN102647616B (en) Audio-video multiplexing device
CN106550248A (en) A kind of method and apparatus of audio-visual synchronization
US10554571B2 (en) Packet-to-packet timing reconstruction for channel bonding
CN103428544A (en) Transmitting apparatus, transmitting method, receiving apparatus, receiving method, and electronic apparatus
CN102957590B (en) Message slicing method and device
CN1997162B (en) PCR correction method and device
CN101379820B (en) Method and apparatus for forming DVB-H signal with wishful bit rate
CN109995608A (en) Network rate calculation method and device
CN101790075B (en) Method and device for sending data
CN103796079B (en) Channel damage simulation method of terrestrial digital TV transmission distribution network
CN102204249A (en) Constant bit rate padding of mpeg transport streams
CN104936006B (en) A kind of sending method of program information table, apparatus and system
CN103139188B (en) Flow-medium transmission method and system
CN1108695C (en) Modulator input interface device
US10080050B2 (en) System and method for insertion of a program clock reference during packetization of an encoded data stream
CN105574292A (en) Method for achieving multi-channel any-bandwidth packet sending based on dynamic arrays
ES2437761T3 (en) Method for processing digital signals for the transmission / reception of a stream of digital signals on a plurality of channels
CN101370121A (en) IBTV matrix circular current digital television and data broadcasting unidirectional demanding system

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