JP2015156119A - Distributed database system, database device, and data synchronization method - Google Patents

Distributed database system, database device, and data synchronization method Download PDF

Info

Publication number
JP2015156119A
JP2015156119A JP2014030816A JP2014030816A JP2015156119A JP 2015156119 A JP2015156119 A JP 2015156119A JP 2014030816 A JP2014030816 A JP 2014030816A JP 2014030816 A JP2014030816 A JP 2014030816A JP 2015156119 A JP2015156119 A JP 2015156119A
Authority
JP
Japan
Prior art keywords
data
record
size
value
ratio
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2014030816A
Other languages
Japanese (ja)
Other versions
JP6114213B2 (en
Inventor
山田 剛史
Takashi Yamada
剛史 山田
俊輔 鶴見
Shunsuke Tsurumi
俊輔 鶴見
弘行 柿沼
Hiroyuki Kakinuma
弘行 柿沼
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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone 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 Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2014030816A priority Critical patent/JP6114213B2/en
Publication of JP2015156119A publication Critical patent/JP2015156119A/en
Application granted granted Critical
Publication of JP6114213B2 publication Critical patent/JP6114213B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

PROBLEM TO BE SOLVED: To efficiently synchronize data.
SOLUTION: Each of database devices 10a-10d includes: a storage unit 111 for storing a plurality data tables, each having a record differing in size; order analysis means 101 for analyzing the order of sizes of records that each data table has; center of gravity calculation means 102 for obtaining the amount of change in size in ascending order of size for each record, and calculating the center of gravity value of the obtained amounts of change; ratio calculation means 103 for obtaining a first difference value that is a difference between the order of the minimum value and the center of gravity value of record sizes and a second difference value that is a difference between the order of the maximum value and the center of gravity value of record sizes, calculating a ratio of the first difference value to the second difference value, and making the calculated ratio to be a ratio of a first record that each transfer data includes to a second record larger in size than the first record; and transfer means 105 for transferring each data formed with the calculated ratio to another database.
COPYRIGHT: (C)2015,JPO&INPIT

Description

本発明は、複数のデータベースを有する分散データベースシステム、データベース装置及びデータ同期方法に関する。   The present invention relates to a distributed database system having a plurality of databases, a database apparatus, and a data synchronization method.

複数のデータベース装置(DB装置)を有し、各DB装置でデータが多重管理される分散データベースシステムがある。このような分散データベースシステムでは、各装置がACT系(運用系)又はSBY系(待機系)として設定されている。通常は、外部の装置からのアクセスは、ACT系のDB装置に接続されるが、ACT系のDB装置が故障した場合等、ACT系とSBY系が切り替わる。その後、外部の装置からのアクセスは、新たなACT系のDB装置に接続される。   There is a distributed database system that has a plurality of database devices (DB devices) and each DB device manages data in a multiplexed manner. In such a distributed database system, each device is set as an ACT system (active system) or an SBY system (standby system). Normally, access from an external device is connected to an ACT DB device, but the ACT system and the SBY system are switched when the ACT DB device fails. Thereafter, access from an external device is connected to a new ACT DB device.

分散データシステムでは、ACT系とSBY系の切り替えを速やかに実行することで、通常の同期処理を再開することができる。例えば、特許文献1では、このような分散データベースシステムにおいて、複数のDB装置間でデータ処理の負荷を軽減し、速やかに切り替えを完了し、通常の処理を再開する技術について記載されている。   In the distributed data system, normal synchronization processing can be resumed by promptly switching between the ACT system and the SBY system. For example, Patent Document 1 describes a technique for reducing the load of data processing among a plurality of DB devices, completing switching quickly, and restarting normal processing in such a distributed database system.

また、分散データベースシステムでは、各DB装置間におけるデータの同期に必要なネットワークの負荷が高くなった場合、通常の処理に必要なネットワークのリソースが減少する。したがって、各DB装置間でデータを同期する際の各DB装置やネットワーク負荷を軽減することが好ましい。   In the distributed database system, when the network load necessary for data synchronization between the DB devices increases, the network resources necessary for normal processing decrease. Therefore, it is preferable to reduce each DB apparatus and network load at the time of synchronizing data between each DB apparatus.

特開2013−46346号公報JP 2013-46346 A

しかしながら、上述した特許文献1では、切り替えの際の負荷を軽減するものではあるが、通常のデータを同期する際のネットワーク負荷を軽減し、効率的にデータ同期を実行することについては考慮されていない。   However, in Patent Document 1 described above, although the load at the time of switching is reduced, consideration is given to reducing the network load when synchronizing normal data and performing data synchronization efficiently. Absent.

上記課題に鑑み、本発明では、分散データベースシステムにおいて、効率的にデータを同期することを目的とする。   In view of the above problems, an object of the present invention is to efficiently synchronize data in a distributed database system.

上記目的を達成するために、本発明に係る分散データベースシステムは、複数のデータベース装置が接続され、いずれかのデータベース装置で記憶されるデータを他のデータベース装置に送信し、複数のデータベース装置でデータを同期して記憶し、各データベース装置は、サイズが異なるレコードをそれぞれ有する複数のデータテーブルを記憶する記憶部と、記憶部に記憶される各データテーブルが有するレコードのサイズの順位を分析する順位分析手段と、順位分析手段が分析した順位の昇順でのサイズの変化量をそれぞれ求め、求めた変化量の重心の値を算出する重心算出手段と、レコードのサイズの最小値の順位と重心算出手段が算出した重心の値との差分である第1差分値と、レコードのサイズの最大値の順位と重心の値との差分である第2差分値とを求め、当該第1差分値と当該第2差分値との比率を算出し、求めた比率を各転送データが含む第1のレコードと、当該第1のレコードよりサイズが大きい第2のレコードの比率とする比率算出手段と、比率算出手段で算出された比率で形成された各データを他のデータベースに転送する転送手段とを備える。   In order to achieve the above object, a distributed database system according to the present invention is connected to a plurality of database devices, transmits data stored in one of the database devices to another database device, and receives data from the plurality of database devices. Each database device stores a plurality of data tables each having a record having a different size, and a ranking for analyzing the order of the sizes of the records included in each data table stored in the storage unit. The analysis means, the centroid calculation means for calculating the size change amount in ascending order of the ranks analyzed by the rank analysis means, and calculating the centroid value of the calculated change amount, and the rank and centroid calculation of the minimum value of the record size The difference between the first difference value, which is the difference from the centroid value calculated by the means, and the rank of the maximum value of the record size and the centroid value A certain second difference value is obtained, a ratio between the first difference value and the second difference value is calculated, the first record including the obtained ratio in each transfer data, and the size is larger than that of the first record. A ratio calculating unit that sets the ratio of the second large record and a transfer unit that transfers each data formed at the ratio calculated by the ratio calculating unit to another database.

本発明によれば、分散データベースシステムにおいて効率的にデータを同期することができる。   According to the present invention, data can be efficiently synchronized in a distributed database system.

図1は、実施形態に係る分散データベースシステムを説明する概略図である。FIG. 1 is a schematic diagram illustrating a distributed database system according to an embodiment. 図2は、実施形態に係るDB装置の構成を説明するブロック図である。FIG. 2 is a block diagram illustrating the configuration of the DB device according to the embodiment. 図3は、DB装置が転送するデータの一例を説明する図である。FIG. 3 is a diagram illustrating an example of data transferred by the DB device. 図4は、DB装置が転送するデータの他の例を説明する図である。FIG. 4 is a diagram illustrating another example of data transferred by the DB device. 図5は、DB装置が転送するデータのサイズについて説明する図である。FIG. 5 is a diagram for explaining the size of data transferred by the DB device. 図6は、実施形態に係るDB装置が転送するデータの一例を説明する図である。FIG. 6 is a diagram illustrating an example of data transferred by the DB device according to the embodiment. 図7は、DB装置が転送対象とするデータのレコードのサイズの関係を説明する図である。FIG. 7 is a diagram for explaining the relationship between the record sizes of data to be transferred by the DB device. 図8は、実施形態に係るデータ同期方法を説明する図である。FIG. 8 is a diagram for explaining a data synchronization method according to the embodiment. 図9は、図8に続いて実施形態に係るデータ同期方法を説明する図である。FIG. 9 is a diagram for explaining the data synchronization method according to the embodiment following FIG. 図10は、実施形態に係るデータ同期方法の効果を説明する図である。FIG. 10 is a diagram for explaining the effect of the data synchronization method according to the embodiment. 図11は、第1のシミュレーション結果である。FIG. 11 shows the first simulation result. 図12は、第2のシミュレーション結果である。FIG. 12 shows the second simulation result.

以下に、図面を用いて本発明の各実施形態に係る分散データベースシステム、データベース装置及びデータ同期方法について説明する。なお、以下の説明において、同一の構成については同一の符号を付して説明を省略する。   Hereinafter, a distributed database system, a database device, and a data synchronization method according to each embodiment of the present invention will be described with reference to the drawings. In the following description, the same components are denoted by the same reference numerals and description thereof is omitted.

図1に示すように、実施形態に係る分散データベースシステム1は、複数のデータベース装置(DB装置)10a〜10dを有し、各DB装置10a〜10dがデータを同期して記憶する。図1に示す分散データベースシステム1では、第1DB装置10a及び第2DB装置10bがACT系(運用系)であり、第3DB装置10c及び第4DB装置10dがSBY系(待機系)である。また、第1DB装置10a及び第3DB装置10cがマスタ(Master)として設定され、第2DB装置10b及び第4DB装置10dがスレーブ(Slave)として設定される。   As shown in FIG. 1, the distributed database system 1 according to the embodiment includes a plurality of database devices (DB devices) 10a to 10d, and the DB devices 10a to 10d store data in synchronization. In the distributed database system 1 shown in FIG. 1, the first DB device 10a and the second DB device 10b are ACT systems (active system), and the third DB device 10c and the fourth DB device 10d are SBY systems (standby system). Further, the first DB device 10a and the third DB device 10c are set as masters, and the second DB device 10b and the fourth DB device 10d are set as slaves (Slave).

具体的には、通常、ユーザ端末20からデータの更新が要求されると、マスタでACT系の第1DB装置10aでデータが更新される。その後、スレーブでACT系の第2DB装置10bと、マスタでSBY系の第3DB装置10cで、第1DB装置10aのデータと同期される。さらにその後、スレーブでSBY系の第4DB装置10dで、第2DB10bのデータと同期される。   Specifically, normally, when data update is requested from the user terminal 20, the data is updated by the master and the ACT first DB device 10a. Thereafter, the data is synchronized with the data in the first DB device 10a by the second ACT system DB device 10b as a slave and the SBY system third DB device 10c as a master device. After that, the slave is synchronized with the data of the second DB 10b by the SBY fourth DB device 10d.

仮に、第1DB装置10aがACT系からSBY系に変更され、第3DB装置10cがSBY系からACT系に変更されると、ユーザ端末20は第1DB装置10aではなく第3DB装置10cにアクセスされ、第3DB装置10cのデータが最初に更新される。また、その後、他のDB装置10a、10b、10dにデータが同期される。   If the first DB device 10a is changed from the ACT system to the SBY system and the third DB device 10c is changed from the SBY system to the ACT system, the user terminal 20 is accessed not by the first DB device 10a but by the third DB device 10c, Data of the third DB device 10c is updated first. Thereafter, the data is synchronized with the other DB devices 10a, 10b, and 10d.

図2に示すように、実施形態に係る第1DB装置10aは、データ転送の際に転送対象のデータに含まれるレコードを分析する順位分析手段101と、レコードの分析結果から送信対象のレコードのサイズの重心を算出する重心算出手段102と、送信対象が含む異なる2種類のサイズの比率を算出する比率算出手段103と、算出された比率で生成した転送データを格納する格納処理手段104と、転送データを転送先のDB装置10b、10cに送信する転送手段105とを有する。また、第1DB装置10aは、ユーザ端末20から入力されるデータをデータテーブル記憶部111に記憶し、データ転送の際に生成される転送データを転送バッファ112に記憶する。   As shown in FIG. 2, the first DB device 10a according to the embodiment includes a rank analysis unit 101 that analyzes records included in data to be transferred at the time of data transfer, and a size of a record to be transmitted from the analysis result of the records. Centroid calculation means 102 for calculating the centroid of the data, ratio calculation means 103 for calculating the ratio of two different sizes included in the transmission target, storage processing means 104 for storing the transfer data generated at the calculated ratio, and transfer And transfer means 105 for transmitting data to the transfer destination DB apparatuses 10b and 10c. Further, the first DB device 10a stores data input from the user terminal 20 in the data table storage unit 111, and stores transfer data generated at the time of data transfer in the transfer buffer 112.

図1に示すように、ACT系でMasterに設定される第1DB装置10aから転送された転送データを受信するDB装置10b、10cは、受信した転送データを自装置の記憶装置110に記憶することで、データが同期される。   As shown in FIG. 1, the DB devices 10b and 10c that receive the transfer data transferred from the first DB device 10a set to Master in the ACT system store the received transfer data in the storage device 110 of the own device. The data is synchronized.

なお、図1に示す分散データベースシステム1では、ユーザ端末20から入力されるデータは、ACT系でMasterに設定される第1DB装置10aに記憶され、他のDB装置10b〜10dは第1DB装置10aと同期される。しかしながら、各DB装置10b〜10dの設定が変更されると、ユーザ端末20から入力されるデータがDB装置10b〜10dに記憶されることも考えられる。したがって、他のDB装置10b〜10dも図2に示す第1DB装置10aと同一の構成である。   In the distributed database system 1 shown in FIG. 1, the data input from the user terminal 20 is stored in the first DB device 10a set as the master in the ACT system, and the other DB devices 10b to 10d are the first DB device 10a. Synchronized with. However, if the settings of the DB devices 10b to 10d are changed, data input from the user terminal 20 may be stored in the DB devices 10b to 10d. Therefore, the other DB devices 10b to 10d have the same configuration as the first DB device 10a shown in FIG.

図3(a)に示すように、分散データベースシステム1で記憶するデータであるテーブルA〜Dは、1レコードあたりのサイズ及びレコード数が異なる条件で形成される。例えば、テーブルAは、「8」のレコードを有し、各レコードのサイズが「5」のデータである。また、テーブルBは、「20」のレコードを有し、各レコードのサイズが「2」のデータである。さらに、テーブルCは、「9」のレコードを有し、各レコードのサイズが「7」のデータである。また、テーブルDは、「14」のレコードを有し、各レコードのサイズが「1」のデータである。   As shown in FIG. 3A, the tables A to D, which are data stored in the distributed database system 1, are formed under conditions where the size and the number of records per record are different. For example, the table A is data having “8” records and the size of each record being “5”. Further, the table B is data having “20” records and the size of each record being “2”. Further, the table C is data having “9” records and the size of each record being “7”. The table D is data having “14” records and the size of each record being “1”.

分散データベースシステム1において、例えば、図3(a)に示すように形成されるテーブルA〜Dを同期する際、各テーブルA〜Dのデータをシーケンシャルに転送バッファ112に格納して転送すると、効率的な送信とはいえない。具体的には、図3(b)に示すように、転送バッファ112の上限サイズや転送レコードの上限数等のリソースの制約に達したタイミングでデータを送信することになり、各転送データのサイズが送信毎に変動する。なお、図3(b)の場合、転送バッファ112の上限サイズは「42」以上であるが、転送レコードの上限数が「6」であるため、レコード数が「6」以上の転送データを送信することができない。   In the distributed database system 1, for example, when synchronizing the tables A to D formed as shown in FIG. 3A, it is efficient if the data of each table A to D is stored in the transfer buffer 112 and transferred sequentially. This is not an effective transmission. Specifically, as shown in FIG. 3B, data is transmitted at the timing when resource constraints such as the upper limit size of the transfer buffer 112 and the upper limit number of transfer records are reached, and the size of each transfer data Varies from transmission to transmission. In the case of FIG. 3B, the upper limit size of the transfer buffer 112 is “42” or more, but since the upper limit number of transfer records is “6”, transfer data with the record number “6” or more is transmitted. Can not do it.

したがって、各転送データのサイズが送信毎に変動することを防止するため、例えば、(1)転送レコード数を少なくする方法、(2)転送データのサイズの条件のみを設定し、転送レコード数を変動可能とする方法、が考えられる。例えば、図4で、上記(1)と(2)の方法とした場合に転送バッファ112に転送データを格納した例を説明する。   Therefore, in order to prevent the size of each transfer data from fluctuating for each transmission, for example, (1) a method for reducing the number of transfer records, (2) only the condition for the size of transfer data is set, and the number of transfer records is set. A method of making it variable is conceivable. For example, FIG. 4 illustrates an example in which transfer data is stored in the transfer buffer 112 when the methods (1) and (2) are used.

図4(a)は、図3(b)と同一であって、所定のリソースの制約で転送バッファ112に転送データを格納した例である。図4(b)は、各テーブルA〜Dのデータを、上記(1)の「転送レコード数を少なくする方法」により転送データを格納し、送信する例である。転送バッファ112に格納するレコード数が3に限定されたため、図4(a)の場合と比較して、各回で転送バッファ112に格納される転送データのデータサイズのばらつきは低減された。しかしながら、図4(b)に示すように転送レコード数を少なくした場合、テータ転送回数が増え、転送時間が長くなる問題がある。   FIG. 4A is the same as FIG. 3B, and shows an example in which transfer data is stored in the transfer buffer 112 with a predetermined resource constraint. FIG. 4B shows an example in which the transfer data is stored and transmitted as the data of each of the tables A to D by the “method of reducing the number of transfer records” of (1) above. Since the number of records stored in the transfer buffer 112 is limited to 3, the variation in the data size of the transfer data stored in the transfer buffer 112 each time is reduced as compared with the case of FIG. However, when the number of transfer records is reduced as shown in FIG. 4B, there is a problem that the number of data transfer increases and the transfer time becomes longer.

図4(b)は、各テーブルA〜Dのデータを、上記(2)の「転送データのサイズの条件のみを設定し、転送レコード数を変動可能とする方法」により転送データを格納し、転送する例である。このように、転送レコード数の条件を設定しないことで、転送バッファ112に格納されるレコードの数を増加させ、転送回数は低減させることができる。しかしながら、転送中は対象レコードの更新がロックされるため、転送レコード数が増加した場合、対象レコードを利用した処理の制約が発生し、その制約率が上昇する。   In FIG. 4B, the transfer data is stored in the data of each table A to D according to the above-mentioned (2) “method of setting only the transfer data size condition and changing the number of transfer records”. It is an example to transfer. Thus, by not setting the condition for the number of transfer records, the number of records stored in the transfer buffer 112 can be increased and the number of transfers can be reduced. However, since the update of the target record is locked during the transfer, if the number of transfer records increases, processing restrictions using the target record occur, and the constraint rate increases.

図5に、転送バッファの上限サイズを「3000」、転送レコードの上限数を「30」とした場合のシミュレーション結果の一例を示す。図5(a)では、横軸を転送対象のテーブルに付された番号とし、縦軸を各テーブルが有するレコードのレコード数とする。また、図5(b)では、横軸を転送データを格納した転送バッファ112の番号とし、縦軸を各転送バッファ112に格納した転送データのサイズとする。   FIG. 5 shows an example of a simulation result when the upper limit size of the transfer buffer is “3000” and the upper limit number of transfer records is “30”. In FIG. 5A, the horizontal axis is the number assigned to the table to be transferred, and the vertical axis is the number of records in each table. In FIG. 5B, the horizontal axis is the number of the transfer buffer 112 that stores the transfer data, and the vertical axis is the size of the transfer data stored in each transfer buffer 112.

このシミュレーションは、図5(a)に示すように、テーブル数が「100」のデータを同期する場合の一例である。ここで、各テーブルが有するレコードのレコード数は1〜100の値から乱数で決定し、また、各レコードのサイズは1〜100の値から乱数で決定した。   This simulation is an example in the case of synchronizing data with the number of tables “100” as shown in FIG. Here, the number of records of each table is determined by a random number from 1 to 100, and the size of each record is determined by a random number from 1 to 100.

この条件でシーケンシャルに、具体的には、テーブル番号順にテーブルを選択し、選択したテーブルのレコードを順に、転送バッファ112にデータを格納したとき、図5(b)に示すように、転送バッファ112に格納される転送データのサイズは、ランダムになる。例えば、バッファ番号「4」や「5」で転送バッファ112に格納される転送データは、転送バッファ112の上限サイズに達していないにもかかわらず、転送レコードの上限値に達したことにより、これ以上のデータが格納されない状態になる。図5(b)に示すシミュレーションでは、各バッファ番号の転送データのサイズは、標準偏差「683」で変動するという結果が得られた。   When data is stored in the transfer buffer 112 sequentially under the conditions, specifically, in the order of the table numbers, and the records of the selected table are sequentially stored in the transfer buffer 112, as shown in FIG. The size of the transfer data stored in is random. For example, the transfer data stored in the transfer buffer 112 with the buffer numbers “4” and “5” has reached the upper limit value of the transfer record even though the upper limit size of the transfer buffer 112 has not been reached. The above data is not stored. In the simulation shown in FIG. 5B, the result that the size of the transfer data of each buffer number fluctuates with the standard deviation “683” was obtained.

これに対し、実施形態に係る第1DB装置10aでは、図6に示すように、テーブル番号順に、転送バッファ112にデータを格納するのではなく、複数の異なるサイズのレコード含むデータを転送データとして転送バッファ112に格納する。これにより、各転送バッファ112のデータサイズのばらつきを低減することができる。   On the other hand, in the first DB device 10a according to the embodiment, as shown in FIG. 6, instead of storing data in the transfer buffer 112 in the order of table numbers, data including records having a plurality of different sizes is transferred as transfer data. Store in the buffer 112. Thereby, the variation in the data size of each transfer buffer 112 can be reduced.

図6(a)は、分散データベースシステム1に記憶されるテーブルA〜Dを表す。例えば、テーブルAは、「8」のレコードを有し、各レコードのサイズが「5」のデータである。また、図6(a)では、各レコードのサイズ及びレコード数に加え、各テーブルA〜Dのレコードのサイズを表す。図6(a)によれば、レコードのサイズは、テーブルC、A、B、Dの順に大きい。このように構成されるテーブルA〜Dから、転送バッファ112に、それぞれ図6(b)に示すように、複数の異なるサイズのレコードを含む転送データを格納する。   FIG. 6A shows tables A to D stored in the distributed database system 1. For example, the table A is data having “8” records and the size of each record being “5”. In FIG. 6A, in addition to the size of each record and the number of records, the size of a record in each table A to D is represented. According to FIG. 6A, the size of the record is larger in the order of the tables C, A, B, and D. From the tables A to D configured as described above, transfer data including a plurality of records of different sizes is stored in the transfer buffer 112 as shown in FIG.

ここで、実施形態に係る第1DB装置10aでデータ同期方法が実行される際、転送バッファ112に格納する転送データを形成するため、記憶装置110が記憶する各テーブルのレコードを分析し、どのテーブルのレコードをそれぞれ組み合わせるかを特定する。例えば、各テーブルのレコードのサイズが図7に示すように、分析され、レコードサイズが小さいテーブルが多く、レコードサイズが大きいテーブルが少ないとする。この場合、第1DB装置10aは、大きいサイズのレコードが少なく、小さいサイズのレコードが多い転送データを生成することで、各転送データのデータサイズのばらつきを減少させることができる。   Here, when the data synchronization method is executed in the first DB device 10a according to the embodiment, in order to form the transfer data to be stored in the transfer buffer 112, the record of each table stored in the storage device 110 is analyzed, and which table Specify whether to combine each record. For example, it is assumed that the record size of each table is analyzed as shown in FIG. 7, and there are many tables with a small record size and few tables with a large record size. In this case, the first DB device 10a can reduce variation in the data size of each transfer data by generating transfer data with a small number of large records and a large number of small records.

具体的には、順位分析手段101は、図8(a)に示すようなテーブル番号が1〜100のテーブルを他のDB装置10a〜10dに同期させる際、図8(b)に示すように、各テーブルに含まれるレコードについてレコードサイズの順位を設定する。図8(b)は、横軸を各レコードのサイズの順位とし、縦軸をレコードのサイズとする。ここで、図8(a)でテーブルの数が100であるのに対し、図8(b)でレコードのサイズの順位が100以上あるのは、各テーブルが複数のレコードを含むためである。なお、ここでは、各テーブルは、1種のサイズのレコードを複数有するものとして説明する。   Specifically, when the rank analysis unit 101 synchronizes the table having the table numbers 1 to 100 as shown in FIG. 8A with the other DB devices 10a to 10d, as shown in FIG. 8B. The order of record size is set for the records included in each table. In FIG. 8B, the horizontal axis represents the size order of each record, and the vertical axis represents the record size. Here, the number of tables in FIG. 8A is 100, whereas the order of the record size in FIG. 8B is 100 or more, because each table includes a plurality of records. Here, each table is described as having a plurality of records of one type.

続いて、重心算出手段102は、順位分析手段101が分析した各レコードサイズの順位を用いて、順位の昇順で、サイズが変化する場合の変化量を、図9(a)に示すように求め、そのサイズ変化量の重心を算出する。   Subsequently, the center-of-gravity calculation unit 102 uses the ranks of the record sizes analyzed by the rank analysis unit 101 to obtain the change amount when the size changes in the ascending order as shown in FIG. 9A. The center of gravity of the size change amount is calculated.

図9(a)は、横軸を各「レコードサイズの順位」とし、縦軸を順位の昇順での各「レコードサイズの変化量」である。なお、図9(a)で、横軸に合わせて付されている数字は、レコードサイズに変化があったレコードの順位を特定する「レコードサイズの順位」である。したがって、例えば、図9(a)に示す例では、最もサイズが小さいレコードのサイズと2番目にサイズが小さいレコードのサイズとは、順位「21.5」に変化したことが分かる。   In FIG. 9A, the horizontal axis represents each “record size rank”, and the vertical axis represents each “record size change amount” in ascending order. In FIG. 9A, the numbers attached to the horizontal axis are “record size ranks” that specify the ranks of records whose record sizes have changed. Therefore, for example, in the example shown in FIG. 9A, it can be seen that the size of the smallest record and the size of the second smallest record have changed to the rank “21.5”.

比率算出手段103は、レコードサイズの最小値の順位と重心算出手段102が算出した重心との差分である「第1差分値」と、レコードサイズの最大値の順位と重心との差分である「第2差分値」を求める。また、比率算出手段103は、第1差分値と第2差分値との比率を算出し、求めた比率を転送データが含む第1のレコードと第2のレコードとの比率とする。ここで、第1のレコードと第2のレコードとは、それぞれ異なるテーブルに含まれるレコードであって、第1レコードのサイズは、第2レコードのサイズより小さい。   The ratio calculation means 103 is a difference between the “first difference value” that is the difference between the rank of the minimum value of the record size and the centroid calculated by the centroid calculation means 102, and the difference between the rank of the maximum value of the record size and the centroid. A “second difference value” is obtained. Further, the ratio calculation unit 103 calculates the ratio between the first difference value and the second difference value, and sets the calculated ratio as the ratio between the first record and the second record included in the transfer data. Here, the first record and the second record are records included in different tables, respectively, and the size of the first record is smaller than the size of the second record.

図9(a)に示すように重心が算出されたとき、比率算出手段103は、図9(b)に示すように、第1差分値と及び第2差分値を求める。図9(b)に示す例では、第1のレコードと第2のレコードとの比率は、「2423:2568」になる。ここで、比率算出手段103で求める値は必ずしも各転送データの第1レコードと第2レコードとの比率を正確に特定することができるものではない。例えば、上記比率は、「1:1.0598…」となり、このような比率でデータを構成することができない。したがって、全ての送信データの第1レコードの合計と第2レコードの合計の比率が「2423:2568」であればよい。具体的には、全レコードの数は、「4991(2423+2568)」であるため、全ての送信データの第1レコードの合計数が「2423」であって、第2レコードの合計数が「2568」であればよい。   When the center of gravity is calculated as shown in FIG. 9A, the ratio calculation means 103 obtains the first difference value and the second difference value as shown in FIG. 9B. In the example shown in FIG. 9B, the ratio between the first record and the second record is “2423: 2568”. Here, the value calculated by the ratio calculation means 103 does not necessarily specify the ratio between the first record and the second record of each transfer data. For example, the ratio is “1: 1.0598...”, And data cannot be configured with such a ratio. Therefore, the ratio of the sum of the first records and the sum of the second records of all transmission data may be “2423: 2568”. Specifically, since the number of all records is “4991 (2423 + 2568)”, the total number of first records of all transmission data is “2423”, and the total number of second records is “2568”. If it is.

格納処理手段104は、比率算出手段103が求めた比率で各テーブルのレコードのデータをデータテーブル記憶部111から読み出し、転送データとして転送バッファ112に格納する。   The storage processing unit 104 reads the record data of each table from the data table storage unit 111 at the ratio obtained by the ratio calculation unit 103 and stores it in the transfer buffer 112 as transfer data.

転送手段105は、格納処理手段104が転送バッファ112に転送データを記憶させると、転送バッファ112が記憶する転送データを対象のデータベース装置10b、10cに送信する。ここで、転送手段105は、転送バッファ112に転送データが記憶されると、次の転送データが記憶されるまで待機する必要はなく、直ちに送信してよい。   When the storage processing unit 104 stores the transfer data in the transfer buffer 112, the transfer unit 105 transmits the transfer data stored in the transfer buffer 112 to the target database devices 10b and 10c. Here, when the transfer data is stored in the transfer buffer 112, the transfer unit 105 does not need to wait until the next transfer data is stored, and may transmit immediately.

図10を用いて、シーケンシャル、すなわち、データテーブル記憶部111に記憶されるデータテーブルの順にレコードを抽出して転送データを生成した場合(図10(a))と、実施形態に係るように第1のレコードと第2のレコードとを求められた割合で含む転送データを生成した場合(図10(b))との各転送データのデータサイズを比較する。ここで、図10(a)及び図10(b)は共に、図8(a)で示した100のテーブルのレコードから転送データを生成した場合の一例である。   Using FIG. 10, when transfer data is generated by extracting records sequentially (ie, in the order of the data table stored in the data table storage unit 111 (FIG. 10A)), as in the embodiment, The data size of each transfer data is compared with the case where the transfer data including the one record and the second record at the required ratio is generated (FIG. 10B). Here, both FIG. 10A and FIG. 10B are examples of cases where transfer data is generated from the records in the table of 100 shown in FIG. 8A.

図10(a)に示すように、シーケンシャルに転送データを生成した場合、各転送データのサイズにはばらつきがあることが分かる。これに対し、図10(b)に示すように、第1のレコードと第2のレコードを求められた割合で含む方法、すなわち、実施形態に係るデータ同期方法において転送データを生成する場合、各転送データのばらつきは小さいことが分かる。実際に、転送データサイズの標準偏差を求めた場合、図10(a)に示す例では、「683」であるのに対し、図10(b)に示す例では、「41」となっている。   As shown in FIG. 10A, it can be seen that when transfer data is generated sequentially, the sizes of the transfer data vary. On the other hand, as shown in FIG. 10B, when generating transfer data in the method including the first record and the second record at the required ratio, that is, in the data synchronization method according to the embodiment, It can be seen that the variation in the transfer data is small. Actually, when the standard deviation of the transfer data size is obtained, it is “683” in the example shown in FIG. 10A, whereas it is “41” in the example shown in FIG. .

同様の比較を、別の例でも実行した。第1の例は、図11(a)に示すような、レコードサイズとレコードサイズ順位のデータテーブルを対象とした一例である。シーケンシャルに転送データを生成した場合、図11(b)に示すように、各転送データの標準偏差は「286」とデータサイズにばらつきが生じる。これに対し、実施形態に係るデータ同期方法において転送データを生成した場合、図11(c)に示すように、各転送データの標準偏差は「45」とデータサイズのばらつきは小さくなる。   A similar comparison was performed in another example. The first example is an example for a data table of record size and record size order as shown in FIG. When the transfer data is generated sequentially, as shown in FIG. 11B, the standard deviation of each transfer data is “286” and the data size varies. On the other hand, when the transfer data is generated by the data synchronization method according to the embodiment, the standard deviation of each transfer data is “45” as shown in FIG.

第2の例は、図12(a)に示すような、レコードサイズとレコードサイズ順位のデータテーブルを対象とした一例である。シーケンシャルに転送データを生成した場合、図12(b)に示すように、各転送データの標準偏差は「215」とデータサイズにばらつきが生じる。これに対し、実施形態に係るデータ同期方法で転送データを生成した場合、図12(c)に示すように、各転送データの標準偏差は「25」とデータサイズのばらつきは小さくなる。   The second example is an example for a data table of record size and record size order as shown in FIG. When the transfer data is generated sequentially, the standard deviation of each transfer data is “215” as shown in FIG. On the other hand, when the transfer data is generated by the data synchronization method according to the embodiment, as shown in FIG. 12C, the standard deviation of each transfer data is “25”, and the variation in data size becomes small.

上述したように、実施形態に係る分散データベースシステム1では、異なるサイズのレコードを組み合わせて転送データを生成することで、効率的にデータを同期することができる。   As described above, in the distributed database system 1 according to the embodiment, data can be efficiently synchronized by generating transfer data by combining records of different sizes.

以上、実施形態を用いて本発明を詳細に説明したが、本発明は本明細書中に説明した実施形態に限定されるものではない。本発明の範囲は、特許請求の範囲の記載及び特許請求の範囲の記載と均等の範囲により決定されるものである。   As mentioned above, although this invention was demonstrated in detail using embodiment, this invention is not limited to embodiment described in this specification. The scope of the present invention is determined by the description of the claims and the scope equivalent to the description of the claims.

1 分散データベースシステム
10a〜10d データベース装置(DB装置)
101 順位分析手段
102 重心算出手段
103 比率算出手段
104 格納処理手段
105 転送手段
110 記憶装置
111 データテーブル記憶部
112 転送バッファ
20 ユーザ端末
1 Distributed Database System 10a to 10d Database device (DB device)
101 rank analysis means 102 centroid calculation means 103 ratio calculation means 104 storage processing means 105 transfer means 110 storage device 111 data table storage unit 112 transfer buffer 20 user terminal

Claims (3)

複数のデータベース装置が接続され、いずれかのデータベース装置で記憶されるデータを他のデータベース装置に送信し、送信されたデータを前記複数のデータベース装置で同期して記憶する分散データベースシステムであって、
前記各データベース装置は、
サイズが異なるレコードをそれぞれ有する複数のデータテーブルを記憶する記憶部と、
前記記憶部に記憶される各データテーブルが有するレコードのサイズの順位を分析する順位分析手段と、
前記順位分析手段が分析した順位の昇順でのサイズの変化量をそれぞれ求め、求めた変化量の重心の値を算出する重心算出手段と、
レコードのサイズの最小値の順位と前記重心算出手段が算出した重心の値との差分である第1差分値と、レコードのサイズの最大値の順位と前記重心の値との差分である第2差分値とを求め、当該第1差分値と当該第2差分値との比率を算出し、求めた比率を各転送データが含む第1のレコードと、当該第1のレコードよりサイズが大きい第2のレコードの比率とする比率算出手段と、
前記比率算出手段で算出された比率で形成された各データを他のデータベースに転送する転送手段と、
を備えることを特徴とする分散データベースシステム。
A distributed database system in which a plurality of database devices are connected, data stored in any one of the database devices is transmitted to another database device, and the transmitted data is stored synchronously in the plurality of database devices,
Each of the database devices is
A storage unit for storing a plurality of data tables each having records of different sizes;
Rank analysis means for analyzing the rank of the record size of each data table stored in the storage unit;
A center-of-gravity calculation unit that calculates the amount of change in size in ascending order of the ranks analyzed by the rank analysis unit, and calculates the value of the center of gravity of the calculated amount of change;
The first difference value, which is the difference between the rank of the record size minimum value and the centroid value calculated by the centroid calculation means, and the second difference between the rank of the record size maximum value and the centroid value. A difference value is obtained, a ratio between the first difference value and the second difference value is calculated, a first record that includes the obtained ratio in each transfer data, and a second that is larger in size than the first record. A ratio calculation means for the ratio of the records of
Transfer means for transferring each data formed at the ratio calculated by the ratio calculation means to another database;
A distributed database system comprising:
複数のデータベース装置が接続され、いずれかのデータベース装置で記憶されるデータを他のデータベース装置に送信し、送信されたデータを前記複数のデータベース装置で同期して記憶する分散データベースシステムにおける前記データベース装置であって、
サイズが異なるレコードを有する複数のデータテーブルを記憶する記憶部と、
前記記憶部に記憶される各データテーブルが有するレコードのサイズの順位を分析する順位分析手段と、
順位の昇順でのサイズの変化量をそれぞれ求め、求めた変化量の重心の値を算出する重心算出手段と、
レコードのサイズの最小値の順位と前記重心算出手段が算出した重心の値との差分である第1差分値と、レコードのサイズの最大値の順位と前記重心の値との差分である第2差分値とを求め、当該第1差分値と当該第2差分値との比率を算出し、求めた比率を各転送データが含む第1のレコードと、当該第1のレコードよりサイズが大きい第2のレコードの比率とする比率算出手段と、
前記比率算出手段で算出された比率で形成された各データを他のデータベースに転送する転送手段と、
を備えることを特徴とするデータベース装置。
The database apparatus in a distributed database system in which a plurality of database apparatuses are connected, data stored in one of the database apparatuses is transmitted to another database apparatus, and the transmitted data is stored in synchronization with the plurality of database apparatuses Because
A storage unit for storing a plurality of data tables having records of different sizes;
Rank analysis means for analyzing the rank of the record size of each data table stored in the storage unit;
A center of gravity calculating means for calculating the amount of change in size in ascending order of the ranking, and calculating the value of the center of gravity of the determined amount of change,
The first difference value, which is the difference between the rank of the record size minimum value and the centroid value calculated by the centroid calculation means, and the second difference between the rank of the record size maximum value and the centroid value. A difference value is obtained, a ratio between the first difference value and the second difference value is calculated, a first record that includes the obtained ratio in each transfer data, and a second that is larger in size than the first record. A ratio calculation means for the ratio of the records of
Transfer means for transferring each data formed at the ratio calculated by the ratio calculation means to another database;
A database apparatus comprising:
複数のデータベース装置が接続される分散データベースシステムにおいて、いずれかのデータベース装置で記憶されるデータを他のデータベース装置に送信し、送信されたデータを前記複数のデータベース装置で同期するデータ同期方法であって、
テーブル記憶部に記憶され、サイズが異なるレコードを有する複数のデータテーブルが有するレコードのサイズの順位を分析するステップと、
順位の昇順でのサイズの変化量をそれぞれ求めるステップと、
求めた変化量の重心の値を算出するステップと、
レコードのサイズの最小値の順位と前記重心の値との差分である第1差分値と、レコードのサイズの最大値の順位と前記重心の値との差分である第2差分値とを求めるステップと、
前記第1差分値と前記第2差分値との比率を算出するステップと、
求めた比率を各転送データが含む第1のレコードと、当該第1のレコードよりサイズが大きい第2のレコードの比率と特定するステップと、
特定された比率で形成された各データを他のデータベースに転送するステップと、
を有することを特徴とするデータ同期方法。
In a distributed database system to which a plurality of database devices are connected, a data synchronization method for transmitting data stored in one of the database devices to another database device and synchronizing the transmitted data with the plurality of database devices. And
Analyzing the order of the size of the records included in the plurality of data tables stored in the table storage unit and having records of different sizes;
Obtaining each size change in ascending order;
Calculating a value of the center of gravity of the obtained change amount;
Obtaining a first difference value that is a difference between the rank of the minimum value of the record size and the value of the centroid, and a second difference value that is a difference between the rank of the maximum value of the record size and the value of the centroid When,
Calculating a ratio between the first difference value and the second difference value;
Identifying the determined ratio as a ratio of a first record included in each transfer data and a second record having a size larger than the first record;
Transferring each data formed at a specified ratio to another database;
A data synchronization method comprising:
JP2014030816A 2014-02-20 2014-02-20 Distributed database system, database apparatus, and data synchronization method Active JP6114213B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014030816A JP6114213B2 (en) 2014-02-20 2014-02-20 Distributed database system, database apparatus, and data synchronization method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014030816A JP6114213B2 (en) 2014-02-20 2014-02-20 Distributed database system, database apparatus, and data synchronization method

Publications (2)

Publication Number Publication Date
JP2015156119A true JP2015156119A (en) 2015-08-27
JP6114213B2 JP6114213B2 (en) 2017-04-12

Family

ID=54775399

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014030816A Active JP6114213B2 (en) 2014-02-20 2014-02-20 Distributed database system, database apparatus, and data synchronization method

Country Status (1)

Country Link
JP (1) JP6114213B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019133508A (en) * 2018-02-01 2019-08-08 日本電気株式会社 Distributed type configuration management apparatus, distributed type configuration management method and distributed type configuration management program
JP2019155401A (en) * 2018-03-12 2019-09-19 株式会社アマダホールディングス Laser processor and laser processing method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5970502A (en) * 1996-04-23 1999-10-19 Nortel Networks Corporation Method and apparatus for synchronizing multiple copies of a database
JP2000222268A (en) * 1999-01-29 2000-08-11 Hitachi Ltd Method for synchronizing file for plural computers
JP2007048089A (en) * 2005-08-10 2007-02-22 Sharp Corp Data processor, data processing method, data processing program, recording medium recorded of data processing program, and data structure of structured document data file

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5970502A (en) * 1996-04-23 1999-10-19 Nortel Networks Corporation Method and apparatus for synchronizing multiple copies of a database
JP2000222268A (en) * 1999-01-29 2000-08-11 Hitachi Ltd Method for synchronizing file for plural computers
JP2007048089A (en) * 2005-08-10 2007-02-22 Sharp Corp Data processor, data processing method, data processing program, recording medium recorded of data processing program, and data structure of structured document data file

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
JPN6016042328; 緒方 祐介 Yusuke Ogata: 電子情報通信学会2011年総合大会講演論文集 通信2 PROCEEDINGS OF THE 2011 IEICE GENERAL CONFEREN , 20110228, p.22 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019133508A (en) * 2018-02-01 2019-08-08 日本電気株式会社 Distributed type configuration management apparatus, distributed type configuration management method and distributed type configuration management program
JP7095296B2 (en) 2018-02-01 2022-07-05 日本電気株式会社 Distributed configuration management device, distributed configuration management method, and distributed configuration management program
JP2019155401A (en) * 2018-03-12 2019-09-19 株式会社アマダホールディングス Laser processor and laser processing method

Also Published As

Publication number Publication date
JP6114213B2 (en) 2017-04-12

Similar Documents

Publication Publication Date Title
US7738504B1 (en) Method of establishing and updating master node in computer network
EP3575979B1 (en) Query priority and operation-aware communication buffer management
WO2015192661A1 (en) Method, device, and system for data synchronization in distributed storage system
US9110696B2 (en) Thin client system, connection management server, connection management method and connection management program
CN104348913B (en) A kind of extendible big data interactive method of close coupling
KR20170073605A (en) Composite partition functions
JP6114213B2 (en) Distributed database system, database apparatus, and data synchronization method
US20190147093A1 (en) Data collection method, information processing apparatus, and distributed processing system
US10691669B2 (en) Big-data processing method and apparatus
JP2013130960A (en) Information processing device, data control method, and data control program
US20150365474A1 (en) Computer-readable recording medium, task assignment method, and task assignment apparatus
JP2019121103A (en) Information processing apparatus, information sharing system, and synchronization control method
CN111064776A (en) Method and device for generating blocks in block chain and storage medium
CN107656980B (en) Method applied to distributed database system and distributed database system
JP2009157437A (en) Distributed storage system
EP3186716B1 (en) Updating files between computing devices via a wireless connection
CN112540966A (en) File synchronization method and device
JP6271003B2 (en) Data management system and data management method
US20160154868A1 (en) Data synchronizing system
JP6085265B2 (en) Distributed processing system
US9444867B2 (en) Systems and methods for data synchronization in a network application
JP6219771B2 (en) Load distribution apparatus, load distribution method, and load distribution system
TWI630549B (en) Serial number burning method and serial number burning system
CN106357429B (en) A kind of data processing method and system
CN113645261A (en) Session data processing method, device, storage medium and computer equipment

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20151218

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20161031

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20161108

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20161221

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20170314

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20170316

R150 Certificate of patent or registration of utility model

Ref document number: 6114213

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150