JP2004062497A - Data communication system and method for correcting data generation time - Google Patents

Data communication system and method for correcting data generation time Download PDF

Info

Publication number
JP2004062497A
JP2004062497A JP2002219488A JP2002219488A JP2004062497A JP 2004062497 A JP2004062497 A JP 2004062497A JP 2002219488 A JP2002219488 A JP 2002219488A JP 2002219488 A JP2002219488 A JP 2002219488A JP 2004062497 A JP2004062497 A JP 2004062497A
Authority
JP
Japan
Prior art keywords
data
time
terminal
difference
terminals
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.)
Pending
Application number
JP2002219488A
Other languages
Japanese (ja)
Inventor
Shinichi Kawasaki
川▲崎▼ 信一
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.)
ADVANCED IT KK
Original Assignee
ADVANCED IT KK
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 ADVANCED IT KK filed Critical ADVANCED IT KK
Priority to JP2002219488A priority Critical patent/JP2004062497A/en
Publication of JP2004062497A publication Critical patent/JP2004062497A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Computer And Data Communications (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a data communication system capable of preventing a situation from occurring that the order of individual data at the moment of data generation becomes different from the actual generation order of the individual data in each terminal when data communication is performed. <P>SOLUTION: The data communication system is provided with a plurality of terminals 10 and the data are communicated among the terminals 10. Each of the terminals 10 is provided with: a time imparting part 13 for imparting a data generation time to the data when the data are generated; a control part 15 for transmitting its own system time at the time of data transmission in addition to the data and the data generation time when transmitting the data to the other terminal; and a time correction part 16 for taking, when receiving the data from the other terminal, a difference between the system time of the other terminal sent together with the data and its own system time at the time of data reception and correcting the data generation time imparted to the data on the basis of the difference. <P>COPYRIGHT: (C)2004,JPO

Description

【0001】
【発明の属する技術分野】
本発明は、各端末間でデータ通信を行う際にデータに付与されたデータ発生時刻を補正するデータ通信システム及びデータ発生時刻の補正方法に関するものである。
【0002】
【従来の技術】
現在、各端末間でデータ通信を行うことができるデータ通信システムが広く利用されている。例えば、多くの会社では、複数のコンピュータをLAN等で接続し、ネットワークが構築されている。そして、コンピュータ間でデータの通信を行うことにより、データを一元的に管理することができる。また、PDA等の携帯端末とコンピュータとを一時的な通信リンクで接続し、それらの間でデータの交換を行うこともできる。
【0003】
一般に、コンピュータや携帯端末は、現在の時刻や年月日(システム時刻)を計時する計時回路を備えている。このシステム時刻は、例えば、データが発生したときに、当該データにデータ発生時刻(タイムスタンプ)を付与するために利用される。各端末間でデータ通信を行うときは、データと共にそのタイムスタンプも一緒に送信される。
【0004】
【発明が解決しようとする課題】
ところで、各端末のシステム時刻が一致しているというケースは稀で、互いにずれているケースの方が多い。このため、他の端末で発生したデータを当該端末に送信した場合、当該端末がその送信されたデータと当該端末で発生したデータとを一緒に管理するときに、タイムスタンプによる各データの順序は各データの実際の発生順序と異なってしまうことがある。
【0005】
本発明は上記事情に基づいてなされたものであり、データ通信を行ったときに、各端末においてデータ発生時刻による各データの順序が各データの実際の発生順序と異なってしまうという事態が発生するのを防止することができるデータ通信システム及びデータ発生時刻の補正方法を提供することを目的とするものである。
【0006】
【課題を解決するための手段】
上記の目的を達成するための本発明は、複数の端末を有し、各端末間でデータの通信を行うことができるデータ通信システムであって、前記各端末は、データが発生したときに、その発生したデータにデータ発生時刻を付与する時刻付与手段と、他の端末にデータを送信するときに、当該データ及び当該データに付与されたデータ発生時刻に加えて、当該データ送信時における自己のシステム時刻を送信する送信制御手段と、他の端末からデータを受信したときに、当該データと共に送られた当該他の端末のシステム時刻と当該データ受信時における自己のシステム時刻との差分をとり、その差分に基づいて当該データに付与されたデータ発生時刻を補正する時刻補正手段と、を具備することを特徴とするものである。
【0007】
また、上記の目的を達成するための本発明は、二つの端末間でデータの通信を行う際に、データに付与されたデータ発生時刻を補正するデータ発生時刻の補正方法であって、一の端末から他の端末にデータを送信するときに、前記一の端末は、当該データ及び当該データに付与されたデータ発生時刻に加えて、当該データ送信時における自己のシステム時刻を送信し、前記他の端末は、当該データと共に送られた前記一の端末のシステム時刻と当該データ受信時における自己のシステム時刻との差分をとり、その差分に基づいて当該データに付与されたデータ発生時刻を補正することを特徴とするものである。
【0008】
【発明の実施の形態】
以下に本発明の一実施形態について図面を参照して説明する。図1は本発明の一実施形態であるデータ通信システムの概略構成図、図2はそのデータ通信システムにおける各端末の概略機能ブロック図である。
【0009】
本実施形態のデータ通信システムは、図1に示すように、複数の端末10を備えるものである。かかるデータ通信システムは、例えば、クライアントとサーバとからなるシステムであってもよい。この場合、クライアントとサーバはLAN等で接続され、ネットワークが構築される。これにより、クライアント間であるいはクライアントとサーバとの間でデータの通信を行うことができる。また、このデータ通信システムは、例えば、少なくとも一つのコンピュータと、複数の携帯端末とからなるシステムであってもよい。この場合、二つの携帯端末が又はコンピュータと携帯端末とが一時的な通信リンクにより接続されたときに、携帯端末間で又はコンピュータと携帯端末との間でデータの通信を行うことができる。尚、図1では、各端末10がコンピュータである場合を例示している。
【0010】
また、本実施形態では、一日一回程度、各端末10間でデータの通信を行う場合を考えることにする。具体的な例としては、セールスマンが携帯端末を所持して外出し、その後、会社に戻ったときに、その日に発生したデータをその携帯端末から会社のコンピュータに送信するような場合が挙げられる。
【0011】
各端末10は、図2に示すように、記憶部11と、計時回路12と、時刻付与部13と、通信部14と、制御部15と、時刻補正部16とを有する。
【0012】
記憶部11は、端末10で発生したデータを記憶するものである。ここで、「発生したデータ」には、新たに作成したデータと更新したデータの双方が含まれる。
【0013】
計時回路12は、現在の時刻や年月日、すなわちシステム時刻を管理するためのものである。通常のコンピュータや携帯端末はかかる計時回路12を備えている。ユーザは、計時回路12が計時するシステム時刻を調整することができる。時刻付与部13は、データが発生したときに、計時回路12が計時するシステム時刻をデータ発生時刻(タイムスタンプ)として当該データに付与するものである。このタイムスタンプは、当該データの属性情報の一つであり、当該データの作成時刻又は更新時刻を示す。
【0014】
通信部14は、他の端末10との間でデータの通信を行うためのものである。制御部15は、端末10全体の制御を行う。具体的には、制御部15は、他の端末10にデータを送信するときに、当該データ及び当該データに付与されたタイムスタンプに加えて、当該データ送信時における自己のシステム時刻を送信する。
【0015】
ところで、一般に、各端末10のシステム時刻が一致しているというケースは稀で、互いにずれているケースの方が多い。たとえすべての端末10のシステム時刻を同時刻に合わせたとしても、計時回路12の個体差により各端末10のシステム時刻の進み方には差異があり、時間の経過に伴い、各端末10のシステム時刻は互いにずれてしまう。また、例えば、携帯端末等では、システム時刻を一時間間違えて設定してしまうということがよくある。
【0016】
このように各端末10のシステム時刻には差異があることから、他の端末10で発生したデータを当該端末10に送信した場合、当該端末10がその送信されたデータと当該端末10で発生したデータとを一緒に管理するときに、タイムスタンプによる各データの順序は各データの実際の発生順序と異なってしまうことがある。本実施形態では、タイムスタンプによる各データの順序と各データの実際の発生順序とが異なってしまうことを防止するため、時刻補正部16を設けている。この時刻補正部16は、他の端末10からデータを受信したときに、当該データと共に送られた他の端末10のシステム時刻と当該データ受信時における自己のシステム時刻との差分をとり、その差分に基づいて当該データに付与されたタイムスタンプを補正する。すなわち、その差分を、他の端末10から送られたデータのタイムスタンプに加算あるいは減算することにより、その送られたデータのタイムスタンプを自己のシステム時刻を基準とした時刻に書き換える。
【0017】
尚、このようなタイムスタンプを補正する時刻補正部16は、当該補正処理を制御部15に実行させるためのプログラムを端末10に組み込むことにより、容易に実現される。
【0018】
次に、本実施形態のデータ通信システムにおいてデータのタイムスタンプを補正する動作について説明する。図3はそのデータ通信システムにおいてデータのタイムスタンプを補正する動作を説明するための図である。
【0019】
図3(a)に示すように、二つの端末A,Bがあり、各端末A,Bで発生したデータを交換する場合を考える。各端末A,Bでは、データが発生すると、時刻付与部13がそのデータにタイムスタンプを付与する。すなわち、端末A,Bでは、それぞれ自己のシステム時刻を用いて、発生したデータにタイムスタンプが付与される。図3(a)の例では、端末Aで三つのデータが発生し、端末Bで二つのデータが発生した場合を示している。また、端末Aで発生したデータはタイムスタンプと共に端末Aの記憶部11に格納され、一方、端末Bで発生したデータはタイムスタンプと共に端末Bの記憶部11に格納される。このように、各端末A,Bでは独立にデータが格納される。
【0020】
次に、端末Aと端末Bは、図3(b)に示すように、データ通信を行い、それぞれで発生したデータを交換する。このとき、端末Aでは、制御部15が、記憶部11に格納された三つのデータ(タイムスタンプを含む。)に加えて、データ送信時における端末Aのシステム時刻を送信する。同様に、端末Bでは、制御部15が、記憶部11に格納された二つのデータ(タイムスタンプを含む。)に加えて、データ送信時における端末Bのシステム時刻を送信する。ここで、データ通信の際、端末Aと端末Bとでは同期がとられており、端末Aがデータ送信時におけるシステム時刻を取得するタイミングと、端末Bがデータ送信時におけるシステム時刻を取得するタイミングとは一致している。また、こうして各端末A,Bで取得されたデータ送信時におけるシステム時刻は、データ受信時におけるシステム時刻ともなる。
【0021】
端末Aが端末Bからデータを受信すると、端末Aの時刻補正部16は、その受信したデータと共に送られたデータ送信時における端末Bのシステム時刻とデータ受信時における自己(端末A)のシステム時刻との差分をとる。そして、その差分に基づいて、受信した各データに付与されたタイムスタンプを補正する。この補正処理について具体的に説明する。端末Aの時刻補正部16は、データ受信時における自己のシステム時刻がデータ送信時における端末Bのシステム時刻よりも時間Tだけ進んでいる場合には、受信した各データのタイムスタンプに時間Tを加算する。その加算した後の各時刻はそれぞれ対応するデータの新たなタイムスタンプとなる。そして、端末Aの制御部15は、受信した各データをその新たなタイムスタンプと共に記憶部11に記憶する。一方、端末Aの時刻補正部16は、データ受信時における自己のシステム時刻がデータ送信時における端末Bのシステム時刻よりも時間Tだけ遅れている場合には、受信した各データのタイムスタンプから時間Tを減算する。その減算した後の各時刻はそれぞれ対応するデータの新たなタイムスタンプとなる。そして、端末Aの制御部15は、受信した各データをその新たなタイムスタンプと共に記憶部11に記憶する。これにより、端末Aでは、自己のシステム時刻を基準として、端末Bで発生したデータのタイムスタンプを書き換えることができる。
【0022】
端末Bが端末Aからデータを受信したときも、端末Bでは上記と同様にタイムスタンプの補正処理が行われる。すなわち、端末Bの時刻補正部16は、その受信したデータ等と共に送られたデータ送信時における端末Aのシステム時刻とデータ受信時における自己(端末B)のシステム時刻との差分をとり、その差分に基づいて、受信した各データに付与されたタイムスタンプを補正する。具体的には、端末Bの時刻補正部16は、データ受信時における自己のシステム時刻がデータ送信時における端末Aのシステム時刻よりも時間Tだけ進んでいる場合には、受信した各データのタイムスタンプに時間Tを加算する。その加算した後の各時刻はそれぞれ対応するデータの新たなタイムスタンプとなる。そして、端末Bの制御部15は、受信した各データをその新たなタイムスタンプと共に記憶部11に記憶する。一方、端末Bの時刻補正部16は、データ受信時における自己のシステム時刻がデータ送信時における端末Aのシステム時刻よりも時間Tだけ遅れている場合には、受信した各データのタイムスタンプから時間Tを減算する。その減算した後の各時刻はそれぞれ対応するデータの新たなタイムスタンプとなる。そして、端末Bの制御部15は、受信した各データをその新たなタイムスタンプと共に記憶部11に記憶する。これにより、端末Bでは、自己のシステム時刻を基準として、端末Aで発生したデータのタイムスタンプを書き換えることができる。
【0023】
ところで、本実施形態では、データ通信の際に、原則として、一方の端末におけるシステム時刻を他方の端末におけるシステム時刻に一致させるという処理を行わない。いずれの端末のシステム時刻が正確であるかは一概には判断できないからである。しかしながら、例えば、クライアントとサーバとからなるシステムやコンピュータと携帯端末とからなるシステムのように、メインの端末とサブの端末とが予め決められているシステムにおいては、サブの端末は、メインの端末との間でデータ通信を行い、自己のシステム時刻がメインの端末のシステム時刻と大幅に異なっていると認識したときに、自己のシステム時刻をメインの端末のシステム時刻に合わせる旨の警告を表示手段に表示したり、その旨を意味する警報を発したりしてもよい。あるいは、サブの端末は、メインの端末から送られたデータ送信時におけるメインの端末のシステム時刻に基づいて、自己のシステム時刻をメインの端末のシステム時刻に一致するように調整するようにしてもよい。メインの端末とサブの端末とが決められてシステムでは、メインの端末のシステム時刻を優先させるのが望ましいからである。また、例えば、携帯端末等では、システム時刻を一時間間違えて設定してしまうということがよくあるが、このような場合に、システム時刻の設定ミスを認識し、あるいは容易に正すことができる。尚、上述した警告を表示しあるいは警報を発する処理、又はシステム時刻を一致させる処理は、当該処理を制御部に実行させるためのプログラムを端末に組み込むことにより、容易に実現できる。
【0024】
本実施形態のデータ通信システムでは、各端末は、他の端末にデータを送信するときに、当該データ及びそのタイムスタンプに加えて、データ送信時における自己のシステム時刻を送信する制御部と、他の端末からデータを受信したときに、当該データと共に送られた他の端末のシステム時刻とデータ受信時における自己のシステム時刻との差分をとり、その差分に基づいて当該データに付与されたタイムスタンプを補正する時刻補正部とを備える。これにより、各端末では、自己のシステム時刻を基準として、他の端末で発生したデータのタイムスタンプを書き換えることができるので、各端末のシステム時刻に差異があるためにタイムスタンプによる各データの順序が各データの実際の発生順序と異なってしまうという事態が発生するのを防止することができる。
【0025】
また、タイムスタンプを補正する処理等は、ソフトウエア的に実現できるので、本実施形態のデータ通信システムにおいては、新たなハードウエアの増設等をする必要はなく、各端末の製造コストもそれ程かさむことはないという利点もある。
【0026】
尚、本発明は上記の実施形態に限定されるものではなく、その要旨の範囲内において種々の変形が可能である。
【0027】
上記の実施形態では、各端末間でデータを交換する頻度が一日一回程度である場合について説明したが、データ交換の頻度はさらに低くてもよい。例えば、一ヶ月に一回程度、各端末間でデータを交換するようにしてもよい。但し、このようにデータ交換の頻度が低い場合には、データのタイムスタンプを補正する際に、一日当たりのシステム時刻の狂いの程度が端末毎に異なる可能性があることを考慮する必要がある。すなわち、各端末の時刻補正部は、他の端末からデータが送られたときに、上述したように今回のデータ送受信時におけるシステム時刻の差分に基づいて当該データのタイムスタンプを補正すると共に、一日当たりのシステム時刻の狂いの程度が端末毎に異なることを考慮した補正を行う。
【0028】
この後者の補正は、具体的には次のように行われる。すなわち、時刻補正部は、まず、今回のデータ送受信時におけるシステム時刻の差分と前回のデータ送受信時におけるシステム時刻の差分との差をとる。この差(差分変化量)は、前回のデータ送受信時から今回のデータ送受信時までの間に、当該二つの端末におけるシステム時刻の差分がどれだけ変化したかを表している。また、今回のデータ送受信時を基準として、当該データが過去何日前に発生したのかを算出する。次に、時刻補正部は、一日当たりの平均の差分変化量を求め、その求めた平均の差分変化量に、今回のデータ送受信時を基準として過去にさかのぼって算出された当該データの日数を乗じる。この乗じて得られた時間が、当該データについてのタイムスタンプの補正量となる。
【0029】
【発明の効果】
以上説明したように本発明に係るデータ通信システムでは、各端末は、他の端末にデータを送信するときに、当該データ及びそのデータ発生時刻に加えて、データ送信時における自己のシステム時刻を送信する送信制御手段と、他の端末からデータを受信したときに、当該データと共に送られた他の端末のシステム時刻とデータ受信時における自己のシステム時刻との差分をとり、その差分に基づいて当該データに付与されたデータ発生時刻を補正する時刻補正手段とを備える。これにより、各端末では、自己のシステム時刻を基準として、他の端末で発生したデータの発生時刻を書き換えることができるので、各端末のシステム時刻に差異があるためにデータ発生時刻による各データの順序が各データの実際の発生順序と異なってしまうという事態が発生するのを防止することができる。
【0030】
また、本発明に係るデータ発生時間の補正方法は、上記と同様に、各端末では、自己のシステム時刻を基準として、他の端末で発生したデータの発生時刻を書き換えることができるので、各端末のシステム時刻に差異があるためにデータ発生時刻による各データの順序が各データの実際の発生順序と異なってしまうという事態が発生するのを防止することができる。
【図面の簡単な説明】
【図1】本発明の一実施形態であるデータ通信システムの概略構成図である。
【図2】そのデータ通信システムにおける各端末の概略機能ブロック図である。
【図3】そのデータ通信システムにおいてデータのタイムスタンプを補正する動作を説明するための図である。
【符号の説明】
10  端末
11  記憶部
12  計時回路
13  時刻付与部
14  通信部
15  制御部
16  時刻補正部
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a data communication system that corrects a data generation time given to data when performing data communication between terminals, and a method of correcting the data generation time.
[0002]
[Prior art]
Currently, data communication systems capable of performing data communication between terminals are widely used. For example, in many companies, a network is constructed by connecting a plurality of computers via a LAN or the like. Then, by communicating data between the computers, the data can be managed centrally. In addition, a portable terminal such as a PDA and a computer can be connected by a temporary communication link, and data can be exchanged between them.
[0003]
Generally, computers and portable terminals are provided with a clock circuit that measures the current time and the date (system time). The system time is used, for example, when data is generated, to add a data generation time (time stamp) to the data. When data communication is performed between the terminals, the time stamp is transmitted together with the data.
[0004]
[Problems to be solved by the invention]
By the way, it is rare that the system time of each terminal is the same, and there are many cases where the system time is shifted from each other. For this reason, when data generated in another terminal is transmitted to the terminal, when the terminal manages the transmitted data and the data generated in the terminal together, the order of each data by the time stamp is The order of occurrence of each data may be different.
[0005]
The present invention has been made based on the above circumstances, and when performing data communication, a situation occurs in which the order of each data according to the data generation time differs from the actual generation order of each data at each terminal. It is an object of the present invention to provide a data communication system and a data generation time correction method capable of preventing the occurrence of the error.
[0006]
[Means for Solving the Problems]
The present invention for achieving the above object has a plurality of terminals, a data communication system capable of performing data communication between each terminal, wherein each terminal, when data occurs, Time providing means for providing a data generation time to the generated data; and when transmitting the data to another terminal, in addition to the data and the data generation time provided to the data, the own time at the time of the data transmission. Transmission control means for transmitting the system time, and when receiving data from another terminal, take the difference between the system time of the other terminal sent together with the data and its own system time at the time of receiving the data, And a time correcting means for correcting the data generation time given to the data based on the difference.
[0007]
Further, the present invention for achieving the above object is a data generation time correction method for correcting the data generation time given to data when performing data communication between two terminals, When transmitting data from a terminal to another terminal, the one terminal transmits its own system time at the time of the data transmission, in addition to the data and the data generation time added to the data, The terminal takes a difference between the system time of the one terminal sent together with the data and its own system time at the time of receiving the data, and corrects the data generation time given to the data based on the difference. It is characterized by the following.
[0008]
BEST MODE FOR CARRYING OUT THE INVENTION
An embodiment of the present invention will be described below with reference to the drawings. FIG. 1 is a schematic configuration diagram of a data communication system according to an embodiment of the present invention, and FIG. 2 is a schematic functional block diagram of each terminal in the data communication system.
[0009]
The data communication system of the present embodiment includes a plurality of terminals 10 as shown in FIG. Such a data communication system may be, for example, a system including a client and a server. In this case, the client and the server are connected by a LAN or the like, and a network is constructed. Thus, data communication can be performed between the clients or between the client and the server. The data communication system may be, for example, a system including at least one computer and a plurality of mobile terminals. In this case, when the two mobile terminals or the computer and the mobile terminal are connected by a temporary communication link, data communication can be performed between the mobile terminals or between the computer and the mobile terminal. FIG. 1 illustrates a case where each terminal 10 is a computer.
[0010]
In the present embodiment, a case will be considered in which data communication is performed between the terminals 10 about once a day. A specific example is a case where a salesman carries a mobile terminal and goes out, and then when he returns to the company, data generated on that day is transmitted from the mobile terminal to the company computer. .
[0011]
As shown in FIG. 2, each terminal 10 includes a storage unit 11, a clock circuit 12, a time giving unit 13, a communication unit 14, a control unit 15, and a time correction unit 16.
[0012]
The storage unit 11 stores data generated in the terminal 10. Here, “occurred data” includes both newly created data and updated data.
[0013]
The clock circuit 12 manages the current time and the date, that is, the system time. Ordinary computers and portable terminals are equipped with such a timing circuit 12. The user can adjust the system time measured by the clock circuit 12. The time assigning unit 13 assigns a system time measured by the clock circuit 12 to the data when the data is generated, as a data generation time (time stamp). The time stamp is one of the attribute information of the data, and indicates a creation time or an update time of the data.
[0014]
The communication unit 14 is for performing data communication with another terminal 10. The control unit 15 controls the entire terminal 10. Specifically, when transmitting data to another terminal 10, the control unit 15 transmits its own system time at the time of transmitting the data, in addition to the data and the time stamp attached to the data.
[0015]
In general, it is rare that the system times of the terminals 10 are coincident with each other, and there are many cases where the system times are shifted from each other. Even if the system times of all the terminals 10 are set to the same time, there is a difference in how the system time of each terminal 10 advances due to the individual difference of the clock circuit 12, and as the time elapses, the system of each terminal 10 Times are shifted from each other. In addition, for example, in a mobile terminal or the like, it is often the case that the system time is incorrectly set for one hour.
[0016]
As described above, since the system time of each terminal 10 is different, when data generated at another terminal 10 is transmitted to the terminal 10, the data transmitted at the terminal 10 and the data generated at the terminal 10 are generated. When managing data together, the order of each data according to the time stamp may be different from the actual generation order of each data. In the present embodiment, the time correction unit 16 is provided to prevent the order of each data based on the time stamp from being different from the actual generation order of each data. When receiving data from another terminal 10, the time correction unit 16 calculates a difference between the system time of the other terminal 10 sent together with the data and its own system time at the time of receiving the data, and calculates the difference. The time stamp given to the data is corrected based on the time stamp. That is, by adding or subtracting the difference to or from the time stamp of the data transmitted from another terminal 10, the time stamp of the transmitted data is rewritten to a time based on its own system time.
[0017]
The time correction unit 16 that corrects such a time stamp can be easily realized by incorporating a program for causing the control unit 15 to execute the correction processing into the terminal 10.
[0018]
Next, an operation for correcting a time stamp of data in the data communication system of the present embodiment will be described. FIG. 3 is a diagram for explaining an operation of correcting a data time stamp in the data communication system.
[0019]
Assume that there are two terminals A and B as shown in FIG. 3A, and data generated at each of the terminals A and B is exchanged. In each of the terminals A and B, when data is generated, the time giving unit 13 gives a time stamp to the data. That is, in the terminals A and B, a time stamp is added to the generated data using their own system times. The example of FIG. 3A shows a case where three data are generated at the terminal A and two data are generated at the terminal B. The data generated at the terminal A is stored in the storage unit 11 of the terminal A together with the time stamp, while the data generated at the terminal B is stored in the storage unit 11 of the terminal B together with the time stamp. Thus, data is stored independently in each of the terminals A and B.
[0020]
Next, as shown in FIG. 3 (b), the terminal A and the terminal B perform data communication and exchange data generated at each. At this time, in the terminal A, the control unit 15 transmits the system time of the terminal A at the time of data transmission in addition to the three data (including the time stamp) stored in the storage unit 11. Similarly, in the terminal B, the control unit 15 transmits the system time of the terminal B at the time of data transmission, in addition to the two data (including the time stamp) stored in the storage unit 11. Here, at the time of data communication, the terminal A and the terminal B are synchronized, and the timing at which the terminal A acquires the system time at the time of data transmission and the timing at which the terminal B acquires the system time at the time of data transmission Is consistent with In addition, the system time at the time of data transmission obtained by each of the terminals A and B in this manner is also the system time at the time of data reception.
[0021]
When the terminal A receives data from the terminal B, the time correction unit 16 of the terminal A determines the system time of the terminal B at the time of data transmission and the system time of the terminal (terminal A) at the time of data reception. Take the difference with Then, based on the difference, the time stamp given to each received data is corrected. This correction processing will be specifically described. If the system time of the terminal A at the time of data reception is ahead of the system time of the terminal B at the time of data transmission by the time T, the time correction unit 16 of the terminal A adds the time T to the time stamp of each received data. to add. Each time after the addition becomes a new time stamp of the corresponding data. Then, the control unit 15 of the terminal A stores the received data together with the new time stamp in the storage unit 11. On the other hand, if the system time of the terminal A at the time of data reception is later than the system time of the terminal B at the time of data transmission by the time T, the time correction unit 16 of the terminal A determines the time from the time stamp of each received data. Subtract T. Each time after the subtraction becomes a new time stamp of the corresponding data. Then, the control unit 15 of the terminal A stores the received data together with the new time stamp in the storage unit 11. As a result, the terminal A can rewrite the time stamp of the data generated at the terminal B based on its own system time.
[0022]
Even when the terminal B receives the data from the terminal A, the terminal B performs the time stamp correction process in the same manner as described above. That is, the time correction unit 16 of the terminal B obtains the difference between the system time of the terminal A at the time of transmitting the data transmitted together with the received data and the like and the system time of the terminal (the terminal B) at the time of receiving the data. , The time stamp added to each received data is corrected. Specifically, if the system time of the terminal B at the time of data reception is ahead of the system time of the terminal A at the time of data transmission by the time T, the time correction unit 16 of the terminal B determines the time of each received data. The time T is added to the stamp. Each time after the addition becomes a new time stamp of the corresponding data. Then, the control unit 15 of the terminal B stores the received data together with the new time stamp in the storage unit 11. On the other hand, when the system time of the terminal B at the time of data reception is later than the system time of the terminal A at the time of data transmission by the time T, the time correction unit 16 of the terminal B determines the time from the time stamp of each received data. Subtract T. Each time after the subtraction becomes a new time stamp of the corresponding data. Then, the control unit 15 of the terminal B stores the received data together with the new time stamp in the storage unit 11. As a result, the terminal B can rewrite the time stamp of the data generated in the terminal A with reference to its own system time.
[0023]
By the way, in the present embodiment, in data communication, in principle, a process of making the system time of one terminal coincide with the system time of the other terminal is not performed. This is because it cannot be unconditionally determined which terminal has the correct system time. However, for example, in a system in which a main terminal and a sub terminal are determined in advance, such as a system including a client and a server or a system including a computer and a mobile terminal, the sub terminal is a main terminal. When performing data communication with the device and recognizing that the system time of the terminal itself is significantly different from the system time of the main terminal, a warning is displayed to the effect that the system time of the terminal is adjusted to the system time of the main terminal It may be displayed on the means or an alarm indicating that effect may be issued. Alternatively, the sub terminal may adjust its own system time to match the system time of the main terminal based on the system time of the main terminal at the time of transmitting data sent from the main terminal. Good. This is because in a system in which a main terminal and a sub terminal are determined, it is desirable to give priority to the system time of the main terminal. In addition, for example, in a mobile terminal or the like, it is often the case that the system time is incorrectly set for one hour. In such a case, a setting error of the system time can be recognized or corrected easily. The above-described process of displaying a warning or issuing a warning, or the process of matching the system time can be easily realized by incorporating a program for causing the control unit to execute the process in a terminal.
[0024]
In the data communication system of the present embodiment, each terminal, when transmitting data to another terminal, in addition to the data and its time stamp, a control unit that transmits its own system time at the time of data transmission, When data is received from the terminal, the difference between the system time of the other terminal sent together with the data and the own system time at the time of receiving the data is taken, and the time stamp given to the data based on the difference is taken. And a time correction unit for correcting As a result, each terminal can rewrite the time stamp of data generated at another terminal based on its own system time. Can be prevented from being different from the actual order in which the data is generated.
[0025]
In addition, since the processing for correcting the time stamp can be realized by software, in the data communication system of the present embodiment, it is not necessary to add new hardware, and the manufacturing cost of each terminal increases considerably. There is also the advantage that there is nothing.
[0026]
Note that the present invention is not limited to the above embodiment, and various modifications can be made within the scope of the gist.
[0027]
In the above embodiment, the case where the frequency of exchanging data between the terminals is about once a day has been described, but the frequency of data exchange may be lower. For example, data may be exchanged between terminals approximately once a month. However, when the frequency of data exchange is low as described above, it is necessary to consider that the degree of deviation of the system time per day may be different for each terminal when correcting the time stamp of data. . That is, when data is transmitted from another terminal, the time correction unit of each terminal corrects the time stamp of the data based on the system time difference at the time of data transmission and reception this time, as described above. Correction is performed taking into account that the degree of deviation of the system time per day varies from terminal to terminal.
[0028]
This latter correction is specifically performed as follows. That is, the time correction unit first calculates the difference between the system time difference at the time of the current data transmission and reception and the system time difference at the time of the previous data transmission and reception. This difference (difference change amount) indicates how much the difference between the system times of the two terminals has changed between the time of the previous data transmission and reception and the current data transmission and reception. Further, based on the current data transmission / reception time, the number of days before the data has occurred in the past is calculated. Next, the time correction unit obtains the average difference change amount per day, and multiplies the obtained average difference change amount by the number of days of the data calculated retroactively based on the current data transmission / reception time. . The time obtained by this multiplication is the time stamp correction amount for the data.
[0029]
【The invention's effect】
As described above, in the data communication system according to the present invention, when transmitting data to another terminal, each terminal transmits its own system time at the time of data transmission in addition to the data and the data generation time. Transmission control means, which, when receiving data from another terminal, takes a difference between the system time of the other terminal sent together with the data and its own system time at the time of data reception, and takes the difference based on the difference. Time correction means for correcting the data generation time given to the data. As a result, each terminal can rewrite the occurrence time of data generated in another terminal based on its own system time, so that there is a difference in the system time of each terminal. It is possible to prevent a situation where the order is different from the actual generation order of each data.
[0030]
In addition, in the method of correcting the data generation time according to the present invention, each terminal can rewrite the generation time of data generated in another terminal with reference to its own system time, as described above. It is possible to prevent the occurrence of a situation in which the order of each data according to the data generation time differs from the actual generation order of each data due to the difference in the system time.
[Brief description of the drawings]
FIG. 1 is a schematic configuration diagram of a data communication system according to an embodiment of the present invention.
FIG. 2 is a schematic functional block diagram of each terminal in the data communication system.
FIG. 3 is a diagram for explaining an operation of correcting a time stamp of data in the data communication system.
[Explanation of symbols]
DESCRIPTION OF SYMBOLS 10 Terminal 11 Storage unit 12 Clock circuit 13 Time giving unit 14 Communication unit 15 Control unit 16 Time correction unit

Claims (2)

複数の端末を有し、各端末間でデータの通信を行うことができるデータ通信システムであって、
前記各端末は、
データが発生したときに、その発生したデータにデータ発生時刻を付与する時刻付与手段と、
他の端末にデータを送信するときに、当該データ及び当該データに付与されたデータ発生時刻に加えて、当該データ送信時における自己のシステム時刻を送信する送信制御手段と、
他の端末からデータを受信したときに、当該データと共に送られた当該他の端末のシステム時刻と当該データ受信時における自己のシステム時刻との差分をとり、その差分に基づいて当該データに付与されたデータ発生時刻を補正する時刻補正手段と、
を具備することを特徴とするデータ通信システム。
A data communication system having a plurality of terminals and capable of performing data communication between the terminals,
Each of the terminals,
A time giving means for giving a data occurrence time to the generated data when data is generated;
When transmitting data to another terminal, in addition to the data and the data generation time given to the data, transmission control means for transmitting its own system time at the time of the data transmission,
When data is received from another terminal, the difference between the system time of the other terminal sent together with the data and the own system time at the time of receiving the data is calculated, and the difference is added to the data based on the difference. Time correction means for correcting the data occurrence time,
A data communication system comprising:
二つの端末間でデータの通信を行う際に、データに付与されたデータ発生時刻を補正するデータ発生時刻の補正方法であって、
一の端末から他の端末にデータを送信するときに、前記一の端末は、当該データ及び当該データに付与されたデータ発生時刻に加えて、当該データ送信時における自己のシステム時刻を送信し、前記他の端末は、当該データと共に送られた前記一の端末のシステム時刻と当該データ受信時における自己のシステム時刻との差分をとり、その差分に基づいて当該データに付与されたデータ発生時刻を補正することを特徴とするデータ発生時刻の補正方法。
When performing data communication between two terminals, a data generation time correction method for correcting the data generation time given to the data,
When transmitting data from one terminal to another terminal, the one terminal transmits its own system time at the time of the data transmission, in addition to the data and the data generation time given to the data, The other terminal calculates a difference between the system time of the one terminal transmitted together with the data and its own system time at the time of receiving the data, and calculates a data generation time given to the data based on the difference. A method of correcting a data generation time, wherein the correction is performed.
JP2002219488A 2002-07-29 2002-07-29 Data communication system and method for correcting data generation time Pending JP2004062497A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002219488A JP2004062497A (en) 2002-07-29 2002-07-29 Data communication system and method for correcting data generation time

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002219488A JP2004062497A (en) 2002-07-29 2002-07-29 Data communication system and method for correcting data generation time

Publications (1)

Publication Number Publication Date
JP2004062497A true JP2004062497A (en) 2004-02-26

Family

ID=31940376

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002219488A Pending JP2004062497A (en) 2002-07-29 2002-07-29 Data communication system and method for correcting data generation time

Country Status (1)

Country Link
JP (1) JP2004062497A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006344020A (en) * 2005-06-09 2006-12-21 Seiko Epson Corp Log information management device, log information management system, log information management method, log information production management method and program

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006344020A (en) * 2005-06-09 2006-12-21 Seiko Epson Corp Log information management device, log information management system, log information management method, log information production management method and program
JP4687258B2 (en) * 2005-06-09 2011-05-25 セイコーエプソン株式会社 Log information management apparatus, log information management method and program thereof

Similar Documents

Publication Publication Date Title
US9979998B1 (en) System for time synchronization of audio devices
US7668207B2 (en) System, method, and article of manufacture for synchronizing time of day clocks on first and second computers
Mills Computer network time synchronization: the network time protocol
US20200021443A1 (en) Method and timer for providing security-protected time information
CN110120989B (en) Method and system for realizing automatic address allocation and matching among devices
US9521638B2 (en) Time synchronizing method for AVB in vehicle and system thereof
JP2565625B2 (en) Method and computer system for generating a time reference value in a node
JPH11154920A (en) Clock synchronizing method for synchronizing-type base station control system and its synchronizing device
US11336510B2 (en) Information processing system, information processing method, and non-transitory recording medium
CN107592608A (en) A kind of schedule synchronization electronic equipment and terminal, method for schedule synchronization
CN109348434A (en) A kind of sending method of scene information, sending device and terminal device
CN110830138A (en) Information processing method, electronic equipment and server
CN111988143B (en) Key updating method, device, equipment and storage medium
CN101133401A (en) Time-stamp device, time emendation method and time emendation program
JP2004062497A (en) Data communication system and method for correcting data generation time
CN104426644A (en) Equipment time synchronization method and device
CN107966673B (en) Simple and effective clock management method for electric energy meter
CN110471697A (en) Configuration method and Related product
CN109818700A (en) Synchronous method, device, plant stand and the topological structure of wide area system protective device
CN114003252A (en) Method, system, terminal and storage medium for automatically updating configuration file
CN114126028A (en) Differential protection method, device, communication unit and storage medium
Refan et al. Redundant GPS time synchronization boards for computer networks
CN113541837A (en) Parameter configuration method, equipment and system
JPS6041344A (en) Managing system of generation time of generated data
JPS63213013A (en) Time point designating system for computer network system