JP2010231310A - Time correction device, time correction system, time correction method, and program - Google Patents

Time correction device, time correction system, time correction method, and program Download PDF

Info

Publication number
JP2010231310A
JP2010231310A JP2009075730A JP2009075730A JP2010231310A JP 2010231310 A JP2010231310 A JP 2010231310A JP 2009075730 A JP2009075730 A JP 2009075730A JP 2009075730 A JP2009075730 A JP 2009075730A JP 2010231310 A JP2010231310 A JP 2010231310A
Authority
JP
Japan
Prior art keywords
time
time difference
storage unit
time correction
server
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.)
Withdrawn
Application number
JP2009075730A
Other languages
Japanese (ja)
Inventor
Yoichi Sugihara
杉原  陽一
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP2009075730A priority Critical patent/JP2010231310A/en
Publication of JP2010231310A publication Critical patent/JP2010231310A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Electric Clocks (AREA)
  • Computer And Data Communications (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To surely notify a manager when a time difference between a system and an NTP server exceeds an allowable range due to the failure of an NTP server, without drastically modifying a time correction means on the system side. <P>SOLUTION: A time correction means 11 transmits a time correction request message to an NTP server 15, and calculates a time difference between a self system 10 and an NTP server 15, based on a time correction response message transmitted from the NTP server 15 in response to this message, and corrects the time of the self system based on the time difference. The time difference is stored in a database 14. When the time difference which is equal to or more than a predetermined threshold is stored in the database 14, a monitoring means 12 stops the time correction means, and issues an alarm. <P>COPYRIGHT: (C)2011,JPO&INPIT

Description

本発明は、システムの時刻を正確な時刻に同期させる時刻補正技術に関する。   The present invention relates to a time correction technique for synchronizing a system time with an accurate time.

課金サーバや証券取引システムなどのように、システムの時刻を正確な時刻に同期させることが必要になるシステムは数多く存在し、このようなシステムに対する時刻補正技術として次のような技術が知られている(例えば、特許文献1参照)。   There are many systems such as billing servers and securities trading systems that require the system time to be synchronized with the correct time, and the following techniques are known as time correction techniques for such systems. (For example, refer to Patent Document 1).

特許文献1に記載されている技術は、NTP(Network Time Protocol)サーバを利用してシステムの時刻を協定世界時(UTC;Coordinated Universal Time)と同期させるものであり、具体的には次のようにしている。先ず、システム側の時刻補正手段(NTPクライアントと呼ばれるプログラムによって実現される)が、NTPサーバに対して時刻補正要求メッセージを送信し、これを受信したNTPサーバが、システムに対して時刻補正応答メッセージを送信する。システム内の時刻補正手段は、時刻補正応答メッセージを受信すると、それに含まれている時刻情報(時刻補正要求メッセージの送受信時刻と、時刻補正応答メッセージの送信時刻)を利用して、自システムの現在時刻とNTPサーバの現在時刻(協定世界時)との時刻差を算出する。その後、時刻補正手段は、算出した時刻差を利用して自システムの時刻を補正すると共に、上記時刻差を含んだログ情報をNTPサーバへ送信する。   The technique described in Patent Document 1 uses an NTP (Network Time Protocol) server to synchronize the system time with Coordinated Universal Time (UTC). I have to. First, the time correction means on the system side (implemented by a program called an NTP client) transmits a time correction request message to the NTP server, and the NTP server that receives this transmits a time correction response message to the system. Send. When the time correction means in the system receives the time correction response message, the time correction means uses the time information (the transmission / reception time of the time correction request message and the transmission time of the time correction response message) contained therein to Calculate the time difference between the time and the current time of the NTP server (Coordinated Universal Time). Thereafter, the time correction means corrects the time of the own system using the calculated time difference, and transmits log information including the time difference to the NTP server.

NTPサーバは、ログ情報を受信すると、それに含まれている時刻差が許容範囲を超えているか否かを判定する。そして、許容範囲を超えている場合には、システムに対して許容範囲外検知メールを送信し、システムの管理者などに時刻差が許容範囲を超えたことを通知する。   When receiving the log information, the NTP server determines whether or not the time difference included in the log information exceeds the allowable range. If it exceeds the allowable range, an out-of-allowance detection mail is transmitted to the system to notify the system administrator or the like that the time difference has exceeded the allowable range.

特開2003−196170号公報JP 2003-196170 A

上述した特許文献1に記載されている技術には、次のような問題がある。NTPサーバに障害が発生した場合、時刻補正応答メッセージに含まれる時刻情報が不正なものとなり、この不正な時刻情報を用いて算出した時刻差が許容範囲を超える場合がある。しかし、特許文献1に記載されている技術では、上記時刻差を含んだログ情報を障害の発生したNTPサーバへ送信し、障害の発生したNTPサーバにおいて時刻差が許容範囲を超えたか否かを判定するようにしているため、時刻差が許容範囲を超えていることを検出できず、許容範囲外検知メールが送信されない場合がある。このため、システムの管理者などが時刻差が許容範囲を超えたことを認識できず、適切な処置が行われない場合があるという問題がある。   The technique described in Patent Document 1 described above has the following problems. When a failure occurs in the NTP server, the time information included in the time correction response message becomes invalid, and the time difference calculated using the incorrect time information may exceed the allowable range. However, in the technique described in Patent Document 1, the log information including the time difference is transmitted to the failed NTP server, and whether or not the time difference exceeds an allowable range in the failed NTP server. Since the determination is made, it may not be possible to detect that the time difference exceeds the allowable range, and an out-of-tolerance detection mail may not be transmitted. For this reason, there is a problem that a system administrator or the like cannot recognize that the time difference has exceeded the allowable range, and appropriate measures may not be taken.

このような問題点を解決するためには、例えば、システム側の時刻補正手段に、時刻差が許容範囲を超えているか否かを判定し、超えている場合には、そのことを管理者に通知する機能を組み込むようにすれば良いが、この場合には、時刻補正手段の大幅な改造が必要になるという問題が生じる。   In order to solve such a problem, for example, it is determined whether or not the time difference exceeds the allowable range in the time correction means on the system side. A function for notifying may be incorporated, but in this case, a problem arises that the time correction means needs to be significantly modified.

〔発明の目的〕
そこで、本発明の目的は、システム側の時刻補正手段を大幅に改造しなくとも、サーバの障害に起因してシステムの現在時刻とサーバの現在時刻との時刻差が許容範囲を超えた場合、そのことを確実に管理者に通知することができる時刻補正装置を提供することにある。
(Object of invention)
Therefore, the object of the present invention is, even if the time correction means on the system side is not significantly modified, if the time difference between the current time of the system and the current time of the server exceeds the allowable range due to the failure of the server, An object of the present invention is to provide a time correction device that can notify an administrator of this fact with certainty.

本発明にかかる時刻補正装置は、
サーバと接続されるシステムに含まれ、前記システムの時刻を前記サーバの時刻に合わせる時刻補正装置であって、
前記サーバから取得した時刻情報を利用して前記サーバの現在時刻と自システムの現在時刻との時刻差を算出して時刻差記憶部に格納すると共に、自システムの現在時刻を補正する時刻補正手段と、
前記時刻差記憶部を参照し、予め定められている閾値以上の時刻差が格納されている場合は、アラームを発する監視手段とを備える。
The time correction apparatus according to the present invention is:
A time correction device included in a system connected to a server, and adjusts the time of the system to the time of the server,
Time correction means for calculating a time difference between the current time of the server and the current time of the own system using the time information acquired from the server, storing the time difference in the time difference storage unit, and correcting the current time of the own system When,
The time difference storage unit is referred to, and when a time difference equal to or greater than a predetermined threshold is stored, a monitoring unit that issues an alarm is provided.

本発明にかかる時刻補正システムは、
時刻補正装置を含むシステムと、サーバとを備え、
前記時刻補正装置は、
前記サーバから取得した時刻情報を利用して前記サーバの現在時刻と自システムの現在時刻との時刻差を算出して時刻差記憶部に格納すると共に、自システムの現在時刻を補正する時刻補正手段と、
前記時刻差記憶部を参照し、予め定められている閾値以上の時刻差が格納されている場合は、アラームを発する監視手段とを備える。
The time correction system according to the present invention is:
A system including a time correction device and a server;
The time correction device is
Time correction means for calculating a time difference between the current time of the server and the current time of the own system using the time information acquired from the server, storing the time difference in the time difference storage unit, and correcting the current time of the own system When,
The time difference storage unit is referred to, and when a time difference equal to or greater than a predetermined threshold is stored, a monitoring unit that issues an alarm is provided.

本発明にかかる時刻補正方法は、
サーバから取得した時刻情報を利用して前記サーバの現在時刻と自システムの現在時刻との時刻差を算出して時刻差記憶部に格納すると共に自システムの現在時刻を補正する第1のステップと、
前記時刻差記憶部を参照し、予め定められている閾値以上の時刻差が格納されている場合は、アラームを発する第2のステップとを含む。
The time correction method according to the present invention includes:
A first step of calculating a time difference between the current time of the server and the current time of the own system using the time information acquired from the server, storing the time difference in a time difference storage unit, and correcting the current time of the own system; ,
A second step of issuing an alarm when a time difference equal to or greater than a predetermined threshold is stored with reference to the time difference storage unit.

本発明にかかるプログラムは、
サーバから取得した時刻情報を利用して前記サーバの現在時刻と自システムの現在時刻との時刻差を算出して時刻差記憶部に格納すると共に、自システムの現在時刻を補正する時刻補正手段を備えるコンピュータを、
前記時刻差記憶部を参照し、予め定められている閾値以上の時刻差が格納されている場合は、アラームを発する監視手段として機能させる。
The program according to the present invention is:
Time correction means for calculating the time difference between the current time of the server and the current time of the own system using the time information acquired from the server, storing the time difference in the time difference storage unit, and correcting the current time of the own system A computer with
The time difference storage unit is referred to, and when a time difference equal to or greater than a predetermined threshold value is stored, the time difference storage unit functions as a monitoring unit that issues an alarm.

本発明によれば、システム側の時刻補正手段を大幅に改造しなくとも、サーバの障害に起因してシステムの現在時刻とサーバの現在時刻との時刻差が許容範囲を超えた場合、そのことを確実に管理者に通知することができるという効果を得ることができる。   According to the present invention, if the time difference between the current system time and the current server time exceeds the allowable range due to a server failure, the system-side time correction means is not significantly modified. Can be reliably notified to the administrator.

本発明にかかる時刻補正システムの第1の実施の形態の構成例を示す図である。It is a figure which shows the structural example of 1st Embodiment of the time correction system concerning this invention. システム10全体の処理例を示すフローチャートである。3 is a flowchart showing an example of processing of the entire system 10. 認証手段13の詳細な処理例を示すフローチャートである。5 is a flowchart showing a detailed processing example of authentication means 13. 監視手段12の詳細な処理例を示すフローチャートである。4 is a flowchart showing a detailed processing example of a monitoring unit 12. 本発明にかかる時刻補正システムの第2の実施の形態における監視手段12の詳細な処理例を示すフローチャートである。It is a flowchart which shows the detailed process example of the monitoring means 12 in 2nd Embodiment of the time correction system concerning this invention. 本発明にかかる時刻補正システムの第3の実施の形態における監視手段12の詳細な処理例を示すフローチャートである。It is a flowchart which shows the detailed process example of the monitoring means 12 in 3rd Embodiment of the time correction system concerning this invention.

〔本発明の第1の実施の形態〕
次に、本発明にかかる時刻補正システムの第1の実施の形態について詳細に説明する。図1を参照すると、本実施の形態にかかる時刻補正システムは、システム10と、複数のNTPサーバ15〜17と、認証局(CA;Certificate Authority)18とを含んでいる。
[First embodiment of the present invention]
Next, a first embodiment of a time correction system according to the present invention will be described in detail. Referring to FIG. 1, the time correction system according to the present embodiment includes a system 10, a plurality of NTP servers 15 to 17, and a certificate authority (CA) 18.

システム10は、厳密な時刻管理が必要な課金サーバや証券取引システムなどのシステムであり、時刻補正手段11と、監視手段12と、認証手段13と、データベース(DB)14とを備えている。   The system 10 is a system such as a billing server or a securities trading system that requires strict time management, and includes a time correction unit 11, a monitoring unit 12, an authentication unit 13, and a database (DB) 14.

本実施の形態では、NTPを用いた時刻補正をより高信頼化するために、時刻補正手段11を補助する認証手段13、および、監視手段12の2つの手段をシステム10内に設けている。   In this embodiment, in order to make the time correction using NTP more reliable, the authentication unit 13 that assists the time correction unit 11 and the monitoring unit 12 are provided in the system 10.

時刻補正手段11は、認証手段13を介してNTPサーバ15〜17の何れかと時刻補正要求メッセージおよび時刻補正応答メッセージを送受信し(遅延時間が最も少ないサーバと通信を行うのが望ましい)、時刻補正応答メッセージに含まれている時刻情報に基づいて、その送信元のNTPサーバの現在時刻と自システム10の現在時刻との時刻差を算出し、算出した時刻差を利用して自システム10の時刻(システムクロック)を補正する機能や、算出した時刻差をデータベース14に格納する機能を有する。なお、時刻補正手段11は、NTPクライアントと呼ばれるプログラムをCPU(Central Processing Unit;図示せず)で実行することにより実現される手段である。   The time correction unit 11 transmits / receives a time correction request message and a time correction response message to / from any of the NTP servers 15 to 17 via the authentication unit 13 (it is desirable to communicate with a server having the shortest delay time). Based on the time information included in the response message, a time difference between the current time of the transmission source NTP server and the current time of the own system 10 is calculated, and the time of the own system 10 is calculated using the calculated time difference. A function of correcting (system clock) and a function of storing the calculated time difference in the database 14; The time correction means 11 is realized by executing a program called an NTP client by a CPU (Central Processing Unit; not shown).

認証手段13は、システム10がNTPサーバ15〜17とNTPを用いて時刻補正を実施する場合に、公開かぎ暗号方式を用いてNTPサーバのなりすまし、メッセージの改ざんを検出する機能を有する。なお、認証手段13は、認証用プログラムをCPUで実行することにより実現される手段である。   The authentication unit 13 has a function of detecting spoofing of a NTP server and alteration of a message using a public key encryption method when the system 10 performs time correction using the NTP servers 15 to 17 and NTP. The authentication unit 13 is a unit realized by executing an authentication program by the CPU.

監視手段12は、時刻補正手段11がデータベース14に格納した時刻差を定期的に監視し、異常と判断されるような値が書き込まれていた場合に、時刻補正手段11を停止し、保守者にアラームをあげる機能を有する。なお、監視手段12は、監視用プログラムをCPUで実行することにより実現される手段である。   The monitoring unit 12 periodically monitors the time difference stored in the database 14 by the time correction unit 11 and stops the time correction unit 11 when a value that is determined to be abnormal is written. It has a function to raise an alarm. The monitoring unit 12 is a unit realized by executing a monitoring program by the CPU.

認証局18は、NTPサーバ15〜17に対して公開かぎ証明書を発行する。NTPサーバ15〜17は、認証局18から発行を受けた公開かぎ証明書をシステム10に配付したり、システム10との間で時刻補正要求メッセージおよび時刻補正応答メッセージを送受信する機能を有する。   The certificate authority 18 issues a public key certificate to the NTP servers 15-17. The NTP servers 15 to 17 have a function of distributing a public key certificate issued from the certificate authority 18 to the system 10 and transmitting / receiving a time correction request message and a time correction response message to / from the system 10.

〔第1の実施の形態の動作の説明〕
次に、図2のフローチャートを参照して本実施の形態の動作について詳細に説明する。
[Description of Operation of First Embodiment]
Next, the operation of the present embodiment will be described in detail with reference to the flowchart of FIG.

悪意のある第三者によるNTPサーバのなりすまし、および時刻補正応答メッセージの改ざんを公開暗号化方式を用いて検出するため、NTPサーバ(例えば、NTPサーバ15)は、NTPの暗号化通信に用いる公開かぎの登録申請を認証局18に対して行い、公開かぎ証明書の発行を要求する(ステップ200)。これに対し認証局18は、所定の認証登録手続きを行い、NTPサーバ15に公開かぎ証明書を発行する(ステップ201)。次に、NTPサーバ15は、この公開かぎ証明書をシステム10に送付する(ステップ202)。   An NTP server (for example, the NTP server 15) is used for NTP encrypted communication to detect spoofing of an NTP server by a malicious third party and tampering of a time correction response message using a public encryption method. A key registration application is made to the certificate authority 18 and a request for issuing a public key certificate is made (step 200). In response to this, the certificate authority 18 performs a predetermined authentication registration procedure and issues a public key certificate to the NTP server 15 (step 201). Next, the NTP server 15 sends this public key certificate to the system 10 (step 202).

システム10内の認証手段12は、公開かぎの正当性をこの公開かぎ証明書により確認し(ステップ203)、以降この公開かぎを用いてNTPサーバ15とNTP通信を行う。   The authenticating means 12 in the system 10 confirms the validity of the public key with this public key certificate (step 203), and thereafter performs NTP communication with the NTP server 15 using this public key.

時刻補正を行うシステム10内の時刻補正手段11は、ある一定の周期毎に、NTPサーバ15に対し、時刻補正要求メッセージを送信する(ステップ204)。このとき、認証手段13が、NTPサーバ15の公開かぎを用いて時刻補正要求メッセージを暗号化するので(ステップ205)、上記公開かぎに対応する秘密かぎを有しているNTPサーバ15のみが上記時刻補正要求メッセージを処理できる。なお、時刻補正手段11が送信する時刻補正要求メッセージには、その送信時刻t1が含まれる。   The time correction means 11 in the system 10 that performs time correction transmits a time correction request message to the NTP server 15 at certain intervals (step 204). At this time, since the authentication means 13 encrypts the time correction request message using the public key of the NTP server 15 (step 205), only the NTP server 15 having the secret key corresponding to the public key is the above-mentioned. A time correction request message can be processed. The time correction request message transmitted by the time correction unit 11 includes the transmission time t1.

NTPサーバ15は、時刻補正要求メッセージに対する時刻補正応答メッセージにデジタル署名とメッセージダイジェストとを加え、自身の秘密かぎによって暗号化しシステム10に送信する(ステップ206)。なお、時刻補正応答メッセージには、時刻情報として、時刻補正要求メッセージの送信時刻t1および受信時刻t2と、時刻補正応答メッセージの送信時刻t3とが含まれる。   The NTP server 15 adds a digital signature and a message digest to the time correction response message for the time correction request message, encrypts it with its own secret key, and transmits it to the system 10 (step 206). The time correction response message includes the time correction request message transmission time t1 and reception time t2 and the time correction response message transmission time t3 as time information.

時刻補正応答メッセージを受け取った認証手段13は、NTPサーバ15の公開かぎでそれを復号したあと、メッセージの改ざんの有無、第三者によるなりすましの有無を確認する(ステップ207)。   Upon receiving the time correction response message, the authentication means 13 decrypts the message using the public key of the NTP server 15, and then checks whether the message has been tampered with and whether the message has been impersonated by a third party (step 207).

図3は、図2のステップ207で認証手段13が行う動作の詳細を示している。認証手段13は、NTPサーバ15からの時刻補正応答メッセージを受け取ると(ステップ30)、NTPサーバ15の公開かぎにて時刻補正応答メッセージを復号する(ステップ31)。次いで、時刻補正応答メッセージ内に付与されているデジタル署名を確認し、NTPサーバ15が第三者によりなりすまされていないことを確認し(ステップ32)、もし、なりすましが検出されたら、時刻補正応答メッセージを廃棄する(ステップ36)。そうでなければ、次にメッセージダイジェストを確認し、第三者による時刻補正応答メッセージの改ざんがないことを確認し(ステップ33)、もし、改ざんが検出されたら先と同様に廃棄する(ステップ36)。なお、デジタル署名を用いてなりすましの有無を確認する方法、また、メッセージダイジェストを用いてメッセージの改ざんを検出する方法は一般によく知られているため、説明を割愛する。最後に、時刻補正手段11の状態を確認し(ステップ34)、時刻補正手段11が動作していた場合は正常な時刻補正応答メッセージであると保障できるため、これを時刻補正手段11へ転送する(ステップ35)。もし、監視手段12によって時刻補正手段11の動作が停止されていた場合は、時刻補正応答メッセージを廃棄する(ステップ36)。以上が図2のステップ207、208で行われる処理の詳細である。   FIG. 3 shows details of the operation performed by the authentication means 13 in step 207 of FIG. Upon receiving the time correction response message from the NTP server 15 (step 30), the authentication means 13 decrypts the time correction response message using the public key of the NTP server 15 (step 31). Next, the digital signature added in the time correction response message is confirmed to confirm that the NTP server 15 is not spoofed by a third party (step 32). If impersonation is detected, the time correction is performed. The response message is discarded (step 36). If not, the message digest is checked next, and it is confirmed that there is no tampering of the time correction response message by a third party (step 33). If tampering is detected, it is discarded as before (step 36). ). Note that a method for confirming the presence / absence of impersonation using a digital signature and a method for detecting falsification of a message using a message digest are generally well known, and will not be described. Finally, the state of the time correction unit 11 is confirmed (step 34). If the time correction unit 11 is operating, it can be ensured that the message is a normal time correction response message, so that it is transferred to the time correction unit 11. (Step 35). If the operation of the time correction unit 11 is stopped by the monitoring unit 12, the time correction response message is discarded (step 36). The above is the details of the processing performed in steps 207 and 208 of FIG.

再び図2に戻り、ステップ207の確認により時刻補正応答メッセージの正常性が確認されると、認証手段13は時刻補正手段11に時刻補正応答メッセージを転送する(ステップ208)。これを受け取った時刻補正手段11は、そのときの時刻t4と、時刻補正応答メッセージに含まれている各時刻t1〜t3とに基づいて、自システム10の現在時刻とNTPサーバ15の現在時刻との時刻差を算出し、この時刻差を含んだ時刻情報をデータベース14に格納する(ステップ209)。そして、時刻補正手段11は、データベース14に格納されている時刻情報をもとに、NTPサーバ15の刻む時刻に自システム10の時刻を徐々に近付けていく。   Returning to FIG. 2 again, when the normality of the time correction response message is confirmed by the confirmation in step 207, the authentication unit 13 transfers the time correction response message to the time correction unit 11 (step 208). Upon receiving this, the time correction means 11 determines the current time of the own system 10 and the current time of the NTP server 15 based on the time t4 at that time and the times t1 to t3 included in the time correction response message. The time difference including the time difference is stored in the database 14 (step 209). Then, the time correction unit 11 gradually approaches the time of the own system 10 to the time recorded by the NTP server 15 based on the time information stored in the database 14.

一方、監視手段12は、一定の周期毎(本実施の形態では、時刻補正手段11が時刻補正要求メッセージを送信する周期と同じ周期とするが、異なっていても良い)に、時刻補正手段11がデータベース14に格納した時刻情報を読み出し(ステップ210)、NTPサーバ15が通知してくる時刻情報の正当性を判定し(ステップ211)、異常が検出された場合は、時刻補正手段11を停止させ、保守者にアラーム通知する(ステップ212)。   On the other hand, the monitoring unit 12 sets the time correction unit 11 at regular intervals (in this embodiment, the time correction unit 11 uses the same cycle as the time correction request message but may be different). Reads the time information stored in the database 14 (step 210), determines the validity of the time information notified by the NTP server 15 (step 211), and stops the time correction means 11 when an abnormality is detected. The maintenance person is notified of the alarm (step 212).

図4は監視手段11の動作の詳細を示している。監視手段12は一定の周期で処理を開始し(ステップ40)、先ず、データベース14から時刻情報を読み出す(ステップ41)。この時刻情報には、NTPサーバ15の現在時刻とシステム10自身の現在時刻との時刻差が含まれている。ここで、時刻補正手段11は、NTPサーバ15に問合せを行うたびに(時刻補正要求メッセージを送信するたびに)、NTPサーバ15の刻む時刻にシステム10自身の時刻を徐々に近付けるように動作するので、時刻差は問合せのたびに小さくなるはずである。   FIG. 4 shows details of the operation of the monitoring means 11. The monitoring unit 12 starts processing at a constant cycle (step 40), and first reads time information from the database 14 (step 41). This time information includes a time difference between the current time of the NTP server 15 and the current time of the system 10 itself. Here, the time correction unit 11 operates so as to gradually bring the time of the system 10 itself closer to the time recorded by the NTP server 15 each time an inquiry is made to the NTP server 15 (each time a time correction request message is transmitted). Therefore, the time difference should be smaller for each inquiry.

NTPサーバ15とシステム10との時刻差を確認したときに(ステップ42)、前回NTPサーバ15に問合せしたときよりも値が小さくなって改善されていた場合は、処理を終えて次の監視周期まで待機する(ステップ45)。つまり、時刻差が減少傾向にある場合は、NTPサーバ15からは正確な時刻情報を含んだ時刻補正応答メッセージが送られてきていると判断できるので、確認手段11は、その処理を終えて次の監視周期まで待機する。なお、データベース14に時刻情報が1つだけしか登録されていない場合(時刻補正手段11による時刻補正処理が1回だけしか行われていない場合)は、ステップ41の実行後、ステップ42をスキップしてステップ43を実行する。   When the time difference between the NTP server 15 and the system 10 is confirmed (step 42), if the value is smaller and improved than when the previous NTP server 15 was inquired, the processing is finished and the next monitoring cycle is completed. (Step 45). That is, when the time difference tends to decrease, it can be determined that a time correction response message including accurate time information has been sent from the NTP server 15, so that the confirmation unit 11 finishes the process and proceeds to the next. Wait until the monitoring cycle. When only one time information is registered in the database 14 (when the time correction processing by the time correction means 11 is performed only once), after executing step 41, step 42 is skipped. Step 43 is executed.

逆に、時刻差が大きくなって悪化していた場合は、その値がシステム10として許容できる範囲(システム設計時に保守者により決められる閾値)に入っているかどうかをチェックする(ステップ43)。許容できる範囲なら処理を終了し、次の監視周期を待つ(ステップ45)。しかし、許容できる範囲を超えていた場合は、NTPサーバ15は正確な時刻情報を通知してきておらず、これ以上のNTP通信は意味がないと判断し、時刻補正手段11を停止させ(ステップ44)、以降はNTP通信による時刻補正を行わない。同時に、保守者にNTP通信に異常があることをアラーム通知し(ステップ44)、NTPサーバ15の状態を確認するなどの回復措置をとらせるように仕向け、早期復旧に努める。なお、時刻補正手段11を停止させた場合は、システム10の時刻が協定世界時から大きくずれないようにするため、例えば、システムクロックをリアルタイムクロックに合わせる、あるいは、システム10の時刻をリアルタイムクロックによって表される時刻とする等の措置をとることができる。   On the other hand, if the time difference has become large and worse, it is checked whether or not the value is within an allowable range for the system 10 (a threshold value determined by a maintenance person at the time of system design) (step 43). If it is within the allowable range, the process is terminated and the next monitoring cycle is awaited (step 45). However, if the allowable range is exceeded, the NTP server 15 has not notified the accurate time information, and it is determined that further NTP communication is meaningless, and the time correction unit 11 is stopped (step 44). ) After that, time correction by NTP communication is not performed. At the same time, the maintenance person is notified of an abnormality in the NTP communication (step 44), and is made to take recovery measures such as confirming the state of the NTP server 15 to make an early recovery. In addition, when the time correction means 11 is stopped, in order to prevent the time of the system 10 from deviating greatly from the coordinated universal time, for example, the system clock is set to the real time clock, or the time of the system 10 is set to the real time clock Measures can be taken such as the time indicated.

〔第1の実施の形態の効果〕
本実施の形態によれば、システム10側の時刻補正手段11を大幅に改造しなくとも、NTPサーバ15の障害に起因してシステム10の現在時刻とNTPサーバ15の現在時刻との時刻差が許容範囲を超えた場合、そのことを確実に保守者に通知することができるという効果を得ることができる。その理由は、時刻補正手段11によってNTPサーバ15の現在時刻とシステムの現在時刻との時刻差が格納されたデータベース14を参照し、予め定められている閾値を超える時刻差が格納されている場合、時刻補正手段11を停止させると共に、アラームを発する監視手段12を備えているからである。
[Effect of the first embodiment]
According to the present embodiment, the time difference between the current time of the system 10 and the current time of the NTP server 15 due to the failure of the NTP server 15 can be obtained without significantly modifying the time correction means 11 on the system 10 side. When the allowable range is exceeded, it is possible to obtain an effect that it is possible to notify the maintenance person of that without fail. The reason is that the time correction means 11 refers to the database 14 in which the time difference between the current time of the NTP server 15 and the current time of the system is stored, and a time difference exceeding a predetermined threshold is stored. This is because the time correction means 11 is stopped and the monitoring means 12 for issuing an alarm is provided.

また、本実施の形態によれば、システム10とNTPサーバ15との間の無駄なトラフィックをなくすことができる。その理由は、データベース14に閾値を超える時刻差が格納されている場合(NTPサーバ15に障害が発生している場合)は、時刻補正手段11を停止させ、NTPサーバ15との間の通信を停止させるようにしているからである。   Moreover, according to this Embodiment, the useless traffic between the system 10 and the NTP server 15 can be eliminated. The reason is that when the time difference exceeding the threshold is stored in the database 14 (when a failure occurs in the NTP server 15), the time correction means 11 is stopped and communication with the NTP server 15 is performed. It is because it is made to stop.

また、本実施の形態によれば、改ざんされた時刻補正応答メッセージや、なりすましによる時刻補正応答メッセージを使用して、システム10の時刻を補正してしまうという事態を確実に防止することができるという効果を得ることができる。その理由は、時刻補正応答メッセージに含まれているデジタル署名によりなりすましを検出し、メッセージダイジェストにより改ざんを検出する認証手段を備えているからである。   In addition, according to the present embodiment, it is possible to reliably prevent a situation in which the time of the system 10 is corrected by using a falsified time correction response message or a time correction response message by impersonation. An effect can be obtained. The reason is that an authentication unit that detects impersonation by a digital signature included in the time correction response message and detects falsification by a message digest is provided.

〔本発明の第2の実施の形態〕
次に本発明にかかる時刻補正システムの第2の実施の形態について説明する。本実施の形態は、監視手段12に図4のフローチャートに示す処理の代わりに、図5のフローチャートに示す処理を行わせることにより実現される。
[Second Embodiment of the Present Invention]
Next, a second embodiment of the time correction system according to the present invention will be described. This embodiment is realized by causing the monitoring unit 12 to perform the process shown in the flowchart of FIG. 5 instead of the process shown in the flowchart of FIG.

図5を参照すると、本実施の形態では、ステップ45の前でステップ50の処理を行っている点が、本発明の第1の実施の形態と相違する。ここでは、相違する点のみ説明する。ステップ50では、データベース14に格納されている最新の時刻差に基づいて、次の監視周期を決定するようにしている。より具体的には、時刻差が小さい場合ほど、監視周期を長くするようにしている。つまり、時刻差が小さい場合は、時刻補正が安定して行われていると判定し、監視周期を長くする。このようにすることにより、時刻補正に伴う負荷を低減させることができる。   Referring to FIG. 5, the present embodiment is different from the first embodiment of the present invention in that the process of step 50 is performed before step 45. Only the differences will be described here. In step 50, the next monitoring cycle is determined based on the latest time difference stored in the database 14. More specifically, the smaller the time difference is, the longer the monitoring cycle is. That is, when the time difference is small, it is determined that the time correction is stably performed, and the monitoring cycle is lengthened. By doing in this way, the load accompanying time correction can be reduced.

〔第2の実施の形態の効果〕
本実施の形態によれば、時刻補正に伴う負荷を低減させることができる。その理由は、データベース14に格納されている最新の時刻差が小さい場合ほど、監視周期を長くするようにしているからである。
[Effects of Second Embodiment]
According to the present embodiment, it is possible to reduce the load accompanying time correction. The reason is that as the latest time difference stored in the database 14 is smaller, the monitoring cycle is longer.

〔本発明の第3の実施の形態〕
次に本発明にかかる時刻補正システムの第3の実施の形態について説明する。本実施の形態は、監視手段12に図4のフローチャートに示す処理の代わりに、図6のフローチャートに示す処理を行わせることにより実現される。
[Third embodiment of the present invention]
Next, a third embodiment of the time correction system according to the present invention will be described. This embodiment is realized by causing the monitoring unit 12 to perform the process shown in the flowchart of FIG. 6 instead of the process shown in the flowchart of FIG.

図6を参照すると、本実施の形態では、ステップ45の前でステップ60の処理を行うようにしている点が、本発明の第1の実施の形態と相違する。ここでは、相違する点についてのみ説明する。ステップ60では、データベース14に格納されている最新の時刻差と、時刻差の増減傾向とに基づいて監視周期を決定するようにしてる。より具体的には、例えば、データベース14に格納されている時刻差が増加傾向にあるのか、減少傾向にあるのかを、最新の時刻差とその1つ前の時刻差とから判定する。そして、最新の時刻差が短い場合ほど、監視周期が長くなり、かつ、時刻差が増加傾向にある場合は、減少傾向にある場合に比較して監視周期が短くなるように、監視周期を決定する。前述したように、時刻差が小さい場合は、時刻補正が安定して行われていると考えられるが、時刻差が小さくても、それが増加傾向にある場合には、何らかの異常が発生している危険性がある。そこで、本実施の形態では、上記したように、時刻差が増加傾向にある場合には、監視周期を短くし、もし障害が発生していたら、それを迅速に検出できるようにしている。   Referring to FIG. 6, the present embodiment is different from the first embodiment of the present invention in that the processing of step 60 is performed before step 45. Here, only different points will be described. In step 60, the monitoring period is determined based on the latest time difference stored in the database 14 and the increasing / decreasing tendency of the time difference. More specifically, for example, it is determined from the latest time difference and the previous time difference whether the time difference stored in the database 14 is increasing or decreasing. Then, the shorter the latest time difference is, the longer the monitoring period is, and when the time difference is increasing, the monitoring period is determined so that the monitoring period is shorter than when it is decreasing. To do. As described above, when the time difference is small, it is considered that the time correction is performed stably, but even if the time difference is small, if it tends to increase, some abnormality has occurred. There is a risk of being. Therefore, in this embodiment, as described above, when the time difference tends to increase, the monitoring cycle is shortened, and if a failure occurs, it can be detected quickly.

〔第3の実施の形態の効果〕
本実施の形態によれば、時刻補正に伴う負荷を低減させ、且つ障害を迅速に検出することが可能になる。その理由は、時刻差と、その増減傾向に基づいて監視周期を決定するようにしているからである。
[Effect of the third embodiment]
According to the present embodiment, it is possible to reduce a load associated with time correction and to quickly detect a failure. The reason is that the monitoring period is determined based on the time difference and the increasing / decreasing tendency thereof.

本発明は、課金サーバ、証券取引システムを代表とする、厳密な時刻管理を必要とするシステムに適用すると好適である。   The present invention is preferably applied to a system that requires strict time management, such as a billing server and a securities trading system.

10…システム
11…時刻補正手段
12…監視手段
13…認証手段
14…データベース(DB)
15〜17…NTPサーバ
18…認証局(CA)
DESCRIPTION OF SYMBOLS 10 ... System 11 ... Time correction means 12 ... Monitoring means 13 ... Authentication means 14 ... Database (DB)
15-17 ... NTP server 18 ... Certificate Authority (CA)

Claims (11)

サーバと接続されるシステムに含まれ、前記システムの時刻を前記サーバの時刻に合わせる時刻補正装置であって、
前記サーバから取得した時刻情報を利用して前記サーバの現在時刻と自システムの現在時刻との時刻差を算出して時刻差記憶部に格納すると共に、自システムの現在時刻を補正する時刻補正手段と、
前記時刻差記憶部を参照し、予め定められている閾値以上の時刻差が格納されている場合は、アラームを発する監視手段とを備えることを特徴とする時刻補正装置。
A time correction device included in a system connected to a server, and adjusts the time of the system to the time of the server,
Time correction means for calculating a time difference between the current time of the server and the current time of the own system using the time information acquired from the server, storing the time difference in the time difference storage unit, and correcting the current time of the own system When,
A time correction apparatus comprising: a monitoring unit that issues an alarm when a time difference equal to or greater than a predetermined threshold is stored with reference to the time difference storage unit.
請求項1記載の時刻補正装置において、
前記監視手段は、前記時刻差記憶部に前記予め定められている閾値以上の時刻差が格納されている場合は、前記時刻補正手段を停止させることを特徴とする時刻補正装置。
The time correction apparatus according to claim 1,
The monitoring means stops the time correction means when a time difference equal to or greater than the predetermined threshold is stored in the time difference storage unit.
請求項1または2記載の時刻補正装置において、
前記監視手段は、一定周期で前記時刻差記憶部を参照することを特徴とする時刻補正装置。
The time correction apparatus according to claim 1 or 2,
The time correction apparatus, wherein the monitoring unit refers to the time difference storage unit at a constant period.
請求項1または2記載の時刻補正装置において、
前記監視手段は、前記時刻差記憶部を参照する毎に、前記時刻差記憶部に格納されている最新の時刻差に基づいて前記時刻差記憶部に対する参照周期を変更することを特徴とする時刻補正装置。
The time correction apparatus according to claim 1 or 2,
The monitoring means changes the reference cycle for the time difference storage unit based on the latest time difference stored in the time difference storage unit each time the time difference storage unit is referred to. Correction device.
請求項1または2記載の時刻補正装置において、
前記監視手段は、前記時刻差記憶部を参照する毎に、前記時刻差記憶部に格納されている時刻差が増加傾向にあるのか減少傾向にあるのかを判定し、この判定結果と前記時刻差記憶部に格納されている最新の時刻差とに基づいて前記時刻差記憶部に対する参照周期を変更することを特徴とする時刻補正装置。
The time correction apparatus according to claim 1 or 2,
Each time the monitoring means refers to the time difference storage unit, the monitoring unit determines whether the time difference stored in the time difference storage unit tends to increase or decreases, and the determination result and the time difference A time correction apparatus that changes a reference cycle for the time difference storage unit based on the latest time difference stored in the storage unit.
請求項4記載の時刻補正装置において、
前記監視手段は、前記最新の時刻差が短い場合ほど、前記時刻差記憶部に対する参照周期を長くすることを特徴とする時刻補正装置。
The time correction apparatus according to claim 4,
The time correction apparatus characterized in that the monitoring means lengthens the reference period for the time difference storage unit as the latest time difference is shorter.
請求項5記載の時刻補正装置において、
前記監視手段は、前記最新の時刻差が短い場合ほど、前記時刻差記憶部に対する参照周期が長くなり、かつ、前記時刻差記憶部に格納されている時刻差が増加傾向にある場合は、減少傾向にある場合に比較して前記時刻差記憶部に対する参照周期が短くなるように、前記時刻差記憶部に対する参照周期を変更することを特徴とする時刻補正装置。
The time correction apparatus according to claim 5,
The monitoring means decreases as the reference time for the time difference storage unit becomes longer and the time difference stored in the time difference storage unit tends to increase as the latest time difference is shorter. The time correction apparatus characterized by changing the reference period for the time difference storage unit so that the reference period for the time difference storage unit is shorter than that in the case where there is a tendency.
請求項1乃至7の何れか1項に記載の時刻補正装置において、
前記時刻情報は付加情報としてデジタル署名およびメッセージダイジェストを含み、且つ前記サーバの秘密かぎで暗号化されており、
前記時刻補正装置は、前記時刻情報を認証局によって認証されている前記サーバの公開かぎで復号した後、デジタル署名によりなりすましの有無を判定すると共にメッセージダイジェストにより改ざんの有無を判定し、なりすましが無く且つ改ざんがない場合、復号した時刻情報を前記時刻補正手段に渡す認証手段を更に備えることを特徴とする時刻補正装置。
The time correction apparatus according to any one of claims 1 to 7,
The time information includes a digital signature and a message digest as additional information, and is encrypted with the secret key of the server,
The time correction device decrypts the time information with the public key of the server that is authenticated by a certificate authority, and then determines the presence or absence of impersonation using a digital signature and the presence or absence of falsification using a message digest. In addition, the time correction apparatus further comprises authentication means for passing the decrypted time information to the time correction means when there is no alteration.
時刻補正装置を含むシステムと、サーバとを備え、
前記時刻補正装置は、
前記サーバから取得した時刻情報を利用して前記サーバの現在時刻と自システムの現在時刻との時刻差を算出して時刻差記憶部に格納すると共に、自システムの現在時刻を補正する時刻補正手段と、
前記時刻差記憶部を参照し、予め定められている閾値以上の時刻差が格納されている場合は、アラームを発する監視手段とを備えることを特徴とする時刻補正システム。
A system including a time correction device and a server;
The time correction device is
Time correction means for calculating a time difference between the current time of the server and the current time of the own system using the time information acquired from the server, storing the time difference in the time difference storage unit, and correcting the current time of the own system When,
A time correction system comprising: a monitoring unit that issues an alarm when a time difference equal to or greater than a predetermined threshold is stored with reference to the time difference storage unit.
サーバから取得した時刻情報を利用して前記サーバの現在時刻と自システムの現在時刻との時刻差を算出して時刻差記憶部に格納すると共に自システムの現在時刻を補正する第1のステップと、
前記時刻差記憶部を参照し、予め定められている閾値以上の時刻差が格納されている場合は、アラームを発する第2のステップとを含むことを特徴とする時刻補正方法。
A first step of calculating a time difference between the current time of the server and the current time of the own system using the time information acquired from the server, storing the time difference in a time difference storage unit, and correcting the current time of the own system; ,
A time correction method comprising: a second step of issuing an alarm when a time difference equal to or greater than a predetermined threshold is stored with reference to the time difference storage unit.
サーバから取得した時刻情報を利用して前記サーバの現在時刻と自システムの現在時刻との時刻差を算出して時刻差記憶部に格納すると共に、自システムの現在時刻を補正する時刻補正手段を備えるコンピュータを、
前記時刻差記憶部を参照し、予め定められている閾値以上の時刻差が格納されている場合は、アラームを発する監視手段として機能させるためのプログラム。
Time correction means for calculating the time difference between the current time of the server and the current time of the own system using the time information acquired from the server, storing the time difference in the time difference storage unit, and correcting the current time of the own system A computer with
A program for referring to the time difference storage unit and functioning as monitoring means for issuing an alarm when a time difference equal to or greater than a predetermined threshold is stored.
JP2009075730A 2009-03-26 2009-03-26 Time correction device, time correction system, time correction method, and program Withdrawn JP2010231310A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009075730A JP2010231310A (en) 2009-03-26 2009-03-26 Time correction device, time correction system, time correction method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009075730A JP2010231310A (en) 2009-03-26 2009-03-26 Time correction device, time correction system, time correction method, and program

Publications (1)

Publication Number Publication Date
JP2010231310A true JP2010231310A (en) 2010-10-14

Family

ID=43047094

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009075730A Withdrawn JP2010231310A (en) 2009-03-26 2009-03-26 Time correction device, time correction system, time correction method, and program

Country Status (1)

Country Link
JP (1) JP2010231310A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3032776A1 (en) * 2014-12-08 2016-06-15 Diebold, Inc. Clock synchronization and authentication
JP2017028654A (en) * 2015-07-28 2017-02-02 ルネサスエレクトロニクス株式会社 Communication terminal and program
JP2018169168A (en) * 2017-03-29 2018-11-01 京セラドキュメントソリューションズ株式会社 Electronic apparatus and program
JP2019022115A (en) * 2017-07-19 2019-02-07 沖電気工業株式会社 Synchronization system, communication device, synchronization program, and synchronization method
JP2020060461A (en) * 2018-10-11 2020-04-16 セイコーエプソン株式会社 Real time clock device, electronic apparatus, and movable body
CN111865462A (en) * 2020-05-26 2020-10-30 石化盈科信息技术有限责任公司 Time synchronization method and device based on Internet of things, computer and storage medium
WO2021210623A1 (en) * 2020-04-15 2021-10-21 国立研究開発法人情報通信研究機構 Clock synchronization system and synchronization method
CN113992295A (en) * 2021-10-29 2022-01-28 世邦通信股份有限公司 Method and system for realizing timing of multiple NTP (network time protocol) servers, computer equipment and storage medium

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3032776A1 (en) * 2014-12-08 2016-06-15 Diebold, Inc. Clock synchronization and authentication
US10110368B2 (en) 2014-12-08 2018-10-23 Diebold Nixdorf, Incorporated Clock synchronization
JP2017028654A (en) * 2015-07-28 2017-02-02 ルネサスエレクトロニクス株式会社 Communication terminal and program
JP2018169168A (en) * 2017-03-29 2018-11-01 京セラドキュメントソリューションズ株式会社 Electronic apparatus and program
JP2019022115A (en) * 2017-07-19 2019-02-07 沖電気工業株式会社 Synchronization system, communication device, synchronization program, and synchronization method
JP7172411B2 (en) 2018-10-11 2022-11-16 セイコーエプソン株式会社 Real-time clock devices, electronic devices and moving bodies
JP2020060461A (en) * 2018-10-11 2020-04-16 セイコーエプソン株式会社 Real time clock device, electronic apparatus, and movable body
WO2021210623A1 (en) * 2020-04-15 2021-10-21 国立研究開発法人情報通信研究機構 Clock synchronization system and synchronization method
JP7502769B2 (en) 2020-04-15 2024-06-19 国立研究開発法人情報通信研究機構 Clock synchronization system and method
CN111865462A (en) * 2020-05-26 2020-10-30 石化盈科信息技术有限责任公司 Time synchronization method and device based on Internet of things, computer and storage medium
CN111865462B (en) * 2020-05-26 2023-04-07 石化盈科信息技术有限责任公司 Time synchronization method and device based on Internet of things, computer and storage medium
CN113992295A (en) * 2021-10-29 2022-01-28 世邦通信股份有限公司 Method and system for realizing timing of multiple NTP (network time protocol) servers, computer equipment and storage medium
CN113992295B (en) * 2021-10-29 2024-04-02 世邦通信股份有限公司 Multi-NTP server timing realization method and system, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
JP2010231310A (en) Time correction device, time correction system, time correction method, and program
CN110168971B (en) Method, computer-readable medium, system, and vehicle for validating a function of time
US7676679B2 (en) Method for self-synchronizing time between communicating networked systems using timestamps
CN107395312B (en) A kind of secure network method for synchronizing time and device
US7468981B2 (en) Clock-based replay protection
US6823456B1 (en) System and method for providing trusted services via trusted server agents
US8464065B2 (en) Procedure and architecture for the protection of real time data
US20060156011A1 (en) Network device having time correction function
EP2405621A1 (en) A method of time synchronization communication
US20060282675A1 (en) Message authentication system, message transmission apparatus and message reception apparatus
JP6814549B2 (en) Arithmetic logic unit, authentication system, authentication method
JP5598164B2 (en) Computer system
US9621689B2 (en) System and method for authenticating a network time protocol (NTP)
CN102739626A (en) Method and device for time synchronization, time stamping device and trusted time server
JP2011108167A (en) Computer system
JP2009276890A (en) Method for detecting error of data communication
JP6814659B2 (en) Information processing system and information processing method
CN116055172A (en) Equipment authentication method, system, electronic equipment and storage medium
US20220179447A1 (en) Method For Synchronizing Clocks Of At Least Two Devices
US11677741B2 (en) Method and system for secure time synchronization
US11973581B2 (en) Method for protecting the time synchronization in a network against unauthorized changes
CN113169865B (en) Control device, industrial control system, and encryption key lifetime extension method
US20190068384A1 (en) Authentication system of synchronizing real-time multi-dimensions timestamp issued by a multi-dimensions timestamp device and a method thereof
JP5940013B2 (en) In-vehicle communication system and communication device
JP2011109204A (en) Long-term signature server, drive recorder, and long-term signature terminal

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20120605