JP2016054437A - Time signal system and program - Google Patents
Time signal system and program Download PDFInfo
- Publication number
- JP2016054437A JP2016054437A JP2014180074A JP2014180074A JP2016054437A JP 2016054437 A JP2016054437 A JP 2016054437A JP 2014180074 A JP2014180074 A JP 2014180074A JP 2014180074 A JP2014180074 A JP 2014180074A JP 2016054437 A JP2016054437 A JP 2016054437A
- Authority
- JP
- Japan
- Prior art keywords
- time
- output
- unit
- signal
- self
- 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
Links
Images
Abstract
Description
本発明は、通信端末に時刻情報の提供を行う時報システム及びプログラムに関する。 The present invention relates to a time signal system and a program for providing time information to a communication terminal.
正確な現在時刻を知る方法として、例えば電話サービスの1つである時報アナウンスを聞くことが知られている。この場合、ユーザは、電話端末を用いて、音声によって現在時刻を認識する。他の方法としては、ユーザは、インターネットを用いてパソコンなどの通信端末の画面に表示させた文字によって、現在時刻を知ることも可能である。音声や文字などによって端末に時刻を提供する時報システムには、正確な時刻情報を有することが求められる。 As a method of knowing the correct current time, for example, it is known to listen to a time signal announcement which is one of telephone services. In this case, the user recognizes the current time by voice using a telephone terminal. As another method, the user can know the current time by using characters displayed on the screen of a communication terminal such as a personal computer using the Internet. A time signal system that provides time to a terminal by voice or text is required to have accurate time information.
特許文献1には、外部装置から時刻情報及びうるう秒が挿入されることを示すフラグ情報を受信する通信部と、通信部が受信した時刻情報に基づいてタイムスタンプを生成する時計部と、時計部が生成するタイムスタンプを、時間が逆行することなく連続して増加するタイムスタンプに補正する補正部と、を有する端末装置が開示されている。
時報システムは、そのシステム内の時刻に基づいて時報情報を提供する。また、時報システムは、例えばNTP(Network Time Protocol)サーバとの通信を行うことによって、システム内の時刻が協定世界時(UTC:Coordinated Universal Time)に同期するように構成されている。具体的には、時報システムは、システム内の時刻(以下、システム時刻と称する)と協定世界時とを定期的に比較する。そして、システム時刻及び協定世界時間にズレが生じた場合、時報システムは、システム時刻を協定世界時に合わせる動作を行う。 The time signal system provides time signal information based on the time in the system. The time signal system is configured such that the time in the system is synchronized with Coordinated Universal Time (UTC) by communicating with, for example, an NTP (Network Time Protocol) server. Specifically, the time signal system periodically compares the time in the system (hereinafter referred to as system time) with the coordinated universal time. When the system time and the coordinated universal time are shifted, the time signal system performs an operation for adjusting the system time to the coordinated universal time.
一方、システムが外部のNTPサーバとの時刻同期を行うモードとして、stepモードとslewモードが用いられる。stepモードはシステム内の時刻を瞬時に協定世界時に同期させるモードであり、slewモードはシステム内の時刻を徐々に(時間をかけて)協定世界時に同期させるモードである。 On the other hand, step mode and slew mode are used as modes in which the system performs time synchronization with an external NTP server. The step mode is a mode in which the time in the system is instantaneously synchronized with the coordinated universal time, and the slew mode is a mode in which the time in the system is gradually (over time) synchronized with the coordinated universal time.
時報システムなどのサーバシステムは、データベースのトランザクションが記録されるアプリケーションなど、各処理の前後関係がシステム時刻から正確に把握される必要があるアプリケーションが実装されている場合、時刻の逆行又は大幅な変更を伴うstepモードによる時刻同期を行うことができない。従って、この場合、サーバシステムは、slewモードでの時刻同期を行うこととなる。すなわち、時刻同期が完了するまでに一定の時間を要することとなる。 The server system such as a time signal system has a time reversal or significant change when an application that needs to accurately grasp the context of each process from the system time, such as an application that records database transactions, is implemented. It is impossible to perform time synchronization in the step mode accompanied with. Therefore, in this case, the server system performs time synchronization in the slew mode. That is, a certain time is required until the time synchronization is completed.
ここで、協定世界時にうるう秒の挿入又は削除が生じた場合を考える。うるう秒の挿入又は削除が生じた場合、時報システムがslewモードでの時刻同期を行うと、一時的にシステム時刻と協定世界時との間に時刻のズレが生ずる場合がある。この場合、システム時刻は、1秒程度協定世界時に対してずれてしまう。従って、正確に現在時刻の提供を行うことが出来ない場合がある。 Here, let us consider a case where a leap second is inserted or deleted in Coordinated Universal Time. When a leap second is inserted or deleted, if the time signal system synchronizes the time in the slew mode, there may be a time lag between the system time and Coordinated Universal Time. In this case, the system time is shifted from the Coordinated Universal Time by about 1 second. Therefore, there are cases where the current time cannot be provided accurately.
本発明は上記した点に鑑みてなされたものであり、slewモードによる時刻同期を行い、うるう秒の挿入又は削除が行われた場合でも正確に時報を提供することが可能な時報システム及びプログラムを提供することを目的としている。 The present invention has been made in view of the above points, and provides a time signal system and program capable of accurately providing a time signal even when a leap second is inserted or deleted by performing time synchronization in the slew mode. It is intended to provide.
本発明による時報システムは、NTPサーバから供給される基準時刻に基づいてシステム時刻を生成し、うるう秒によって基準時刻が調整された場合、slewモードによってシステム時刻の基準時刻との同期を行うように構成されたシステム時刻生成部と、システム時刻とは無関係に刻時を行う自走時刻を生成する自走時刻生成部と、時報を出力する出力部と、うるう秒によって基準時刻が調整される調整予定時刻を受信し、調整予定時刻に基づいてシステム時刻生成部がシステム時刻の基準時刻との同期を開始する同期開始時刻を算出する演算部と、システム時刻に基づいて出力部に時報の出力時刻を提供し、同期開始時刻よりも後の時刻においては自走時刻に基づいて出力部に時報の出力時刻を提供するように構成された出力制御部と、を有することを特徴としている。 The time signal system according to the present invention generates the system time based on the reference time supplied from the NTP server, and synchronizes the system time with the reference time in the slew mode when the reference time is adjusted by the leap second. A configured system time generation unit, a self-running time generation unit that generates a self-running time that clocks regardless of the system time, an output unit that outputs a time signal, and an adjustment in which the reference time is adjusted by leap seconds A calculation unit that receives the scheduled time and calculates a synchronization start time at which the system time generation unit starts synchronization with the reference time of the system time based on the scheduled adjustment time, and an output time of the time signal to the output unit based on the system time An output control unit configured to provide a time signal output time to the output unit based on the self-running time at a time later than the synchronization start time; I am characterized by having a.
また、本発明によるプログラムは、サーバを、NTPサーバから供給される基準時刻に基づいてシステム時刻を生成し、うるう秒によって基準時刻が調整された場合、slewモードによってシステム時刻の基準時刻との同期を行うように構成されたシステム時刻生成部と、システム時刻とは無関係に刻時を行う自走時刻を生成する自走時刻生成部と、時報を出力する出力部と、うるう秒によって基準時刻が調整される調整予定時刻を受信し、調整予定時刻に基づいてシステム時刻生成部がシステム時刻の基準時刻との同期を開始する同期開始時刻を算出する演算部と、システム時刻に基づいて出力部に時報の出力時刻を提供し、同期開始時刻よりも後の時刻においては自走時刻に基づいて出力部に時報の出力時刻を提供するように構成された出力制御部と、を有する時報システムとして機能させることを特徴としている。 Further, the program according to the present invention generates a system time based on the reference time supplied from the NTP server, and synchronizes the system time with the reference time in the slew mode when the reference time is adjusted by the leap second. The reference time is determined by the leap second, the system time generation unit configured to perform the operation, the self-running time generation unit that generates a self-running time that performs timekeeping regardless of the system time, the output unit that outputs a time signal, and the leap second. A calculation unit that receives the scheduled adjustment time to be adjusted and calculates a synchronization start time at which the system time generation unit starts synchronization with the reference time of the system time based on the scheduled adjustment time, and an output unit based on the system time The time signal output time is provided, and at the time after the synchronization start time, the time signal output time is provided to the output section based on the self-running time. It is characterized in that to function as a time signal system and an output control unit.
以下、本発明の実施例について詳細に説明する。 Examples of the present invention will be described in detail below.
図1は、本発明の実施例1にかかる時報システム10の構成を示すブロック図である。時報システム10は、1つ以上(n個)の通信端末(以下、単に端末と称する)T1、T2、・・・、Tnに対して時報TSを出力する出力部OPを有している。n個の端末T1、T2、・・・、Tnの各々は、例えば、電話機、ラジオ、スマートフォン、タブレット及びパーソナルコンピュータなどである。
FIG. 1 is a block diagram illustrating a configuration of a
以下においては、時報システム10が、端末T1、T2、・・・、Tnのうちのいずれか1つの端末として、端末Tj(jは1≦j≦nの関係を満たす整数)に時報TSを提供する場合について説明する。例えば端末Tjが電話機である場合、出力部OPは、端末Tjに対して音声情報として時報TSを出力する。また、例えば端末Tjがタブレットである場合、出力部OPは、端末Tjに対して文字や画像、映像などの表示情報として時報TSを出力する。
In the following, the
時報システム10は、NTP(Network Time Protocol)サーバNSから供給される基準時刻RCに基づいてシステム内の時刻であるシステム時刻SCを生成するシステム時刻生成部11を有している。具体的には、時報システム10は、NTPサーバNSから基準時刻RCを取得するNTPクライアントNCを有し、NTPクライアントNCは取得した基準時刻RCをシステム時刻生成部11に供給する。
The
なお、図示していないが、NTPサーバNSは、さらに上位に配備されたNTPサーバとの時刻同期を行っている。また、最上位のNTPサーバは、GPSや標準電波、原子時計など、協定世界時(UTC:Coordinated Universal Time)の時刻に準じた正確な時刻源に直結されている。システム時刻生成部11は、このNTPサーバNSから供給される基準時刻RCに基づいて時報システム10全体の時刻としてシステム時刻SCを生成する。
Although not shown, the NTP server NS performs time synchronization with an NTP server provided at a higher level. The top NTP server is directly connected to an accurate time source according to UTC (Coordinated Universal Time) time, such as GPS, standard radio wave, and atomic clock. The system
システム時刻生成部11は、システム時刻SCと基準時刻RCとの間に時刻のズレが生じた場合、slewモードによってシステム時刻SCの基準時刻RCとの同期を行うように構成されている。具体的には、システム時刻生成部11は、定期的にシステム時刻SC及び基準時刻RCの時刻比較を行う。そして、システム時刻生成部11は、両者に一定の差異が生じた場合、slewモードによって時刻合わせを行う機能を有している。
The
例えば、NTPサーバNSがうるう秒の挿入又は削除によって基準時刻RCの調整を行った場合、システム時刻SCと基準時刻RCとの間に1秒のズレが生ずる。システム時刻生成部11は、うるう秒によって基準時刻RCが調整された場合、slewモードによってシステム時刻SCの基準時刻RCとの同期を行うように構成されている。
For example, when the NTP server NS adjusts the reference time RC by inserting or deleting a leap second, a one-second gap occurs between the system time SC and the reference time RC. The
時報システム10は、システム時刻SCを用いて情報処理を行い、その処理情報を生成及び記憶するアプリケーションAPを有している。例えばアプリケーションAPは、時報システム10のトランザクションのログを生成及び記憶するデータベースアプリケーションである。アプリケーションAPは、システム時刻SCに基づいてトランザクションを実行し、そのログを生成して記憶する。従って、時刻の逆行などを回避するために、時報システム10は、システム時刻SCの同期をstepモードで行うようには構成されていない。従って、システム時刻生成部11は、システム時刻SCの基準時刻RCとの同期をslewモードによって行う。
The
時報システム10は、システム時刻SCとは無関係に刻時する自走時刻LCを生成する自走時刻生成部12を有している。自走時刻生成部12は、独自の時刻生成を行う。具体的には、システム時刻生成部11とは無関係に、すなわち自走的に時刻のカウントを行う。
The
時報システム10は、うるう秒によって基準時刻RCが調整される調整予定時刻ATを受信し、調整予定時刻ATに基づいてシステム時刻生成部11がシステム時刻SCの基準時刻RCとの同期を開始する同期開始時刻SBTを算出する演算部13を有している。
The
具体的には、演算部13は、外部のうるう秒情報入力装置INから、調整予定時刻AT、すなわちうるう秒が挿入又は削除され、NTPサーバNSが基準時刻RCを調整する予定時刻が入力される。また、うるう秒情報入力装置INは、基準時刻RCがうるう秒の挿入によって調整されるか、又はうるう秒の削除によって調整されるかを示す情報、すなわち基準時刻RCの調整方向ADを示す情報を演算部13に入力する。演算部13は、この調整予定時刻AT及び調整方向ADに基づいて、システム時刻生成部11がシステム時刻SCの基準時刻RCとの時刻同期を開始する同期開始時刻SBTを算出する。
Specifically, the
また、演算部13は、システム時刻生成部11がシステム時刻SCの基準時刻RCとの同期を終了する同期終了時刻SETを算出する。具体的には、演算部13は、システム時刻生成部11の同期開始時刻SBT、同期開始時における時刻のズレ及び予め設定されている同期条件(単位時間当たりの調整幅や調整実行回数など)に基づいて、同期終了時刻SETを算出する。演算部13は、算出した同期開始時刻SBT及び同期終了時刻SETを出力する。
In addition, the
時報システム10は、出力部OPが時報TSを出力する時刻(出力時刻)OTを出力部OPに提供する出力制御部14を有している。出力部OPは、出力制御部14から出力時刻OTを受信し、出力時刻OTを受信したタイミングで、出力時刻OTを示す出力データDBを取り出し、時報TSとして出力する。端末Tjは、この時報TSを受信する。
The
出力制御部14は、通常時、すなわち調整予定時刻ATから所定時間離れた時刻においては、システム時刻SCに基づいて出力部OPに時報TSの出力時刻OTを提供する(以下、システム時刻参照モードと称する)。また、出力制御部14は、同期開始時刻SBTよりも後の時刻においては、自走時刻LCに基づいて出力部OPに時報TSの出力時刻OTを提供する(以下、自走時刻参照モードと称する)。換言すれば、うるう秒の挿入又は削除が発生すると、出力制御部14は、システム時刻SCの参照を停止し、システム時刻SCではなく自走時刻LCを参照して時報TSの出力時刻OTを提供する。
The
また、出力制御部14は、同期終了時刻SETまでは自走時刻参照モードで出力時刻OTを生成し、出力時刻OTを出力部OPに供給する。すなわち、同期開始時刻SBTから同期終了時刻SETまでの間の時刻において、出力制御部14は自走時刻参照モードで出力部OPの時報TSの出力を制御するように構成されている。
Further, the
図2(a)は、出力制御部14の詳細構成を示すブロック図である。図2(b)は、出力制御部14の動作例を時系列で模式的に示す図である。出力制御部14は、システム時刻参照モードと自走時刻参照モードとを切替える切替部14Aを有している。以下においては、切替部14Aがシステム時刻参照モードから自走時刻参照モードに切替えることをモード切替と称し、自走時刻参照モードからシステム時刻参照モードに切替えることをモード切戻と称する。
FIG. 2A is a block diagram illustrating a detailed configuration of the
出力制御部14は、モード切戻時におけるシステム時刻SCと自走時刻LCとを比較して両時刻の誤差dを算出する比較部14Bを有している。また、出力制御部14は、比較部14Bによって算出された誤差dが許容誤差を超えている場合、システム時刻SCに基づく時報TSの出力時刻OTを調整した調整出力時刻AOTを出力時刻OTとして出力部OPに提供する調整部14Cを有している。
The
図2(b)を用いて、うるう秒による基準時刻RCの調整予定時刻ATの前後における出力制御部14の動作について説明する。まず、出力制御部14は、調整予定時刻AT、すなわちうるう秒の挿入時刻又は削除時刻まではシステム時刻SCを参照して出力時刻OTを出力部OPに提供する。次に、調整予定時刻ATにおいて、うるう秒による基準時刻RCの調整が行われる(タイミングt1)。例えばうるう秒の挿入が行われる場合、タイミングt1では、うるう秒の挿入によって基準時刻RCが1秒遅れることとなる。従って、システム時刻SCは基準時刻RCに対して1秒ずれる。
The operation of the
ここで、システム時刻生成部11はNTPサーバNSに時刻の問合せを行い、システム時刻SCと基準時刻RCとの間に時刻のズレが生じていることを検出する。そして、システム時刻生成部11は、システム時刻SCの基準時刻RCとの同期を開始する(タイミングt2、同期開始時刻SBT)。以後、システム時刻生成部11は、所定期間(同期期間ST)に亘って、slewモードで時刻同期を行う。同期期間STが終了すると、すなわち同期終了時刻SET以降は、システム時刻SCは基準時刻RCに同期される。
Here, the system
一方、演算部13は、既に調整予定時刻AT及び調整方向ADを受信しており、これに基づいて同期開始時刻SBT及び同期終了時刻SETを算出している。演算部13は、この演算結果、すなわち同期開始時刻SBT及び同期終了時刻SETを出力制御部14に対して出力している。
On the other hand, the
切替部14Aは、同期開始時刻SBTよりも前の時刻であって同期開始時刻SBTに最も近い時報TSの出力時刻OT(タイミングt3)において、システム時刻参照モードから自走時刻参照モードに切替えるように構成されている。すなわち、出力制御部14の切替部14Aは、同期開始時刻SBTの直近における時報TSの出力タイミングt3を契機に、モードの切替を行う。
The
モードの切替後は、出力制御部14は、自走時刻LCに基づいて出力部OPに対して時報TSの出力時刻(出力タイミング)OTを提供する。出力部OPは、出力制御部14から供給された出力時刻OTに基づいて出力データDBから出力対象データを取り出し、当該出力対象データを出力する。なお、モードの切替時には、出力部OPは、うるう秒の挿入又は削除に対応した出力データを出力データDBから取出して時報TSとして出力する。
After the switching of the mode, the
出力制御部14の切替部14Bは、同期終了時刻SETよりも後の時刻において自走時刻参照モードからシステム時刻参照モードに切戻すように構成されている。より具体的には、切替部14Bは、同期終了時刻SETよりも後の時刻であって同期終了時刻SETに最も近い時報TSの出力時刻OT(タイミングt4)において自走時刻参照モードからシステム時刻参照モードに切戻すように構成されている。
The
なお、モード切戻のタイミングは同期終了時刻SETよりも後の時刻であればよいが、自走時刻LCの刻時精度を考慮すると、本実施例のように同期終了時刻SETの直後にモード切戻を行うことが望ましい。 It should be noted that the mode switching timing may be any time after the synchronization end time SET, but considering the clock accuracy of the self-running time LC, the mode switching is immediately after the synchronization end time SET as in this embodiment. It is desirable to make a return.
モードの切戻時、切替部14Aが自走時刻参照モードからシステム時刻参照モードにモードの切戻を行ったタイミングt4において、比較部14Bはシステム時刻SCと自走時刻LCとの比較を行う。すなわち、比較部14Bは、モードの切戻タイミングt4におけるシステム時刻SC及び自走時刻LC間の時刻の誤差dを算出する。
At the time of mode switching, the
調整部14Cは、比較部14Bによって算出された誤差dが所定の許容誤差を超えていると判断した場合、システム時刻SCに基づいた時報TSの出力時刻OTを調整する。例えば5ミリ秒が許容誤差として設定される。具体的には、調整部14Cは、システム時刻SCに基づいた時報TSの出力時刻OTに対し、自走時刻LCとの誤差dを縮める方向に所定時間だけ調整した調整出力時刻AOTを出力部OPに提供する(タイミングt5)。例えば調整出力時刻AOTは誤差dの半分の時間だけ縮めるように調整された時刻であってもよい。
When the
なお、本実施例については調整部14Cが調整出力時刻AOTを1回だけ生成する場合について説明したが、調整部14Cは、複数回に亘って調整出力時刻AOTを出力部OPに提供するように構成されていてもよい。例えば、誤差dが13ミリ秒である場合、具体的には、モード切戻時においてシステム時刻SCが自走時刻LCよりも13ミリ秒遅れている場合を考える。この場合、調整部14Cは、2回の調整を行って徐々に誤差dを縮めていくことが可能である。
In this embodiment, the
具体的には、調整部14Cは、モード切戻直後の出力タイミングである1回目の調整では、システム時刻SCに基づく出力時刻OTに対し、誤差dから5ミリ秒減じた調整出力時刻AOTを提供する。すなわち、調整部14Cは、1回目の調整において出力時刻OTよりも8ミリ秒早いタイミングで出力時刻OTを提供する。同様に、調整部14Cは、2回目の調整で、1回目よりもさらに5ミリ秒だけ誤差dを減じ、出力時刻OTよりも3ミリ秒早い調整出力時刻ATOを提供する。
Specifically, the
上記したように、本実施例における時報システム10は、通常時は協定世界時に対応するシステム時刻SCを参照して時報を出力し、うるう秒によって協定世界時に調整が行われた際にはシステム独自の刻時時刻である自走時刻LCを参照して時報を出力する。従って、時報システムのシステム時刻SCがうるう秒の発生に対してslewモードで時刻同期を行う場合、すなわちstepモードによって即時に時刻同期を行うことができない場合であっても、うるう秒による時刻調整に対応した正確な時報提供を行うことが可能となる。
As described above, the
また、モードの切戻時においてシステム時刻SC及び自走時刻LC間に許容誤差を超える時刻の誤差dが生じた場合でも、出力時刻(すなわち時報の出力タイミング)が間延びしたり欠落したりすることが抑制される。従って、ユーザに違和感を与えることなく、またユーザに認識されることなくモードの切替及び切戻を行うことが可能となる。 In addition, even when an error d that exceeds the allowable error occurs between the system time SC and the free-running time LC when the mode is switched back, the output time (that is, the output timing of the time signal) may be extended or lost. Is suppressed. Therefore, the mode can be switched and switched back without giving the user a sense of incongruity and without being recognized by the user.
図3(a)〜(c)は、自走時刻生成部12が生成する自走時刻LCについて詳細に説明する図である。図3(a)に示すように、自走時刻生成部12は、時報システム10内で生成されたタイマー割込み(クロック割込み)の回数NTIに基づいて自走時刻LCの刻時を行うように構成されている。具体的には、自走時刻生成部12が生成する自走時刻LCは、例えば時報システム10として機能するサーバのハードウェアが周期的に発生させるクロック割込み(タイマー割込み)に基づいて刻時されている。
FIGS. 3A to 3C are diagrams for explaining the self-running time LC generated by the self-running
タイマー割込みの頻度はカーネルにおいて規定されている。例えば100HZの周波数で動作するハードウェアクロックの場合、約10ミリ秒に一回の頻度でタイマー割込みが発生する。自走時刻生成部12は、このタイマー割込みの回数NTIに基づいて刻時(カウント)を行うことによって自走時刻LCを生成する。
The frequency of timer interrupts is specified in the kernel. For example, in the case of a hardware clock that operates at a frequency of 100 Hz, a timer interrupt is generated at a frequency of about once every 10 milliseconds. The free-running
なお、タイマー割込みは、厳密には一定の頻度で発生しない。例えば時報システム10の設置環境や誤差などの要因によって、タイマー割込みはわずかに異なる頻度で発生する。従って、タイマー割込み回数NTIに基づいて刻時を行う場合、自走時刻LCがシステム時刻SCに対して徐々にずれてくることが予想される。従って、自走時刻生成部12は、タイマー割込みの秒間平均回数ANTIを算出し、タイマー割込みの秒間平均回数ANTIに基づいて自走時刻LCの刻時を行うように構成されていることが好ましい。
Strictly speaking, timer interruption does not occur at a constant frequency. For example, timer interruptions occur at slightly different frequencies depending on factors such as the installation environment of the
具体的には、自走時刻生成部12は、所定期間分(例えば24時間分)のタイマー割込み回数NTIに基づいて、その秒間平均回数ANTIを算出する。自走時刻生成部12は、このタイマー割込みの秒間平均回数ANTIに基づいて自走時刻LCを生成する。この場合、ハードウェハの設置条件などに起因する刻時のズレを抑制することが可能となる。
Specifically, the self-running
次に、図3(b)を用いてタイマー割込みの秒間平均回数ANTIの算出例について説明する。なお、以下においては、100HZの周波数で動作するクロックを用いて10秒に相当するタイマー割込み回数NTIを蓄積し、これに基づいてタイマー割込みの秒間平均回数(1秒当たりの平均割込み回数)ANTIを算出する場合について説明する。なお、この場合、10秒は、概ね1,000回のタイマー割込み回数に相当する。 Next, a calculation example of the average number of seconds of timer interruption ANTI will be described with reference to FIG. In the following, the timer interrupt count NTI corresponding to 10 seconds is accumulated using a clock operating at a frequency of 100 Hz, and based on this, the timer interrupt average count (average interrupt count per second) ANTI is calculated. The case of calculating will be described. In this case, 10 seconds corresponds to approximately 1,000 timer interruptions.
まず、10秒毎にタイマー割込み回数NTIを収集する。次に、前回収集したタイマー割込み回数NTIとの差分から10秒間に発生したタイマー割込み回数NTIを算出して記録する。例えば24時間分のデータに基づいたタイマー割込みの秒間平均回数ANTIが99.9847回であった場合、自走時刻生成部12は99.9847回のタイマー割込みを1秒とし、自走時刻LCの刻時を行う。
First, the timer interrupt count NTI is collected every 10 seconds. Next, the timer interrupt count NTI generated in 10 seconds is calculated and recorded from the difference from the previously collected timer interrupt count NTI. For example, when the average number of timer interruptions ANTI based on 24 hours of data is 99.9847, the self-running
なお、自走時刻生成部12は、定期的にタイマー割込みの秒間平均回数ANTIを更新しつつ自走時刻LCの刻時に反映させることが好ましい。すなわち、定期的にタイマー割込み回数NTIの収集及びタイマー割込み秒間平均回数ANTIの算出を行い、最新のタイマー割込みの秒間平均回数ANTIに基づいて自走時刻LCの刻時を行うことが好ましい。また、システム起動直後にうるう秒による調整が行われることを考慮して、自走時刻生成部12は、最新のタイマー割込みの秒間平均回数ANTIを記憶する機能を有していることが好ましい。
In addition, it is preferable that the free-running
次に、図3(c)を用いて、モード切替後における自走時刻生成部12による自走時刻LCの生成について説明する。なお、以下においては、時報システム10が、電話サービスの1つである音声による時報提供サービスを行う場合について説明する。詳細については後述するが、この場合、出力制御部14は、10秒毎に出力時刻OTを出力部OPに提供(通知)し、出力部OPはうるう秒調整時を除いては10秒毎に時報TSを出力する。
Next, generation of the free-running time LC by the free-running
まず、自走時刻生成部12は、モード切替時(図2(b)のタイミングt3)のシステム時刻SCを取得する。図3(c)は、例えばタイミングt3におけるシステム時刻SCが2015年6月30日23時59分50秒である場合について示している。自走時刻生成部12は、これ以降、タイマー割込み回数NTI又はタイマー割込み秒間平均回数ANTIに基づいて自走時刻LCの刻時を行う。
First, the free-running
なお、自走時刻生成部12は、うるう秒の挿入又は削除に対応する刻時を行うように構成されている。例えばうるう秒の挿入が行われる場合、NTPサーバNSは、調整予定時刻AT(図2(b)のタイミングt1)において、2015年6月30日23時59分60秒をカウントする。従って、自走時刻生成部12が刻時する2015年7月1日0時0分0秒は、調整予定時刻ATから1秒後、すなわちモード切替タイミングt3から11秒経過後である。従って、出力制御部14は、モード切替から、タイマー割込み秒間平均回数ANTIが11回発生したタイミングで出力時刻OTを出力部OPに提供する。
The free-running
その後、自走時刻生成部12は、引き続きタイマー割込み秒間平均回数ANTIに基づいて自走時刻LCの刻時を行っていく。また、自走時刻生成部12は、前回の出力時刻OTから10回分のタイマー割込み秒間平均回数ANTIが発生したタイミングを2015年7月1日0時0分10秒とし、これを出力制御部14に供給する。出力制御部14は、2015年7月1日0時0分10秒を出力時刻OTとして出力部OPに提供する。出力制御部14は、これを繰り返して自走時刻参照モードで時報TSの出力時刻OTを出力部OPに提供する。
Thereafter, the free-running
図4は、時報システム10に記憶され、出力部OPが出力する時報TSを示す出力データDBの一例を示す図である。図4に示すように、出力データDBは、背景トーンが記憶された第1のデータベースDB1と、アナウンス音源が記憶された第2のデータベースDB2とからなる。第1のデータベースDB1には、出力時刻OTに応じた4種類の背景トーンが記憶されている。第2のデータベースDB2には、出力時刻OTを知らせるためのアナウンス音源が記憶されている。出力部OPは、出力時刻OTに応じて第1及び第2のデータベースDB1及びDB2から該当データを取り出し、再生する。
FIG. 4 is a diagram illustrating an example of the output data DB stored in the
背景トーン0は、秒針音、予告音及び時報音から構成された再生時間10秒の音源ファイルである。背景トーン0は毎分20秒及び50秒の出力時刻OTにおいて使用される。背景トーン1は、秒針音び時報音から構成された再生時間10秒の音源ファイルである。背景トーン1は、毎分00秒、10秒、30秒及び40秒の出力時刻OTにおいて使用される。
The
背景トーン2は、秒針音、予告音及び時報音から構成され、うるう秒挿入分を含む再生時間11秒の音源ファイルである。背景トーン2は、うるう秒が挿入される直前の再生に使用される。背景トーン3は、秒針音、予告音及び時報音から構成され、うるう秒削除分を含む再生時間9秒の音源ファイルである。背景トーン3は、うるう秒が削除される直前の再生に使用される。
The background tone 2 is a sound source file composed of a second hand sound, a warning sound, and a time signal sound and having a playback time of 11 seconds including a leap second insertion. Background tone 2 is used for playback immediately before the leap second is inserted. The
出力部OPは、例えば出力制御部14から出力時刻OTとして2015年7月1日0時0分0秒を受信された場合、まず、第1のデータベースDB1から背景トーン1を選択する。また、出力部OPは、第2のデータベースDB2のアナウンス音源が出力時刻OTを示すアナウンス音源となるように編集する。そして、出力部OPは、両者を合成して(ミキシングを行って)再生する。
For example, when the output unit OP receives, as output time OT from the
なお、図4に示す出力データDBは一例に過ぎない。また、タブレットなどの通信端末に時報TSを出力する場合は、出力データDBは文字や画像、動画などのファイルから構成されていてもよい。 The output data DB shown in FIG. 4 is merely an example. When outputting the time signal TS to a communication terminal such as a tablet, the output data DB may be composed of files such as characters, images, and moving images.
なお、本実施例においては、時報システム10がNTPクライアントNCを有する場合について説明したが、NTPクライアントNCは時報システム10とは独立して設けられていてもよい。また、システム時刻生成部11がNTPクライアントNCを介してNTPサーバNSから基準時刻RCを取得する場合について説明したが、システム時刻生成部11は、NTPサーバNSと直接通信を行って基準時刻RCを取得してもよい。すなわち、システム時刻生成部11は、NTPサーバNSから基準時刻RCを直接取得するクライアント機能を有していてもよい。
In the present embodiment, the case where the
また、本実施例においては、出力制御部14が同期開始時刻SBTの直前の出力時刻OT(図2(b)におけるタイミングt3)でシステム時刻参照モードから自走時刻参照モードに切替える場合について説明したが、モード切替のタイミングはこれに限定されない。出力制御部14は、同期開始時刻SBTよりも後の時刻において自走時刻参照モードで出力時刻OTの提供動作を行っていればよい。
In the present embodiment, the case where the
なお、タイミングt3でモードの切替を行う場合、うるう秒による基準時刻RCの調整の直前、すなわち同期動作により時刻のズレが生ずる直前のタイミングで自走時刻参照モードに切り替わることとなる。従って、うるう秒による基準時刻RC及びシステム時刻SC間の時刻のズレが時報提供に影響を与えることが防止される。従って、モード切替前後においても正確な時報提供を継続的に行うことが可能となる。 When the mode is switched at the timing t3, the mode is switched to the free-running time reference mode immediately before the adjustment of the reference time RC by leap seconds, that is, immediately before the time shift occurs due to the synchronization operation. Accordingly, it is possible to prevent the time difference between the reference time RC and the system time SC due to leap seconds from affecting the provision of the time signal. Therefore, it is possible to continuously provide an accurate time signal even before and after mode switching.
また、出力制御部14が切替部14A、比較部14B及び調整部14Cを有する場合について説明したが、出力制御部14はこれらを有していなくてもよい。例えば自走時刻生成部12が正確な刻時を行うことが可能な場合は、出力制御部14は比較部14B及び調整部14Cを有していなくてもよい。また、例えば保守者がモード切戻及びモード切戻時における時刻比較及び出力時刻OTの調整を行う場合、出力制御部14は比較部14B及び調整部14Cを有していなくてもよい。また、例えば出力制御部14がモード切替及び切戻機能を有する場合、また、出力制御部14は切替部14Aを有している必要は無い。また、出力制御部14が切替部14Aを有する場合について説明したが、出力部OPが切替部14Aを有していてもよい。
Moreover, although the case where the
本実施例においては、時報システム10が、うるう秒によって基準時刻RCが調整される調整予定時刻ATを受信し、調整予定時刻SBTに基づいてシステム時刻生成部11がシステム時刻SCの基準時刻RCとの同期を開始する同期開始時刻SBTを算出する演算部13と、システム時刻SCに基づいて出力部OPに時報TSの出力時刻OTを提供し、同期開始時刻SBTよりも後の時刻においては自走時刻LCに基づいて出力部OPに時報TSの出力時刻OTを提供するように構成された出力制御部14と、を有する。
In this embodiment, the
従って、うるう秒の挿入又は削除が発生した際には自走時刻LCを参照して時報TSの出力時刻OTを判断する構成となる。従って、slewモードでの時刻同期を行う時報システムにおいて、うるう秒による基準時刻RCの調整が発生した際にも時報の時刻ズレを生じさせることを抑制し、正確に時報を提供することが可能となる。 Therefore, when the leap second is inserted or deleted, the output time OT of the time signal TS is determined with reference to the self-running time LC. Therefore, in the time signal system that performs time synchronization in the slew mode, it is possible to suppress the time deviation of the time signal even when the reference time RC is adjusted by the leap second, and to accurately provide the time signal. Become.
図5は、実施例2に係るプログラムPGの構成を示すブロック図である。図5に示すように、プログラムPGは、サーバSVを時報システム10として機能させる。具体的には、プログラムPGは、サーバSVを、NTPサーバSVから供給される基準時刻RCに基づいてシステム時刻SCを生成し、うるう秒によって基準時刻RCが調整された場合、slewモードによってシステム時刻SCの基準時刻RCとの同期を行うように構成されたシステム時刻生成部11として機能させる。プログラムPGは、サーバSVを、システム時刻SCとは無関係に刻時を行う自走時刻LCを生成する自走時刻生成部12として機能させる。プログラムPGは、サーバSVを、時報TSを出力する出力部OPとして機能させる。
FIG. 5 is a block diagram illustrating the configuration of the program PG according to the second embodiment. As shown in FIG. 5, the program PG causes the server SV to function as the
また、プログラムPGは、サーバSVを、うるう秒によって基準時刻RCが調整される調整予定時刻ATを受信し、調整予定時刻ATに基づいてシステム時刻生成部11がシステム時刻SCの基準時刻RCとの同期を開始する同期開始時刻SBTを算出する演算部13として機能させる。
Further, the program PG receives the adjustment time AT at which the reference time RC is adjusted by the leap second from the server SV, and the
また、プログラムPGは、サーバSVを、システム時刻SCに基づいて出力部OPに時報TSの出力時刻OTを提供し、同期開始時刻SBTよりも後の時刻においては自走時刻LCに基づいて出力部OPに時報TSの出力時刻OTを提供するように構成された出力制御部14として機能させる。
Further, the program PG provides the output time OT of the time signal TS to the output unit OP based on the system time SC, and the output unit based on the self-running time LC at a time later than the synchronization start time SBT. The OP is made to function as the
本実施例においては、プログラムPGが、サーバSVを実施例1に係る時報システム10として機能させる。すなわち、プログラムPGがインストールされたサーバSVは時報システム10として動作する。従って、slewモードによってシステム内の時刻合わせを行うサーバにプログラムPGをインストールすることで容易に実施可能である。従って、新たにハードウェアを用意することなく正確な時報提供を行う時報システムを構成することが可能である。
In the present embodiment, the program PG causes the server SV to function as the
10 時報システム
OP 出力部
11 システム時刻生成部
12 自走時刻生成部
13 演算部
14 出力制御部
14A 切替部
14B 比較部
14C 調整部
DESCRIPTION OF
Claims (8)
前記システム時刻とは無関係に刻時を行う自走時刻を生成する自走時刻生成部と、
時報を出力する出力部と、
前記うるう秒によって前記基準時刻が調整される調整予定時刻を受信し、前記調整予定時刻に基づいて前記システム時刻生成部が前記システム時刻の前記基準時刻との同期を開始する同期開始時刻を算出する演算部と、
前記システム時刻に基づいて前記出力部に前記時報の出力時刻を提供し、前記同期開始時刻よりも後の時刻においては前記自走時刻に基づいて前記出力部に前記時報の出力時刻を提供するように構成された出力制御部と、を有することを特徴とする時報システム。 A system configured to generate a system time based on a reference time supplied from an NTP server, and to synchronize the system time with the reference time by a slew mode when the reference time is adjusted by a leap second A time generation unit;
A self-propelled time generation unit that generates a self-propelled time for performing timekeeping regardless of the system time;
An output unit for outputting a time signal;
The scheduled adjustment time in which the reference time is adjusted by the leap second is received, and the system time generation unit calculates a synchronization start time for starting synchronization of the system time with the reference time based on the scheduled adjustment time. An arithmetic unit;
The output time of the time signal is provided to the output unit based on the system time, and the output time of the time signal is provided to the output unit based on the self-running time at a time later than the synchronization start time. A time signal system comprising: an output control unit configured as described above.
前記切替部は、前記同期開始時刻よりも前の時刻であって前記同期開始時刻に最も近い前記時報の出力時刻において、前記システム時刻参照モードから前記自走時刻参照モードに切替えるように構成されていることを特徴とする請求項1に記載の時報システム。 The output control unit includes a system time reference mode in which the output time of the time signal is provided to the output unit based on the system time, and an output time of the time signal to the output unit based on the self-running time. It has a switching part that switches between running time reference mode,
The switching unit is configured to switch from the system time reference mode to the free-running time reference mode at an output time of the time signal that is earlier than the synchronization start time and closest to the synchronization start time. The time signal system according to claim 1, wherein:
前記切替部は、前記同期終了時刻よりも後の時刻において、前記自走時刻参照モードから前記システム時刻参照モードに切戻すように構成されていることを特徴とする請求項2に記載の時報システム。 The calculation unit calculates a synchronization end time at which the system time generation unit ends synchronization of the system time with the reference time,
The time signal system according to claim 2, wherein the switching unit is configured to switch back from the self-running time reference mode to the system time reference mode at a time later than the synchronization end time. .
NTPサーバから供給される基準時刻に基づいてシステム時刻を生成し、うるう秒によって前記基準時刻が調整された場合、slewモードによって前記システム時刻の前記基準時刻との同期を行うように構成されたシステム時刻生成部と、
前記システム時刻とは無関係に刻時を行う自走時刻を生成する自走時刻生成部と、
時報を出力する出力部と、
前記うるう秒によって前記基準時刻が調整される調整予定時刻を受信し、前記調整予定時刻に基づいて前記システム時刻生成部が前記システム時刻の前記基準時刻との同期を開始する同期開始時刻を算出する演算部と、
前記システム時刻に基づいて前記出力部に前記時報の出力時刻を提供し、前記同期開始時刻よりも後の時刻においては前記自走時刻に基づいて前記出力部に前記時報の出力時刻を提供するように構成された出力制御部と、を有する時報システムとして機能させることを特徴とするプログラム。 Server
A system configured to generate a system time based on a reference time supplied from an NTP server, and to synchronize the system time with the reference time by a slew mode when the reference time is adjusted by a leap second A time generation unit;
A self-propelled time generation unit that generates a self-propelled time for performing timekeeping regardless of the system time;
An output unit for outputting a time signal;
The scheduled adjustment time in which the reference time is adjusted by the leap second is received, and the system time generation unit calculates a synchronization start time for starting synchronization of the system time with the reference time based on the scheduled adjustment time. An arithmetic unit;
The output time of the time signal is provided to the output unit based on the system time, and the output time of the time signal is provided to the output unit based on the self-running time at a time later than the synchronization start time. And an output control unit configured as described above, to function as a time signal system.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2014180074A JP6476666B2 (en) | 2014-09-04 | 2014-09-04 | Time report system and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2014180074A JP6476666B2 (en) | 2014-09-04 | 2014-09-04 | Time report system and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2016054437A true JP2016054437A (en) | 2016-04-14 |
JP6476666B2 JP6476666B2 (en) | 2019-03-06 |
Family
ID=55745356
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2014180074A Active JP6476666B2 (en) | 2014-09-04 | 2014-09-04 | Time report system and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6476666B2 (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2020074570A (en) * | 2015-02-10 | 2020-05-14 | ソニー株式会社 | Transmission method and transmission device |
KR20210125083A (en) | 2019-03-20 | 2021-10-15 | 엔이씨 플랫폼즈 가부시키가이샤 | Broadcast control apparatus, broadcast control method, program, and recording medium |
CN113726967A (en) * | 2021-08-03 | 2021-11-30 | 湘潭大学 | Voice time reporting method and system for multi-channel communication line of time service center |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH04143816A (en) * | 1990-10-04 | 1992-05-18 | Fujitsu Ltd | Time counting system |
JP2000075071A (en) * | 1998-09-02 | 2000-03-14 | Nippon Telegr & Teleph Corp <Ntt> | Method and device for supplying coordinate universal time and storage for storing program for supplying coordinate universal time |
JP2007202003A (en) * | 2006-01-30 | 2007-08-09 | Nippon Telegr & Teleph Corp <Ntt> | Time tone guidance providing system |
JP2010272071A (en) * | 2009-05-25 | 2010-12-02 | Hitachi Kokusai Electric Inc | Terminal device |
-
2014
- 2014-09-04 JP JP2014180074A patent/JP6476666B2/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH04143816A (en) * | 1990-10-04 | 1992-05-18 | Fujitsu Ltd | Time counting system |
JP2000075071A (en) * | 1998-09-02 | 2000-03-14 | Nippon Telegr & Teleph Corp <Ntt> | Method and device for supplying coordinate universal time and storage for storing program for supplying coordinate universal time |
JP2007202003A (en) * | 2006-01-30 | 2007-08-09 | Nippon Telegr & Teleph Corp <Ntt> | Time tone guidance providing system |
JP2010272071A (en) * | 2009-05-25 | 2010-12-02 | Hitachi Kokusai Electric Inc | Terminal device |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2020074570A (en) * | 2015-02-10 | 2020-05-14 | ソニー株式会社 | Transmission method and transmission device |
JP2022016498A (en) * | 2015-02-10 | 2022-01-21 | ソニーグループ株式会社 | Transmission method and transmission device |
JP7279767B2 (en) | 2015-02-10 | 2023-05-23 | ソニーグループ株式会社 | Transmission method and transmission device |
KR20210125083A (en) | 2019-03-20 | 2021-10-15 | 엔이씨 플랫폼즈 가부시키가이샤 | Broadcast control apparatus, broadcast control method, program, and recording medium |
US11778128B2 (en) | 2019-03-20 | 2023-10-03 | Nec Platforms, Ltd. | Broadcasting control apparatus, broadcasting control method, program, and recording medium |
CN113726967A (en) * | 2021-08-03 | 2021-11-30 | 湘潭大学 | Voice time reporting method and system for multi-channel communication line of time service center |
CN113726967B (en) * | 2021-08-03 | 2023-10-20 | 湘潭大学 | Time service center multipath communication line voice time reporting method and system |
Also Published As
Publication number | Publication date |
---|---|
JP6476666B2 (en) | 2019-03-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5436311B2 (en) | Information display system, information content distribution server, and display device | |
US9671761B2 (en) | Method, time consumer system, and computer program product for maintaining accurate time on an ideal clock | |
US10679673B2 (en) | Synchronization in audio playback network independent of system clock | |
US20120139597A1 (en) | High precision synchronisation method and system | |
JP6476666B2 (en) | Time report system and program | |
JP2014236443A (en) | Communication device, communication system, and communication method | |
CN106712885B (en) | Clock synchronizing method, the network equipment and network system | |
CN111954050B (en) | Method and system for synchronizing videos among multiple devices | |
JP2013118502A (en) | Time synchronization apparatus, radio terminal and time synchronization system | |
AU2012302451A1 (en) | Terminal and application management method thereof | |
JP2012242190A (en) | Reference signal generation device and reference signal generating method | |
CN107800529B (en) | Clock frequency synchronization method of network node | |
US11627365B2 (en) | Synchronization with synthesized audio clock | |
JP2016197814A (en) | Time adjustment system and time adjustment method of electronic program guide | |
JP2014165582A (en) | Time synchronization system, time synchronization method, slave node and computer program | |
US20200192782A1 (en) | Method and apparatus for evaluating quality of software running environment of device | |
US10134442B2 (en) | Method for synchronising and rendering multimedia streams | |
JP6198075B2 (en) | Time synchronization apparatus, time synchronization method, and time synchronization program | |
JP6085864B2 (en) | Time synchronization system, time synchronization method, slave node, and computer program | |
KR102544034B1 (en) | Broadcast control device, broadcast control method, program, and recording medium | |
CN112019288B (en) | Time synchronization method, service single board and network equipment | |
WO2017033416A1 (en) | Relay device, communication system, and fault detection method | |
JP6068031B2 (en) | Time synchronization apparatus, time synchronization method, and time synchronization program | |
JP2008151556A (en) | Method for correcting time in remote monitoring/controlling system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20170515 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20180530 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20180626 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20180823 |
|
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: 20190108 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20190121 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6476666 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |