JP3837693B2 - Packet communication system - Google Patents
Packet communication system Download PDFInfo
- Publication number
- JP3837693B2 JP3837693B2 JP2000323849A JP2000323849A JP3837693B2 JP 3837693 B2 JP3837693 B2 JP 3837693B2 JP 2000323849 A JP2000323849 A JP 2000323849A JP 2000323849 A JP2000323849 A JP 2000323849A JP 3837693 B2 JP3837693 B2 JP 3837693B2
- Authority
- JP
- Japan
- Prior art keywords
- clock
- packet
- value
- data output
- transmission
- 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
Links
Images
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Description
【0001】
【発明の属する技術分野】
本発明は、送信側端末装置と受信側端末装置との間でパケット通信網を介してパケットを伝送し、受信側端末装置は、送信側端末装置のクロック信号に同期化させた受信側クロック信号により、受信したパケットを処理するパケット通信システムに関する。
【0002】
【従来の技術】
近年のインターネット/イントラネットの普及により、AV(Audio Video)データ等のリアルタイムメディアを伝送するアプリケーションが増加している。IP(Internet Protocol )ネットワークでデータ伝送を行う際のプロトコルとしては、一般的には、TCP(Transmission Control Protocol )又はUDP(User Datagram Protocol )が用いられる。TCPを用いた場合、信頼性の高いデータの伝送が可能となる反面、再送制御が行われる為に、リアルタイム性に欠ける欠点がある。そこで、リアルタイムにAVデータ等を伝送するアプリケーションについては、TCPではなくUDPが用いられる。又TV放送のように同報通信を実現するには、マルチキャストを行うことになるが、TCPはマルチキャストをサポートしていない為、UDPを用いることになる。
【0003】
又ネットワークを介してAVデータを伝送する場合、送信側でAVデータをサンプリングするクロック信号と、受信側で受信したデータを出力するクロック信号との同期をとる必要がある。このような送受信間のクロック信号の同期をとらないと、受信側のバッファに、アンダーフローやオーバーフローが生じる問題がある。例えば、伝送データがビデオデータの場合、アンダーフロー時に同一のフレームを複数回表示したり、又オーバーフローの場合、或るフレームを表示しないようにして、フレームレートの調整を行う必要が生じる。従って、再生画面の動きが不自然となって、表示品質が低下する。又オーディオの場合は、オーバーフロー時にPCMデータを間引いたり、或いはアンダーフロー時にPCMデータを繰り返して再生することによって、一応は調整できるが、その場合の再生音はノイズとなり、再生音質が劣化する。従って、送信側クロック信号に対して受信側クロック信号を同期化する必要がある。
【0004】
送信側と受信側とを同期網を介して接続した場合は、送受信側のそれぞれのクロック信号を同期網のクロック信号に同期させることにより、送受信間のクロック同期をとることができる。しかし、非同期網の場合や、送受信端末装置を網クロック信号に同期できない場合は、送受信間のクロック同期の実現は容易ではない。通常TCP/IPベースの通信では、送受信側の端末装置が網クロックに同期することを想定していないものである。従って、送受信間のクロック同期をとる手段として、例えば、受信側で、或る程度の受信データをバッファリングしてから出力を開始し、データ出力中の受信バッファ量を監視し、オーバーフロー傾向であれば、受信側のデータ出力クロック速度を速くし、アンダーフロー傾向であれば、データ出力クロック速度を遅くすることにより、受信側クロック信号を送信側クロック信号に追従制御する手段が知られている。
【0005】
しかし、UDPを用いた通信に於いては、伝送遅延が一定あることが保証されていないと共に、ネットワークの輻輳によりパケットの廃棄が生じる可能性が大きいものである。従って、前述のような受信バッファ量を所定範囲内に維持する手段では、パケットの伝送遅延の揺らぎやパケットの廃棄により、受信バッファ量の増減の変化が大きくなり、送受信間のクロック差の調整が不可能となる問題がある。
【0006】
又送受信間のクロック同期の他の手段として、送信側端末装置からの送信パケットに、送信データをサンプリングした時の送信側クロック信号をカウンタとした値を時刻情報として付加して送信し、受信側端末装置は、受信側クロック信号をカウントした時刻情報を用い、受信したパケットに付加された時刻情報による送信パケット間隔と、受信側端末装置により生成した時刻情報による受信パケット処理間隔とにより、送信側クロック信号に受信側クロック信号を同期化させる手段も知られている。
【0007】
図9はパケット通信システムの説明図であり、送信側端末装置51と受信側端末装置52とをパケット通信網53に接続し、送信側端末装置51に於いて生成したパケットをパケット通信網53を介して受信側端末装置52宛に送出する。送信側端末装置51は、データサンプリング部54に於いて入力データを送信側クロック発生部55からのクロック信号によってサンプリングし、その時のクロック信号をカウントしたクロック値と共にデータ処理部56に転送し、パケット化部57に於いてパケット化すると共に、クロック値を時刻情報としてヘッダ情報に付加して送信する。
【0008】
このパケットをパケット通信網53を介して受信した受信側端末装置52は、パケット受信部58により受信して、パケットに付加されたクロック値を抽出し、データ出力部59にデータを転送し、クロック値を受信側クロック発生部60に転送する。このクロック値を用いて例えば送信パケット間隔を判定し、又パケット受信処理の為の受信側クロック信号をカウントしたクロック値を用いて受信パケット処理間隔を判定して、送信パケット間隔と受信パケット処理間隔とに対応して、データ出力部59から受信データとして送出する。
【0009】
図10は従来例のクロック同期の説明図であり、受信側端末装置に於ける時間軸t上の受信パケットを示し、送信側に於いて、送信側クロック信号のカウント値による時刻情報tSnを付加したパケットnの次に、時刻情報tSn+1を付加したパケットn+1を送信し、受信側に於いて、パケットnを、受信側クロック信号のカウント値による時刻tRnで受信し、パケットn+1を時刻tRn+1で受信した場合、それぞれの差分dSn=tSn+1−tSn、dRn=dRn+1を求める。即ち、送信パケット間隔と受信パケット間隔とを求める。そして、dRn>dSnの場合は、受信側クロック速度が送信側クロック速度に比較して速く、反対に、dRn<dSnの場合は、受信側クロック速度が送信側クロック速度に比較して遅いと判定することができる。これにより、パケット廃棄が発生しても、送信側クロック速度と受信側クロック速度との差分を得ることができるから、受信側クロック信号を送信側クロック信号に同期化するように制御することができる。
【0010】
しかし、パケット伝送の遅延揺らぎ及び送信側に於ける入力データをサンプリングしてパケット化して送信するまでの揺らぎの影響により、前述のような差分dSn,dRnの比較では精度の高いクロック同期化は困難である。即ち、送信パケット間隔が一定であっても、受信パケット間隔は揺らぎが大きいと変化することになる。そこで、統計的処理を施すことにより、パケットの遅延揺らぎの影響を除くことが知られている。即ち、連続するN個の前述の差分dRn,dSnの平均値AdR(n,N),AdS(n,N)とを、
AdR(n,N)=(1/N)Σ(n+N-1) (j=n) dRj
AdS(n,N)=(1/N)Σ(n+N-1) (j=n) dSj
として求める。なお、Σ(n+N-1) (j=n) は、j=nからn+N−1まで累算することを示す。
【0011】
この平均値AdR(n,N),AdS(n,N)を比較することにより、受信側クロック速度が送信側クロック速度に対して速いか遅いかを判定して、受信側クロック速度を送信側クロック速度に一致するように、即ち、クロック同期化を行うことができる。又このN個の平均値を求める区間をスライドさせて移動平均値として求めることにより、パケット受信が継続する限り、送信側クロック信号に受信側クロック信号を同期化することができる。更に、移動平均値を求めたN個の差分dSnの分散値を求め、この分散値に対応して移動平均観測窓を伸縮制御して、クロック同期化の精度を高めることも知られている(例えば、特開平5−14399号公報参照)。
【0012】
【発明が解決しようとする課題】
前述の従来例に於けるパケットの送受信間隔に相当するdSn,dRnの測定に於いて、受信側クロックについてはmsec単位以下の短い時間単位で測定する必要がある。例えば、NTSC方式のビデオデータをパケット化して伝送する場合、フレーム単位で測定することになるから、その場合のdSn,dRnは、約33msec(正確には、1001/30msec)となる。例えば、送受信間で1%のクロック速度の誤差があると仮定すると、その誤差は約333μsecとなる。従って、マイクロ秒単位で受信タイミングの測定が可能なクロック信号を必要とするものである。
【0013】
しかし、受信側端末装置を通常のパーソナルコンピュータ(PC)やワークステーション(WS)により構成してビデオ再生を行うアプリケーションが各種存在するが、その殆どは、オペレーションシステム(OS)が提供する時刻情報取得API(Application Programming Interface)を利用して、再生ビデオフレーム出力間隔を計測している。この時刻情報取得APIにより取得可能な時刻情報は、PCやWSのクロック信号に同期してカウントするハードウェアによるカウント値であり、PCやWS上で提供されている時刻情報取得APIでは、一般的に最小でも1msec単位の時刻情報しか取得できない。
【0014】
従って、PCやWSで動作するソフトウェアにより、ビデオの受信側端末装置を実現する場合に、マイクロ秒単位で時刻情報を取得することは容易でなく、前述のような手段により、送信側クロック信号に受信側クロック信号を同期化することは困難となる。なお、送信側と受信側とのクロック信号の誤差を計測可能となるように、図10のdRnを測定するパケット間隔を大きくすることも理屈上は可能であるが、システム毎にパケット間隔の調整等が必要となり、実用上の問題がある。
【0015】
又PCやWSのビデオ再生アプリケーションプログラムは、OSにより提供される時刻情報取得APIを用いて取得した時刻情報に従って、所定のフレーム表示間隔を実現することが前述のように可能であるが、実際のPCやWCに於ける時刻情報生成のクロック信号の速度調整が不可能の構成が一般的である。又PCやWSに於けるOSでもハードウェアでも時刻情報を生成する為のクロック信号の速度調整手段は用意されていないものである。従って、PC等を受信側端末装置として用いた時、送信側クロック信号に受信側クロック信号を同期化させることは実用上不可能に近いものであった。
【0016】
本発明は、時刻情報がmsec単位で取得できる受信側端末装置に於いても、送受信間のクロック同期を可能とすることを目的とする。
【0017】
【課題を解決するための手段】
本発明のパケット通信システムは、図1を参照して説明すると、送信側端末装置2から、データをパケット化する時の時刻情報としてサンプリングクロック信号を基に形成した送信側クロック値をパケットに付加して送信し、このパケットをパケット通信網3等を介して受信した受信側端末装置1は、送信側クロック値を基にクロック同期をとってデータを出力するデータ出力部9を有するパケット通信システムに於いて、受信側端末装置1は、受信したパケットに付加されている送信側クロック値tSn と、受信側クロック信号を基に形成したデータ出力用クロック値tRとの差分を算出するクロック差分算出手段5と、このクロック差分算出手段5からの差分を所定の期間について移動平均値を算出する移動平均値算出手段6と、この移動平均値算出手段6からの移動平均値の信頼度を判定する信頼度判定手段7と、この信頼度判定手段7による信頼度の高い移動平均値を基に、データ出力部9に加えるデータ出力用クロック値を補正するデータ出力クロック生成手段8とを備えている。
【0018】
又信頼度判定手段7は、移動平均値算出手段6により移動平均値を求めたクロック値の差分の分散を求め、この分散が小さい時に信頼度が高いと判定してデータ出力クロック生成手段8によるデータ出力用クロック値の補正を行わせる構成を有し、又データ出力クロック生成手段8は、係数を乗算してデータ出力用クロック値を出力し、信頼度判定手段7からの信頼度の高い時のクロック補正により係数を更新する手段を備えることができる。
【0019】
又受信側端末装置1は、送信側端末装置2からのパケットに付加した送信側クロック値が有効か無効かを示すフラグ情報を検出する手段と、この手段により検出したフラグが有効を示す時のみ、パケットに付加された送信側クロック値を基に前記データ出力用クロック値の補正を行う手段とを備えることができる。又受信したパケットの属性情報を検出し、この属性情報に従ってパケットに付加された送信側クロック値を基にデータ出力用クロック値の補正を行うか否かを判定する手段を備えることができる。
【0020】
【発明の実施の形態】
図1は本発明の原理説明図であり、1は受信側端末装置、2は送信側端末装置、3はパケット通信網、4はパケット受信手段、5はクロック差分算出手段、6は移動平均値算出手段、7は信頼度判定手段、8はデータ出力クロック生成手段、9はデータ出力部を示す。
【0021】
送信側端末装置2からは、前述のように、時刻情報を付加したパケットを送出するもので、この時刻情報は、データのサンプリングに用いたクロック信号、又はこのクロック信号に同期した他のクロック信号をカウントアップした値をクロック値としたものである。このパケットをパケット通信網2を介して受信した受信側端末装置1は、パケット受信手段4によりパケットを分解してデータと送信側クロック値とに分離し、この送信側クロック値をクロック差分算出手段5に転送し、データ出力クロック生成手段8からのデータ出力用クロック値と送信側クロック値との差分を算出する。又パケット受信手段4に於いて分離したデータとクロック値とをデータ出力部9に転送し、データ出力部9からデータ出力用のクロック値に従ってビデオデータの場合は図示を省略した表示装置へ転送し、音声データのみの場合は図示を省略したスピーカ等を含む音声装置へ転送する。
【0022】
例えば、パケットnに付加された送信側クロック値をtSn 、最初の受信パケットをパケット0とし、最初の受信パケットのデータを出力した時のデータ出力用クロック値をtR0 とすると、パケットnのデータを出力する時のクロック値tRn は、
tRn =(tSn −tS0 )+tR0 …(1)
となる。即ち、データ出力部9は、クロック値tRがtRn を超えた時点で受信パケットnのデータを出力するように、データ出力タイミングを管理することになる。
【0023】
前述のように、パケット受信手段4で受信したパケットから送信側クロック値tSn を抽出してクロック差分算出手段5に転送し、このクロック差分算出手段5に於いてデータ出力用クロック値との差分を求める。そして、移動平均値算出手段6に於いて所定期間内の差分値の移動平均値を求める。又信頼度判定手段7に於いて移動平均値の基になったクロック値差分の信頼度を判定し、この信頼度情報と、移動平均値算出手段6からのクロック値差分平均値とをデータ出力クロック生成手段8に転送し、信頼度が高い場合のみ、クロック値差分平均値によりデータ出力部9に加えるデータ出力用クロック値の補正を行うものである。
【0024】
図2は本発明の実施の形態の要部説明図であり、11は受信側端末装置、14はパケット受信部、15はクロック差分計算部、16は移動平均計算部、17は信頼度判定部、18は受信側クロック生成部、19はビデオデコーダ、20はビデオレンダラを示す。
【0025】
同図に於いて、図1と類似した名称の機能部分は同一の機能を有するものであり、又図1のデータ出力部9として、ビデオデータを出力する場合に於ける復号化処理等を行うビデオデコーダ19と、画像処理を行ったビデオデータを、図示を省略した表示装置へ出力するビデオレンダラ20とを含む場合を示す。又図1のデータ出力クロック生成手段8に相当する受信側クロック生成部18は、信頼度判定部17からの情報に従って受信クロック信号を補正して、ビデオレンダラ20からのデータを出力するタイミングを示すデータ出力用のクロック値tRを出力する。この受信側クロック生成部18は、PCやWS上のアプリケーションプログラムに於いては、OSが提供する時刻情報取得APIによって実現することができる。
【0026】
例えば、マイクロソフト社のPC/WS用のOSとして知られているMicrosoft Windows Operating System NT(商標)のアプリケーションプログラムから、timeGetTime()というAPIにより、最高1msec単位までの時刻情報の取得が可能である。この取得可能の時刻情報(受信側クロック値)をtrとし、受信側クロック生成部18は、実際にビデオのフレーム表示間隔を管理する為に使用するデータ出力用のクロック値tRを生成する。
【0027】
この場合、受信側端末装置11の基本クロック信号は一定速度であり、その基本クロック信号を例えば分周してカウントし、そのカウント値をデータ出力用クロック値tRとし、分周比を制御することにより、又はオフセット値を加算することにより、データ出力用クロック値tRを補正することができる。例えば、係数Crを乗算することによりデータ出力用クロック値tRを出力し、この係数Crを更新することにより、クロック補正を行うことができる。
【0028】
例えば、受信側クロック生成部18は、係数Crを乗算してデータ出力用クロック値を出力する場合、次式で定義されるデータ出力用のクロック値tRを出力する。
tR=Cr(tr−tr0 )+tS0 …(2)
ここで、tr0 は最初の再生可能なデータが格納されたパケットを受信した時の時刻情報(受信側クロック値)trであり、tS0 は最初の再生可能のデータが格納されたパケットに付加されている送信側クロック値を示す。又Crは、時刻情報(受信側クロック値)trの速度を基準にしてデータ出力用のクロック値tRの速度を指定する為の係数であり、この係数Crの初期値は1.0とする。そして、この係数Crを更新することによって、データ出力用クロック値tRの補正を行うことができる。即ち、クロック補正を行うことができる。なお、実際の装置では、受信したデータが表示可能となるまでに、何らかの処理時間がかかるから、クロック値tRを遅延させる必要があるが、簡略化の為の遅延についての説明は省略する。
【0029】
又ビデオレンダラ20は、ビデオデコーダ19に於いて復号されたビデオフレームデータと、送信側クロック値tSn と、受信側クロック生成部18からのデータ出力用クロック値tRとを基に、図示を省略した表示装置にデータを出力する。その場合、tR=tSn となった時点でデータを出力する。即ち、送受信間のクロック同期をとってデータを出力することになる。
【0030】
そして、パケットを継続して長時間受信している場合、送信側クロック速度(送信側クロック値)と受信側クロック速度(データ出力用クロック値)とのずれにより、データを表示すべきタイミングで出力することができなくなる。そこで、クロック差分計算部15に於いて、受信パケットnに付加されている送信側クロック値tSn と、このパケットn受信時のデータ出力用のクロック値tRn との差分dSRn =tSn −tRn を計算する。又移動平均計算部16は、クロック値の差分dSRn について、過去の所定の期間内のN個(j=n−(N−1)〜j=n)の平均値AdSR(n,N)=(1/N)Σn j=n-(N-1) dSRj を計算する。
【0031】
この移動平均値AdSRの計算は、クロック補正を施す周期で行うものであり、クロック値の差分dSRn の移動平均値AdSRが増加している場合は、送信側クロック速度に比較してデータ出力用クロック速度が遅く、反対に、移動平均値AdSRが減少している場合は、送信側クロック速度に比較してデータ出力用クロック速度が速いことを示すから、それに従ってクロック補正を施すことができる。このクロック補正を施す前に、求めた移動平均値AdSRが信頼できるものであるか否かを信頼度判定部17に於いて判定する。
【0032】
具体的には、信頼度判定部17に於いて、差分dSRn の真値に対して、算出されたこの差分dSRn の平均値の分布が中心極限定理により正規分布に従うと仮定し、求めた移動平均値AdSRと、この移動平均値AdSRの計算に用いた差分dSRn の分散を用いて評価する。即ち、次の(3)〜(5)式により標準偏差σを求める。
【数1】
【0033】
そして、予め想定した危険率によって決定される係数αを用い、
AdSR−ασ<0<AdSR+ασ
の場合は移動平均値AdSRの信頼度が低く、
AdSR−ασ>0又はAdSR+ασ<0
の場合は移動平均値AdSRの信頼度が高いと判定する。この信頼度が高いと判定した場合のみ、受信側クロック生成部18に於けるクロック補正を行わせるものである。
【0034】
この場合の信頼度が高い移動平均値をAdSRa 、その時の受信側クロック値をtra 、データ出力用クロック値をtRa 、更新された係数をCra とすると、この更新された係数Cra は、
Cra =(AdSRa +tRa −tR0 )/(tra −tr0 ) …(6)
となる。又da =AdSRa +tRa とすると、補正されたデータ出力用クロック値tRは、
tR=Cra (tr−tra )+da …(7)
となる。
【0035】
図3は新たに算出した移動平均値AdSRn が、補正不要な(信頼度が低い)範囲内の場合を示す。従って、クロック補正の次の周期に於いて算出した移動平均値AdSRn+1 についても同様にクロック補正の要否を判定することになる。又図4は新たに算出した移動平均値AdSRn が、補正が必要な(信頼度が高い)範囲に存在する場合を示す。この場合にクロック補正を行う。なお、図3,図4に於ける0は、クロック補正を行った時の移動平均値をクロック補正の次の周期の基準とする値を示す。
【0036】
又(7)式により補正されたデータ出力用クロック値tRについて、送信側クロック値に追従する様子を図5に示す。即ち、横軸を受信側クロック値tr、縦軸を送信側クロック値及びデータ出力用クロック値とし、受信側クロック値がtr0 の時の送信側クロック値をtS0 、データ出力用クロック値をtR0 とし、tS0 =tR0 として、受信側クロック値trの増加、即ち、時間の経過に従って点線で示す送信側クロック値tSが増加し、又実線で示すデータ出力用クロック値tRが係数Crを初期値1.0として増加する状態を示す。
【0037】
そして、受信側クロック値がtra に於ける送信側クロック値tSa と、データ出力用クロック値tRa との差分と、移動平均値AdSRa とを求め、且つ分散σを求め、AdSRa −ασ>0となった時に、クロック補正を行うと共に、係数Crの補正を行う。即ち、(6)式に従って係数Cra を求め、且つda =tRa +AdSRa として、tR=Cra (tr−tra )+da に従ったデータ出力用クロックtRとするクロック補正を行う。即ち、実線矢印で示すようにda を加算し、且つ係数Crの更新を行うことにより、誤差分が小さくなるようにクロック補正する。この更新した係数Cra により、データ出力用クロック値tRは、送信側クロック値tSと同一又は近似した速度(傾斜)となる。これにより、クロック補正を頻繁に行うことなく、送受信間クロック同期をとることができる。又この場合、N個の差分の移動平均値を求める場合のNを小さくした場合でも、誤差分が累積して大きくなった時にクロック補正が行われることになるが、このNを或る程度大きくすることにより、精度の高いクロック補正処理が可能となる。
【0038】
又NTSCビデオデータをパケット化して伝送する場合、ビデオフレーム間隔は約33msecであるから、送信側クロック値と、データ出力用クロック値との誤差を33msec以下で調整できれば、送信側に対する受信側の誤差が1フレーム時間以下の状態を実現できることになる。PC(パソコン)やWS(ワークステーション)に於ける測定可能の時刻は1msec程度あることから、クロック差分計算部15に於けるクロック値の差分dSRn =tSn −tRn は1msec単位程度で求めることができれば、充分にクロック補正が可能となる。
【0039】
通常は、送信側端末装置のデータサンプリングクロック信号と受信側端末装置のデータ出力用クロック信号との誤差は、元々大きくないので、送受信間クロック差を厳密に管理しなくても充分な場合がある。例えば、フレームレートが5fps(フレーム/秒)程度のビデオデータを伝送するアプリケーションの場合、フレーム間隔は200msec程度となり、この場合は、数10msec程度の誤差を許容できることになる。このようなアプリケーションに於いては、係数Crの更新を行わない簡略化した手段でクロック補正が可能である。
【0040】
そこで、データ出力用クロック値tRを、
tR=(tr−tr0 )+tS0 …(8)
とし、前述の場合と同様に、送受信間クロック誤差の移動平均値を求め、信頼度を判定し、信頼度の高い移動平均値AdSRa が得られた時に、
tR=(tr−tra )+da …(9)
としてデータ出力用クロック値tRを補正することができる。即ち、係数Crについては初期値の1.0のままとし、クロック補正時に:da =AdSRa +tRa を加算する。
【0041】
前述のクロック補正手段によるデータ出力用クロック値の追従の様子を図6に示す。即ち、tr0 に於けるtS0 =tR0 とし、受信側クロック値tra に於ける移動平均値AdSRa の信頼度が高く、クロック補正を行うものである。この場合、係数Crの補正を行わないので、点線で示す送信側クロック値tSと、実線で示すデータ出力用クロック値tRとの特性(傾斜)は異なる場合が一般的となり、移動平均値AdSRと標準偏差σとを用いて信頼度の判定を行い、実線矢印で示すようにクロック補正を行うことになる。
【0042】
又送信側クロック値は、送信データをサンプリングする処理と送信処理とを同時に並行的に行われることを前提とした場合を示すが、実際のシステムに於いては、記録媒体に一旦蓄積した後に、パケット通信網を介して受信側端末装置へ伝送する場合がある。図7は前述のようなシステムに適用した場合を示す。同図に於いて、31は送信側端末装置、32は送信データ作成装置、33は磁気ディスク装置や光磁気ディスク装置等の記録メディア、34はデータサンプリング部、35はデータ処理部、36はサンプリングクロック生成部、37はパケット化部、38はパケット送信部、39は送信側クロック生成部を示す。
【0043】
送信データ作成装置32は、入力データをデータサンプリング部34に於いてサンプリングクロック生成部36からのサンプリングクロック信号によりサンプリングし、サンプリングしたデータとクロック信号をカウントしたクロック値とをデータ処理部35に転送する。データ処理部35はクロック値を付加したデータをパケット化部37に転送し、パケット化部37はヘッダ情報にクロック値を付加してデータをパケット化し、記録メディア33に転送して記録する。
【0044】
又送信側端末装置31は、パケット送信部38により記録メディア33から読出したパケットに付加されているクロック値と、送信側クロック生成部39からのクロック値とを基に、前述の送信側クロック値とデータ出力用クロック値とを基に同期化を行う場合と同様にして、パケット送信部38から図示を省略したパケット通信網を介して受信側端末装置へ送信する。
【0045】
例えば、パケット送信部38は、記録メディア33から読出して送信するパケットのクロック値がtP0 で、そのパケットを送信した時の送信側クロック生成部39によるクロック値がtS0 であったとすると、次の送信パケットのクロック値がtP1 で、そのパケットの送信タイミングを示すクロック値tS1 を、tS1 =(tP1 −tP0 )+tS0 により求め、送信側クロック生成部39のクロック値がtS1 を超えた時に、そのパケットを送信する。以後同様にして、パケットに付加されたクロック値と、送信側クロック生成部39によるクロック値とを比較して、送信タイミングを決定することができる。
【0046】
前述の図7に示す実施の形態に於いては、送信データ作成装置32に於いてパケット化し、記録メディア33に一旦蓄積して送信側端末装置31からパケット送信を行う場合を示すが、送信側端末装置31にパケット化部37を設け、送信データ作成装置32はデータ処理部35から記録メディア33にクロック値を付加したデータを記憶し、その記録メディア33から読出したデータを、送信側端末装置31に設けたパケット化部によりパケット化して送信する構成とすることも可能である。その場合、記録メディア33には、データと共に時刻情報を記録しておき、送信側端末装置31のパケット化部に於いて送信パケットを生成して時刻情報を付加し、その時刻情報に従ったタイミングで送信することになる。
【0047】
又送信側端末装置に於いて、パケットに付加した送信側クロック値と送信クロックとの同期を維持できない場合がある。例えば、図7に於いて、記録メディア33を複数の送信側端末装置からアクセスしてデータを読出して送信するシステムに於いては、記録メディア33に対するアクセスが輻輳して、データの読出しが送信タイミングに間に合わない場合が生じる。このような状況が頻繁に発生すると、受信側では、パケットの伝送遅延の揺らぎが大きいように観測される。その場合は、クロック値の差分とその移動平均値と分散とを用いた信頼度の判定に於いて、信頼度が低いと判定される問題が生じる。
【0048】
これを回避する為に、パケットの送信側に、パケットに付加した送信側クロック値が有効か無効かを示すフラグ情報を付加して送信し、受信側端末装置は、このフラグ情報を検出する手段を例えばパケット受信部14(図2参照)に設け、このフラグ情報が有効を示す時のみクロック補正を行う構成とすることができる。具体的には、フラグ情報として同期フラグ情報を用い、正常な送信タイミングでパケットを送信している場合は、同期がとれていることを示す同期フラグ情報とし、データの読出しが送信タイミングに間に合わないような場合は、同期がとれていないことを示す同期フラグ情報をそれぞれパケットに付加して伝送する。従って、受信側端末装置に於いては、この同期フラグ情報を検出して、同期がとれていないことを示す時は、このパケットに付加された送信側クロック値を利用しないようにする。即ち、クロック補正を行わないようにすることができる。
【0049】
又パケット通信システムに於いては、ルータ等のパケットを中継転送する装置を設けたシステムも知られている。このルータ等のパケット中継装置は、受信バッファ等を含み、パケット中継処理による伝送遅延の揺らぎが発生する場合が一般的である。例えば、図8に示すように、受信側端末装置41と送信側端末装置42との間で、ネットワークA,Bとルータ等のパケット中継装置43とを介してパケットの送受信を行うシステムに於いて、受信側端末装置41は、例えば、図2に示す構成とし、又送信側端末装置42は、例えば、図9に示す構成とすることができる。又パケット中継装置43は、受信バッファを備え、且つパケットのヘッダ情報に従ってパケットの中継処理を行う構成を有するものである。
【0050】
このようなシステムに於いて、パケット中継装置43を、受信側端末装置41に対して新たな送信端末装置と見做してクロック同期をとる方式(a)と、パケット中継装置の伝送遅延時間r2を一定に維持する方式(b)との何れかを適用することができる。なお、r1〜r4はネットワークA,パケット中継装置43,ネットワークB及び送信側端末装置42と受信側端末装置41との間のそれぞれの伝送遅延時間を示す。
【0051】
パケット中継装置43を新たな送信端末装置と見做す方式(a)の場合、パケット中継装置43に、図7に於ける送信端末装置31の機能を設けることができる。その場合、パケット中継装置43を送信端末装置と見做す方式(a)の場合、パケット中継装置43に図7に示す送信端末装置31の機能を設けることができる。即ち、送信端末装置42が図7に於ける記録メディア33に対応し、パケット中継装置43が図7に於ける送信側端末装置31に対応した構成と見做すことができる。
【0052】
従って、パケットに付加された送信側クロック値を基に、パケット中継装置43から送出するタイミングを制御し、且つ同期フラグ情報を用いて、同期がとれている状態か、又はとれていない状態かを受信側端末装置41に通知することができる。なお、送信側端末装置42とパケット中継装置43との間では、パケット中継装置43の受信バッファのオーバーフローやアンダーフローを回避する為に、クロック同期をとる必要がある。その為に、中継するパケットストリーム毎にクロック同期処理の機能を必要とすることになる。
【0053】
又伝送遅延時間r2を一定に維持する方式(b)の場合は、受信バッファを用いて、送信側端末装置42から受信したパケットを伝送遅延時間r2後に受信側端末装置41へ送出するように処理するものであるが、複数のパケットストリームについて処理することから、この伝送遅延時間r2を一定に維持できない場合が生じる。その時は、前述の同期フラグ情報を用いて同期がとれていないことを受信側端末装置41に通知する。従って、受信側端末装置41は、同期がとれていることを示す同期フラグ情報を検出した時に、パケットに付加された送信側クロック値を基に、送信側端末装置42との間のクロック同期をとり、同期がとれていないことを示す同期フラグ情報が付加されている場合は、そのパケットに付加された送信側クロック値を無視する処理を行うものである。
【0054】
又パケットに属性情報を付加して送信し、受信側端末装置は、この属性情報をパケット受信部14(図2参照)に於いて抽出する。例えば、送信側端末装置がビデオデータと共に、これに同期したオーディオデータを送信する場合に、受信側では、この属性情報が例えば、オーディオデータかビデオデータかの何れか一方の場合に、パケットに付加された送信側クロック値を抽出してデータ出力用クロック値の補正処理にも利用し、他方の場合は、パケットに付加された送信側クロック値をデータ出力タイミングを測る目的のみに利用する。これにより、例えば、送信側でソフトウェアにより圧縮符号化を施してデータを送信する等に於いて、入力データの内容や符号化方式上の理由により、処理時間のばらつきが大きい状況であって、且つオーディオかビデオかの何れかの送信処理時間の方がばらつきの少ないことが判っている場合に、ばらつきの少ない方のデータに付随する送信側クロック値のみを利用することで、送受信間クロック差検出の確度を向上させることができる。
【0055】
(付記1)送信側端末装置からデータをパケット化する時の時刻情報としてサンプリングクロック信号を基に形成した送信側クロック値をパケットに付加して送信し、該パケットを受信した受信側端末装置は、前記送信側クロック値を基にクロック同期をとってデータを出力するデータ出力部を有するパケット通信システムに於いて、前記受信側端末装置は、受信したパケットに付加されている前記送信側クロック値と、受信側クロック信号を基に形成したデータ出力用クロック値との差分を算出するクロック差分算出手段と、該クロック差分算出手段からの差分を所定の期間について移動平均値を算出する移動平均値算出手段と、該移動平均値算出手段からの移動平均値の信頼度を判定する信頼度判定手段と、該信頼度判定手段による信頼度の高い前記移動平均値を基に前記データ出力部に加えるデータ出力用クロック値を補正するデータ出力クロック生成手段とを備えたことを特徴とするパケット通信システム。
【0056】
(付記2)前記信頼度判定手段は、前記移動平均値算出手段により移動平均値を求めた前記差分の分散を求めて、該分散が小さい時に信頼度が高いと判定して前記データ出力クロック生成手段によるデータ出力用クロック値の補正を行わせる構成を有することを特徴とする付記1記載のパケット通信システム。
(付記3)前記データ出力クロック生成手段は、係数を乗算して前記データ出力部に加えるデータ出力用クロック値を出力し、且つ前記信頼度判定手段からの信頼度の高い時のクロック補正により前記係数を更新する手段を備えたことを特徴とする付記1又は2記載のパケット通信システム。
(付記4)前記受信側端末装置は、前記送信側端末装置からのパケットに付加した送信側クロック値が有効か無効かを示すフラグ情報を検出する手段と、該手段により検出したフラグが有効を示す時のみ、該パケットに付加された前記送信側クロック値を基に前記データ出力用クロック値の補正を行う手段とを備えたことを特徴とする付記1乃至3の何れかに記載のパケット通信システム。
【0057】
(付記5)送信側クロック値を付加したパケットを記録メディアに記憶した後に該パケットを読出して送信するパケット通信システムに於いて、前記記録メディアから前記パケットを読出して送信する送信側端末装置は、前記パケットに付加された送信側クロック値と、該送信側端末装置のパケット送信時のクロック値とを対応させた送信タイミングで前記パケットを送信し、且つ該パケットの送信タイミングが所定のタイミングからずれている時に、該パケットの同期がとれていないことを示すフラグ情報を付加して送信する手段を備えていることを特徴とするパケット通信システム。
(付記6)送信側端末装置からの送信側クロック値を付加したパケットを中継送出するパケット中継装置を介して受信側端末装置へ伝送するパケット通信システムに於いて、前記パケット中継装置は、前記送信側クロック値に同期するようにデータ出力用クロック値を補正すると共に、所定のタイミングでパケットを送出できない時に、該パケットの送信側クロック値の無効を示すフラグ情報を付加して送出する構成を備えたことを特徴とするパケット通信システム。
(付記7)送信側端末装置からの送信側クロック値を付加したパケットを中継送出するパケット中継装置を介して受信側端末装置へ伝送するパケット通信システムに於いて、前記パケット中継装置は、受信したパケットを一定の遅延後の送信タイミングで送出し、該送信タイミングがずれた時に、該パケットの送信側クロック値の無効を示すフラグ情報を付加して送出する構成を備えたことを特徴とするパケット通信システム。
(付記8)前記受信側端末装置は、受信したパケットの属性情報を検出して、該属性情報に従って該パケットに付加された送信側クロック値を基に前記データ出力用クロック値の補正を行うか否かを判定する手段を備えたことを特徴とする付記1乃至3の何れかに記載のパケット通信システム。
【0058】
【発明の効果】
以上説明したように、本発明は、PC(パソコン)やWS(ワークステーション)等のように、1msec単位程度の時刻情報の取得が可能のハードウェア及びOS(オペレーションシステム)で動作するソフトウェアによってパケットを受信するシステムに於いて、ビデオデータ等をパケット化して伝送する場合でも、サンプリングして形成したパケットに付加された送信側クロック値を基に、データ出力用クロック値を補正して、送受信間のクロック同期をとることにより、所定のタイミングでデータを受信出力することができる。従って、受信側端末装置の受信バッファのオーバーフローやアンダーフローを生じさせることなく、所定のタイミングでデータを出力することができるから、受信データの品質を維持できる利点がある。又同期フラグ情報等の送信側クロック値の有効,無効を示すフラグ情報を用いることにより、送信側で正常のタイミングでパケットを送出できない時に、受信側へ通知することができるから、有効なクロック補正のみが可能となる。
【図面の簡単な説明】
【図1】本発明の原理説明図である。
【図2】本発明の実施の形態の要部説明図である。
【図3】クロック補正の要否の説明図である。
【図4】クロック補正の要否の説明図である。
【図5】本発明の実施の形態のデータ出力用クロック値の補正説明図である。
【図6】本発明の実施の形態のデータ出力用クロック値の簡略化補正説明図である。
【図7】本発明の他の実施の形態の要部説明図である。
【図8】本発明の更に他の実施の形態の要部説明図である。
【図9】パケット通信システムの説明図である。
【図10】従来例のクロック同期の説明図である。
【符号の説明】
1 受信側端末装置
2 送信側端末装置
3 パケット通信網
4 パケット受信手段
5 クロック差分算出手段
6 移動平均値算出手段
7 信頼度判定手段
8 データ出力クロック生成手段
9 データ出力部[0001]
BACKGROUND OF THE INVENTION
The present invention transmits a packet between a transmitting terminal device and a receiving terminal device via a packet communication network, and the receiving terminal device synchronizes with the clock signal of the transmitting terminal device. The present invention relates to a packet communication system that processes received packets.
[0002]
[Prior art]
With the spread of the Internet / intranet in recent years, applications for transmitting real-time media such as AV (Audio Video) data are increasing. As a protocol for data transmission in an IP (Internet Protocol) network, TCP (Transmission Control Protocol) or UDP (User Data Protocol) is generally used. When TCP is used, it is possible to transmit data with high reliability. However, since retransmission control is performed, there is a drawback that real-time characteristics are lacking. Therefore, for applications that transmit AV data or the like in real time, UDP is used instead of TCP. Also, in order to realize broadcast communication like TV broadcasting, multicasting is performed. However, since TCP does not support multicasting, UDP is used.
[0003]
When AV data is transmitted via a network, it is necessary to synchronize a clock signal for sampling AV data on the transmission side and a clock signal for outputting data received on the reception side. If the clock signals are not synchronized between such transmission and reception, there is a problem that underflow and overflow occur in the buffer on the receiving side. For example, when the transmission data is video data, it is necessary to adjust the frame rate so that the same frame is displayed a plurality of times at the time of underflow or when a certain frame is not displayed. Therefore, the movement of the playback screen becomes unnatural and the display quality is degraded. In the case of audio, it is possible to adjust temporarily by thinning out PCM data at the time of overflow or by repeatedly playing back PCM data at the time of underflow, but the reproduced sound in that case becomes noise and the reproduced sound quality deteriorates. Therefore, it is necessary to synchronize the reception side clock signal with the transmission side clock signal.
[0004]
When the transmission side and the reception side are connected via a synchronization network, clock synchronization between transmission and reception can be achieved by synchronizing the clock signals of the transmission and reception sides with the clock signal of the synchronization network. However, in the case of an asynchronous network or when the transmission / reception terminal device cannot be synchronized with the network clock signal, it is not easy to realize clock synchronization between transmission and reception. In normal TCP / IP-based communication, it is not assumed that the terminal device on the transmission / reception side is synchronized with the network clock. Therefore, as a means to synchronize the clock between transmission and reception, for example, on the receiving side, a certain amount of received data is buffered and then output is started. For example, there is known a means for controlling the reception side clock signal to follow the transmission side clock signal by increasing the data output clock speed on the reception side and decreasing the data output clock speed if the data tends to underflow.
[0005]
However, in communications using UDP, it is not guaranteed that the transmission delay is constant, and there is a high possibility that packets will be discarded due to network congestion. Therefore, in the means for maintaining the reception buffer amount within the predetermined range as described above, a change in increase / decrease in the reception buffer amount becomes large due to fluctuations in packet transmission delay or packet discard, and adjustment of the clock difference between transmission and reception is possible. There is a problem that becomes impossible.
[0006]
Also, as another means of clock synchronization between transmission and reception, a transmission packet from the transmission side terminal device is added with a value obtained by using the transmission side clock signal when the transmission data is sampled as a counter as time information, and transmitted. The terminal device uses the time information obtained by counting the reception side clock signal, and the transmission side according to the transmission packet interval based on the time information added to the received packet and the reception packet processing interval based on the time information generated by the reception side terminal device. Means for synchronizing the receiving clock signal with the clock signal are also known.
[0007]
FIG. 9 is an explanatory diagram of a packet communication system, in which a transmission
[0008]
The receiving-side terminal device 52 that has received the packet via the
[0009]
FIG. 10 is an explanatory diagram of clock synchronization of a conventional example, showing a received packet on the time axis t in the receiving side terminal device, and adding time information tSn based on the count value of the transmitting side clock signal on the transmitting side. Packet n + 1 to which time information tSn + 1 is added is transmitted next to the received packet n, and on the receiving side, packet n is received at time tRn according to the count value of the receiving side clock signal, and packet n + 1 is received at time tRn + 1. In this case, the respective differences dSn = tSn + 1−tSn and dRn = dRn + 1 are obtained. That is, the transmission packet interval and the reception packet interval are obtained. When dRn> dSn, it is determined that the receiving-side clock speed is faster than the transmitting-side clock speed. On the other hand, when dRn <dSn, it is determined that the receiving-side clock speed is slower than the transmitting-side clock speed. can do. Thus, even if packet discard occurs, the difference between the transmission side clock speed and the reception side clock speed can be obtained, so that the reception side clock signal can be controlled to be synchronized with the transmission side clock signal. .
[0010]
However, due to the influence of delay fluctuations in packet transmission and fluctuations in which input data on the transmission side is sampled and packetized before being transmitted, it is difficult to accurately synchronize the clocks by comparing the differences dSn and dRn as described above. It is. That is, even if the transmission packet interval is constant, the reception packet interval changes if the fluctuation is large. Therefore, it is known to eliminate the influence of packet delay fluctuation by performing statistical processing. That is, the average values AdR (n, N) and AdS (n, N) of the N consecutive differences dRn and dSn described above are expressed as follows:
AdR (n, N) = (1 / N) Σ(n + N-1) (j = n)dRj
AdS (n, N) = (1 / N) Σ(n + N-1) (j = n)dSj
Asking. Σ(n + N-1) (j = n)Indicates accumulation from j = n to n + N−1.
[0011]
By comparing the average values AdR (n, N) and AdS (n, N), it is determined whether the reception side clock speed is faster or slower than the transmission side clock speed, and the reception side clock speed is set to the transmission side. Clock synchronization can be performed to match the clock speed, ie. In addition, by sliding the section for obtaining the N average values as the moving average value, the reception side clock signal can be synchronized with the transmission side clock signal as long as packet reception continues. Furthermore, it is also known that the dispersion value of N differences dSn for which the moving average value is obtained is obtained, and the moving average observation window is expanded and contracted in accordance with the dispersion value to improve the accuracy of clock synchronization ( For example, see JP-A-5-14399.
[0012]
[Problems to be solved by the invention]
In the measurement of dSn and dRn corresponding to the packet transmission / reception interval in the above-described conventional example, the receiving clock needs to be measured in a short time unit of less than msec. For example, when NTSC video data is packetized and transmitted, measurement is performed in units of frames. In this case, dSn and dRn are about 33 msec (more precisely, 1001/30 msec). For example, assuming that there is an error of 1% clock speed between transmission and reception, the error is about 333 μsec. Therefore, a clock signal that can measure the reception timing in microseconds is required.
[0013]
However, there are various applications that perform video playback by configuring the receiving terminal device with a normal personal computer (PC) or workstation (WS), and most of them acquire time information provided by the operation system (OS). The playback video frame output interval is measured using an API (Application Programming Interface). The time information that can be acquired by this time information acquisition API is a count value by hardware that counts in synchronization with the clock signal of the PC or WS. In the time information acquisition API provided on the PC or WS, Only time information in units of 1 msec can be acquired at a minimum.
[0014]
Therefore, it is not easy to obtain time information in units of microseconds when a video receiving terminal device is realized by software operating on a PC or WS. It is difficult to synchronize the receiving clock signal. Although it is theoretically possible to increase the packet interval for measuring dRn in FIG. 10 so that the error of the clock signal between the transmission side and the reception side can be measured, adjustment of the packet interval for each system is possible. Etc. are necessary, and there is a problem in practical use.
[0015]
In addition, as described above, the PC or WS video playback application program can realize a predetermined frame display interval according to the time information acquired using the time information acquisition API provided by the OS. A configuration in which the speed adjustment of a clock signal for generating time information in a PC or WC is generally impossible. In addition, no means for adjusting the speed of the clock signal for generating time information is prepared for either the OS or hardware of the PC or WS. Therefore, when a PC or the like is used as a receiving terminal device, it is practically impossible to synchronize the receiving clock signal with the transmitting clock signal.
[0016]
An object of the present invention is to enable clock synchronization between transmission and reception even in a reception-side terminal device that can acquire time information in units of msec.
[0017]
[Means for Solving the Problems]
The packet communication system of the present invention will be described with reference to FIG. 1. A transmission side clock value formed based on a sampling clock signal is added to a packet from the transmission
[0018]
The reliability determination means 7 obtains the variance of the difference between the clock values obtained by the moving average value calculation means 6, determines that the reliability is high when the variance is small, and uses the data output clock generation means 8. When the data output clock generation means 8 outputs the data output clock value by multiplying the coefficient and the reliability from the reliability determination means 7 is high, the data output clock value is corrected. There can be provided means for updating the coefficient by the clock correction.
[0019]
The receiving
[0020]
DETAILED DESCRIPTION OF THE INVENTION
FIG. 1 is a diagram for explaining the principle of the present invention. 1 is a receiving terminal device, 2 is a transmitting terminal device, 3 is a packet communication network, 4 is packet receiving means, 5 is clock difference calculating means, and 6 is a moving average value. Calculation means, 7 is reliability determination means, 8 is a data output clock generation means, and 9 is a data output unit.
[0021]
As described above, the transmission
[0022]
For example, the transmission side clock value added to the packet n is set to tSnThe first received packet is
tRn= (TSn-TS0) + TR0 ... (1)
It becomes. That is, the
[0023]
As described above, the transmission side clock value tS is determined from the packet received by the packet receiving means 4.nIs extracted and transferred to the clock difference calculating means 5, and the clock difference calculating means 5 obtains the difference from the data output clock value. Then, the moving average value calculating means 6 obtains the moving average value of the difference values within a predetermined period. Further, the reliability determination means 7 determines the reliability of the clock value difference that is the basis of the moving average value, and outputs the reliability information and the clock value difference average value from the moving average value calculation means 6 as data output. Only when the reliability is high, the data output clock value applied to the
[0024]
FIG. 2 is an explanatory diagram of a main part of the embodiment of the present invention, in which 11 is a receiving side terminal device, 14 is a packet receiving unit, 15 is a clock difference calculation unit, 16 is a moving average calculation unit, and 17 is a reliability determination unit. , 18 is a receiving side clock generation unit, 19 is a video decoder, and 20 is a video renderer.
[0025]
In the figure, functional parts having names similar to those in FIG. 1 have the same functions, and the
[0026]
For example, time information of up to 1 msec unit can be acquired from an application program of Microsoft Windows Operating System NT (trademark), which is known as an OS for PC / WS of Microsoft Corporation, by an API called timeGetTime (). With this acquirable time information (reception side clock value) as tr, the reception side
[0027]
In this case, the basic clock signal of the receiving
[0028]
For example, when receiving the data output clock value by multiplying the coefficient Cr, the reception side
tR = Cr (tr−tr0) + TS0 ... (2)
Where tr0Is time information (reception side clock value) tr when receiving a packet storing the first reproducible data, tS0Indicates the transmission side clock value added to the packet storing the first reproducible data. Cr is a coefficient for designating the speed of the clock value tR for data output on the basis of the speed of the time information (reception side clock value) tr. The initial value of the coefficient Cr is 1.0. Then, the data output clock value tR can be corrected by updating the coefficient Cr. That is, clock correction can be performed. In an actual apparatus, since it takes some processing time until the received data can be displayed, it is necessary to delay the clock value tR. However, description of the delay for simplification is omitted.
[0029]
The
[0030]
If the packet is received continuously for a long time, the data is output at the timing to display data due to the difference between the transmission side clock speed (transmission side clock value) and the reception side clock speed (data output clock value). Can not do. Therefore, in the clock
[0031]
The calculation of the moving average value AdSR is performed at a cycle for performing the clock correction, and the difference dSR of the clock valuenWhen the moving average value AdSR is increased, the data output clock speed is slower than the transmission side clock speed. On the contrary, when the moving average value AdSR is decreased, the data output clock speed is compared with the transmission side clock speed. Since the data output clock speed is high, clock correction can be performed accordingly. Before performing the clock correction, the
[0032]
Specifically, in the
[Expression 1]
[0033]
Then, using a coefficient α determined by a risk factor assumed in advance,
AdSR-ασ <0 <AdSR + ασ
In the case of, the reliability of the moving average value AdSR is low,
AdSR-ασ> 0 or AdSR + ασ <0
In this case, it is determined that the reliability of the moving average value AdSR is high. Only when it is determined that the reliability is high, the clock correction in the reception-
[0034]
In this case, the moving average value with high reliability is set to AdSR.a, The reception side clock value at that time is tra, The data output clock value is tRa, The updated coefficient CraThen, this updated coefficient CraIs
Cra= (AdSRa+ TRa-TR0) / (Tra-Tr0(6)
It becomes. Da= AdSRa+ TRaThen, the corrected data output clock value tR is
tR = Cra(Tr-tra) + Da ... (7)
It becomes.
[0035]
FIG. 3 shows the newly calculated moving average value AdSR.nIndicates a case where correction is not necessary (low reliability). Therefore, the moving average value AdSR calculated in the next period of the clock correction.n + 1Similarly, whether or not clock correction is necessary is determined. FIG. 4 shows the newly calculated moving average value AdSR.nIndicates a case where correction is necessary (high reliability). In this case, clock correction is performed. Note that 0 in FIGS. 3 and 4 indicates a value based on the moving average value when the clock correction is performed as a reference for the next cycle of the clock correction.
[0036]
FIG. 5 shows how the data output clock value tR corrected by the equation (7) follows the transmission side clock value. That is, the horizontal axis is the reception side clock value tr, the vertical axis is the transmission side clock value and the data output clock value, and the reception side clock value is tr.0The transmission side clock value at t0, The data output clock value is tR0And tS0= TR0As shown, the transmission clock value tS indicated by the dotted line increases as the reception clock value tr increases, that is, as time elapses, and the data output clock value tR indicated by the solid line increases with the coefficient Cr as the initial value 1.0. Indicates the state.
[0037]
And the receiving side clock value is traTransmitter side clock value tSaAnd a data output clock value tRaAnd the moving average value AdSRaAnd the variance σ are calculated, and AdSRaWhen −ασ> 0, the clock correction is performed and the coefficient Cr is corrected. That is, the coefficient Cr according to the equation (6)aAnd da= TRa+ AdSRaTR = Cra(Tr-tra) + DaThe clock is corrected to the data output clock tR according to the above. That is, as shown by the solid arrow, daAnd the coefficient Cr is updated to correct the clock so as to reduce the error. This updated coefficient CraThus, the data output clock value tR has the same speed (slope) as the transmission side clock value tS. Thereby, the clock synchronization between transmission and reception can be achieved without frequently performing clock correction. Further, in this case, even when N in the case of obtaining a moving average value of N differences is reduced, clock correction is performed when the error amount is accumulated and increased. However, this N is increased to some extent. This makes it possible to perform clock correction processing with high accuracy.
[0038]
When NTSC video data is packetized and transmitted, the video frame interval is about 33 msec. Therefore, if the error between the transmission side clock value and the data output clock value can be adjusted to 33 msec or less, the error on the reception side relative to the transmission side Can realize a state of 1 frame time or less. Since the measurable time in a PC (personal computer) or WS (workstation) is about 1 msec, the clock value difference dSR in the clock
[0039]
Usually, since the error between the data sampling clock signal of the transmitting terminal device and the data output clock signal of the receiving terminal device is not originally large, it may be sufficient without strictly managing the clock difference between transmission and reception. . For example, in the case of an application that transmits video data having a frame rate of about 5 fps (frames / second), the frame interval is about 200 msec. In this case, an error of about several tens of msec can be allowed. In such an application, clock correction can be performed by a simplified means that does not update the coefficient Cr.
[0040]
Therefore, the data output clock value tR is set to
tR = (tr−tr0) + TS0 ... (8)
As in the above case, the moving average value of the clock error between transmission and reception is obtained, the reliability is determined, and the moving average value AdSR with high reliability is determined.aIs obtained,
tR = (tr−tra) + Da ... (9)
As described above, the data output clock value tR can be corrected. That is, the coefficient Cr remains at the initial value of 1.0, and at the time of clock correction:a= AdSRa+ TRaIs added.
[0041]
FIG. 6 shows how the clock value for data output is followed by the clock correction means described above. That is, tr0TS in0= TR0And the receiving side clock value traMoving average value AdSRaIs highly reliable and performs clock correction. In this case, since the coefficient Cr is not corrected, the characteristics (slope) of the transmission-side clock value tS indicated by the dotted line and the data output clock value tR indicated by the solid line are generally different, and the moving average value AdSR and The reliability is determined using the standard deviation σ, and clock correction is performed as indicated by the solid arrow.
[0042]
In addition, the transmission side clock value indicates a case where it is assumed that the process of sampling transmission data and the transmission process are performed in parallel at the same time, but in an actual system, after being temporarily stored in a recording medium, In some cases, the data is transmitted to the receiving terminal device via the packet communication network. FIG. 7 shows a case where the present invention is applied to the system as described above. In the figure, 31 is a transmission side terminal device, 32 is a transmission data creation device, 33 is a recording medium such as a magnetic disk device or a magneto-optical disk device, 34 is a data sampling unit, 35 is a data processing unit, and 36 is sampling. A clock generation unit, 37 is a packetization unit, 38 is a packet transmission unit, and 39 is a transmission side clock generation unit.
[0043]
The transmission data creation device 32 samples the input data with the sampling clock signal from the sampling
[0044]
The transmission-side terminal device 31 uses the above-mentioned transmission-side clock value based on the clock value added to the packet read from the recording medium 33 by the
[0045]
For example, the
[0046]
In the embodiment shown in FIG. 7 described above, the transmission data creating device 32 forms a packet, temporarily stores it in the recording medium 33, and transmits the packet from the transmission side terminal device 31. The terminal device 31 is provided with a packetizing unit 37, the transmission data creating device 32 stores data with a clock value added to the recording medium 33 from the
[0047]
Further, in the transmission side terminal device, there is a case where synchronization between the transmission side clock value added to the packet and the transmission clock cannot be maintained. For example, in FIG. 7, in a system in which the recording medium 33 is accessed from a plurality of transmission side terminal devices and data is read and transmitted, access to the recording medium 33 is congested and data reading is performed at the transmission timing. In some cases, it may not be in time. If such a situation occurs frequently, the receiving side observes that the fluctuation of the packet transmission delay is large. In that case, there arises a problem that the reliability is determined to be low in the determination of the reliability using the difference between the clock values, the moving average value, and the variance.
[0048]
In order to avoid this, flag information indicating whether the transmission side clock value added to the packet is valid or invalid is transmitted to the transmission side of the packet, and the reception side terminal device detects the flag information. Can be provided in the packet receiver 14 (see FIG. 2), and the clock correction can be performed only when the flag information indicates validity. Specifically, when synchronization flag information is used as flag information and packets are transmitted at a normal transmission timing, the synchronization flag information indicates that synchronization is established, and data reading is not in time for the transmission timing. In such a case, synchronization flag information indicating that synchronization is not achieved is added to each packet and transmitted. Therefore, in the receiving side terminal device, when this synchronization flag information is detected to indicate that synchronization is not established, the transmitting side clock value added to this packet is not used. That is, it is possible to prevent clock correction.
[0049]
In the packet communication system, a system provided with an apparatus for relaying and transferring packets such as a router is also known. This packet relay device such as a router generally includes a reception buffer or the like, and transmission delay fluctuations due to packet relay processing generally occur. For example, as shown in FIG. 8, in a system that transmits and receives packets between a receiving
[0050]
In such a system, a method (a) in which the
[0051]
In the case of the method (a) in which the
[0052]
Therefore, based on the transmission side clock value added to the packet, the timing of transmission from the
[0053]
Further, in the case of the method (b) for keeping the transmission delay time r2 constant, the reception buffer is used to send the packet received from the transmission
[0054]
Further, the attribute information is added to the packet for transmission, and the receiving side terminal device extracts this attribute information in the packet receiving unit 14 (see FIG. 2). For example, when the transmitting terminal device transmits audio data synchronized with the video data, the receiving side adds this attribute information to the packet when the attribute information is either audio data or video data, for example. The transmitted clock value is extracted and used for the correction process of the data output clock value. In the other case, the transmitted clock value added to the packet is used only for the purpose of measuring the data output timing. Thereby, for example, in the case of transmitting data by performing compression encoding by software on the transmission side, the processing time varies greatly due to the contents of the input data and the encoding method, and When the transmission processing time of either audio or video is known to have less variation, detection of the clock difference between transmission and reception is made by using only the transmission side clock value associated with the data with less variation. Accuracy can be improved.
[0055]
(Supplementary Note 1) A transmission-side clock value formed based on a sampling clock signal is added to a packet as time information when data is packetized from the transmission-side terminal device, and the reception-side terminal device that receives the packet transmits the packet. In the packet communication system having a data output unit that outputs data with clock synchronization based on the transmission side clock value, the reception side terminal device adds the transmission side clock value added to the received packet. And a clock difference calculating means for calculating a difference between the data output clock value formed based on the receiving side clock signal, and a moving average value for calculating a moving average value for a predetermined period from the difference from the clock difference calculating means. A calculation means, a reliability determination means for determining the reliability of the moving average value from the moving average value calculation means, and a reliability by the reliability determination means Packet communication system characterized in that a data output clock generating means for correcting the high applied to the moving average value the data output unit on the basis of the data output clock value.
[0056]
(Supplementary Note 2) The reliability determination means obtains the variance of the difference obtained by the moving average value calculation means by the moving average value calculation means, determines that the reliability is high when the variance is small, and generates the
(Supplementary Note 3) The data output clock generation means outputs a data output clock value to be applied to the data output unit by multiplying by a coefficient, and the clock correction when the reliability is high from the reliability determination means The packet communication system according to
(Supplementary Note 4) The receiving side terminal device detects a flag information indicating whether a transmitting side clock value added to the packet from the transmitting side terminal device is valid or invalid, and the flag detected by the means is valid. The packet communication according to any one of
[0057]
(Supplementary Note 5) In a packet communication system for reading and transmitting a packet after storing the packet with the transmission side clock value added to the recording medium, the transmission side terminal device for reading and transmitting the packet from the recording medium, The packet is transmitted at a transmission timing in which the transmission side clock value added to the packet is associated with the clock value at the time of packet transmission of the transmission side terminal device, and the transmission timing of the packet deviates from a predetermined timing. A packet communication system comprising means for adding flag information indicating that the packet is not synchronized during transmission.
(Additional remark 6) In the packet communication system which transmits to the receiving side terminal device via the packet relay device which relays and transmits the packet which added the transmitting side clock value from the transmitting side terminal device, the said packet relay device is said transmission The data output clock value is corrected so as to be synchronized with the side clock value, and when the packet cannot be transmitted at a predetermined timing, flag information indicating invalidity of the transmission side clock value of the packet is added and transmitted. A packet communication system characterized by the above.
(Appendix 7) In a packet communication system that transmits a packet with a transmission side clock value from a transmission side terminal device to a reception side terminal device via a packet relay device that relays and transmits the packet, the packet relay device receives the packet A packet comprising a configuration in which a packet is transmitted at a transmission timing after a certain delay, and flag information indicating invalidity of a transmission side clock value of the packet is added and transmitted when the transmission timing is shifted Communications system.
(Appendix 8) Whether the receiving terminal device detects the attribute information of the received packet and corrects the data output clock value based on the transmitting clock value added to the packet according to the attribute information. The packet communication system according to any one of
[0058]
【The invention's effect】
As described above, the present invention allows packets to be obtained by hardware such as a PC (personal computer) or WS (workstation) that can acquire time information in units of 1 msec and software that operates on an OS (operation system). Even when video data is packetized and transmitted, the data output clock value is corrected based on the transmission side clock value added to the packet formed by sampling, and transmission and reception are performed. By synchronizing the clocks, it is possible to receive and output data at a predetermined timing. Therefore, since the data can be output at a predetermined timing without causing overflow or underflow of the reception buffer of the receiving terminal device, there is an advantage that the quality of the received data can be maintained. In addition, by using flag information indicating validity / invalidity of the transmission side clock value such as synchronization flag information, it is possible to notify the reception side when the transmission side cannot send a packet at normal timing. Only possible.
[Brief description of the drawings]
FIG. 1 is a diagram illustrating the principle of the present invention.
FIG. 2 is an explanatory diagram of relevant parts of an embodiment of the present invention.
FIG. 3 is an explanatory diagram of necessity of clock correction.
FIG. 4 is an explanatory diagram of necessity of clock correction.
FIG. 5 is a correction explanatory diagram of a data output clock value according to the embodiment of this invention;
FIG. 6 is a simplified correction explanatory diagram of a data output clock value according to the embodiment of this invention;
FIG. 7 is an explanatory diagram of relevant parts of another embodiment of the present invention.
FIG. 8 is an explanatory diagram of a main part of still another embodiment of the present invention.
FIG. 9 is an explanatory diagram of a packet communication system.
FIG. 10 is an explanatory diagram of clock synchronization of a conventional example.
[Explanation of symbols]
1 Receiving terminal device
2 Sending terminal device
3 Packet communication network
4 Packet reception means
5 Clock difference calculation means
6 Moving average value calculation means
7 Reliability judgment means
8 Data output clock generation means
9 Data output part
Claims (5)
前記受信側端末装置は、受信したパケットに付加されている前記送信側クロック値と、受信側クロック信号を基に形成したデータ出力用クロック値との差分を算出するクロック差分算出手段と、
該クロック差分算出手段からの差分値の所定の期間についての移動平均値を算出する移動平均値算出手段と、
該移動平均値算出手段からの移動平均値の信頼度を判定する信頼度判定手段と、
該信頼度判定手段による信頼度の高い前記移動平均値を基に前記データ出力部に加えるデータ出力用クロック値を補正するデータ出力クロック生成手段と
を備えたことを特徴とするパケット通信システム。A transmission-side clock value formed based on a sampling clock signal is added to the packet as time information when data is packetized from the transmission-side terminal device, and the reception-side terminal device that has received the packet receives the packet. In a packet communication system having a data output unit for outputting data in synchronization with a clock based on a clock value,
The reception side terminal device includes a clock difference calculation means for calculating a difference between the transmission side clock value added to the received packet and a data output clock value formed based on the reception side clock signal;
A moving average value calculating means for calculating a moving average value for a predetermined period of the difference value from the clock difference calculating means;
Reliability determination means for determining the reliability of the moving average value from the moving average value calculation means;
A packet communication system comprising: data output clock generation means for correcting a data output clock value applied to the data output unit based on the moving average value with high reliability by the reliability determination means.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2000323849A JP3837693B2 (en) | 2000-10-24 | 2000-10-24 | Packet communication system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2000323849A JP3837693B2 (en) | 2000-10-24 | 2000-10-24 | Packet communication system |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2002135299A JP2002135299A (en) | 2002-05-10 |
JP3837693B2 true JP3837693B2 (en) | 2006-10-25 |
Family
ID=18801465
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2000323849A Expired - Fee Related JP3837693B2 (en) | 2000-10-24 | 2000-10-24 | Packet communication system |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3837693B2 (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR100475435B1 (en) * | 2002-09-27 | 2005-03-10 | 삼성전자주식회사 | Method for correcting clock of processor |
JP4955024B2 (en) * | 2009-02-12 | 2012-06-20 | 日本電信電話株式会社 | Reference clock frequency adjusting method and relay device |
JP5441650B2 (en) * | 2009-12-07 | 2014-03-12 | 三菱電機株式会社 | Media receiver |
JP5958008B2 (en) * | 2012-03-26 | 2016-07-27 | 住友電気工業株式会社 | Stream processing apparatus, stream processing method, and stream processing program |
-
2000
- 2000-10-24 JP JP2000323849A patent/JP3837693B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2002135299A (en) | 2002-05-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101160900B (en) | Stream synchronization method of multimedia live transmission in packet network and device thereof | |
US7162315B2 (en) | Digital audio compensation | |
US7606928B2 (en) | Method and device for controlling receiver buffer fullness level in multimedia streaming | |
US8873928B2 (en) | Audio and video synchronization apparatus and method in wireless communication network | |
JP4361561B2 (en) | Data receiving apparatus and data receiving method | |
US7724780B2 (en) | Synchronization of one or more source RTP streams at multiple receiver destinations | |
CN106792073B (en) | Method, playback equipment and the system that the audio, video data of striding equipment is played simultaneously | |
US5864678A (en) | System for detecting and reporting data flow imbalance between computers using grab rate outflow rate arrival rate and play rate | |
CN113286184B (en) | Lip synchronization method for respectively playing audio and video on different devices | |
JP4782973B2 (en) | Audio and video signal synchronization | |
US20130091528A1 (en) | Video reproduction system, receive terminal, home gateway device, and quality control system | |
EP1229690A1 (en) | Data stream processing device and method, and program storage medium | |
KR20050085344A (en) | Synchronization of signals | |
JP3837693B2 (en) | Packet communication system | |
TWI431986B (en) | Information processing apparatus and method, and program | |
US20160261897A1 (en) | Apparatus and method for managing mmt buffer model using reception quality feedback | |
JP4042396B2 (en) | Data communication system, data transmission apparatus, data reception apparatus and method, and computer program | |
JP4553537B2 (en) | Information transmission method in telecommunication system | |
JP3499818B2 (en) | Time stamp offset adjusting method and packet transmission device using the same | |
US20060114944A1 (en) | Apparatus and method for measuring a delay in the transmission of multimedia data in a multimedia system | |
JP3906678B2 (en) | Data communication system, data transmission apparatus, data reception apparatus and method, and computer program | |
KR101108888B1 (en) | Method and device for measuring iptv service quality | |
JP2008028599A (en) | Reproduction method of multimedia data, and main communication apparatus, sub-communication apparatus, and program for execution of the method | |
US20030053795A1 (en) | Data stream processing device and method and program storage medium | |
JP2017204700A (en) | Image reproduction apparatus, image reproduction method, and image reproduction program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20041208 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20060622 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20060704 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20060720 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090811 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100811 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110811 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120811 Year of fee payment: 6 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120811 Year of fee payment: 6 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130811 Year of fee payment: 7 |
|
LAPS | Cancellation because of no payment of annual fees |