[go: up one dir, main page]

JP2004086800A - Data synchronization system and data synchronization method - Google Patents

Data synchronization system and data synchronization method Download PDF

Info

Publication number
JP2004086800A
JP2004086800A JP2002250161A JP2002250161A JP2004086800A JP 2004086800 A JP2004086800 A JP 2004086800A JP 2002250161 A JP2002250161 A JP 2002250161A JP 2002250161 A JP2002250161 A JP 2002250161A JP 2004086800 A JP2004086800 A JP 2004086800A
Authority
JP
Japan
Prior art keywords
data synchronization
database
update
client
update history
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.)
Abandoned
Application number
JP2002250161A
Other languages
Japanese (ja)
Inventor
Satoshi Mitsui
三井 聡
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2002250161A priority Critical patent/JP2004086800A/en
Publication of JP2004086800A publication Critical patent/JP2004086800A/en
Abandoned legal-status Critical Current

Links

Images

Landscapes

  • Information Transfer Between Computers (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

【課題】適当なデータ送信量でのデータ同期を自動的に開始することにより、通信時間の増大やデータ同期中にエラーの起こる可能性を抑えることができるデータ同期システムを提供する。
【解決手段】サーバ10は、データベース211を有するクライアント21とネットワーク3を介して接続され、自らが保有するデータベース101の更新内容を更新履歴として保存する更新履歴DB102と、更新履歴DB102にクライアント21とデータ同期する更新履歴がいくつ保存されたらデータ同期を開始するかの閾値を記憶する記憶部105とを有し、データ同期が必要な更新履歴を更新履歴DB102より抽出し、この抽出した更新履歴の件数が前記閾値より大きい時に、データベース101とデータベース211のデータ同期を開始する。
【選択図】    図1
A data synchronization system capable of automatically starting data synchronization with an appropriate data transmission amount to suppress an increase in communication time and a possibility of occurrence of an error during data synchronization.
A server is connected to a client having a database via a network, and stores an update history of a database held by the server as an update history. A storage unit 105 for storing a threshold value indicating how many update histories for data synchronization are stored before starting data synchronization, and extracting update histories requiring data synchronization from the update history DB 102; When the number of cases is greater than the threshold, data synchronization between the database 101 and the database 211 is started.
[Selection diagram] Fig. 1

Description

【0001】
【発明の属する技術分野】
この発明は、ネットワークで接続されたサーバコンピュータと1台以上のクライアント端末との間のデータ同期を行うデータ同期システム及びデータ同期方法に関するものである。
【0002】
【従来の技術】
データベースの内容を同一に保つためのデータの送受信(以下、データ同期)の手法としては、自身のデータベースの更新内容を更新履歴として更新履歴データベースに記憶しておき、その更新履歴をもとに相手に送信する必要のある情報を相手に送信することが考えられている。これにより、自身のデータベースの更新内容を相手のデータベースに反映させるとともに、相手から送信されてきた相手のデータベースの更新内容情報に基づいて自身のデータベースの内容更新をすることができ、自身のデータベースと相手のデータベースとの内容を同一に保つことができる。
【0003】
また、従来のデータ同期の開始方法としては、ユーザが手動で行う方法の他に、例えば特開2000−132603号公報に記載されているように、前もってデータ同期を開始する時刻を登録しておく方法や、特開2000−330880号公報に記載されているように、クライアント端末がサーバコンピュータへの接続を確立したときに自動的にデータ同期を開始する方法が知られている。
【0004】
【発明が解決しようとする課題】
以上のように従来のデータ同期方法では、長い期間ユーザがデータ同期を行わなかったり、登録したデータ同期開始時刻以前にデータベースに大量の変更がなされたような場合には、データ同期開始時に相手へ送信する情報の量、又は相手から受信する情報の量は多大なものとなってしまった。
【0005】
また、クライアント端末が携帯電話のように記憶領域に制限のあるような機器である場合や、サーバコンピュータとクライアント端末をつなぐネットワークとして公衆網や無線等が用いられ信頼性や通信速度が十分でないような場合には、一度のデータ同期で大量の情報を送受信すると、データ同期をするにあたり通信時間が増大し、データ同期中にエラーの起こる可能性も高かった。
さらに、通信時間が増大することによってコストが増加する。また、エラーが発生することにより何度もデータ同期を行う必要があり、結果として通信時間が増大する、コストが増加するなどの課題があった。
【0006】
また、携帯電話などでは、データ転送中には他の機能、例えば通話などをすることができない。さらに、処理速度が著しく低下するため一度のデータ同期に多くの時間がかかりその間に携帯電話の他の機能を使用できないという事態が発生し、ユーザに対してストレスを与えることがあった。このように、一度のデータ同期で大量の情報を送受信することは望ましくないものであった。
【0007】
この発明は、上記のような課題を解決するためになされたものであり、一度のデータ同期で大量の情報を送受信することのないように、適当なデータ送信量でのデータ同期を自動的に開始することにより、通信時間の増大やデータ同期中にエラーの起こる可能性を抑えることができ、通信コストの削減やデータ同期プログラムによるクライアント端末の占有を回避することができるデータ同期システムを提供することを目的とする。
【0008】
【課題を解決するための手段】
第1の発明は、第1のデータベースを有するクライアントと、
前記クライアントとネットワークを介して接続され、第2のデータベースと、前記第2のデータベースの更新内容を更新履歴として保存する更新履歴保存手段と、前記更新履歴保存手段に前記クライアントに送信する必要のある更新履歴が何件保存されたらデータ同期を開始するかの第1の閾値を記憶する記憶手段とを有し、前記クライアントに送信する必要のある更新履歴を前記更新履歴保存手段より抽出し、この抽出した更新履歴の件数が前記第1の閾値より大きい時に、前記第1のデータベースと前記第2のデータベースとのデータ同期を開始するサーバと、を備えたものである。
【0009】
第2の発明は、前記クライアントに送信するメッセージサイズがいくつになったらデータ同期を開始するかの第2の閾値を記憶する記憶手段と、
前記更新履歴保存手段より抽出した更新履歴から前記クライアントに送信するメッセージサイズを計算し、このメッセージサイズが前記第2の閾値より大きい時に、前記第1のデータベースと前記第2のデータベースとのデータ同期を開始するサーバと、を備えたものである。
【0010】
第3の発明は、データ同期を開始しなくてもよい第1の時間間隔を第3の閾値として記憶する記憶手段と、
前記更新履歴保存手段より抽出した更新履歴の中から一番古い更新日時と現在の日時との差を求め、この差が前記第3の閾値より大きい時に、前記第1のデータベースと前記第2のデータベースとのデータ同期を開始するサーバと、を備えたものである。
【0011】
第4の発明は、データ同期を再開始する第2の時間間隔を記憶する記憶手段と、
前記データ同期の開始ができなかった時には、前記記憶手段に記憶された前記第2の時間間隔に従って一定時間待機後、データ同期を開始するサーバと、を備えたものである。
【0012】
第5の発明は、第1のデータベースを有するサーバと、
前記サーバとネットワークを介して接続され、第2のデータベースと、前記第2のデータベースの更新内容を更新履歴として保存する更新履歴保存手段と、前記更新履歴保存手段に前記サーバに送信する必要のある更新履歴が何件保存されたらデータ同期を開始するかの第1の閾値を記憶する記憶手段とを有し、前記サーバに送信する必要のある更新履歴を前記更新履歴保存手段より抽出し、この抽出した更新履歴の件数が前記第1の閾値より大きい時に、前記第1のデータベースと前記第2のデータベースとのデータ同期を開始するクライアントと、を備えたものである。
【0013】
第6の発明は、前記サーバに送信するメッセージサイズがいくつになったらデータ同期を開始するかの第2の閾値を記憶する記憶手段と、
前記更新履歴保存手段より抽出した更新履歴から前記サーバに送信するメッセージサイズを計算し、このメッセージサイズが前記第2の閾値より大きい時に、前記第1のデータベースと前記第2のデータベースとのデータ同期を開始するクライアントと、を備えたものである。
【0014】
第7の発明は、データ同期を開始しなくてもよい第1の時間間隔を第3の閾値として記憶する記憶手段と、
前記更新履歴保存手段より抽出した更新履歴の中から一番古い更新日時と現在の日時との差を求め、この差が前記第3の閾値より大きい時に、前記第1のデータベースと前記第2のデータベースとのデータ同期を開始するクライアントと、を備えたものである。
【0015】
第8の発明は、前記データ同期を再開始する時間間隔を記憶する記憶手段と、前記データ同期の開始ができなかった時には、前記記憶手段に記憶された時間間隔に従って一定時間待機後、データ同期を開始するクライアントと、を備えたものである。
【0016】
第9の発明は、第1のデータベースの更新内容を更新履歴として保存する更新履歴保存ステップと、
前記更新履歴の中からネットワークを介して接続された第2のデータベースに送信する必要のある更新履歴を抽出する抽出ステップと、
前記第2のデータベースに送信する必要のある更新履歴が前記更新履歴保存ステップで何件保存されたらデータ同期を開始するかの第1の閾値を記憶する記憶ステップと、
前記抽出ステップにより抽出された更新履歴の件数が、前記第1の閾値より大きい時に、前記第1のデータベースと前記第2のデータベースとのデータ同期を開始するデータ同期開始ステップと、を備えたものである。
【0017】
第10の発明は、前記第2のデータベースに送信するメッセージサイズがいくつになったらデータ同期を開始するかの第2の閾値を記憶する記憶ステップと、
前記抽出ステップにより抽出された更新履歴から前記第2のデータベースに送信するメッセージサイズを計算し、このメッセージサイズが前記第2の閾値より大きい時に、前記第1のデータベースと前記第2のデータベースとのデータ同期を開始するデータ同期開始ステップと、を備えたものである。
【0018】
第11の発明は、データ同期を開始しなくてもよい第1の時間間隔を第3の閾値として記憶する記憶ステップと、
前記抽出ステップにより抽出された更新履歴の中から一番古い更新日時と現在の日時との差を求め、この差が前記第3の閾値より大きい時に、前記第1のデータベースと前記第2のデータベースとのデータ同期を開始するデータ同期開始ステップと、を備えたものである。
【0019】
第12の発明は、データ同期を再開始する時間間隔を記憶する記憶ステップと、
前記データ同期の開始ができなかった時には、前記記憶ステップにより記憶された時間間隔に従って一定時間待機後、データ同期を開始するデータ同期開始ステップと、を備えたものである。
【0020】
【発明の実施の形態】
実施の形態1.
実施の形態1では、データ同期システムにおけるサーバコンピュータのデータ同期自動開始プログラム(以下、サーバプログラム)によるサーバの処理動作について説明する。
図1は、実施の形態1のデータ同期システムの構成図である。
図1において、10はサーバコンピュータ、21,22はクライアント端末、3はサーバコンピュータ10とクライアント端末21,22とを接続するネットワーク、101はサーバコンピュータ10内のデータベース、211,221はそれぞれクライアント端末21,22内のデータベース、102はサーバコンピュータ10内の更新履歴保存手段である更新履歴データベース、212,222はそれぞれクライアント端末21,22内の更新履歴保存手段である更新履歴データベース、103はサーバコンピュータ10のCPU、213,223はそれぞれクライアント端末21,22のCPU、104はサーバコンピュータ10のデータ同期自動開始プログラムを含むプログラム記憶部、214,224はそれぞれクライアント端末21,22のデータ同期自動開始プログラムを含むプログラム記憶部、105はサーバコンピュータのデータ同期自動開始プログラムの用いる閾値と再要求する時間間隔とを記憶する記憶部、215,225はそれぞれクライアント端末21,22のデータ同期自動開始プログラムの用いる閾値と再要求する時間間隔を記憶する記憶部である。
【0021】
図2は、サーバ10とクライアント21との前回のデータ同期終了直後のサーバ10のデータベース101の内容について示した図である。
図2に示すように、データベース101はデータの識別番号であるデータIDと、データの要素(ここでは名前と電話番号)からなっているものとする。また、サーバ10とクライアント21の前回のデータ同期は2002年1月3日に行われたものとする。
【0022】
図3は、2002年1月4日にサーバ10においてデータベース101の内容が変更された直後のデータベース101の内容について示した図である。図3では、データID3のデータが削除され、データID4のデータが変更され、データID5のデータが新たに追加されている。
【0023】
図4は、2002年1月4日にサーバ10においてデータベース101の内容が変更された直後の更新履歴データベース102の内容について示した図である。更新履歴データベース102の内容は、編集日時、データID、編集内容という要素からなるものとする。
【0024】
次に、サーバプログラムによるサーバ10の処理動作について説明する。
図5は、サーバプログラムによるサーバ10の処理動作を示すフローチャートである。
サーバ10のデータベース101の内容が変更されると、CPU103はサーバプログラムを呼び出す。ここでは、サーバプログラムは、2002年1月4日にデータベース101の内容が変更された直後に呼び出される。サーバプログラムはその時点で既知であるクライアント全て(ここではクライアント21,22)に対してそれぞれ下記の手順を順に行う。
【0025】
ここでは、クライアント21に対する手順について説明する。
まず、対象のクライアント21に対して必要な更新履歴を更新履歴データベース102から抽出する(ステップS11)。ここで、クライアント21に対しては2002年1月3日に一度データ同期を行っているので、それ以前に登録された更新履歴は必要ない。よって、ステップS11によって抽出される更新履歴は図6のようになる。
図6は、クライアント21に対して必要な更新履歴を更新履歴データベース102から抽出した内容について示した図である。
【0026】
次に、ステップS11によって抽出された更新履歴件数Xと対象のクライアントに対する更新履歴件数の閾値Yを比較する(ステップS12)。閾値Yの値は、更新履歴がいくつ溜まったらデータ同期開始を要求するかを示す閾値であり、任意のタイミング、任意の方法で記憶部105に登録されている。ここで、任意のタイミングについては、例えばクライアント21がサーバ10に登録された時に、また任意の方法については、例えば更新履歴データベース102の最大登録可能件数の半分を閾値Yの値とする方法により、閾値Yの値を記録部105に登録する。
なお、閾値Yの値は対象となるクライアントごとに独立に決定することができる。ここで、クライアント21に対する閾値Yの値は10であったとする。
【0027】
ステップS12での比較結果がX>Yである場合、CPU103に対して対象のクライアントとのデータ同期開始を要求することを命令する(ステップS13)。ステップS12での比較の結果がX≦Yである場合は何も行わずに終了する。図6に示すように、ここでは、クライアント21に対しては更新履歴件数X=3であり、X≦Yであるため、クライアント21とのデータ同期開始は要求されない。
【0028】
ステップS12での比較の結果がX>Yである場合には、クライアントとのデータ同期開始を要求することをCPU103に対して命令する(ステップS13)。CPU103が、クライアントに対してデータ同期開始を要求した場合に、ネットワークが切断されている等の理由で、データ同期を開始できなかった場合、記憶部105から再要求する時間間隔を読み出し、その時間間隔ごとにデータ同期開始を要求する(ステップS14、ステップS15)。すなわち、記憶部105から再要求する時間間隔を読み出し、この時間間隔の間一定時間待機後、再度データ同期開始を要求し、データ同期の開始を行う。
【0029】
この繰り返しは、クライアントとのデータ同期が開始できるまで続けられる。ただし、その間に例えばユーザからデータ同期開始要求があれば、待機中(ステップS15)であってもデータ同期開始をCPU105に要求することも考えられる。また、ユーザによってデータ同期要求の繰り返し手順を中止することも考えられる。
【0030】
以上のように本実施の形態によれば、サーバはデータ同期対象の各クライアントに対して適当な(大きすぎない)データ送信量でのデータ同期を自動的に開始することができ、これによって通信時間の増大やデータ同期中にエラーの起こる可能性を抑えることができるので、通信コストの削減やデータ同期プログラムによるクライアント端末の占有を回避することができる。
【0031】
実施の形態2.
実施の形態1ではサーバコンピュータの処理動作について説明したが、実施の形態2ではクライアントのデータ同期自動開始プログラム(以下、クライアントプログラム)によるクライアントの処理動作について説明する。
データ同期システムの構成は、実施の形態1の図1と同様であるので、説明を省略する。
【0032】
次に、クライアントプログラムによるクライアントの処理動作について説明する。
クライアントの処理動作は、実施の形態1で説明した図5のサーバプログラムによるサーバ10の処理動作と同様であるので、図5にしたがってクライアント21の処理動作について説明を行う。
【0033】
クライアント21のデータベース211の内容が変更されると、CPU213はクライアントプログラムを呼び出す。クライアントプログラムは、まず、必要な更新履歴を更新履歴データベース212から抽出する(ステップS11)。
次に、ステップS11によって抽出された更新履歴件数Xとサーバ104に対する更新履歴件数の閾値Yを比較する(ステップS12)。閾値Yの値は、更新履歴がいくつ溜まったらデータ同期開始を要求するかを示す閾値であり、任意のタイミング、任意の方法で記憶部215に登録されている。ここで、任意のタイミングについては、例えばクライアント21がサーバ10と初めてデータ同期を行う直前に、また任意の方法については、例えば更新履歴データベース212の最大登録可能件数の半分を閾値Yの値とする方法により、閾値Yの値を記録部215に登録する。
【0034】
ステップS12の比較の結果がX>Yである場合には、CPU213に対してサーバとのデータ同期開始を要求することを命令する(ステップS13)。ステップS12の比較の結果がX≦Yである場合は何もせずに終了する。
【0035】
ステップS13でサーバとのデータ同期開始を要求することをCPU213に対して命令した時に、ネットワークが切断されている等の理由で、データ同期を開始できなかった場合には、記憶部215から再要求する時間間隔を読み出し、その時間間隔ごとにデータ同期開始を要求する(ステップS14、ステップS15)。すなわち、記憶部215から再要求する時間間隔を読み出し、この時間間隔の間一定時間待機後、再度データ同期開始を要求し、データ同期の開始を行う。
【0036】
この繰り返しはサーバとのデータ同期が開始できるまで続けられる。ただし、その間に例えばユーザからデータ同期開始要求があれば、待機中(ステップS15)であってもデータ同期開始をCPU215に要求することも考えられる。また、ユーザによってデータ同期再要求の繰り返し手順を中止することも考えられる。
【0037】
以上のように本実施の形態によれば、クライアントはサーバに対して適当なデータ送信量でのデータ同期を自動的に開始することができ、これによって通信時間の増大やデータ同期中にエラーの起こる可能性を抑えることができるので、通信コストの削減やデータ同期プログラムによるクライアント端末の占有を回避することができる。
【0038】
実施の形態3.
実施の形態3では、実施の形態1のサーバプログラムとは異なるサーバプログラムについて説明する。データ同期システムの構成は、実施の形態1の図1と同様であり、また、サーバ10とクライアント21との前回のデータ同期終了直後のサーバ10のデータベース101の内容は図2と、2002年1月4日にサーバ10においてデータベース101の内容が変更された直後のデータベース101の内容は図3と、2002年1月4日にサーバ10においてデータベース101の内容が変更された直後の更新履歴データベース102の内容は図4と、クライアント21に対して必要な更新履歴を更新履歴データベース102から抽出した内容は図6と同様である。
【0039】
次に、サーバプログラムによるサーバ10の処理動作について説明する。
図7は、サーバプログラムによるサーバ10の処理動作を示すフローチャートである。
サーバ10のデータベース101の内容が変更されると、CPU103はサーバプログラムを呼び出す。ここでは、サーバプログラムは、2002年1月4日にデータベース101の内容が変更された直後に呼び出される。サーバプログラムはその時点で既知であるクライアント全て(ここではクライアント21,22)に対してそれぞれ下記の手順を行う。
【0040】
ここでは、クライアント21に対する処理動作について説明する。
まず、対象のクライアント21に対して必要な更新履歴を更新履歴データベース102から抽出する(ステップS21)。ここで、クライアント21に対しては2002年1月3日に一度データ同期を行っているので、それ以前に登録された更新履歴は必要ない。よって、ステップS21によって抽出される更新履歴は図6のようになる。
【0041】
次に、ステップS21によって抽出された更新履歴から対象のクライアントに対してパラメータX’を計算する(ステップS22)。ここでは、パラメータX’をクライアントに対して送信する必要のあるメッセージのサイズとする。ここでのメッセージは、データ同期において用いられるプロトコルによって定められ、相手に送信する必要のあるデータストリームである。
【0042】
例として、図8のように、各更新履歴ごとにデータID(2バイト)、編集内容(1バイト)、編集内容が「追加」、「変更」である場合には、データの内容(ここではデータベースの要素「名前」が10バイト、「電話番号」が11バイトとする)を連結し、さらにこれらを全ての更新履歴に対して連結したものをメッセージであるとすると、クライアント21に対して送信するメッセージのサイズは51バイトとなる。
【0043】
次に、ステップS22によって計算されたパラメータ(メッセージサイズ)X’と対象のクライアントに対するパラメータ(メッセージサイズ)の閾値Y’を比較する(ステップS23)。閾値Y’の値は、クライアントに対して送信する必要のあるメッセージのサイズがいくつになったらデータ同期開始を要求するかを示す閾値であり、任意のタイミング、任意の方法で記憶部105に登録されている。ここで、任意のタイミングについては、例えばクライアント21がサーバ10に登録された時に、また任意の方法については、例えば対象クライアントがサーバから受信するメッセージを蓄えるためのバッファの最大サイズの半分又は全部を閾値Y’の値とする方法により、閾値Y’の値を記録部105に登録する。
また、閾値Y’の値は対象となるクライアントごとに独立に決定することができる。ここでクライアント21に対しては閾値Y’の値は100バイトであったとする。
【0044】
ステップS23の比較の結果がX’>Y’である場合には、CPU103に対して対象のクライアントとのデータ同期開始を要求することを命令する(ステップS24)。ステップS23の比較の結果がX’≦Y’である場合は何もせずに終了する。図6に示すように、ここではクライアント21に対してはX’≦Y’であるため、クライアント21とのデータ同期は開始されない。
【0045】
一方、クライアントに対してX’>Y’である場合には、クライアントとのデータ同期開始を要求することをCPU103に対して命令する(ステップS24)。CPU103がクライアント22に対してデータ同期開始を要求した場合にネットワークが切断されている等の理由で、データ同期を開始できなかった場合、記憶部105から再要求する時間間隔を読み出し、その時間間隔ごとにデータ同期開始を要求する(ステップS25、ステップS26)。すなわち、記憶部105から再要求する時間間隔を読み出し、この時間間隔の間一定時間待機後、再度データ同期開始を要求し、データ同期の開始を行う。
【0046】
この繰り返しはクライアント22とのデータ同期が開始できるまで続けられる。ただし、その間に例えばユーザからデータ同期開始要求があれば、待機中(ステップS26)であってもデータ同期開始をCPU105に要求することも考えられる。また、ユーザによってデータ同期要求の繰り返し手順を中止することも考えられる。
【0047】
上記の方法とは別に、パラメータ(メッセージサイズ)の閾値Y’の決定方法として、通信速度が動的に変化するようなネットワークの場合には、動的に閾値Y’を更新して記憶部215に登録することも考えられる。
【0048】
以上のように本実施の形態によれば、サーバはデータ同期対象の各クライアント端末に対して、クライアント端末のメモリ制約や、ネットワークの通信速度などを考慮したデータ送信量でのデータ同期を自動的に開始することができ、これによって通信時間の増大やデータ同期中にエラーの起こる可能性を抑えることができるので、通信コストの削減やデータ同期プログラムによるクライアント端末の占有を回避することができる。
【0049】
実施の形態4.
実施の形態4では、実施の形態2のクライアントプログラムとは異なるクライアントプログラムについて説明する。データ同期システムの構成は、実施の形態1の図1と同様である。
【0050】
次に、クライアントプログラムによるクライアントの処理動作について説明する。
図7は、クライアントプログラムによるクライアントの処理動作を示すフローチャートである。
ここでは、クライアント21における動作について説明する。
クライアント21のデータベース211の内容が変更されると、CPU213はクライアントプログラムを呼び出す。クライアントプログラムは次の手順を行う。まず、必要な更新履歴を更新履歴データベース212から抽出する(S21)。
【0051】
次に、ステップS21によって抽出された更新履歴からパラメータX’を計算する(ステップS22)。ここでは、パラメータX’をサーバに対して送信する必要のあるメッセージのサイズとする。そしてステップS22によって計算されたパラメータX’とパラメータの閾値Y’を比較する(ステップS23)。ここで閾値Y’の値は、サーバに対して送信する必要のあるメッセージサイズがいくつになったらデータ同期開始を要求するかを示す閾値であり、任意のタイミング、任意の方法で記憶部215に登録されている。ここで、任意のタイミングについては、例えばクライアント21がサーバ10と初めてデータ同期を行う直前に、また任意の方法については、例えばサーバ10とクライアント21をつなぐネットワークの通信速度を参考に閾値Y’の値を決定する方法により、閾値Y’の値を記録部215に登録する。なお、通信速度を参考に閾値Y’の値を決定する方法は、通信速度が遅い場合には多くのデータを送る時間が長くかかり、このために送信エラーの発生が多くなるっことから考えたものである。
【0052】
ステップS23の比較の結果がX’>Y’である場合、CPU213に対してサーバとのデータ同期開始を命令する(S24)。ステップS23の比較の結果がX’≦Y’である場合は何もせずに終了する。
【0053】
ステップS24でサーバとのデータ同期開始を要求することをCPU213に対して命令した場合に、ネットワークが切断されている等の理由で、データ同期を開始できなかった場合は、記憶部215から再要求する時間間隔を読み出し、その時間間隔ごとにデータ同期開始を要求する(ステップS25、ステップS26)。すなわち、記憶部215から再要求する時間間隔を読み出し、この時間間隔の間一定時間待機後、再度データ同期開始を要求し、データ同期の開始を行う。
【0054】
この繰り返しはサーバとのデータ同期が開始できるまで続けられる。ただし、その間に例えばユーザからデータ同期開始要求があれば、待機中(ステップS26)であってもデータ同期開始をCPU215に要求することも考えられる。また、ユーザによってデータ同期再要求の繰り返し手順を中止することも考えられる。
【0055】
上記の方法とは別に、パラメータ(メッセージサイズ)の閾値Y’の決定方法として、通信速度が動的に変化するようなネットワークの場合には、動的に閾値Y’を更新して記憶部215に登録することも考えられる。
【0056】
以上のように本実施の形態によれば、クライアントはサーバに対してネットワークの通信速度などを考慮したデータ転送量でのデータ同期を自動的に開始することができ、これによって通信時間の増大やデータ同期中にエラーの起こる可能性を抑えることができるので、通信コストの削減やデータ同期プログラムによるクライアント端末の占有を回避することができる。
【0057】
なお、実施の形態3ではパラメータX’をクライアントに対して送信する必要のあるメッセージのサイズとし、実施の形態4ではパラメータX’をサーバに対して送信する必要のあるメッセージのサイズとしたが、以下の方法によりパラメータX’の設定を行うようにしても良い。すなわち、抽出した更新履歴のうち、更新履歴データベースに記録された日時(つまりデータベースの変更が発生した日時)が一番古いものの日時と、現在の日時との差をパラメータX’とする。このようにパラメータX’を設定すると、例えば、一番古い履歴が1週間前のものであり、現在の日時との差が7日と○○時間△△分××秒あり、閾値Y’が5日ということであれば、全てデータ同期を自動開始する。
【0058】
これにより、上記実施の形態と同様の効果を得ることができる。ここで、閾値Y’は、ここまではデータ同期を開始しなくてもよい時間間隔を示すものである。
なお、この場合にも、データ同期を開始できなかった場合、記憶部105から再要求する時間間隔を読み出し、その時間間隔ごとにデータ同期開始を要求することにより、データ同期の開始を行うか、または、記憶部215から再要求する時間間隔を読み出し、その時間間隔ごとにデータ同期開始を要求することにより、データ同期の開始を行うことができる。
【0059】
【発明の効果】
この発明は、以上説明したように構成されているので、以下に示すような効果を奏する。
【0060】
この発明によれば、サーバが、第1のデータベースを有するクライアントとネットワークを介して接続され、第2のデータベースと、前記第2のデータベースの更新内容を更新履歴として保存する更新履歴保存手段と、前記更新履歴保存手段に前記クライアントに送信する必要のある更新履歴が何件保存されたらデータ同期を開始するかの第1の閾値を記憶する記憶手段とを有し、前記クライアントに送信する必要のある更新履歴を前記更新履歴保存手段より抽出し、この抽出した更新履歴の件数が前記第1の閾値より大きい時に、前記第1のデータベースと前記第2のデータベースとのデータ同期を開始することにより、通信時間の増大やデータ同期中にエラーの起こる可能性を抑えることができるので、通信コストの削減やデータ同期プログラムによるクライアント端末の占有を回避することができる。
【0061】
また、クライアントが、第1のデータベースを有するサーバとネットワークを介して接続され、第2のデータベースと、前記第2のデータベースの更新内容を更新履歴として保存する更新履歴保存手段と、前記更新履歴保存手段に前記サーバに送信する必要のある更新履歴が何件保存されたらデータ同期を開始するかの第1の閾値を記憶する記憶手段とを有し、前記サーバに送信する必要のある更新履歴を前記更新履歴保存手段より抽出し、この抽出した更新履歴の件数が前記第1の閾値より大きい時に、前記第1のデータベースと前記第2のデータベースとのデータ同期を開始することにより、通信時間の増大やデータ同期中にエラーの起こる可能性を抑えることができるので、通信コストの削減やデータ同期プログラムによるクライアント端末の占有を回避することができる。
【図面の簡単な説明】
【図1】実施の形態1のデータ同期システムの構成図。
【図2】実施の形態1におけるデータベース101の内容について示した図。
【図3】実施の形態1におけるデータベース101の内容について示した図。
【図4】実施の形態1における更新履歴データベース102の内容について示した図。
【図5】実施の形態1におけるサーバ10の処理動作を示すフローチャート。
【図6】実施の形態1において必要な更新履歴を更新履歴データベース102から抽出した内容について示した図。
【図7】実施の形態3におけるサーバ10の処理動作を示すフローチャート。
【図8】実施の形態3における各更新履歴ごとのデータ内容を示した図。
【符号の説明】
10 サーバコンピュータ、21、22 クライアント端末、3 ネットワーク、101 データベース、102 更新履歴データベース、103 CPU、104 プログラム記憶部、105 記憶部、212、222 更新履歴データベース、213、223 CPU、214、224 プログラム記憶部、215、225 記憶部。
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a data synchronization system and a data synchronization method for synchronizing data between a server computer connected to a network and one or more client terminals.
[0002]
[Prior art]
As a method of data transmission / reception (hereinafter referred to as data synchronization) to keep the contents of the database the same, the update contents of the own database are stored in the update history database as an update history, and based on the update history, the partner is stored. It is considered that information that needs to be transmitted to the other party is transmitted to the other party. As a result, the updated contents of the own database can be reflected in the partner database, and the contents of the own database can be updated based on the updated contents information of the partner database transmitted from the partner. The content in the partner database can be kept the same.
[0003]
As a conventional method of starting data synchronization, in addition to a method that is manually performed by a user, a time at which data synchronization is started is registered in advance as described in, for example, JP-A-2000-132603. A method and a method of automatically starting data synchronization when a client terminal establishes a connection to a server computer as described in JP-A-2000-330880 are known.
[0004]
[Problems to be solved by the invention]
As described above, in the conventional data synchronization method, if the user does not perform data synchronization for a long period of time, or if a large amount of changes are made to the database before the registered data synchronization start time, the user is not notified when the data synchronization starts. The amount of information to be transmitted or the amount of information received from the other party has become enormous.
[0005]
Further, when the client terminal is a device having a limited storage area such as a mobile phone, a public network or a wireless network is used as a network connecting the server computer and the client terminal, and the reliability and communication speed are not sufficient. In such a case, if a large amount of information is transmitted / received in one data synchronization, the communication time increases in the data synchronization, and the possibility of occurrence of an error during the data synchronization is high.
Further, the cost increases due to the increase in communication time. In addition, it is necessary to perform data synchronization many times due to the occurrence of an error. As a result, there are problems such as an increase in communication time and an increase in cost.
[0006]
In addition, other functions such as a telephone call cannot be performed during data transfer in a mobile phone or the like. Further, since the processing speed is remarkably reduced, it takes a lot of time for one data synchronization, and during that time, other functions of the mobile phone cannot be used. As described above, it is not desirable to transmit and receive a large amount of information by one data synchronization.
[0007]
The present invention has been made to solve the above-described problem, and automatically performs data synchronization at an appropriate data transmission amount so as not to transmit and receive a large amount of information in one data synchronization. By starting the process, it is possible to provide a data synchronization system capable of suppressing an increase in communication time and the possibility of occurrence of an error during data synchronization, and reducing communication costs and avoiding occupation of a client terminal by a data synchronization program. The purpose is to:
[0008]
[Means for Solving the Problems]
A first invention provides a client having a first database,
A second database connected to the client via a network, an update history storage unit for storing update contents of the second database as an update history, and transmission to the client to the update history storage unit. Storage means for storing a first threshold value indicating how many update histories are stored before starting data synchronization, and extracting update histories that need to be transmitted to the client from the update history storage means; A server that starts data synchronization between the first database and the second database when the number of extracted update histories is greater than the first threshold.
[0009]
A second invention is a storage means for storing a second threshold value of the message size to be transmitted to the client when data synchronization is started,
A message size to be transmitted to the client is calculated from the update history extracted from the update history storage unit. When the message size is larger than the second threshold, data synchronization between the first database and the second database is performed. And a server that starts the process.
[0010]
A third invention is a storage unit that stores a first time interval that does not need to start data synchronization as a third threshold value,
The difference between the oldest update date and time and the current date and time is calculated from the update histories extracted from the update history storage means. When the difference is greater than the third threshold value, the first database and the second database are compared. And a server for starting data synchronization with the database.
[0011]
A fourth invention is a storage means for storing a second time interval for restarting data synchronization,
A server that starts data synchronization after waiting for a predetermined time according to the second time interval stored in the storage unit when the data synchronization cannot be started.
[0012]
A fifth invention provides a server having a first database,
A second database connected to the server via a network, an update history storage unit for storing the update content of the second database as an update history, and the update history storage unit need to be transmitted to the server. Storage means for storing a first threshold value of how many update histories are stored before starting data synchronization, and extracting update histories that need to be transmitted to the server from the update history storage means; A client that starts data synchronization between the first database and the second database when the number of extracted update histories is greater than the first threshold.
[0013]
A sixth invention is a storage means for storing a second threshold value of when a message size to be transmitted to the server is to start data synchronization,
A message size to be transmitted to the server is calculated from the update history extracted from the update history storage unit, and when the message size is larger than the second threshold, data synchronization between the first database and the second database is performed. And a client that starts the process.
[0014]
A seventh invention is a storage means for storing a first time interval which does not need to start data synchronization as a third threshold value,
The difference between the oldest update date and time and the current date and time is calculated from the update histories extracted from the update history storage means. When the difference is greater than the third threshold value, the first database and the second database are compared. And a client for starting data synchronization with the database.
[0015]
According to an eighth aspect of the present invention, there is provided a storage means for storing a time interval for restarting the data synchronization, and when the data synchronization cannot be started, after waiting for a predetermined time in accordance with the time interval stored in the storage means, the data synchronization is performed. And a client that starts the process.
[0016]
A ninth invention provides an update history saving step of saving the update content of the first database as an update history,
An extracting step of extracting, from the update history, an update history that needs to be transmitted to a second database connected via a network;
A storage step of storing a first threshold value indicating how many update histories that need to be transmitted to the second database are stored in the update history storage step before starting data synchronization;
A data synchronization start step of starting data synchronization between the first database and the second database when the number of update histories extracted in the extraction step is larger than the first threshold value It is.
[0017]
A tenth aspect of the present invention is a storage step of storing a second threshold value of a message size to be transmitted to the second database when data synchronization is started,
A message size to be transmitted to the second database is calculated from the update history extracted in the extraction step, and when the message size is larger than the second threshold, the size of the message between the first database and the second database is calculated. A data synchronization start step for starting data synchronization.
[0018]
An eleventh invention stores a first time interval which does not need to start data synchronization as a third threshold value,
A difference between the oldest update date and time and the current date and time is obtained from the update history extracted by the extraction step, and when the difference is larger than the third threshold, the first database and the second database are determined. And a data synchronization start step for starting data synchronization with the data.
[0019]
A twelfth invention stores a time interval for restarting data synchronization,
A data synchronization start step of starting data synchronization after waiting for a predetermined time according to the time interval stored in the storage step when the data synchronization cannot be started.
[0020]
BEST MODE FOR CARRYING OUT THE INVENTION
Embodiment 1 FIG.
In the first embodiment, the processing operation of the server by the data synchronization automatic start program (hereinafter, server program) of the server computer in the data synchronization system will be described.
FIG. 1 is a configuration diagram of the data synchronization system according to the first embodiment.
1, reference numeral 10 denotes a server computer, 21 and 22 denote client terminals, 3 denotes a network connecting the server computer 10 and the client terminals 21 and 22, 101 denotes a database in the server computer 10, and 211 and 221 denote client terminals 21 respectively. , 22; 102, an update history database as update history storage means in the server computer 10; 212, 222, update history databases as update history storage means in the client terminals 21, 22; CPUs 213 and 223 are client terminals 21 and 22 respectively, 104 is a program storage unit including a data synchronization automatic start program of the server computer 10, and 214 and 224 are client terminals, respectively. A program storage unit including the data synchronization automatic start programs 1 and 22; a storage unit 105 for storing a threshold used by the data synchronization automatic start program of the server computer and a time interval for re-request; This is a storage unit for storing a threshold value used by the data synchronization automatic start program 22 and a time interval for re-requesting.
[0021]
FIG. 2 is a diagram illustrating the contents of the database 101 of the server 10 immediately after the end of the previous data synchronization between the server 10 and the client 21.
As shown in FIG. 2, it is assumed that the database 101 includes a data ID, which is a data identification number, and data elements (here, a name and a telephone number). It is assumed that the last data synchronization between the server 10 and the client 21 was performed on January 3, 2002.
[0022]
FIG. 3 is a diagram illustrating the contents of the database 101 immediately after the contents of the database 101 are changed in the server 10 on January 4, 2002. In FIG. 3, the data of data ID3 is deleted, the data of data ID4 is changed, and the data of data ID5 is newly added.
[0023]
FIG. 4 is a diagram showing the contents of the update history database 102 immediately after the contents of the database 101 are changed in the server 10 on January 4, 2002. It is assumed that the content of the update history database 102 is composed of elements such as an edit date, a data ID, and an edit content.
[0024]
Next, the processing operation of the server 10 by the server program will be described.
FIG. 5 is a flowchart showing the processing operation of the server 10 by the server program.
When the contents of the database 101 of the server 10 are changed, the CPU 103 calls the server program. Here, the server program is called immediately after the contents of the database 101 are changed on January 4, 2002. The server program sequentially performs the following procedures for all the clients (here, clients 21 and 22) known at that time.
[0025]
Here, the procedure for the client 21 will be described.
First, an update history required for the target client 21 is extracted from the update history database 102 (step S11). Here, since data synchronization is once performed on the client 21 on January 3, 2002, the update history registered before that time is not necessary. Therefore, the update history extracted in step S11 is as shown in FIG.
FIG. 6 is a diagram showing the contents of the update history necessary for the client 21 extracted from the update history database 102.
[0026]
Next, the number of update histories X extracted in step S11 is compared with a threshold Y of the number of update histories for the target client (step S12). The value of the threshold Y is a threshold indicating how many update histories are accumulated before requesting the start of data synchronization, and is registered in the storage unit 105 at an arbitrary timing and an arbitrary method. Here, for the arbitrary timing, for example, when the client 21 is registered in the server 10, and for the arbitrary method, for example, a method of setting half of the maximum number of registrable records in the update history database 102 to the value of the threshold Y is used. The value of the threshold Y is registered in the recording unit 105.
Note that the value of the threshold Y can be determined independently for each target client. Here, it is assumed that the value of the threshold value Y for the client 21 is 10.
[0027]
When the comparison result in step S12 is X> Y, the CPU 103 is instructed to request the start of data synchronization with the target client (step S13). If the result of the comparison in step S12 is X ≦ Y, the process ends without performing any operation. As shown in FIG. 6, here, the update history record number X = 3 and X ≦ Y for the client 21, so that the start of data synchronization with the client 21 is not required.
[0028]
If the result of the comparison in step S12 is X> Y, the CPU 103 is instructed to request the start of data synchronization with the client (step S13). When the CPU 103 requests the client to start data synchronization, and when the data synchronization cannot be started due to a disconnection of the network or the like, the CPU 103 reads a time interval of the re-request from the storage unit 105 and reads the time interval. A request for starting data synchronization is made at each interval (steps S14 and S15). That is, a time interval for re-requesting is read from the storage unit 105, and after waiting for a certain time during this time interval, a request for starting data synchronization is made again to start data synchronization.
[0029]
This repetition is continued until data synchronization with the client can be started. However, if there is a data synchronization start request from the user during that time, the data synchronization start may be requested to the CPU 105 even during standby (step S15). It is also conceivable that the user stops the procedure of repeating the data synchronization request.
[0030]
As described above, according to the present embodiment, the server can automatically start data synchronization with an appropriate (not too large) data transmission amount for each client to be subjected to data synchronization, thereby enabling communication. Since it is possible to suppress an increase in time and the possibility of occurrence of an error during data synchronization, it is possible to reduce communication costs and avoid occupation of the client terminal by the data synchronization program.
[0031]
Embodiment 2 FIG.
In the first embodiment, the processing operation of the server computer has been described. In the second embodiment, the processing operation of the client by the data synchronization automatic start program (hereinafter, referred to as a client program) of the client will be described.
The configuration of the data synchronization system is the same as that of the first embodiment shown in FIG.
[0032]
Next, the processing operation of the client by the client program will be described.
Since the processing operation of the client is the same as the processing operation of the server 10 by the server program of FIG. 5 described in the first embodiment, the processing operation of the client 21 will be described with reference to FIG.
[0033]
When the contents of the database 211 of the client 21 are changed, the CPU 213 calls the client program. The client program first extracts a necessary update history from the update history database 212 (step S11).
Next, the number of update histories X extracted in step S11 is compared with the threshold Y of the number of update histories for the server 104 (step S12). The value of the threshold Y is a threshold indicating how many update histories have been accumulated before requesting the start of data synchronization, and is registered in the storage unit 215 at an arbitrary timing and in an arbitrary method. Here, for the arbitrary timing, for example, immediately before the client 21 first performs data synchronization with the server 10, and for the arbitrary method, for example, half of the maximum number of registrable records in the update history database 212 is set as the threshold Y value. The value of the threshold Y is registered in the recording unit 215 by the method.
[0034]
If the result of the comparison in step S12 is X> Y, the CPU 213 is instructed to request the start of data synchronization with the server (step S13). If the result of the comparison in step S12 is X ≦ Y, the process ends without doing anything.
[0035]
When the CPU 213 is instructed to request the start of data synchronization with the server in step S13, if data synchronization cannot be started due to a network disconnection or the like, a re-request is sent from the storage unit 215. A time interval to be read is read, and a request for starting data synchronization is made for each time interval (steps S14 and S15). That is, a time interval to be re-requested is read from the storage unit 215, and after waiting for a certain period of time during this time interval, a request for starting data synchronization is made again to start data synchronization.
[0036]
This repetition is continued until data synchronization with the server can be started. However, if, for example, there is a data synchronization start request from the user during that time, it is conceivable to request the CPU 215 to start data synchronization even during standby (step S15). It is also conceivable that the user cancels the repetition procedure of the data synchronization re-request.
[0037]
As described above, according to the present embodiment, a client can automatically start data synchronization with an appropriate data transmission amount to a server, thereby increasing communication time and causing an error during data synchronization. Since the possibility of occurrence can be suppressed, the communication cost can be reduced and the occupation of the client terminal by the data synchronization program can be avoided.
[0038]
Embodiment 3 FIG.
In the third embodiment, a server program different from the server program of the first embodiment will be described. The configuration of the data synchronization system is the same as that of FIG. 1 of the first embodiment, and the contents of the database 101 of the server 10 immediately after the end of the previous data synchronization between the server 10 and the client 21 are shown in FIG. The contents of the database 101 immediately after the contents of the database 101 are changed in the server 10 on the month 4 are shown in FIG. 3 and the update history database 102 immediately after the contents of the database 101 are changed in the server 10 on January 4, 2002. 4 is the same as FIG. 4, and the content obtained by extracting the update history necessary for the client 21 from the update history database 102 is the same as FIG. 6.
[0039]
Next, the processing operation of the server 10 by the server program will be described.
FIG. 7 is a flowchart showing the processing operation of the server 10 by the server program.
When the contents of the database 101 of the server 10 are changed, the CPU 103 calls the server program. Here, the server program is called immediately after the contents of the database 101 are changed on January 4, 2002. The server program performs the following procedure for all the clients known at that time (here, the clients 21 and 22).
[0040]
Here, the processing operation for the client 21 will be described.
First, an update history required for the target client 21 is extracted from the update history database 102 (step S21). Here, since data synchronization is once performed on the client 21 on January 3, 2002, the update history registered before that is not necessary. Therefore, the update history extracted in step S21 is as shown in FIG.
[0041]
Next, a parameter X 'is calculated for the target client from the update history extracted in step S21 (step S22). Here, the parameter X ′ is the size of the message that needs to be transmitted to the client. The message here is a data stream that is determined by a protocol used in data synchronization and needs to be transmitted to the other party.
[0042]
As an example, as shown in FIG. 8, when the data ID (2 bytes), the editing content (1 byte), and the editing content are “add” and “change” for each update history, the data content (here, If the database element "name" is 10 bytes and the "telephone number" is 11 bytes), and these are linked to all update histories as a message, it is transmitted to the client 21. The size of the message is 51 bytes.
[0043]
Next, the parameter (message size) X ′ calculated in step S22 is compared with the parameter (message size) threshold Y ′ for the target client (step S23). The threshold value Y ′ is a threshold value indicating the size of a message that needs to be transmitted to the client before requesting the start of data synchronization, and is registered in the storage unit 105 at an arbitrary timing and in an arbitrary method. Have been. Here, for the arbitrary timing, for example, when the client 21 is registered in the server 10, and for the arbitrary method, for example, half or all of the maximum size of the buffer for storing the message received by the target client from the server is set. The value of the threshold Y ′ is registered in the recording unit 105 by a method of setting the value of the threshold Y ′.
Further, the value of the threshold Y ′ can be determined independently for each target client. Here, it is assumed that the value of the threshold value Y 'for the client 21 is 100 bytes.
[0044]
If the result of the comparison in step S23 is X '>Y', the CPU 103 is instructed to request the start of data synchronization with the target client (step S24). If the result of the comparison in step S23 is X'≤Y ', the process ends without doing anything. As shown in FIG. 6, since X ′ ≦ Y ′ for the client 21 here, data synchronization with the client 21 is not started.
[0045]
On the other hand, if X '>Y' to the client, it instructs the CPU 103 to request the start of data synchronization with the client (step S24). When the CPU 103 requests the client 22 to start data synchronization, if data synchronization cannot be started because the network is disconnected or the like, the time interval for re-requesting is read from the storage unit 105, and the time interval is read. A request for starting data synchronization is made every time (steps S25 and S26). That is, a time interval to be re-requested is read from the storage unit 105, and after waiting for a predetermined time during this time interval, a request for starting data synchronization is made again to start data synchronization.
[0046]
This repetition is continued until data synchronization with the client 22 can be started. However, if, for example, there is a data synchronization start request from the user during that time, it is conceivable to request the CPU 105 to start data synchronization even during standby (step S26). It is also conceivable that the user stops the procedure of repeating the data synchronization request.
[0047]
Apart from the above method, as a method of determining the threshold value Y ′ of the parameter (message size), in the case of a network where the communication speed changes dynamically, the threshold value Y ′ is dynamically updated and the storage unit 215 is updated. It is also conceivable to register to.
[0048]
As described above, according to the present embodiment, the server automatically performs data synchronization for each client terminal to be synchronized with a data transmission amount in consideration of the memory constraints of the client terminal and the communication speed of the network. This can increase the communication time and suppress the possibility of an error during data synchronization, thereby reducing communication costs and avoiding occupation of the client terminal by the data synchronization program.
[0049]
Embodiment 4 FIG.
In the fourth embodiment, a client program different from the client program of the second embodiment will be described. The configuration of the data synchronization system is the same as that of the first embodiment shown in FIG.
[0050]
Next, the processing operation of the client by the client program will be described.
FIG. 7 is a flowchart showing the processing operation of the client by the client program.
Here, the operation in the client 21 will be described.
When the contents of the database 211 of the client 21 are changed, the CPU 213 calls the client program. The client program performs the following procedure. First, a necessary update history is extracted from the update history database 212 (S21).
[0051]
Next, a parameter X 'is calculated from the update history extracted in step S21 (step S22). Here, the parameter X ′ is the size of the message that needs to be transmitted to the server. Then, the parameter X ′ calculated in step S22 is compared with the parameter threshold Y ′ (step S23). Here, the value of the threshold value Y ′ is a threshold value that indicates the size of a message that needs to be transmitted to the server before requesting the start of data synchronization. It is registered. Here, for the arbitrary timing, for example, immediately before the client 21 first performs data synchronization with the server 10, and for the arbitrary method, for example, the threshold Y ′ is determined with reference to the communication speed of the network connecting the server 10 and the client 21. The value of the threshold Y ′ is registered in the recording unit 215 by a method of determining the value. It should be noted that the method of determining the value of the threshold value Y ′ with reference to the communication speed was considered because it takes a long time to send a lot of data when the communication speed is low, and this often causes transmission errors to occur. Things.
[0052]
If the result of the comparison in step S23 is X '>Y', the CPU 213 is instructed to start data synchronization with the server (S24). If the result of the comparison in step S23 is X'≤Y ', the process ends without doing anything.
[0053]
If the CPU 213 is instructed to request the start of data synchronization with the server in step S24, and if data synchronization cannot be started due to a disconnection of the network or the like, a re-request is sent from the storage unit 215. A time interval to be read is read, and a request for starting data synchronization is made for each time interval (steps S25 and S26). That is, a time interval to be re-requested is read from the storage unit 215, and after waiting for a certain period of time during this time interval, a request for starting data synchronization is made again to start data synchronization.
[0054]
This repetition is continued until data synchronization with the server can be started. However, if there is a data synchronization start request from the user during that time, for example, it is conceivable to request the CPU 215 to start data synchronization even during standby (step S26). It is also conceivable that the user cancels the repetition procedure of the data synchronization re-request.
[0055]
Apart from the above method, as a method of determining the threshold value Y ′ of the parameter (message size), in the case of a network where the communication speed changes dynamically, the threshold value Y ′ is dynamically updated and the storage unit 215 is updated. It is conceivable to register to
[0056]
As described above, according to the present embodiment, the client can automatically start data synchronization with the server at a data transfer amount in consideration of the communication speed of the network, thereby increasing the communication time. Since the possibility of occurrence of an error during data synchronization can be suppressed, it is possible to reduce communication cost and avoid occupation of the client terminal by the data synchronization program.
[0057]
In the third embodiment, the parameter X ′ is set to the size of the message that needs to be transmitted to the client, and in the fourth embodiment, the parameter X ′ is set to the size of the message that needs to be transmitted to the server. The setting of the parameter X ′ may be performed by the following method. That is, a difference between the date and time of the extracted update history recorded in the update history database (that is, the date and time when the database change occurred) and the current date and time is set as the parameter X ′. When the parameter X ′ is set in this way, for example, the oldest history is one week ago, the difference between the current date and time is 7 days and XX hours △△ minute × seconds, and the threshold Y ′ is If it is 5 days, data synchronization is automatically started.
[0058]
Thereby, the same effect as in the above embodiment can be obtained. Here, the threshold value Y 'indicates a time interval at which the data synchronization does not have to be started.
Also in this case, if data synchronization cannot be started, a time interval to be re-requested is read from the storage unit 105, and data synchronization start is requested at each time interval. Alternatively, data synchronization can be started by reading the time interval to be re-requested from the storage unit 215 and requesting the start of data synchronization at each time interval.
[0059]
【The invention's effect】
Since the present invention is configured as described above, it has the following effects.
[0060]
According to the present invention, a server is connected to a client having a first database via a network, a second database, and update history storage means for storing update contents of the second database as an update history; Storage means for storing a first threshold value indicating how many update histories that need to be transmitted to the client should be stored in the update history storage means, and a first threshold value of how many update histories to start data synchronization. By extracting a certain update history from the update history storage unit, and when the number of extracted update histories is greater than the first threshold, data synchronization between the first database and the second database is started. It can reduce the communication cost and the data synchronization It is possible to avoid the occupation of the client terminal according to the gram.
[0061]
In addition, a client is connected to a server having a first database via a network, and a second database; an update history storage unit for storing update contents of the second database as an update history; Means for storing a first threshold value indicating how many update histories that need to be transmitted to the server are stored before starting data synchronization, and storing the update history that needs to be transmitted to the server. When the number of the extracted update histories is greater than the first threshold value, the data synchronization between the first database and the second database is started. Since the possibility of errors during data synchronization and data growth can be reduced, communication costs can be reduced and client It is possible to avoid the occupation of the terminal.
[Brief description of the drawings]
FIG. 1 is a configuration diagram of a data synchronization system according to a first embodiment.
FIG. 2 is a diagram showing contents of a database 101 according to the first embodiment.
FIG. 3 is a diagram showing contents of a database 101 according to the first embodiment.
FIG. 4 is a diagram showing contents of an update history database 102 according to the first embodiment.
FIG. 5 is a flowchart showing a processing operation of the server 10 according to the first embodiment.
FIG. 6 is a diagram showing contents obtained by extracting necessary update histories from an update history database 102 in the first embodiment.
FIG. 7 is a flowchart showing a processing operation of a server 10 according to the third embodiment.
FIG. 8 is a diagram showing data contents for each update history according to the third embodiment.
[Explanation of symbols]
10 server computer, 21, 22 client terminal, 3 network, 101 database, 102 update history database, 103 CPU, 104 program storage unit, 105 storage unit, 212, 222 update history database, 213, 223 CPU, 214, 224 program storage Section, 215, 225 storage section.

Claims (12)

第1のデータベースを有するクライアントと、
前記クライアントとネットワークを介して接続され、第2のデータベースと、前記第2のデータベースの更新内容を更新履歴として保存する更新履歴保存手段と、前記更新履歴保存手段に前記クライアントに送信する必要のある更新履歴が何件保存されたらデータ同期を開始するかの第1の閾値を記憶する記憶手段とを有し、前記クライアントに送信する必要のある更新履歴を前記更新履歴保存手段より抽出し、この抽出した更新履歴の件数が前記第1の閾値より大きい時に、前記第1のデータベースと前記第2のデータベースとのデータ同期を開始するサーバと、
を備えたことを特徴とするデータ同期システム。
A client having a first database;
A second database connected to the client via a network, an update history storage unit for storing update contents of the second database as an update history, and transmission to the client to the update history storage unit. Storage means for storing a first threshold value indicating how many update histories are stored before starting data synchronization, and extracting update histories that need to be transmitted to the client from the update history storage means; A server that starts data synchronization between the first database and the second database when the number of extracted update histories is greater than the first threshold value;
A data synchronization system comprising:
前記記憶手段は、前記クライアントに送信するメッセージサイズがいくつになったらデータ同期を開始するかの第2の閾値を記憶し、
前記サーバは、前記更新履歴保存手段より抽出した更新履歴から前記クライアントに送信するメッセージサイズを計算し、このメッセージサイズが前記第2の閾値より大きい時に、前記第1のデータベースと前記第2のデータベースとのデータ同期を開始することを特徴とする請求項1記載のデータ同期システム。
The storage means stores a second threshold value of the size of a message to be transmitted to the client when data synchronization is started,
The server calculates a message size to be transmitted to the client from the update history extracted by the update history storage unit, and when the message size is larger than the second threshold, the first database and the second database 2. The data synchronization system according to claim 1, wherein data synchronization with the data synchronization is started.
前記記憶手段は、データ同期を開始しなくてもよい第1の時間間隔を第3の閾値として記憶し、
前記サーバは、前記更新履歴保存手段より抽出した更新履歴の中から一番古い更新日時と現在の日時との差を求め、この差が前記第3の閾値より大きい時に、前記第1のデータベースと前記第2のデータベースとのデータ同期を開始することを特徴とする請求項1記載のデータ同期システム。
The storage unit stores a first time interval that does not need to start data synchronization as a third threshold value,
The server obtains a difference between the oldest update date and time and the current date and time from the update histories extracted by the update history storage unit, and when the difference is larger than the third threshold value, 2. The data synchronization system according to claim 1, wherein data synchronization with said second database is started.
前記記憶手段は、データ同期を再開始する第2の時間間隔を記憶し、
前記サーバは、前記データ同期の開始ができなかった時には、前記記憶手段に記憶された前記第2の時間間隔に従って一定時間待機後、データ同期を開始することを特徴とする請求項1乃至請求項3のいずれかに記載のデータ同期システム。
The storage means stores a second time interval for restarting data synchronization;
4. The server according to claim 1, wherein when the data synchronization cannot be started, the server waits for a predetermined time according to the second time interval stored in the storage unit, and then starts the data synchronization. 3. The data synchronization system according to any one of 3.
第1のデータベースを有するサーバと、
前記サーバとネットワークを介して接続され、第2のデータベースと、前記第2のデータベースの更新内容を更新履歴として保存する更新履歴保存手段と、前記更新履歴保存手段に前記サーバに送信する必要のある更新履歴が何件保存されたらデータ同期を開始するかの第1の閾値を記憶する記憶手段とを有し、前記サーバに送信する必要のある更新履歴を前記更新履歴保存手段より抽出し、この抽出した更新履歴の件数が前記第1の閾値より大きい時に、前記第1のデータベースと前記第2のデータベースとのデータ同期を開始するクライアントと、
を備えたことを特徴とするデータ同期システム。
A server having a first database;
A second database connected to the server via a network, an update history storage unit for storing the update content of the second database as an update history, and the update history storage unit need to be transmitted to the server. Storage means for storing a first threshold value of how many update histories are stored before starting data synchronization, and extracting update histories that need to be transmitted to the server from the update history storage means; A client that starts data synchronization between the first database and the second database when the number of extracted update histories is greater than the first threshold;
A data synchronization system comprising:
前記記憶手段は、前記サーバに送信するメッセージサイズがいくつになったらデータ同期を開始するかの第2の閾値を記憶し、
前記クライアントは、前記更新履歴保存手段より抽出した更新履歴から前記サーバに送信するメッセージサイズを計算し、このメッセージサイズが前記第2の閾値より大きい時に、前記第1のデータベースと前記第2のデータベースとのデータ同期を開始することを特徴とする請求項5記載のデータ同期システム。
The storage means stores a second threshold value of the size of a message to be transmitted to the server when data synchronization is started,
The client calculates a message size to be transmitted to the server from the update history extracted by the update history storage unit, and when the message size is larger than the second threshold, the first database and the second database 6. A data synchronization system according to claim 5, wherein data synchronization with the data synchronization is started.
前記記憶手段は、データ同期を開始しなくてもよい第1の時間間隔を第3の閾値として記憶し、
前記クライアントは、前記更新履歴保存手段より抽出した更新履歴の中から一番古い更新日時と現在の日時との差を求め、この差が前記第3の閾値より大きい時に、前記第1のデータベースと前記第2のデータベースとのデータ同期を開始することを特徴とする請求項5記載のデータ同期システム。
The storage unit stores a first time interval that does not need to start data synchronization as a third threshold value,
The client obtains a difference between the oldest update date and time and the current date and time from the update history extracted by the update history storage unit, and when the difference is larger than the third threshold value, The data synchronization system according to claim 5, wherein data synchronization with the second database is started.
前記記憶手段は、前記データ同期を再開始する時間間隔を記憶し、
前記クライアントは、前記データ同期の開始ができなかった時には、前記記憶手段に記憶された時間間隔に従って一定時間待機後、データ同期を開始することを特徴とする請求項5乃至請求項7のいずれかに記載のデータ同期システム。
The storage means stores a time interval for restarting the data synchronization,
8. The client according to claim 5, wherein, when the data synchronization cannot be started, the client waits for a predetermined time according to the time interval stored in the storage unit, and then starts the data synchronization. A data synchronization system according to item 1.
第1のデータベースの更新内容を更新履歴として保存する更新履歴保存ステップと、
前記更新履歴の中からネットワークを介して接続された第2のデータベースに送信する必要のある更新履歴を抽出する抽出ステップと、
前記第2のデータベースに送信する必要のある更新履歴が前記更新履歴保存ステップで何件保存されたらデータ同期を開始するかの第1の閾値を記憶する記憶ステップと、
前記抽出ステップにより抽出された更新履歴の件数が、前記第1の閾値より大きい時に、前記第1のデータベースと前記第2のデータベースとのデータ同期を開始するデータ同期開始ステップと、
を備えたことを特徴とするデータ同期方法。
An update history saving step of saving the update content of the first database as an update history;
An extracting step of extracting, from the update history, an update history that needs to be transmitted to a second database connected via a network;
A storage step of storing a first threshold value indicating how many update histories that need to be transmitted to the second database are stored in the update history storage step before starting data synchronization;
A data synchronization start step of starting data synchronization between the first database and the second database when the number of update histories extracted in the extraction step is larger than the first threshold value;
A data synchronization method comprising:
前記記憶ステップは、前記第2のデータベースに送信するメッセージサイズがいくつになったらデータ同期を開始するかの第2の閾値を記憶し、
前記データ同期開始ステップは、前記抽出ステップにより抽出された更新履歴から前記第2のデータベースに送信するメッセージサイズを計算し、このメッセージサイズが前記第2の閾値より大きい時に、前記第1のデータベースと前記第2のデータベースとのデータ同期を開始することを特徴とする請求項9記載のデータ同期方法。
The storing step stores a second threshold value of a message size to be transmitted to the second database when data synchronization is started;
The data synchronization start step calculates a message size to be transmitted to the second database from the update history extracted by the extraction step, and when the message size is larger than the second threshold value, 10. The data synchronization method according to claim 9, wherein data synchronization with the second database is started.
前記記憶ステップは、データ同期を開始しなくてもよい第1の時間間隔を第3の閾値として記憶し、
前記データ同期開始ステップは、前記抽出ステップにより抽出された更新履歴の中から一番古い更新日時と現在の日時との差を求め、この差が前記第3の閾値より大きい時に、前記第1のデータベースと前記第2のデータベースとのデータ同期を開始することを特徴とする請求項9記載のデータ同期方法。
The storing step stores a first time interval that does not need to start data synchronization as a third threshold value,
The data synchronization start step obtains a difference between the oldest update date and time and the current date and time from the update history extracted by the extraction step, and when the difference is larger than the third threshold, the first synchronization is performed. The data synchronization method according to claim 9, wherein data synchronization between a database and the second database is started.
前記記憶ステップは、データ同期を再開始する時間間隔を記憶し、
前記データ同期開始ステップは、前記データ同期の開始ができなかった時には、前記記憶ステップにより記憶された時間間隔に従って一定時間待機後、データ同期を開始することを特徴とする請求項9乃至請求項11のいずれかに記載のデータ同期方法。
The storing step stores a time interval for restarting data synchronization,
12. The data synchronization start step, wherein when the data synchronization cannot be started, the data synchronization is started after waiting for a predetermined time according to the time interval stored in the storage step. The data synchronization method according to any one of the above.
JP2002250161A 2002-08-29 2002-08-29 Data synchronization system and data synchronization method Abandoned JP2004086800A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002250161A JP2004086800A (en) 2002-08-29 2002-08-29 Data synchronization system and data synchronization method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002250161A JP2004086800A (en) 2002-08-29 2002-08-29 Data synchronization system and data synchronization method

Publications (1)

Publication Number Publication Date
JP2004086800A true JP2004086800A (en) 2004-03-18

Family

ID=32057056

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002250161A Abandoned JP2004086800A (en) 2002-08-29 2002-08-29 Data synchronization system and data synchronization method

Country Status (1)

Country Link
JP (1) JP2004086800A (en)

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008505419A (en) * 2004-07-01 2008-02-21 アプル・コンピュータ・インコーポレーテッド State-based synchronization
WO2008026521A1 (en) * 2006-08-31 2008-03-06 Ntt Docomo Inc. Database synchronization system and database synchronization method
JP2008226088A (en) * 2007-03-15 2008-09-25 Hitachi Ltd Disaster recovery system and method
JP2009518757A (en) * 2005-12-08 2009-05-07 グッド テクノロジー インコーポレイテッド Method and system for maintaining up-to-date data of wireless devices
WO2009147701A1 (en) * 2008-01-08 2009-12-10 株式会社 アテナテレコムラボ Parallel access program of database
JP2011040106A (en) * 2008-06-04 2011-02-24 Athena Telecom Lab Inc Database parallel editing system
WO2011027654A1 (en) 2009-09-04 2011-03-10 株式会社シンクロア Data synchronization system and data synchronization method
US20110138079A1 (en) * 2009-12-04 2011-06-09 Sony Corporation Information processing apparatus, information processing method, data management server and data synchronization system
US8171003B2 (en) 2007-06-06 2012-05-01 Kunio Kamimura Method and apparatus for changing reference of database
US8868491B2 (en) 2006-08-04 2014-10-21 Apple Inc. Method and system for using global equivalency sets to identify data during peer-to-peer synchronization
EP3121721A1 (en) 2015-06-30 2017-01-25 Canon Kabushiki Kaisha Information processing apparatus, information processing system, control method for the information processing apparatus, and program
WO2017038057A1 (en) 2015-08-31 2017-03-09 Canon Kabushiki Kaisha Information processing apparatus, control method for information processing apparatus, and program
US9678996B2 (en) 2007-06-06 2017-06-13 Kunio Kamimura Conflict resolution system for database parallel editing
CN109634971A (en) * 2018-11-07 2019-04-16 平安科技(深圳)有限公司 Data-updating method, device, equipment and computer readable storage medium
JP2019101658A (en) * 2017-11-30 2019-06-24 Tdk株式会社 Communication system
US10439893B2 (en) 2015-09-08 2019-10-08 Canon Kabushiki Kaisha Information sharing system
US11758034B2 (en) 2020-12-17 2023-09-12 Fujifilm Business Innovation Corp. Information processing apparatus and non-transitory computer readable medium

Cited By (29)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8868493B2 (en) 2004-07-01 2014-10-21 Apple Inc. Method and system using reusable state information for synchronization and maintenance of data
JP2008505419A (en) * 2004-07-01 2008-02-21 アプル・コンピュータ・インコーポレーテッド State-based synchronization
US7730026B2 (en) 2004-07-01 2010-06-01 Apple Inc. Method and system using reusable state information for synchronization and maintenance of data
US8332352B2 (en) 2004-07-01 2012-12-11 Apple Inc. Method and system using reusable state information for synchronization and maintenance of data
JP2009518757A (en) * 2005-12-08 2009-05-07 グッド テクノロジー インコーポレイテッド Method and system for maintaining up-to-date data of wireless devices
US8868491B2 (en) 2006-08-04 2014-10-21 Apple Inc. Method and system for using global equivalency sets to identify data during peer-to-peer synchronization
WO2008026521A1 (en) * 2006-08-31 2008-03-06 Ntt Docomo Inc. Database synchronization system and database synchronization method
JP2008226088A (en) * 2007-03-15 2008-09-25 Hitachi Ltd Disaster recovery system and method
US9678996B2 (en) 2007-06-06 2017-06-13 Kunio Kamimura Conflict resolution system for database parallel editing
US8171003B2 (en) 2007-06-06 2012-05-01 Kunio Kamimura Method and apparatus for changing reference of database
WO2009147701A1 (en) * 2008-01-08 2009-12-10 株式会社 アテナテレコムラボ Parallel access program of database
JP2011040106A (en) * 2008-06-04 2011-02-24 Athena Telecom Lab Inc Database parallel editing system
US8775374B2 (en) 2009-09-04 2014-07-08 Kii Corporation Data synchronization system and data synchronization method
JP2011054092A (en) * 2009-09-04 2011-03-17 Synclore Corp Data synchronization system and data synchronization method
WO2011027654A1 (en) 2009-09-04 2011-03-10 株式会社シンクロア Data synchronization system and data synchronization method
US8706857B2 (en) 2009-12-04 2014-04-22 Sony Corporation Information processing apparatus, information processing method, data management server and data synchronization system
CN102104594A (en) * 2009-12-04 2011-06-22 索尼公司 Information processing apparatus, information processing method, data management server and data synchronization system
EP2369501A2 (en) 2009-12-04 2011-09-28 Sony Corporation Information processing apparatus, information processing method, data management server and data synchronization system
US20110138079A1 (en) * 2009-12-04 2011-06-09 Sony Corporation Information processing apparatus, information processing method, data management server and data synchronization system
US9983837B2 (en) 2015-06-30 2018-05-29 Canon Kabushiki Kaisha System and method of updating setting information in an information processing apparatus
EP3121721A1 (en) 2015-06-30 2017-01-25 Canon Kabushiki Kaisha Information processing apparatus, information processing system, control method for the information processing apparatus, and program
US10645236B2 (en) 2015-08-31 2020-05-05 Canon Kabushiki Kaisha Information processing apparatus and control method for synchronizing setting information
WO2017038057A1 (en) 2015-08-31 2017-03-09 Canon Kabushiki Kaisha Information processing apparatus, control method for information processing apparatus, and program
US10439893B2 (en) 2015-09-08 2019-10-08 Canon Kabushiki Kaisha Information sharing system
JP2019101658A (en) * 2017-11-30 2019-06-24 Tdk株式会社 Communication system
JP7043809B2 (en) 2017-11-30 2022-03-30 Tdk株式会社 Communications system
CN109634971A (en) * 2018-11-07 2019-04-16 平安科技(深圳)有限公司 Data-updating method, device, equipment and computer readable storage medium
CN109634971B (en) * 2018-11-07 2024-01-23 平安科技(深圳)有限公司 Data updating method, device, equipment and computer readable storage medium
US11758034B2 (en) 2020-12-17 2023-09-12 Fujifilm Business Innovation Corp. Information processing apparatus and non-transitory computer readable medium

Similar Documents

Publication Publication Date Title
JP2004086800A (en) Data synchronization system and data synchronization method
US9152654B2 (en) System and method for managing images over a network
US20050235019A1 (en) Method and system for transmitting data for data synchronization between server and client when data synchronization session was abnormally terminated
US8799516B2 (en) Method and apparatus for storing real-time text messages
US20040064517A1 (en) Synchronization message processing method
US20020143971A1 (en) Session resumption in wireless packet data network
JP2002517857A (en) Two-way process-to-process byte stream protocol
CN101800712B (en) Gateway apparatus, information communication method, information communication program, and information communication system
US20050187959A1 (en) Method for transferring a message file between a client and a server
WO2006046445A1 (en) File transferring system, transmitting device and receiving apparatus
US20050055448A1 (en) Internet service synchronization method for mobile communication terminal
US10812434B2 (en) Apparatus and method for maintaining message databases in eventual consistency distributed database systems
JP2002215516A (en) Information terminal, downloading control method, and computer program
US7234003B2 (en) Method and apparatus to facilitate direct transfer of data between a data device and a network connection
JP2003157190A (en) Synchronous message processing method
JP5080636B2 (en) Replica processing method, program and apparatus
JPH10312351A (en) Data communication system, method therefor and proxy server for the system
JP3968060B2 (en) Session media holding method, holding device, holding program, and recording medium recording the program
JPH08256367A (en) Personal information management method in personal communication system
CN113141319B (en) Message processing method, device, electronic equipment and storage medium
JP2002157161A (en) Data transfer method and data transfer system, recording medium and program
JP2002335299A (en) Communication system for multimedia information
US20040153522A1 (en) System for delivering message and processing the message on server based on instruction from the client after the message delivering completed
JP2003304346A (en) Incoming call method after dial-up line disconnection, server device, incoming call control program, and recording medium of the program
US8281353B1 (en) Service creation system and method for packet based cellular networks

Legal Events

Date Code Title Description
RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20040707

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050729

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080819

A762 Written abandonment of application

Free format text: JAPANESE INTERMEDIATE CODE: A762

Effective date: 20080918