JP2007278873A - Time synchronizer, time synchronization method, and program thereof - Google Patents

Time synchronizer, time synchronization method, and program thereof Download PDF

Info

Publication number
JP2007278873A
JP2007278873A JP2006106200A JP2006106200A JP2007278873A JP 2007278873 A JP2007278873 A JP 2007278873A JP 2006106200 A JP2006106200 A JP 2006106200A JP 2006106200 A JP2006106200 A JP 2006106200A JP 2007278873 A JP2007278873 A JP 2007278873A
Authority
JP
Japan
Prior art keywords
time
information
synchronization
allowable error
accuracy
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
JP2006106200A
Other languages
Japanese (ja)
Inventor
Yoshiyuki Ono
芳幸 小野
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.)
Seiko Epson Corp
Original Assignee
Seiko Epson 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 Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2006106200A priority Critical patent/JP2007278873A/en
Publication of JP2007278873A publication Critical patent/JP2007278873A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

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

Abstract

<P>PROBLEM TO BE SOLVED: To easily set appropriate timing for making the time synchronized. <P>SOLUTION: This time synchronizer stores accuracy information 45c on the accuracy of time measured by an RTC 46 in an HDD 45, acquires allowable error information including allowable errors allowed in time measured by the RTC 46, and sets the time synchronization timing, based on the accuracy information 45c and on the error information so that the times for performing time synchronization falls within a range that does not exceed the allowable error acquired by the time measured by the RTC 46, with the time synchronization for synchronizing time information generated by the RTC 46 with base time generated by an NTP server 50. Furthermore, this time synchronizer finds the time of deviation of the RTC 46 from the base time, based on the base time received a plurality of number of times in performing time synchronization, updates the accuracy information 45c based on the found time deviation, and stores it in the HDD 45. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は、時刻同期装置、時刻同期方法及びそのプログラムに関する。   The present invention relates to a time synchronization apparatus, a time synchronization method, and a program thereof.

従来、時刻同期装置としては、基準時刻の問合せを基準時刻サーバへ行い、基準時刻サーバが生成した基準時間を受信するとこの受信した基準時間を記憶して管理し、所定数未満の端末からの時刻問合せ要求を受信すると基準時刻サーバに各端末へ基準時刻を出力させ、所定数以上の端末からの時刻問合せ要求を受信するとこの時刻同期装置(ルータ)が管理している時間を各端末へ出力することにより基準時刻サーバの負荷を低減するものが提案されている(例えば、特許文献1参照)。
特開2003−110562号公報
Conventionally, as a time synchronizer, when a reference time is inquired to a reference time server and the reference time generated by the reference time server is received, the received reference time is stored and managed, and the time from less than a predetermined number of terminals When an inquiry request is received, the reference time server outputs a reference time to each terminal, and when a time inquiry request from a predetermined number of terminals or more is received, the time managed by this time synchronizer (router) is output to each terminal. There has been proposed one that reduces the load on the reference time server (see, for example, Patent Document 1).
JP 2003-110562 A

しかしながら、この特許文献1に記載された時刻同期装置では、時刻の問合せを要求する時刻同期を行うタイミングについては考慮されていなかった。ここで、時刻同期を行う周期を短く設定すると時刻問合せが頻繁に実行されることから負荷の増加などの問題があり、時刻同期を行う周期を長く設定すると基準時刻とのずれが大きくなってしまうという問題があった。この時刻同期装置では基準時刻からどの程度ずれるのかについての情報がないため、試行錯誤で基準時刻からのずれを求めたりするしかなく、時刻を同期させる適切な時期を容易に設定することができなかった。   However, in the time synchronization apparatus described in Patent Document 1, the timing for performing time synchronization for requesting time inquiry has not been considered. Here, there is a problem such as an increase in load because time inquiry is frequently performed if the time synchronization period is set short, and if the time synchronization period is set long, the deviation from the reference time becomes large. There was a problem. Since this time synchronizer does not have information on how much it deviates from the reference time, it is only possible to find a deviation from the reference time by trial and error, and it is not possible to easily set an appropriate time to synchronize the time. It was.

本発明は、このような課題に鑑みなされたものであり、時刻を同期させる適切な時期を容易に設定することができる時刻同期装置、時刻同期方法及びそのプログラムを提供することを目的とする。   The present invention has been made in view of such problems, and an object of the present invention is to provide a time synchronization apparatus, a time synchronization method, and a program thereof that can easily set an appropriate time to synchronize the time.

本発明は、上述の目的を達成するために以下の手段を採った。   The present invention adopts the following means in order to achieve the above-mentioned object.

本発明の時刻同期装置は、
基準装置が発生する基準時刻と時刻の同期を行う時刻同期装置であって、
時刻情報を発生する時刻情報発生手段と、
前記時刻情報発生手段が発生する時刻情報の精度に関する精度情報を記憶する記憶手段と、
前記時刻情報発生手段によって発生される時刻情報に許容される許容誤差を含む許容誤差情報を取得可能な許容誤差取得手段と、
前記時刻情報発生手段が発生する時刻情報と前記基準時刻とを同期させる時刻同期を行う時期を前記取得された許容誤差情報と前記記憶された精度情報とに基づいて設定する同期時期設定手段と、
を備えたものである。
The time synchronization apparatus of the present invention is
A time synchronization device that synchronizes time with a reference time generated by a reference device,
Time information generating means for generating time information;
Storage means for storing accuracy information relating to the accuracy of time information generated by the time information generation means;
Allowable error acquisition means capable of acquiring allowable error information including allowable error in time information generated by the time information generating means;
Synchronization time setting means for setting a time for performing time synchronization for synchronizing the time information generated by the time information generating means and the reference time based on the acquired allowable error information and the stored accuracy information;
It is equipped with.

この時刻同期装置では、時刻情報発生手段が発生する時刻情報の精度に関する精度情報を記憶し、時刻情報発生手段によって発生される時刻情報に許容される許容誤差を含む許容誤差情報を取得し、時刻情報発生手段が発生する時刻情報と基準装置が発生する基準時刻とを同期させる時刻同期を行う時期を、取得された許容誤差情報と記憶された精度情報とに基づいて設定する。このように、時刻情報の精度に関する精度情報と時刻情報に許容される許容誤差を含む許容誤差情報とを用いて時刻同期を行う時期を設定するのである。したがって、時刻を同期させる適切な時期を容易に設定することができる。   In this time synchronizer, accuracy information relating to the accuracy of time information generated by the time information generating means is stored, allowable error information including an allowable error allowed in the time information generated by the time information generating means is acquired, and time A time synchronization time for synchronizing the time information generated by the information generating means and the reference time generated by the reference device is set based on the acquired allowable error information and the stored accuracy information. As described above, the time synchronization is set by using the accuracy information regarding the accuracy of the time information and the allowable error information including the allowable error allowed for the time information. Therefore, it is possible to easily set an appropriate time for synchronizing the time.

本発明の時刻同期装置において、前記同期時期設定手段は、前記取得した許容誤差情報と前記記憶された精度情報とに基づいて、前記時刻情報発生手段が発生する時刻情報が前記取得した許容誤差を超えない範囲内に該取得した許容誤差情報と前記記憶された精度情報とに基づいて前記時刻同期を行う時期を設定してもよい。このとき、前記同期時期設定手段は、前記精度情報に含まれる単位時間あたりの前記基準時刻と前記時刻情報との差であるずれ時間を前記許容誤差情報に含まれる許容誤差で除算することにより単位時間あたりの前記時刻同期を行う回数を求め、該求めた回数に応じた前記時刻同期を行う時期を設定してもよい。   In the time synchronization apparatus of the present invention, the synchronization timing setting means is configured such that the time information generated by the time information generation means indicates the acquired allowable error based on the acquired allowable error information and the stored accuracy information. A time for performing the time synchronization may be set based on the acquired allowable error information and the stored accuracy information within a range not exceeding. At this time, the synchronization timing setting means divides a deviation time, which is a difference between the reference time per unit time included in the accuracy information and the time information, by an allowable error included in the allowable error information. The number of times of the time synchronization per time may be obtained, and the time for performing the time synchronization according to the obtained number of times may be set.

本発明の時刻同期装置において、前記記憶手段は、基準時刻に基づいて定められた前記精度情報を予め記憶していてもよい。こうすれば、当初から精度情報が記憶されているため、新たに精度情報を求めることなく時刻同期を行う時期を設定することができる。   In the time synchronizer of the present invention, the storage means may store the accuracy information determined based on a reference time in advance. By doing so, since the accuracy information is stored from the beginning, it is possible to set the time for performing the time synchronization without newly obtaining the accuracy information.

本発明の時刻同期装置は、前記基準装置と情報のやり取りが可能な情報送受信手段と、前記基準装置で生成される基準時刻を前記情報送受信手段に複数回受信させ、該複数回受信した前記基準時刻と該受信のときの前記時刻情報発生手段が発生した時刻情報とに基づいて前記精度情報を求め、該求めた精度情報を前記記憶手段に記憶させる記憶制御手段と、を備えていてもよい。こうすれば、基準装置の基準時刻を用いて精度情報を更新可能であるため、記憶手段に記憶された精度情報を基準装置の基準時刻に適合したものに更新することができる。このとき、前記記憶制御手段は、前記基準装置で生成される基準時刻を前記情報送受信手段に複数回受信させるに際して、起動された直後と該起動直後から所定時間後とで前記基準時刻を前記情報送受信手段に受信させてもよい。こうすれば、起動時から比較的短い時間で精度情報が更新されるため、比較的迅速に、記憶手段に記憶された精度情報を基準装置の基準時刻に適合したものに更新することができる。   The time synchronization apparatus according to the present invention includes an information transmitting / receiving unit capable of exchanging information with the reference device, a reference time generated by the reference device received by the information transmitting / receiving unit a plurality of times, and the reference received at the plurality of times. A storage control unit that obtains the accuracy information based on the time and the time information generated by the time information generation unit at the time of reception, and stores the obtained accuracy information in the storage unit. . In this way, since the accuracy information can be updated using the reference time of the reference device, the accuracy information stored in the storage means can be updated to one that matches the reference time of the reference device. At this time, the storage control means determines the information on the reference time immediately after being activated and a predetermined time after the activation when the information transmitting / receiving means receives the reference time generated by the reference device a plurality of times. You may make a transmission / reception means receive. In this way, the accuracy information is updated in a relatively short time from the start-up, so that the accuracy information stored in the storage means can be updated relatively quickly to the one adapted to the reference time of the reference device.

精度情報を求めて記憶手段に記憶させる態様の本発明の時刻同期装置において、前記記憶制御手段は、前記基準装置で生成される基準時刻を前記情報送受信手段に複数回受信させるに際して、前記同期時期設定手段によって設定された時期に行う前記時刻同期で前記基準時刻を前記情報送受信手段に受信させてもよい。こうすれば、時刻同期を利用して精度情報を更新可能であるため、精度情報を更新する処理を時刻同期と別に行う必要がない。   In the time synchronization apparatus of the present invention in which accuracy information is obtained and stored in the storage means, the storage control means is configured to receive the reference time generated by the reference apparatus a plurality of times when the information transmission / reception means receives the reference time. The reference time may be received by the information transmitting / receiving means in the time synchronization performed at the time set by the setting means. In this way, the accuracy information can be updated using time synchronization, and therefore it is not necessary to perform processing for updating the accuracy information separately from time synchronization.

本発明の時刻同期装置において、前記記憶手段は、予め定められた前記許容誤差情報を記憶し、前記許容誤差取得手段は、前記記憶手段に記憶された前記許容誤差情報を該記憶手段から取得してもよい。こうすれば、予め記憶されている許容誤差情報を取得してその後の処理を実行するため、ユーザは、許容誤差情報を入力する手間がいらない。   In the time synchronization apparatus of the present invention, the storage means stores the predetermined allowable error information, and the allowable error acquisition means acquires the allowable error information stored in the storage means from the storage means. May be. In this way, since the allowable error information stored in advance is acquired and the subsequent processing is executed, the user does not have to input the allowable error information.

本発明の時刻同期装置は、前記同期時期設定手段によって設定された時期に前記時刻同期を実行する時刻同期実行手段、を備えたものとしてもよい。こうすれば、許容誤差の範囲内に時刻同期を実行するため、時刻情報発生手段が発生する時刻情報を許容誤差の範囲内とすることができる。   The time synchronization apparatus of the present invention may include time synchronization execution means for executing the time synchronization at a time set by the synchronization time setting means. In this way, since time synchronization is executed within the allowable error range, the time information generated by the time information generating means can be set within the allowable error range.

本発明の時刻同期方法は、
基準装置で生成される基準時刻と時刻の同期を行う、時刻情報を発生する時刻情報発生手段と、前記時刻情報発生手段が発生する時刻情報の精度に関する精度情報を記憶する記憶手段とを備えた時刻同期装置を用いた時刻同期方法であって、
(a)前記時刻情報発生手段によって発生される時刻情報に許容される許容誤差を含む許容誤差情報を取得するステップと、
(b)前記時刻情報発生手段が発生する時刻情報と前記基準時刻とを同期させる時刻同期を行う時期を前記ステップ(a)で取得した許容誤差情報と前記記憶された精度情報とに基づいて設定するステップと、
を含むものである。
The time synchronization method of the present invention
Time information generating means for generating time information for synchronizing the time with the reference time generated by the reference device, and storage means for storing accuracy information regarding the accuracy of the time information generated by the time information generating means. A time synchronization method using a time synchronization device,
(A) obtaining allowable error information including an allowable error allowed in the time information generated by the time information generating means;
(B) A time synchronization time for synchronizing the time information generated by the time information generating means and the reference time is set based on the allowable error information acquired in the step (a) and the stored accuracy information. And steps to
Is included.

この時刻同期方法では、時刻情報発生手段が発生する時刻情報の精度に関する精度情報を記憶し、時刻情報発生手段によって発生される時刻情報に許容される許容誤差を含む許容誤差情報を取得し、時刻情報発生手段が発生する時刻情報と基準装置が発生する基準時刻とを同期させる時刻同期を行う時期を、取得された許容誤差情報と記憶された精度情報とに基づいて設定する。このように、時刻情報の精度に関する精度情報と時刻情報に許容される許容誤差を含む許容誤差情報とを用いて時刻同期を行う時期を設定するのである。したがって、時刻を同期させる適切な時期を容易に設定することができる。なお、この時刻同期方法において、上述した時刻同期装置の種々の態様を採用してもよいし、また、上述した時刻同期装置の各機能を実現するようなステップを追加してもよい。   In this time synchronization method, accuracy information relating to the accuracy of time information generated by the time information generation means is stored, allowable error information including an allowable error allowed for the time information generated by the time information generation means is acquired, A time synchronization time for synchronizing the time information generated by the information generating means and the reference time generated by the reference device is set based on the acquired allowable error information and the stored accuracy information. As described above, the time synchronization is set by using the accuracy information regarding the accuracy of the time information and the allowable error information including the allowable error allowed for the time information. Therefore, it is possible to easily set an appropriate time for synchronizing the time. In this time synchronization method, various aspects of the time synchronization device described above may be adopted, and steps for realizing each function of the time synchronization device described above may be added.

本発明のプログラムは、上述した時刻同期方法の各ステップを1又は複数のコンピュータに実現させるためのものである。このプログラムは、コンピュータが読み取り可能な記録媒体(例えばハードディスク、ROM、FD、CD、DVDなど)に記録されていてもよいし、伝送媒体(インターネットやLANなどの通信網)を介してあるコンピュータから別のコンピュータへ配信されてもよいし、その他どのような形で授受されてもよい。このプログラムを一つのコンピュータに実行させるか又は複数のコンピュータに各ステップを分担して実行させれば、上述した時刻同期方法の各ステップが実行されるため、該時刻同期方法と同様の作用効果が得られる。   The program of the present invention is for causing one or more computers to implement each step of the above-described time synchronization method. This program may be recorded on a computer-readable recording medium (for example, hard disk, ROM, FD, CD, DVD, etc.), or from a computer via a transmission medium (communication network such as the Internet or LAN). It may be distributed to another computer, or may be exchanged in any other form. If this program is executed by a single computer, or if each step is shared and executed by a plurality of computers, each step of the time synchronization method described above is executed. Therefore, the same effects as the time synchronization method can be obtained. can get.

次に、本発明を実施するための最良の形態を図面を用いて説明する。   Next, the best mode for carrying out the present invention will be described with reference to the drawings.

図1は、本発明の一実施形態である印刷処理時刻管理システム10の構成の概略を示す構成図であり、図2は、印刷サーバ40のHDD45に記憶された時刻同期設定プログラム45a、時刻同期実行プログラム45b、精度情報45c、自動設定情報45d及び印刷ログ45eの説明図である。本実施形態の印刷処理時刻管理システム10は、図1に示すように、LAN60を介して受信した印刷データを印刷するプリンタ20及びプリンタ30と、LAN60に接続され本発明の時刻同期装置としての機能を備えた印刷サーバ40と、この印刷サーバ40とLAN60を介して接続され本発明の基準装置の機能を備えたNTP(Network Time Protocol)サーバ50と、によって構成されている。なお、この印刷処理時刻管理システム10では、図示しない複数のユーザPCや他のプリンタがLAN60に接続されている。   FIG. 1 is a configuration diagram showing an outline of the configuration of a print processing time management system 10 according to an embodiment of the present invention. FIG. 2 shows a time synchronization setting program 45a stored in the HDD 45 of the print server 40, and time synchronization. It is explanatory drawing of the execution program 45b, the precision information 45c, the automatic setting information 45d, and the print log 45e. As shown in FIG. 1, the print processing time management system 10 according to the present embodiment includes a printer 20 and a printer 30 that print print data received via the LAN 60, and a function as a time synchronization apparatus of the present invention connected to the LAN 60. And an NTP (Network Time Protocol) server 50 connected to the print server 40 via the LAN 60 and having the function of the reference device of the present invention. In the print processing time management system 10, a plurality of user PCs and other printers (not shown) are connected to the LAN 60.

プリンタ20は、図示しないCPUを中心とするマイクロプロセッサとして構成され装置全体の制御を司るコントローラ21と、単一感光体方式と中間転写方式とを採用しシアン(C)、マゼンタ(M)、イエロー(Y)、ブラック(K)の4色のトナーを用いて印刷可能なフルカラーの電子写真方式の印刷機構22と、電気通信回線としてのLAN60に接続された機器との間で信号の送受信が可能なネットワークインターフェース(I/F)23とを備えている。なお、コントローラ21のCPUは内部システムクロックを有しており、この内部システムクロックは水晶発振子からの発信クロックを分周してクロック周波数を生成する。   The printer 20 is configured as a microprocessor centered on a CPU (not shown), and adopts a controller 21 that controls the entire apparatus, a single photoconductor system and an intermediate transfer system, and cyan (C), magenta (M), and yellow. Signals can be transmitted and received between the full-color electrophotographic printing mechanism 22 that can be printed using four color toners (Y) and black (K), and a device connected to the LAN 60 as an electric communication line. Network interface (I / F) 23. Note that the CPU of the controller 21 has an internal system clock, and this internal system clock divides the oscillation clock from the crystal oscillator to generate a clock frequency.

プリンタ30は、図示しないCPUを中心とするマイクロプロセッサとして構成され装置全体の制御を司るコントローラ31と、単一感光体方式と中間転写方式とを採用しシアン(C)、マゼンタ(M)、イエロー(Y)、ブラック(K)の4色のトナーを用いて印刷可能なフルカラーの電子写真方式の印刷機構32と、電気通信回線としてのLAN60に接続された機器との間で信号の送受信が可能なネットワークインターフェース(I/F)33とを備えている。なお、コントローラ31のCPUは内部システムクロックを有しており、この内部システムクロックは水晶発振子からの発信クロックを分周してクロック周波数を生成する。   The printer 30 is configured as a microprocessor centered on a CPU (not shown), and adopts a controller 31 for controlling the entire apparatus, a single photoconductor system and an intermediate transfer system, and cyan (C), magenta (M), and yellow. Signals can be transmitted and received between the full-color electrophotographic printing mechanism 32 that can be printed using four-color toners (Y) and black (K) and a device connected to the LAN 60 as an electric communication line. Network interface (I / F) 33. Note that the CPU of the controller 31 has an internal system clock, and this internal system clock divides the oscillation clock from the crystal oscillator to generate a clock frequency.

印刷サーバ40は、各種制御を実行するCPU42と、各種制御プログラムを記憶するROM43と、データを一時記憶するRAM44と、各種アプリケーションプログラムや各種データファイルを記憶する大容量メモリであるHDD45と、印刷サーバ40の時刻を計時するRTC(Real time clock)46と、外部機器との間で信号の送受信が可能なI/F47と、各種情報を画面表示するディスプレイ48と、ユーザが各種指令を入力するキーボード等の入力装置49とを備え、これらは図示しないバスによって情報のやり取りが可能なように接続されている。この印刷サーバ40は、ディスプレイ48に表示されたカーソル等をユーザが入力装置49を介して入力操作するとその入力操作に応じた動作を実行する機能を有している。この印刷サーバ40は、NTPサーバ50から基準時刻を受信してNTPサーバ50の基準時刻にRTC46の時刻を合わせる時刻同期(以下単に時刻同期とする)を行ったり、プリンタ20やプリンタ30に印刷データを送信したり、プリンタ20やプリンタ30で印刷した内容を受信しこの印刷内容と印刷した時刻などを含む印刷ログを保存・管理するサーバである。RAM44には、LAN60を介してプリンタ20やプリンタ30、NTPサーバ50とデータを送受信する際に用いられる、所定領域に図示しない受信バッファ及び送信バッファが設けられている。HDD45には、アプリケーションプログラムである時刻同期設定プログラム45aや時刻同期実行プログラム45b、精度情報45c、自動設定情報45d、印刷ログ45eなどが記憶されている。RTC46は、水晶発振子からの発信クロックを分周してクロック周波数を生成するものであり、電源が切られている間も図示しないバッテリから電源供給を受けて動作する。   The print server 40 includes a CPU 42 that executes various controls, a ROM 43 that stores various control programs, a RAM 44 that temporarily stores data, an HDD 45 that is a large-capacity memory that stores various application programs and various data files, and a print server. An RTC (Real time clock) 46 that measures 40 times, an I / F 47 that can transmit and receive signals to and from an external device, a display 48 that displays various information on a screen, and a keyboard on which a user inputs various commands Etc., and these are connected so that information can be exchanged by a bus (not shown). The print server 40 has a function of executing an operation corresponding to the input operation when the user inputs the cursor or the like displayed on the display 48 via the input device 49. The print server 40 receives the reference time from the NTP server 50 and performs time synchronization (hereinafter simply referred to as time synchronization) to match the time of the RTC 46 with the reference time of the NTP server 50, or print data to the printer 20 or 30. , Or receives the contents printed by the printer 20 or the printer 30, and stores and manages a print log including the printed contents and the printing time. The RAM 44 is provided with a reception buffer and a transmission buffer (not shown) in a predetermined area used when data is transmitted / received to / from the printer 20, the printer 30, and the NTP server 50 via the LAN 60. The HDD 45 stores a time synchronization setting program 45a, a time synchronization execution program 45b, accuracy information 45c, automatic setting information 45d, a print log 45e, and the like, which are application programs. The RTC 46 divides the oscillation clock from the crystal oscillator to generate a clock frequency, and operates while receiving power from a battery (not shown) while the power is off.

ここで、HDD45に記憶された時刻同期設定プログラム45a、時刻同期実行プログラム45b、精度情報45c、自動設定情報45d及び印刷ログ45eについて図2を用いて説明する。時刻同期設定プログラム45aは、時刻同期を実行するタイミングなどの条件を精度情報45cや自動設定情報45dなどを利用して設定するプログラムである。時刻同期実行プログラム45bは、時刻同期設定プログラム45aで設定された条件に基づいて時刻同期を実行するプログラムである。精度情報45cは、RTC46により計時される時刻が基準時刻に対してどの程度ずれるのか、つまり、RTC46の時刻精度に関する情報である。この精度情報45cには、初期値として、出荷前の検査時に、基準時刻が所定時間経つ間を基準時間とし、この基準時間の間にRTC46で計時された時間を実測時間とし、((実測時間)−(基準時間))/(基準時間)…式(1)によって求めた単位基準時間あたりのRTC56の基準時刻とRTC46の実測時刻との差であるずれ時間(以下単にずれ時間ともいう)が含まれている。この精度情報45cは、印刷サーバ40が起動されるたびにNTPサーバ50のRTC56(図1参照)が計時する基準時刻に基づいて更新される。自動設定情報45dは、時刻同期を行う際の設定をユーザからの入力なしで自動設定するときに用いられる情報である。この自動設定情報45dには、基準時刻を取得する取得先のサーバ名、そのIPアドレス、印刷サーバ40の時刻のずれとして許容される許容ずれ時間(以下許容誤差という)である自動設定時許容誤差情報等が含まれている。ここでは、自動設定時許容誤差情報として所定の初期値(ここでは2秒)が設定されている。印刷ログ45eは、LAN60に接続されている各プリンタ20,30の印刷内容や印刷時刻などを含む過去の印刷処理に関する情報を保存するものである。この印刷ログ45eには、プリンタ20やプリンタ30で実行された印刷の情報として、RTC46の時刻に基づく印刷時刻や印刷処理を実行したプリンタ名、写真及び文書などの印刷種別、印刷枚数、カラーやモノクロなどの印刷色などが含まれている。時刻同期設定プログラム45aや時刻同期実行プログラム45b、精度情報45c、自動設定情報45dは、ここでは、印刷ログ45eに含まれる印刷時刻をRTC56の基準時刻とほぼ同じ時間軸とするために用いられる。   Here, the time synchronization setting program 45a, the time synchronization execution program 45b, the accuracy information 45c, the automatic setting information 45d, and the print log 45e stored in the HDD 45 will be described with reference to FIG. The time synchronization setting program 45a is a program for setting conditions such as timing for executing time synchronization using accuracy information 45c, automatic setting information 45d, and the like. The time synchronization execution program 45b is a program that executes time synchronization based on the conditions set by the time synchronization setting program 45a. The accuracy information 45c is information relating to how much the time counted by the RTC 46 is deviated from the reference time, that is, the time accuracy of the RTC 46. In the accuracy information 45c, as an initial value, a time during which a reference time passes during a pre-shipment inspection is set as a reference time, and a time measured by the RTC 46 during this reference time is set as an actual measurement time. ) − (Reference time)) / (reference time)... A deviation time (hereinafter also simply referred to as a deviation time) that is the difference between the reference time of the RTC 56 per unit reference time and the actual measurement time of the RTC 46 obtained by the equation (1). include. The accuracy information 45c is updated based on a reference time measured by the RTC 56 (see FIG. 1) of the NTP server 50 every time the print server 40 is started. The automatic setting information 45d is information used when the setting for performing time synchronization is automatically set without input from the user. The automatic setting information 45d includes the name of the server from which the reference time is acquired, its IP address, and an allowable deviation time that is allowed as a time deviation of the print server 40 (hereinafter referred to as an allowable error). Information etc. are included. Here, a predetermined initial value (here, 2 seconds) is set as the automatic setting allowable error information. The print log 45e stores information related to past print processing including the print contents and print time of the printers 20 and 30 connected to the LAN 60. The print log 45e includes, as information on printing executed by the printer 20 and the printer 30, the printing time based on the time of the RTC 46, the name of the printer that executed the printing process, the printing type such as a photograph and a document, the number of copies, the color, Print colors such as monochrome are included. Here, the time synchronization setting program 45a, the time synchronization execution program 45b, the accuracy information 45c, and the automatic setting information 45d are used to set the print time included in the print log 45e to the same time axis as the reference time of the RTC 56.

NTPサーバ50は、ネットワーク・タイム・プロトコルに基づいてUTC(Coordinated Universal Time)の基準時計から正確な時刻を取得するコンピュータであり、各種制御を実行するCPU52と、各種制御プログラムを記憶するROM53と、データを一時記憶するRAM54と、各種アプリケーションプログラムや各種データファイルを記憶する大容量メモリであるHDD55と、基準時刻を計時するRTC56と、外部機器との間で信号の送受信が可能なI/F57とを備え、これらは図示しないバスによって情報のやり取りが可能なように接続されている。このNTPサーバ50は、印刷サーバ40などLAN60に接続されている機器から受信した要求内容に応じた応答内容を印刷サーバ40などへ送信したりする。なお、このRTC56は、印刷サーバ40のRTC46よりも時刻精度が高いものである。   The NTP server 50 is a computer that acquires an accurate time from a UTC (Coordinated Universal Time) reference clock based on a network time protocol, and includes a CPU 52 that executes various controls, a ROM 53 that stores various control programs, A RAM 54 that temporarily stores data, an HDD 55 that is a large-capacity memory that stores various application programs and various data files, an RTC 56 that measures a reference time, and an I / F 57 that can transmit and receive signals to and from external devices These are connected so that information can be exchanged by a bus (not shown). The NTP server 50 transmits response content corresponding to the request content received from a device connected to the LAN 60 such as the print server 40 to the print server 40 or the like. The RTC 56 has higher time accuracy than the RTC 46 of the print server 40.

次に、こうして構成された本実施形態の印刷処理時刻管理システム10の動作について、まず、印刷サーバ40がNTPサーバ50に時刻の問合せを行う時刻同期の条件を設定する動作について説明する。図3は、印刷サーバ40のCPU42により実行される時刻同期設定処理ルーチンの一例を表すフローチャートである。このルーチンは、ユーザにより印刷サーバ40のディスプレイ48上で時刻同期設定プログラム45aの実行が指示されたあとに実行される。   Next, regarding the operation of the print processing time management system 10 according to the present embodiment configured as described above, first, an operation for setting a time synchronization condition in which the print server 40 inquires the NTP server 50 about time will be described. FIG. 3 is a flowchart illustrating an example of a time synchronization setting processing routine executed by the CPU 42 of the print server 40. This routine is executed after the user instructs execution of the time synchronization setting program 45a on the display 48 of the print server 40.

このルーチンが開始されると、CPU42は、まず、ディスプレイ48に図4に示す時刻同期設定画面80を表示する(ステップS100)。この時刻同期設定画面80には、RTC46により計時されている現在の時刻を表示する時刻情報表示欄81と、自動で条件を設定するか否かを選択可能な自動設定入力欄82と、基準時刻を取得するサーバを選択するサーバ選択欄83と、サーバ選択欄83に入力されたサーバのIPアドレスを入力するIPアドレス入力欄84と、許容誤差を入力する許容誤差入力欄85と、NTPサーバとの接続状態を表すステータス表示欄86と、入力装置49の入力に基づいて各欄の選択等を行うカーソル80aが含まれている。ユーザはこの時刻同期設定画面80に条件を入力することにより、RTC46により計時されている時刻をRTC56の基準時刻に合わせる時刻同期を実行する周期(タイミング)などを設定する。なお、時刻情報表示欄81には、時刻取得ボタンが配置されており、このボタンをクリックすると直後に時刻同期を実行するようになっている。   When this routine is started, the CPU 42 first displays a time synchronization setting screen 80 shown in FIG. 4 on the display 48 (step S100). The time synchronization setting screen 80 includes a time information display field 81 for displaying the current time measured by the RTC 46, an automatic setting input field 82 for selecting whether or not conditions are automatically set, and a reference time. A server selection field 83 for selecting a server from which to obtain a server, an IP address input field 84 for inputting the IP address of the server input in the server selection field 83, an allowable error input field 85 for inputting an allowable error, an NTP server, And a cursor 80a for selecting each column based on an input from the input device 49 is included. The user inputs conditions on the time synchronization setting screen 80 to set a cycle (timing) for performing time synchronization for matching the time measured by the RTC 46 with the reference time of the RTC 56. Note that a time acquisition button is arranged in the time information display field 81, and time synchronization is executed immediately after clicking this button.

次に、CPU42は、自動設定が選択されているか否かを、自動設定入力欄82がチェックされているか否かに基づいて判定する(ステップS110)。自動設定が選択されていないと判定されたときには、CPU42は、各設定値が入力されたか否かを判定し(ステップS120)、設定値が入力されたと判定されたときには、その入力に応じた処理を実行する(ステップS130)。例えば、サーバ選択欄83がプルダウン操作されると選択可能なサーバ名を並べて表示し、その中からサーバが選択されると、そのサーバ名をサーバ選択欄83に表示する。あるいは、IPアドレス入力欄84に数値が入力されると、入力された数値をIPアドレス入力欄84に表示する。   Next, the CPU 42 determines whether or not automatic setting is selected based on whether or not the automatic setting input field 82 is checked (step S110). When it is determined that the automatic setting has not been selected, the CPU 42 determines whether or not each setting value has been input (step S120). When it is determined that the setting value has been input, a process corresponding to the input is performed. Is executed (step S130). For example, when the server selection field 83 is pulled down, selectable server names are displayed side by side, and when a server is selected from them, the server name is displayed in the server selection field 83. Alternatively, when a numerical value is input in the IP address input field 84, the input numerical value is displayed in the IP address input field 84.

ステップS130のあと、または、ステップS120で設定値が入力されていないと判定されたときには、CPU42は、許容誤差が入力されているか否かを、許容誤差入力欄85に数値が入力されているか否かに基づいて判定し(ステップS140)、許容誤差が入力されていないと判定されたときには、ステップS110以降の処理を実行する。この許容誤差は、RTC46の計時する時刻が基準時刻に対してどの程度ずれるのをユーザが許容するかを表す許容ずれ時間として入力されるよう設定されている。   After step S130 or when it is determined in step S120 that no set value has been input, the CPU 42 determines whether an allowable error has been input and whether a numerical value has been input in the allowable error input field 85. (Step S140), and if it is determined that the allowable error has not been input, the processing after step S110 is executed. This allowable error is set so as to be input as an allowable deviation time indicating how much the user allows the time measured by the RTC 46 to deviate from the reference time.

また、ステップS110で自動設定が選択されていると判定されたときには、CPU42は、自動設定時許容誤差や時刻同期を行うサーバ名、そのIPアドレスなど、時刻同期設定画面80に入力する情報を自動設定情報45dから読み出し、サーバ選択欄83,IPアドレス入力欄84,許容誤差入力欄85に入力する(ステップS150)。このように、自動設定情報45dを利用してユーザの入力の手間を省略するのである。   If it is determined in step S110 that automatic setting is selected, the CPU 42 automatically inputs information to be input to the time synchronization setting screen 80, such as an automatic setting tolerance, a name of a server that performs time synchronization, and its IP address. The information is read from the setting information 45d and input to the server selection field 83, the IP address input field 84, and the allowable error input field 85 (step S150). Thus, the user's input is saved by using the automatic setting information 45d.

ステップS150のあと、または、ステップS140で許容誤差が入力されていると判定されたときには、CPU42は、入力が終了したか否かを時刻同期設定画面80上に配置された設定完了ボタンがクリックされたか否かに基づいて判定し(ステップS160)、入力が終了していないと判定されたときには、ステップS110以降の処理を実行する。一方、入力が終了したと判定されたときには、CPU42は、HDD45に記憶された精度情報45cを読み出し(ステップS170)、読み出した精度情報45cと入力された許容誤差とに基づいて時刻同期タイミングを設定し(ステップS180)、設定した時刻同期タイミングや時刻同期設定画面80に入力された内容をHDD45の所定領域に保存し(ステップS190)、そのままこのルーチンを終了する。ここで、時刻同期タイミングは、精度情報45cに含まれる「ずれ時間」を「許容誤差」によって除算し、単位基準時間あたりの時刻同期の必要回数(頻度)を計算し、RTC46で計時される時刻に換算した時刻同期の時間を計算することにより求める。具体的には、例えば「ずれ時間」が10秒/hであり、「許容誤差」が2秒である場合、単位基準時間あたりの時刻同期の必要回数は5回/hであり、RTC46で計時される時刻に換算した時刻同期タイミングは、基準時刻が1時間経過するとRTC46で計時される時刻が1時間10秒であるから、これを5回/hで除算した12分2秒に計算される(後述図6参照)。即ち、RTC46で計時されている時刻が12分2秒経過する毎にRTC46の時刻をRTC56の基準時刻に同期させると、基準時刻とRTC46の時刻との時間差が2秒以内となるように維持することができるのである。ここでは、RTC46で計時される時刻に換算した最長の時刻同期タイミングを計算し(12分などではなく12分2秒に計算し)、許容誤差の最大値に至るまで時刻同期を行わないようにするため、NTPサーバ50の負荷をできる限り低減することができる。   After step S150 or when it is determined in step S140 that an allowable error has been input, the CPU 42 clicks on a setting completion button arranged on the time synchronization setting screen 80 to determine whether or not the input has been completed. If it is determined that the input has not been completed, the processing after step S110 is executed. On the other hand, when it is determined that the input has been completed, the CPU 42 reads the accuracy information 45c stored in the HDD 45 (step S170), and sets the time synchronization timing based on the read accuracy information 45c and the input allowable error. (Step S180), the set time synchronization timing and the contents input to the time synchronization setting screen 80 are stored in a predetermined area of the HDD 45 (Step S190), and this routine is terminated as it is. Here, the time synchronization timing is calculated by dividing the “deviation time” included in the accuracy information 45c by the “allowable error”, calculating the required number (frequency) of time synchronization per unit reference time, and measuring the time counted by the RTC 46. It is obtained by calculating the time of time synchronization converted to. Specifically, for example, when the “deviation time” is 10 seconds / h and the “allowable error” is 2 seconds, the required number of time synchronizations per unit reference time is 5 times / h, and the time is measured by the RTC 46. The time synchronization timing converted into the calculated time is calculated as 12 minutes and 2 seconds divided by 5 times / h because the time counted by the RTC 46 is 1 hour and 10 seconds when the reference time elapses 1 hour. (See FIG. 6 described later). That is, when the time measured by the RTC 46 is synchronized with the reference time of the RTC 56 every time 12 minutes and 2 seconds elapse, the time difference between the reference time and the time of the RTC 46 is maintained within 2 seconds. It can be done. Here, the longest time synchronization timing converted to the time counted by the RTC 46 is calculated (calculated as 12 minutes and 2 seconds instead of 12 minutes, etc.), and time synchronization is not performed until the maximum allowable error is reached. Therefore, the load on the NTP server 50 can be reduced as much as possible.

次に、印刷サーバ40がNTPサーバ50に時刻の問合せを行う時刻同期を実行する動作について説明する。図5は、印刷サーバ40のCPU42により実行される時刻同期実行処理ルーチンの一例を表すフローチャートである。このルーチンは、印刷サーバ40が起動したあと所定のタイミングごと(例えば数msecごと)に実行される。   Next, an operation for executing time synchronization in which the print server 40 inquires the NTP server 50 about the time will be described. FIG. 5 is a flowchart illustrating an example of a time synchronization execution processing routine executed by the CPU 42 of the print server 40. This routine is executed every predetermined timing (for example, every several msec) after the print server 40 is activated.

このルーチンが実行されると、まず、CPU42は、RAM44に時刻同期情報44aが記憶されているか否かを判定し(ステップS200)、RAM44に時刻同期情報44aが記憶されていないと判定されたときには、RAM44に時刻同期情報44aを作成する(ステップS210)。図6は、RAM44に記憶された時刻同期情報44aの説明図である。この時刻同期情報44aは、時刻同期を実行する際に用いられる情報である。この時刻同期情報44aには、RTC46によって計時されている現在時刻や印刷サーバ40が起動したときの起動時刻、RTC56に前回同期した時刻である前回同期時刻、RTC56に次回同期する予定の時刻である次回同期時刻、精度情報45cを読み出した精度情報、時刻同期設定処理ルーチンで設定された許容誤差情報、時刻同期タイミングなどが含まれている。この時刻同期情報44aでは、現在時刻や起動時刻、前回同期時刻には、RTC46で計時された時刻を読み出したものが入力され、精度情報、許容誤差情報、時刻同期タイミングには、HDD45に保存されたものを読み出したものが入力され、次回同期時刻には、前回同期時刻に時刻同期タイミングの時間を加えたものが計算されて入力されるものとした。   When this routine is executed, the CPU 42 first determines whether or not the time synchronization information 44a is stored in the RAM 44 (step S200), and when it is determined that the time synchronization information 44a is not stored in the RAM 44. The time synchronization information 44a is created in the RAM 44 (step S210). FIG. 6 is an explanatory diagram of the time synchronization information 44 a stored in the RAM 44. The time synchronization information 44a is information used when time synchronization is executed. The time synchronization information 44a includes the current time measured by the RTC 46, the activation time when the print server 40 is activated, the previous synchronization time that is the last synchronization time with the RTC 56, and the time that is scheduled to be synchronized with the RTC 56 next time. The next synchronization time, accuracy information obtained by reading the accuracy information 45c, tolerance information set in the time synchronization setting processing routine, time synchronization timing, and the like are included. In the time synchronization information 44a, the current time, start time, and previous synchronization time are read from the time measured by the RTC 46, and the accuracy information, tolerance information, and time synchronization timing are stored in the HDD 45. It is assumed that the data read out is input, and the next synchronization time is calculated by adding the time of the time synchronization timing to the previous synchronization time.

ステップS200でRAM44に時刻同期情報44aが記憶されていると判定されたときには、CPU42は、時刻同期情報44aを最新の情報に更新する(ステップS220)。時刻同期情報44aの更新は、現在時刻にRTC46が計時している現在の時刻を入力し、精度情報と許容誤差情報と時刻同期タイミングとをHDD45から読み出しこの読み出した内容をそれぞれに入力することにより行う。こうして、時刻同期設定処理ルーチンで設定された最新の内容が精度情報と許容誤差情報と時刻同期タイミングとに入力される。ステップS210のあと、または、ステップS220のあと、CPU42は、現在が時刻同期タイミングであるか否かを判定する(ステップS230)。現在が時刻同期タイミングであるか否かの判定は、初回は起動直後であるか否かに基づき、2回目以降は時刻同期情報44aの現在時刻が次回同期時刻に至ったか否かに基づいて行う。現在が時刻同期タイミングでないと判定されたときには、CPU42は、そのままこのルーチンを終了し、現在が時刻同期タイミングであると判定されたときには、I/F47に基準時刻の問合せ要求をNTPサーバ50へ送信させその応答をNTPサーバ50から受信することによりNTPサーバ50から基準時刻を取得する(ステップS240)。ここで、本実施形態では、説明の便宜のため、基準時刻の問合せ要求の送信から基準時刻の受信までのタイムラグについて考慮しないものとした。なお、このタイムラグを考慮する処理、例えば、通信状態に基づいてこのタイムラグを推定し、この推定した時間だけ受信した基準時刻をシフトさせる処理を行うものとしてもよい。   When it is determined in step S200 that the time synchronization information 44a is stored in the RAM 44, the CPU 42 updates the time synchronization information 44a to the latest information (step S220). The time synchronization information 44a is updated by inputting the current time measured by the RTC 46 at the current time, reading out accuracy information, tolerance information, and time synchronization timing from the HDD 45, and inputting the read contents to each. Do. In this way, the latest contents set in the time synchronization setting processing routine are input to the accuracy information, allowable error information, and time synchronization timing. After step S210 or after step S220, the CPU 42 determines whether or not the current time is the time synchronization timing (step S230). Whether or not the current time is the time synchronization timing is determined based on whether or not the first time is immediately after startup, and whether or not the current time of the time synchronization information 44a has reached the next synchronization time after the second time. . When it is determined that the current time is not the time synchronization timing, the CPU 42 ends this routine as it is. When it is determined that the current time is the time synchronization timing, the CPU 42 transmits an inquiry request for the reference time to the NTP server 50. The reference time is acquired from the NTP server 50 by receiving the response from the NTP server 50 (step S240). In this embodiment, for convenience of explanation, the time lag from the transmission of the reference time inquiry request to the reception of the reference time is not considered. Note that a process that takes this time lag into account, for example, a process that estimates the time lag based on the communication state and shifts the received reference time by the estimated time may be performed.

次に、CPU42は、HDD45に保存された精度情報45cの更新タイミングであるか否かを判定する(ステップS250)。ここでは、精度情報45cの更新タイミングは、起動直後の最初の時刻同期タイミングの次の時刻同期タイミングに設定されている。精度情報45cの更新タイミングであると判定されたときには、CPU42は、NTPサーバ50から取得した基準時刻と現在時刻とに基づいて精度情報45cを更新する(ステップS260)。精度情報45cの更新は、起動時の基準時刻と今回の基準時刻との差分を基準時間とし、起動時に時刻同期を行った時刻と現在のRTC46の時刻との差分を実測時間とし、上述した式(1)を用いて行う。このステップS250,S260の処理は、起動直後の2回の時刻同期を利用して基準時刻とRTC46が計時する時刻とのずれ時間を求め、求めたずれ時間を以後の時刻同期に反映させる処理である。このように、NTPサーバ50の基準時刻に基づいて精度情報45cを更新するため、当初の精度情報45cよりも実際の使用環境に適した精度情報45cとすることができる。   Next, the CPU 42 determines whether or not it is the update timing of the accuracy information 45c stored in the HDD 45 (step S250). Here, the update timing of the accuracy information 45c is set to the time synchronization timing next to the first time synchronization timing immediately after activation. When it is determined that it is the update timing of the accuracy information 45c, the CPU 42 updates the accuracy information 45c based on the reference time acquired from the NTP server 50 and the current time (step S260). The accuracy information 45c is updated using the difference between the reference time at the time of activation and the current reference time as the reference time, and the difference between the time at which time synchronization was performed at the time of activation and the time of the current RTC 46 as the actual measurement time. (1) is used. The processes in steps S250 and S260 are processes for obtaining a deviation time between the reference time and the time counted by the RTC 46 using two time synchronizations immediately after activation, and reflecting the obtained deviation time in the subsequent time synchronization. is there. Thus, since the accuracy information 45c is updated based on the reference time of the NTP server 50, the accuracy information 45c more suitable for the actual use environment can be obtained than the initial accuracy information 45c.

ステップS260のあと、または、ステップS250で精度情報45cの更新タイミングでないと判定されたときには、CPU42は、RTC46の計時している現在の時刻を基準時刻に合わせ(ステップS270)、時刻同期情報44aを更新し(ステップS280)、このルーチンを終了する。時刻同期情報44aの更新は、前回同期時刻に現在時刻を入力し、次回同期時刻に、時刻同期タイミングの時間を現在時刻に加えた時刻を入力することにより行う。このように、精度情報45cを基準時刻に基づいて更新し、許容誤差の範囲内でRTC46が計時する時刻が許容誤差の範囲内に入るように時刻同期を行うのである。   After step S260 or when it is determined in step S250 that it is not an update timing of the accuracy information 45c, the CPU 42 adjusts the current time measured by the RTC 46 to the reference time (step S270), and sets the time synchronization information 44a. Update (step S280), and this routine ends. The time synchronization information 44a is updated by inputting the current time as the previous synchronization time and inputting the time obtained by adding the time of the time synchronization timing to the current time as the next synchronization time. In this way, the accuracy information 45c is updated based on the reference time, and time synchronization is performed so that the time counted by the RTC 46 is within the allowable error range.

そして、図示しないユーザPCなどから印刷データをI/F47が受信したときには、CPU42は、印刷データに含まれた印刷内容と現在のRTC46が計時する時刻とを印刷ログ45eに書き加えると共に、印刷要求先のプリンタ20やプリンタ30へこの印刷データを送信する。印刷データをプリンタ20のI/F23が受信すると、プリンタ20のコントローラ21は、受信した印刷データを印刷機構22に印刷させる。同様に、印刷データをプリンタ30のI/F33が受信すると、プリンタ30のコントローラ31は、受信した印刷データを印刷機構32に印刷させる。その後、システム管理者がHDD45に保存された印刷ログ45eの内容をディスプレイ48に表示出力したり、プリンタ20に印刷出力したりして確認する。あるいは、印刷処理に課金する際の課金内容(何時何分に印刷したなど)の信憑性を高めるための情報としてこの印刷ログ45eの内容を利用する。   When the I / F 47 receives print data from a user PC (not shown) or the like, the CPU 42 writes the print content included in the print data and the time counted by the current RTC 46 to the print log 45e and print request. This print data is transmitted to the previous printer 20 or printer 30. When the print data is received by the I / F 23 of the printer 20, the controller 21 of the printer 20 causes the print mechanism 22 to print the received print data. Similarly, when the print data is received by the I / F 33 of the printer 30, the controller 31 of the printer 30 causes the print mechanism 32 to print the received print data. Thereafter, the system administrator checks the contents of the print log 45e stored in the HDD 45 by displaying it on the display 48 or printing it on the printer 20. Alternatively, the contents of the print log 45e are used as information for enhancing the credibility of the charge contents (printing what time and what time, etc.) when charging the print processing.

ここで、本実施形態の構成要素と本発明の構成要素との対応関係を明らかにする。本実施形態のRTC46が本発明の時刻情報発生手段に相当し、RAM44及びHDD45が記憶手段に相当し、I/F47が情報送受信手段に相当し、CPU42が許容誤差取得手段、同期時期設定手段、記憶制御手段及び時刻同期実行手段に相当する。また、本実施形態のNTPサーバ50が本発明の基準装置に相当する。なお、本実施形態では、印刷処理時刻管理システム10の動作を説明することにより本発明の時刻同期方法の一例も明らかにしている。   Here, the correspondence between the components of the present embodiment and the components of the present invention will be clarified. The RTC 46 of this embodiment corresponds to the time information generation means of the present invention, the RAM 44 and the HDD 45 correspond to storage means, the I / F 47 corresponds to information transmission / reception means, the CPU 42 includes an allowable error acquisition means, a synchronization timing setting means, It corresponds to storage control means and time synchronization execution means. Further, the NTP server 50 of this embodiment corresponds to the reference device of the present invention. In the present embodiment, an example of the time synchronization method of the present invention is also clarified by describing the operation of the print processing time management system 10.

以上詳述した本実施形態の印刷処理時刻管理システム10によれば、RTC46が計時する時刻の精度に関する精度情報45cをHDD45に記憶し、RTC46によって計時される時刻に許容される許容誤差を含む許容誤差情報を取得し、RTC46が発生する時刻情報と基準装置が発生する基準時刻とを同期させる時刻同期を行う時期を、RTC46の計時する時刻が取得した許容誤差を超えない範囲内となるように、精度情報45cに含まれる単位基準時間あたりのずれ時間を許容誤差情報に含まれる許容される許容誤差で除算することにより単位基準時間あたりの時刻同期を行う回数(頻度)を求め、この求めた回数に応じた時刻同期タイミングを設定する。このように、時刻情報の精度に関する精度情報と時刻情報に許容される許容誤差を含む許容誤差情報とを用いて時刻同期を行う時期を設定するのである。したがって、時刻を同期させる適切な時期を容易に設定することができる。   According to the print processing time management system 10 of the present embodiment described in detail above, the accuracy information 45c regarding the accuracy of the time counted by the RTC 46 is stored in the HDD 45, and the tolerance including the tolerance allowed for the time counted by the RTC 46 is included. The time for performing time synchronization to acquire the error information and synchronize the time information generated by the RTC 46 and the reference time generated by the reference device is set so that the time measured by the RTC 46 does not exceed the acquired allowable error. The number of times (frequency) of time synchronization per unit reference time is determined by dividing the deviation time per unit reference time included in the accuracy information 45c by the allowable tolerance included in the allowable error information. Set the time synchronization timing according to the number of times. As described above, the time synchronization is set by using the accuracy information regarding the accuracy of the time information and the allowable error information including the allowable error allowed for the time information. Therefore, it is possible to easily set an appropriate time for synchronizing the time.

また、出荷時に基準時刻に基づいて定められた精度情報45cがHDD45に当初から記憶されているため、新たに精度情報45cを求めることなく時刻同期を行う時期を設定することができる。更に、起動された直後の時刻同期タイミングとこの起動直後から時刻同期タイミング後との複数回、基準時刻をI/F47に受信させ、この複数回受信した基準時刻と基準時刻の受信時のRTC46が計時した時刻とに基づいてずれ時間を求め、この求めたずれ時間により精度情報45cをHDD45に更新して記憶させるため、NTPサーバ50の基準時刻を用いて精度情報を更新可能であり、HDD45に記憶された精度情報45cをNTPサーバ50の基準時刻に適合した実情に合うものに更新することができる。また、2回目の時刻同期タイミングで精度情報45cが更新されるため、比較的迅速にHDD45に記憶された精度情報45cをNTPサーバ50の基準時刻に適合したものに更新することができる。更に、時刻同期タイミングによる時刻同期を利用して精度情報45cを更新可能であるため、精度情報45cを更新する処理を時刻同期と別に行う必要がない。   Further, since the accuracy information 45c determined based on the reference time at the time of shipment is stored in the HDD 45 from the beginning, it is possible to set a time for performing time synchronization without newly obtaining the accuracy information 45c. Further, the I / F 47 receives the reference time a plurality of times immediately after the start and the time synchronization timing immediately after the start and after the time synchronization timing, and the RTC 46 at the time of receiving the reference time and the reference time received a plurality of times Since the deviation time is obtained based on the measured time and the accuracy information 45c is updated and stored in the HDD 45 based on the obtained deviation time, the accuracy information can be updated using the reference time of the NTP server 50. The stored accuracy information 45c can be updated to information that matches the actual situation that matches the reference time of the NTP server 50. Further, since the accuracy information 45c is updated at the second time synchronization timing, the accuracy information 45c stored in the HDD 45 can be updated relatively quickly to the one that matches the reference time of the NTP server 50. Furthermore, since the accuracy information 45c can be updated using time synchronization based on the time synchronization timing, it is not necessary to perform processing for updating the accuracy information 45c separately from the time synchronization.

更に、時刻同期設定画面80で自動設定が選択されると、HDD45に記憶された自動設定時許容誤差情報を取得して時刻同期の条件を設定しその後の処理を実行するため、ユーザは、許容誤差情報を入力する手間がいらない。また、精度情報45cと許容誤差情報とを用いて設定された時刻同期タイミングで時刻同期を実行するため、許容誤差の範囲内に時刻同期を実行するため、RTC46が計時する時刻を許容誤差の範囲内とすることができる。   Further, when automatic setting is selected on the time synchronization setting screen 80, the user sets the time synchronization condition by acquiring the automatic setting allowable error information stored in the HDD 45 and executes the subsequent processing. No need to input error information. Further, since time synchronization is executed at the time synchronization timing set using the accuracy information 45c and the allowable error information, the time synchronized by the RTC 46 is set within the allowable error range in order to execute time synchronization within the allowable error range. Can be inside.

なお、本発明は上述した実施形態に何ら限定されることはなく、本発明の技術的範囲に属する限り種々の態様で実施し得ることはいうまでもない。   It should be noted that the present invention is not limited to the above-described embodiment, and it goes without saying that the present invention can be implemented in various modes as long as it belongs to the technical scope of the present invention.

例えば、上述した実施形態では、時刻同期タイミングを、RTC46で計時される時刻に換算した最長の時刻同期タイミングとして計算し、許容誤差の最大値に至るまで時刻同期を行わないようにするものとしたが、許容誤差の範囲内に入るようなタイミングに設定するものとしてもよい。こうすれば、NTPサーバ50の負荷を低減する効果は低くなることがあるが、時刻を同期させる適切な時期を容易に設定することはできる。   For example, in the embodiment described above, the time synchronization timing is calculated as the longest time synchronization timing converted to the time counted by the RTC 46, and time synchronization is not performed until the maximum allowable error is reached. However, the timing may be set so as to fall within the allowable error range. By doing so, the effect of reducing the load on the NTP server 50 may be reduced, but an appropriate time for synchronizing the time can be easily set.

上述した実施形態では、起動直後の2回、時刻同期を行う際に精度情報45cをNTPサーバ50の基準時刻に基づいて更新するものとしたが、起動直後以外に行ってもよい。また、時刻同期を行う際に定期的(例えば1日おきなど)に精度情報45cをNTPサーバ50の基準時刻に基づいて更新するものとしてもよい。こうすれば、印刷サーバ40を再起動せずに運用する場合でも、現在の環境(温度や湿度など)に応じた精度情報45cに更新して時刻同期を実行することができる。   In the embodiment described above, the accuracy information 45c is updated based on the reference time of the NTP server 50 when time synchronization is performed twice immediately after activation, but may be performed other than immediately after activation. Further, the accuracy information 45c may be updated periodically (for example, every other day) based on the reference time of the NTP server 50 when performing time synchronization. In this way, even when the print server 40 is operated without being restarted, the time information can be synchronized with the accuracy information 45c corresponding to the current environment (temperature, humidity, etc.).

あるいは、時刻同期のタイミングに関係なくNTPサーバ50から時刻を複数回取得して精度情報45cの更新を実行するものとしてもよい。こうすれば、RTC46のずれ時間を計測しやすい基準時間で精度情報45cの更新処理を実行することもできる。   Alternatively, the accuracy information 45c may be updated by acquiring the time from the NTP server 50 a plurality of times regardless of the timing of time synchronization. In this way, the update process of the accuracy information 45c can be executed at a reference time at which the RTC 46 deviation time can be easily measured.

上述した実施形態では、NTPサーバ50の基準時刻に基づいて精度情報45cを更新するものとしたが、この更新処理を行わないものとしてもよい。こうすれば、当初HDD45に記憶された精度情報45cを用いて時刻同期の実行を確保し、処理負担を低減することができる。   In the embodiment described above, the accuracy information 45c is updated based on the reference time of the NTP server 50. However, this update process may not be performed. By doing so, it is possible to secure execution of time synchronization using the accuracy information 45c initially stored in the HDD 45 and reduce the processing load.

上述した実施形態では、出荷前の検査時に求めた精度情報45cが予めHDD45に記憶されているものとしたが、出荷時に精度情報45cがHDD45に記憶されていないものとし、LAN60に接続されて使用開始した際にNTPサーバ50から基準時刻を複数回取得して精度情報45cを求めてHDD45に記憶するものとしてもよい。   In the above-described embodiment, the accuracy information 45c obtained at the time of inspection before shipment is stored in the HDD 45 in advance. However, the accuracy information 45c is not stored in the HDD 45 at the time of shipment and is used by being connected to the LAN 60. When starting, the reference time may be obtained from the NTP server 50 a plurality of times, and the accuracy information 45c may be obtained and stored in the HDD 45.

上述した実施形態では、印刷サーバ40がRTC46を備えるものとして説明したが、印刷サーバ40がRTC以外の時刻を計時する装置(例えばシステムクロックなど)を備えるものとしてもよい。一般的にRTCよりもシステムクロックなどの方が時刻精度が低いため、本発明を適用することにより、より高い効果を得ることができる。   In the above-described embodiment, the print server 40 is described as including the RTC 46. However, the print server 40 may include an apparatus (for example, a system clock) that measures time other than the RTC. In general, since the time accuracy of the system clock or the like is lower than that of the RTC, a higher effect can be obtained by applying the present invention.

上述した実施形態では、本発明の時刻同期装置を印刷サーバ40に適用するものとして説明したが、プリンタ20やプリンタ30、パーソナルコンピュータ、FAX装置、放送を録画可能な録画装置、携帯電話などの電子機器に本発明を適用してもよい。特に、時刻管理が必要であり、RTCを備えないものなどに適用することが好ましい。RTCを備えない機器では時刻精度が低いため、本発明を適用する意義が高い。   In the above-described embodiments, the time synchronization apparatus of the present invention has been described as being applied to the print server 40. However, the printer 20, the printer 30, a personal computer, a FAX apparatus, a recording apparatus capable of recording broadcasts, an electronic device such as a mobile phone, etc. The present invention may be applied to a device. In particular, it is preferable to apply to a device that requires time management and does not have an RTC. Since the time accuracy is low in a device that does not include an RTC, the significance of applying the present invention is high.

印刷処理時刻管理システム10の構成の概略を示す構成図である。1 is a configuration diagram showing an outline of the configuration of a print processing time management system 10. FIG. HDD45に記憶された情報の説明図である。4 is an explanatory diagram of information stored in an HDD 45. FIG. 時刻同期設定処理ルーチンの一例を表すフローチャートである。It is a flowchart showing an example of a time synchronous setting process routine. ディスプレイ48に表示する時刻同期設定画面80の説明図である。It is explanatory drawing of the time synchronization setting screen 80 displayed on the display. 時刻同期実行処理ルーチンの一例を表すフローチャートである。It is a flowchart showing an example of a time synchronous execution process routine. 時刻同期情報44aの説明図である。It is explanatory drawing of the time synchronous information 44a.

符号の説明Explanation of symbols

10 印刷処理時刻管理システム、20,30 プリンタ、21,31 コントローラ、22,32 印刷機構、23,33 I/F、40 印刷サーバ、42 CPU、43 ROM、44 RAM、44a 時刻同期情報、45 HDD、45a 時刻同期設定プログラム、45b 時刻同期実行プログラム、45c 精度情報、45d 自動設定情報、45e 印刷ログ、46 リアルタイムクロック(RTC)、47 ネットワークインターフェース(I/F)、48 ディスプレイ、49 入力装置、50 ネットワークタイムプロトコル(NTP)サーバ、52 CPU、53 ROM、54 RAM、56 リアルタイムクロック(RTC)、57 ネットワークインターフェース(I/F)、60 LAN、80 時刻同期設定画面、80a カーソル、81 時刻情報表示欄、82 自動設定入力欄、83 サーバ選択欄、84 IPアドレス入力欄、85 許容誤差入力欄、86 ステータス表示欄。 10 print processing time management system, 20, 30 printer, 21, 31 controller, 22, 32 printing mechanism, 23, 33 I / F, 40 print server, 42 CPU, 43 ROM, 44 RAM, 44a time synchronization information, 45 HDD 45a Time synchronization setting program, 45b Time synchronization execution program, 45c Accuracy information, 45d Automatic setting information, 45e Print log, 46 Real time clock (RTC), 47 Network interface (I / F), 48 Display, 49 Input device, 50 Network time protocol (NTP) server, 52 CPU, 53 ROM, 54 RAM, 56 Real time clock (RTC), 57 Network interface (I / F), 60 LAN, 80 Time synchronization setting screen, 80a -Sol, 81 Time information display field, 82 Automatic setting input field, 83 Server selection field, 84 IP address input field, 85 Allowable error input field, 86 Status display field.

Claims (10)

基準装置が発生する基準時刻と時刻の同期を行う時刻同期装置であって、
時刻情報を発生する時刻情報発生手段と、
前記時刻情報発生手段が発生する時刻情報の精度に関する精度情報を記憶する記憶手段と、
前記時刻情報発生手段によって発生される時刻情報に許容される許容誤差を含む許容誤差情報を取得可能な許容誤差取得手段と、
前記時刻情報発生手段が発生する時刻情報と前記基準時刻とを同期させる時刻同期を行う時期を前記取得された許容誤差情報と前記記憶された精度情報とに基づいて設定する同期時期設定手段と、
を備えた時刻同期装置。
A time synchronization device that synchronizes time with a reference time generated by a reference device,
Time information generating means for generating time information;
Storage means for storing accuracy information relating to the accuracy of time information generated by the time information generation means;
Allowable error acquisition means capable of acquiring allowable error information including allowable error in time information generated by the time information generating means;
Synchronization time setting means for setting a time for performing time synchronization for synchronizing the time information generated by the time information generating means and the reference time based on the acquired allowable error information and the stored accuracy information;
A time synchronizer comprising:
前記同期時期設定手段は、前記取得した許容誤差情報と前記記憶された精度情報とに基づいて、前記時刻情報発生手段が発生する時刻情報が該取得された許容誤差を超えない範囲内に前記時刻同期を行う時期を設定する、請求項1に記載の時刻同期装置。   The synchronization time setting unit is configured to set the time within a range in which time information generated by the time information generation unit does not exceed the acquired allowable error based on the acquired allowable error information and the stored accuracy information. The time synchronizer of Claim 1 which sets the time which synchronizes. 前記記憶手段は、基準時刻に基づいて定められた前記精度情報を予め記憶している、請求項1又は2に記載の時刻同期装置。   The time synchronization apparatus according to claim 1, wherein the storage unit stores in advance the accuracy information determined based on a reference time. 請求項1〜3のいずれかに記載の時刻同期装置であって、
前記基準装置と情報のやり取りが可能な情報送受信手段と、
前記基準装置で生成される基準時刻を前記情報送受信手段に複数回受信させ、該複数回受信した前記基準時刻と該受信のときの前記時刻情報発生手段が発生した時刻情報とに基づいて前記精度情報を求め、該求めた精度情報を前記記憶手段に記憶させる記憶制御手段と、
を備えた時刻同期装置。
The time synchronization apparatus according to any one of claims 1 to 3,
Information transmitting and receiving means capable of exchanging information with the reference device;
The information transmitting / receiving means receives the reference time generated by the reference device a plurality of times, and the accuracy is based on the reference time received a plurality of times and the time information generated by the time information generating means at the time of the reception. Storage control means for obtaining information and storing the obtained accuracy information in the storage means;
A time synchronizer comprising:
前記記憶制御手段は、前記基準装置で生成される基準時刻を前記情報送受信手段に複数回受信させるに際して、起動された直後と該起動直後から所定時間後とで前記基準時刻を前記情報送受信手段に受信させる、請求項4に記載の時刻同期装置。   The storage control means causes the information transmission / reception means to send the reference time to the information transmission / reception means immediately after activation and a predetermined time after the activation when the information transmission / reception means receives the reference time generated by the reference device a plurality of times. The time synchronizer of Claim 4 made to receive. 前記記憶制御手段は、前記基準装置で生成される基準時刻を前記情報送受信手段に複数回受信させるに際して、前記同期時期設定手段によって設定された時期に行う前記時刻同期で前記基準時刻を前記情報送受信手段に受信させる、請求項4又は5に記載の時刻同期装置。   The storage control means transmits and receives the reference time in the time synchronization performed at the time set by the synchronization time setting means when the information transmission / reception means receives the reference time generated by the reference device a plurality of times. The time synchronizer according to claim 4 or 5, which is received by a means. 前記記憶手段は、予め定められた前記許容誤差情報を記憶し、
前記許容誤差取得手段は、前記記憶手段に記憶された前記許容誤差情報を該記憶手段から取得する、
請求項1〜6のいずれかに記載の時刻同期装置。
The storage means stores the predetermined allowable error information,
The allowable error acquisition means acquires the allowable error information stored in the storage means from the storage means;
The time synchronizer in any one of Claims 1-6.
請求項1〜7のいずれかに記載の時刻同期装置であって、
前記同期時期設定手段によって設定された時期に前記時刻同期を実行する時刻同期実行手段、を備えた時刻同期装置。
The time synchronization device according to any one of claims 1 to 7,
A time synchronization apparatus comprising: time synchronization execution means for executing the time synchronization at a time set by the synchronization time setting means.
基準装置で生成される基準時刻と時刻の同期を行う、時刻情報を発生する時刻情報発生手段と、前記時刻情報発生手段が発生する時刻情報の精度に関する精度情報を記憶する記憶手段とを備えた時刻同期装置を用いた時刻同期方法であって、
(a)前記時刻情報発生手段によって発生される時刻情報に許容される許容誤差を含む許容誤差情報を取得するステップと、
(b)前記時刻情報発生手段が発生する時刻情報と前記基準時刻とを同期させる時刻同期を行う時期を前記ステップ(a)で取得した許容誤差情報と前記記憶された精度情報とに基づいて設定するステップと、
を含む時刻同期方法。
Time information generating means for generating time information that synchronizes the time with the reference time generated by the reference device, and storage means for storing accuracy information relating to the accuracy of the time information generated by the time information generating means. A time synchronization method using a time synchronization device,
(A) obtaining allowable error information including an allowable error allowed in the time information generated by the time information generating means;
(B) A time synchronization time for synchronizing the time information generated by the time information generating means and the reference time is set based on the allowable error information acquired in the step (a) and the stored accuracy information. And steps to
Time synchronization method including
請求項9に記載の時刻同期方法の各ステップを1以上のコンピュータに実行させるためのプログラム。   A program for causing one or more computers to execute each step of the time synchronization method according to claim 9.
JP2006106200A 2006-04-07 2006-04-07 Time synchronizer, time synchronization method, and program thereof Withdrawn JP2007278873A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006106200A JP2007278873A (en) 2006-04-07 2006-04-07 Time synchronizer, time synchronization method, and program thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006106200A JP2007278873A (en) 2006-04-07 2006-04-07 Time synchronizer, time synchronization method, and program thereof

Publications (1)

Publication Number Publication Date
JP2007278873A true JP2007278873A (en) 2007-10-25

Family

ID=38680461

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006106200A Withdrawn JP2007278873A (en) 2006-04-07 2006-04-07 Time synchronizer, time synchronization method, and program thereof

Country Status (1)

Country Link
JP (1) JP2007278873A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012013548A (en) * 2010-06-30 2012-01-19 Kyocera Mita Corp Image forming device
JP2020166446A (en) * 2019-03-28 2020-10-08 ブラザー工業株式会社 Image processing apparatus, information processing apparatus, time application method, time application program, information processing method, information processing program, and image processing system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63108292A (en) * 1986-10-24 1988-05-13 Yamatake Honeywell Co Ltd Method for controlling reference timepiece
JPH07159559A (en) * 1993-12-07 1995-06-23 Casio Comput Co Ltd Time data receiving device
JP2004106281A (en) * 2002-09-17 2004-04-08 Seiko Epson Corp Printer and information processor

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63108292A (en) * 1986-10-24 1988-05-13 Yamatake Honeywell Co Ltd Method for controlling reference timepiece
JPH07159559A (en) * 1993-12-07 1995-06-23 Casio Comput Co Ltd Time data receiving device
JP2004106281A (en) * 2002-09-17 2004-04-08 Seiko Epson Corp Printer and information processor

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012013548A (en) * 2010-06-30 2012-01-19 Kyocera Mita Corp Image forming device
JP2020166446A (en) * 2019-03-28 2020-10-08 ブラザー工業株式会社 Image processing apparatus, information processing apparatus, time application method, time application program, information processing method, information processing program, and image processing system
JP7318269B2 (en) 2019-03-28 2023-08-01 ブラザー工業株式会社 Image processing device, information processing device, time application method, time application program, information processing method, information processing program, and image processing system

Similar Documents

Publication Publication Date Title
US9158287B2 (en) Information processing apparatus for updating local time
JP4831154B2 (en) Timing device
EP3561659B1 (en) Maintenance system, set of program instructions, and information processing device
JP2017097769A (en) Information processing device and control method thereof, system, and program
JP4687258B2 (en) Log information management apparatus, log information management method and program thereof
US20100253976A1 (en) Image processing apparatus and method of setting image processing apparatus
US20170085735A1 (en) Information processing apparatus, image forming apparatus, information processing system, method for controlling information processing apparatus, method for controlling image forming apparatus, and storage medium storing program
WO2020194714A1 (en) Communication system, communication device, and program
JP2007278873A (en) Time synchronizer, time synchronization method, and program thereof
JP4692359B2 (en) Log management device, log management system, log management method and program thereof
JP3933018B2 (en) Printer and information processing apparatus
JP2007101183A (en) Communication system and time synchronization method
JP4645720B2 (en) Electronics
KR102067860B1 (en) Server that synchronizes information between information processors, information processing system, information processing apparatus, control method for server, control method for information processing system, control method for information processing apparatus, and computer program
JP2003248076A (en) Image forming apparatus
JP5779840B2 (en) Image processing apparatus, device cooperation system, power return control method, program
JP2010134806A (en) State monitoring method, program therefor, state monitoring device
JP4296776B2 (en) Printer and printing system
JP2015093477A (en) Image formation apparatus and control method thereof, and program
JP2020170353A (en) Information processing device, control method of information processing device, and program
JP2013006381A (en) Image processing apparatus, information processing apparatus and job conversion program
JP2024002173A (en) Information processing apparatus, method for controlling information processing apparatus, and program
JP7318269B2 (en) Image processing device, information processing device, time application method, time application program, information processing method, information processing program, and image processing system
JP2007245634A (en) Image forming device
JP2006154944A (en) Image output controller

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20090327

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110415

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110426

A761 Written withdrawal of application

Free format text: JAPANESE INTERMEDIATE CODE: A761

Effective date: 20110531