JP2013003637A - Database system and control method - Google Patents

Database system and control method Download PDF

Info

Publication number
JP2013003637A
JP2013003637A JP2011131028A JP2011131028A JP2013003637A JP 2013003637 A JP2013003637 A JP 2013003637A JP 2011131028 A JP2011131028 A JP 2011131028A JP 2011131028 A JP2011131028 A JP 2011131028A JP 2013003637 A JP2013003637 A JP 2013003637A
Authority
JP
Japan
Prior art keywords
information
cache
data
combination
specific
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
JP2011131028A
Other languages
Japanese (ja)
Other versions
JP5492146B2 (en
Inventor
Naoki Takada
直樹 高田
Takao Yamashita
高生 山下
Takuya Minami
拓也 南
Mitsuru Seo
充 瀬尾
Yasuyuki Tanaka
恭之 田中
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 JP2011131028A priority Critical patent/JP5492146B2/en
Publication of JP2013003637A publication Critical patent/JP2013003637A/en
Application granted granted Critical
Publication of JP5492146B2 publication Critical patent/JP5492146B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

PROBLEM TO BE SOLVED: To perform suitable retrieval.SOLUTION: A database stores each data correspondingly to a combination of specific information and non-specific type information. A cache server, when receiving a data request, determines whether data are stored in a cache or not, and when the data are not stored, transmits the data request to the database. The database responds a combination of specific information and non-specific type information and the data to the cache server. When the transmitted combination of the specific information and the non-specific type information is stored in the cache, the cache server stores the received combination in the cache correspondingly to the data corresponding to the stored combination of the specific information and the non-specific type information, and when the combination is not stored in the cache, stores the transmitted combination of the specific information and the non-specific type information and the received combination in the cache correspondingly to the transmitted data.

Description

本発明は、データベースシステム及び制御方法に関する。   The present invention relates to a database system and a control method.

レコードを複数蓄積したデータベースと、データベース応答を高速化するためのキャッシュを連携させる場合のキャッシュ検索技術がある。例えば、オープンハッシュ法によるデータ構造を用いる手法や、k−d木を用いる手法がある。なお、オープンハッシュ法は、外部ハッシュ法とも称される。   There is a cache search technique in the case where a database storing a plurality of records and a cache for accelerating the database response are linked. For example, there are a method using a data structure by an open hash method and a method using a k-d tree. The open hash method is also referred to as an external hash method.

キャッシュ検索技術は、例えば、認証要求やネットワークを制御するためのデータ要求の処理において用いられる。   The cache search technique is used, for example, in processing of an authentication request and a data request for controlling a network.

図27は、検索アルゴリズムを用いて目的となるレコードを抽出することになる場面の一例を示す図である。図27に示す例では、ネットワーク機器501が、ユーザ502からの要求に基づいて、ネットワーク機器503を特定したり、ユーザ502を認証したりする場合を例に示した。また、図27に示す例では、ネットワーク機器501が、ネットワーク機器503を特定したり、ユーザ502を認証したりする場合に、認証サーバ504や網制御サーバ505に問い合わせる場合を例に示した。図27に示す例では、認証サーバ504や網制御サーバ505がデータベースと接続され、レコードを抽出する場合を用いて説明する。   FIG. 27 is a diagram illustrating an example of a scene in which a target record is extracted using a search algorithm. In the example illustrated in FIG. 27, the network device 501 identifies the network device 503 or authenticates the user 502 based on a request from the user 502. In the example illustrated in FIG. 27, the network device 501 makes an inquiry to the authentication server 504 or the network control server 505 when the network device 503 is specified or the user 502 is authenticated. In the example shown in FIG. 27, the case where the authentication server 504 and the network control server 505 are connected to a database and a record is extracted will be described.

この場合、認証サーバ504や網制御サーバ505は、ネットワーク機器501によって送信される情報に基づいて、データベースからレコードを抽出することで、どのような認証を行うかを特定したり、どのような網制御を行うかを特定したりする。   In this case, the authentication server 504 and the network control server 505 identify what kind of authentication is performed by extracting records from the database based on information transmitted by the network device 501, and what kind of network Specify whether to perform control.

以下では、レコードの抽出に用いられる情報を「サービス特定情報」とも記載する。「サービス特定情報」により提供されるサービスを「制御サービス」とも記載し、「制御サービス」の提供に用いられる情報を「制御サービスデータ」とも記載する。「サービス特定情報」は、一つ又は複数の「サービス特定情報要素」から構成され、サービス特定情報を構成するサービス特定情報要素が、N個あり、それぞれを、サービス特定情報要素(E1、E2、・・・EN)と記載する。   Hereinafter, information used for record extraction is also referred to as “service identification information”. The service provided by the “service specifying information” is also referred to as “control service”, and the information used for providing the “control service” is also referred to as “control service data”. The “service specifying information” is composed of one or a plurality of “service specifying information elements”, and there are N service specifying information elements that constitute the service specifying information, each of which is designated as a service specifying information element (E1, E2,. ... EN).

図27に示す例に当てはめると、例えば、ネットワーク機器501は、サービス特定情報を認証サーバ504や網制御サーバ505に送信する。ここで、認証サーバ504や網制御サーバ505は、ネットワーク機器501から受信したサービス特定情報に基づいて、データベースからレコードを抽出する。   27, for example, the network device 501 transmits service specifying information to the authentication server 504 and the network control server 505. Here, the authentication server 504 and the network control server 505 extract a record from the database based on the service specifying information received from the network device 501.

なお、サービス特定情報要素を「特定情報」とも記載する。ここで、制御サービスには、全てのサービス特定情報要素により制御サービスデータが決定されるものもあれば、一部のサービス特定情報要素の集合により制御サービスデータが決定されるものもある。例えば、ネットワーク機器501によって送信されたサービス特定情報に含まれる複数の特定情報のうち、すべてが用いられる場合もあれば、一部が用いられる場合もある。   The service specific information element is also referred to as “specific information”. Here, in some control services, control service data is determined by all service specifying information elements, and in other cases, control service data is determined by a set of some service specifying information elements. For example, all of the plurality of pieces of specific information included in the service specific information transmitted by the network device 501 may be used, or some may be used.

図28を用いて、オープンハッシュ法について簡単に示す。図28は、オープンハッシュ法の基本的なデータ構造の一例を示す図である。図28に示すように、オープンハッシュ法では、検索対象となるカラムをキーとして、このキーがB個の有限個のクラスに分割される。また、B個に分割したクラス各々に対して、0、1、・・・B−1の整数の番号をつける。更に、キーになり得るxに対して、0からB−1までの整数h(x)を与えるようなハッシュ関数hを用意する。h(x)がxの属するクラスを表す。ここで、h(x)は、xのハッシュ値とも称される。xは、バケットh(x)に属するとも称される。図28に示すように、同一のハッシュ値を持つキーを含むレコードは、言い換えると、同一のバケットに属するキーを含むレコードは、リストとして管理される。   The open hash method will be briefly described with reference to FIG. FIG. 28 is a diagram illustrating an example of a basic data structure of the open hash method. As shown in FIG. 28, in the open hash method, a column to be searched is used as a key, and this key is divided into B finite classes. Also, an integer number of 0, 1,... B-1 is assigned to each of the B divided classes. Further, a hash function h is prepared that gives an integer h (x) from 0 to B−1 for x that can be a key. h (x) represents the class to which x belongs. Here, h (x) is also referred to as a hash value of x. x is also referred to as belonging to bucket h (x). As shown in FIG. 28, records including keys having the same hash value, in other words, records including keys belonging to the same bucket are managed as a list.

図28に示すデータ構造を用いて、オープンハッシュ法におけるレコードの追加操作、削除操作、検索操作の一例を順に説明する。オープンハッシュ法における追加操作の一例について説明する。この場合、(1)追加対象のレコードのキーxのハッシュ値h(x)を計算し、バケットを特定する。そして、(2)特定されたバケットのリストを順に調査し、リストの最後まで同一のキーのレコードがリストに存在しない場合に、リストの最後に追加対象のレコードを連結する。言い換えると、追加対象となるレコードを追加する。   An example of a record addition operation, a deletion operation, and a search operation in the open hash method will be described in order using the data structure shown in FIG. An example of an additional operation in the open hash method will be described. In this case, (1) the hash value h (x) of the key x of the record to be added is calculated, and the bucket is specified. (2) The specified list of buckets is examined in order, and if the record with the same key does not exist in the list until the end of the list, the record to be added is linked to the end of the list. In other words, a record to be added is added.

次に、オープンハッシュ法における検索操作の一例について説明する。この場合、(1)追加対象のレコードのキーxのハッシュ値h(x)を計算し、バケットを特定する。そして、(2)特定されたバケットのリストを順に調査し同一のキーであるかの判定を行う。その後、(3)同一のキーが存在すれば、検索対象のレコードと判定する。   Next, an example of a search operation in the open hash method will be described. In this case, (1) the hash value h (x) of the key x of the record to be added is calculated, and the bucket is specified. (2) The list of identified buckets is examined in order to determine whether the keys are the same. Thereafter, (3) if the same key exists, it is determined as a record to be searched.

続いて、オープンハッシュ法における削除操作の一例について説明する。この場合、(1)追加対象のレコードのキーxのハッシュ値h(x)を計算し、バケットを特定する。そして、(2)特定されたバケットのリストを順に調査し同一のキーであるかの判定を行う。その後、(3)同一のキーが存在すれば、リストから該当するキーのレコードを削除する。   Next, an example of a deletion operation in the open hash method will be described. In this case, (1) the hash value h (x) of the key x of the record to be added is calculated, and the bucket is specified. (2) The list of identified buckets is examined in order to determine whether the keys are the same. Thereafter, (3) if the same key exists, the record of the corresponding key is deleted from the list.

図29を用いて、k−d木法について簡単に示す。図29は、k−d木を用いた方法のデータ構造の一例を示す図である。k−d木法では、k個のカラムが検証対象となる。以下では、検証対象となるk個のカラムを、それぞれ、c0、c1、・・・ck−1と記載する。図29には、kを3とした場合を例に示した。図29の丸に示すデータ構造にあるノードには、レコードが登録される。各ノードには、木のルートとなるノードからの深さに応じたディスクリミネータと呼ばれる値が割り当てられる。ルートであるノードAのディスクリミネータは、「0」である。また、ノードB、Cのディスクリミネータは、「1」である。ノードD、E、Fのディスクリミネータは、「2」である。更に、ノードGのディスクリミネータは、「0」である。この例のように、ルートとなるノードのディスクリミネータを「0」とし、深さに応じて一つずつk−1まで増加させ、その後、「0」に戻ることを繰り返しながら、ディスクリミネータをノードに割り当てる。   The kd tree method will be briefly described with reference to FIG. FIG. 29 is a diagram illustrating an example of a data structure of a method using a kd tree. In the kd tree method, k columns are to be verified. Hereinafter, the k columns to be verified are described as c0, c1,... Ck−1, respectively. FIG. 29 shows an example in which k is 3. A record is registered in a node in the data structure indicated by a circle in FIG. Each node is assigned a value called a discriminator corresponding to the depth from the node that is the root of the tree. The discriminator of node A, which is the root, is “0”. Further, the discriminators of the nodes B and C are “1”. The discriminators of the nodes D, E, and F are “2”. Further, the discriminator of the node G is “0”. As shown in this example, the discriminator of the root node is set to “0”, incremented to k−1 one by one in accordance with the depth, and then returned to “0” while repeating the discriminator. Is assigned to a node.

ここで、ディスクリミネータは、割り当てられているノードで比較すべきカラムを示す。例えば、ディスクリミネータが1のノードでは、カラムc1が比較対象となる。   Here, the discriminator indicates a column to be compared with the assigned node. For example, in a node with a discriminator of 1, column c1 is a comparison target.

以下では、ノードPのカラムciの値を、Ki(P)と記載する。また、各ノードPには、2つの子ノードが存在し、LOSON(P)及びHISON(P)と記載する。また、ノードPのディスクリミネータが「i」であるとき、LOSON(P)以下の任意のノードについて、カラムciの値が、Ki(P)よりも小さくなるようにノードを配置する。また、HISON(P)以下の任意のノードについて、カラムciの値が、Ki(P)よりも大きくなるようにノードを配置する。   Hereinafter, the value of the column ci of the node P is described as Ki (P). Each node P has two child nodes and is described as LOSON (P) and HISON (P). Further, when the discriminator of the node P is “i”, the node is arranged so that the value of the column ci is smaller than Ki (P) for any node below LOSON (P). In addition, for any node below HISON (P), the node is arranged such that the value of the column ci is larger than Ki (P).

図29に示すデータ構造を用いて、k−d木法におけるレコードの追加操作、完全一致検索、部分一致検索、削除の一例を順に説明する。なお、完全一致検索とは、全てのカラムの条件が指定された場合における検索を示し、部分一致検索とは、一部のカラムの条件が指定された場合における検索を示す。   An example of record addition operation, complete match search, partial match search, and deletion in the k-d tree method will be described in order using the data structure shown in FIG. The complete match search indicates a search when conditions for all columns are specified, and the partial match search indicates a search when conditions for some columns are specified.

k−d木を用いた方法における追加操作の一例について説明する。この場合、(1)追加対象のレコードをk−d木に組み込んだときのノードをノードPと表すものとして説明する。ここで、(2)ルートノードが存在しなければ、追加対象のレコードをルートノードとし、LOSON(P)とHISON(P)には、「空」を割り当て、終了する。一方、ルートノードが存在する場合は、ルートノードをノードQとして以下を実施する。具体的には、(3)全てのカラムciについて、Ki(P)とKi(Q)を比較し、全て同じ場合には、既に存在するため追加を行わない。(4)一方、Ki(P)<Ki(Q)ならば、LOSON(Q)をSON(Q)とし、Ki(P)>Ki(Q)ならば、HISON(Q)をSON(Q)とする。また、(5)SON(Q)が「空」であれば、SON(Q)にノードPを連結し、LOSON(P)とHISON(P)には、「空」を割り当て、終了する。SON(Q)が「空」でない場合、SON(Q)をQとして、上記の(3)を実行する。Ki(P)=Ki(Q)ならば、全てのカラムを繋げた値で、Ki(P)とKi(Q)を比較する。   An example of an additional operation in the method using the k-d tree will be described. In this case, description will be made assuming that (1) a node when the record to be added is incorporated into the k-d tree is represented as a node P. Here, (2) if the root node does not exist, the record to be added is set as the root node, “empty” is assigned to LOSON (P) and HISON (P), and the process ends. On the other hand, when the root node exists, the following is performed with the root node as the node Q. Specifically, (3) Ki (P) and Ki (Q) are compared for all columns ci, and if all are the same, no addition is performed because they already exist. (4) On the other hand, if Ki (P) <Ki (Q), LOSON (Q) is set to SON (Q), and if Ki (P)> Ki (Q), HISON (Q) is set to SON (Q). To do. If (5) SON (Q) is “empty”, node P is connected to SON (Q), “empty” is assigned to LOSON (P) and HISON (P), and the process ends. When SON (Q) is not “empty”, the above (3) is executed with SON (Q) as Q. If Ki (P) = Ki (Q), Ki (P) and Ki (Q) are compared with a value obtained by connecting all the columns.

k−d木を用いた方法における完全一致検索操作の一例について説明する。(1)検索対象のレコードをk−d木に組み込んだと仮定したときのノードをノードPと表すものとして説明する。ここで、(2)ルートノードが存在しない場合には、検索対象なしとして終了し、ルートノードが存在する場合には、ルートノードをノードQとして以下の処理を実行する。具体的には、(3)全てのカラムciについて、Ki(P)とKi(Q)を比較し、全て同じ場合は、Qに割り当てられたレコードを検索結果とする。(4)もし、Ki(P)<Ki(Q)となる場合には、LOSON(Q)をSON(Q)とし、Ki(P)>Ki(Q)となる場合には、HISON(Q)をSON(Q)とする。(5)その上で、SON(Q)が「空」であれば、検索対象なしとして終了する。また、SON(Q)が「空」でない場合、SON(Q)をQとして、上記の(3)を実行する。また、Ki(P)=Ki(Q)ならば、全てのカラムを繋げた値で、Ki(P)とKi(Q)を比較する。   An example of the exact match search operation in the method using the k-d tree will be described. (1) A description will be given assuming that a node when a record to be searched is incorporated in a k-d tree is represented as a node P. Here, (2) if the root node does not exist, the process ends as no search target, and if the root node exists, the following processing is executed with the root node as the node Q. Specifically, (3) Ki (P) and Ki (Q) are compared for all the columns ci, and if all are the same, the record assigned to Q is taken as the search result. (4) If Ki (P) <Ki (Q), LOSON (Q) is set to SON (Q), and if Ki (P)> Ki (Q), HISON (Q) Is SON (Q). (5) If SON (Q) is “empty”, the process ends as no search target. When SON (Q) is not “empty”, SON (Q) is set as Q and the above (3) is executed. If Ki (P) = Ki (Q), Ki (P) and Ki (Q) are compared with a value obtained by connecting all the columns.

k−d木を用いた方法における部分一致検索操作の一例について説明する。この場合、(1)検索対象のレコードをk−d木に組み込んだと仮定したときのノードをノードPと表すものとして説明する。ここで、(2)ルートノードが存在しない場合には、検索対象なしとして終了する。ルートノードが存在する場合は、ルートノードをノードQとして以下を実施する。具体的には、(3)検索条件となっている全てのカラムciについて、検索条件とKi(Q)を比較し、全て条件に合致すれば、Qを検索対象とし、以下を実施する。すなわち、(4)QのディスクリミネータがJであり、カラムcJが検索条件として指定されているとき、カラムcJの検索条件とKi(Q)を比較する。比較の結果、Ki(Q)が大きければ、LOSON(Q)について、(3)の処理を再帰的に実行する。比較の結果、Ki(Q)が小さければ、HISON(Q)について、(3)の処理を再帰的に実行する。カラムcJが検索条件として指定されていないとき、LOSON(Q)とHISON(Q)の双方について、(3)の処理を再帰的に実行する。ここで、(5)もし、Ki(P)<Ki(Q)ならば、LOSON(Q)をSON(Q)とし、Ki(P)>Ki(Q)ならば、HISON(Q)をSON(Q)とする。(6)SON(Q)が「空」であれば、検索対象なしとして終了する。SON(Q)が「空」でない場合、SON(Q)をQとして、上記の(3)を実行する。Ki(P)=Ki(Q)ならば、全てのカラムを繋げた値で、Ki(P)とKi(Q)を比較する。   An example of the partial match search operation in the method using the k-d tree will be described. In this case, description will be made assuming that (1) a node when it is assumed that a record to be searched is incorporated in a k-d tree is represented as a node P. Here, (2) if there is no root node, the process ends as no search target. When the root node exists, the following is performed with the root node as the node Q. Specifically, (3) For all columns ci that are search conditions, the search conditions are compared with Ki (Q), and if all the conditions are met, Q is set as the search target, and the following is performed. That is, (4) when the discriminator of Q is J and the column cJ is designated as the search condition, the search condition of the column cJ is compared with Ki (Q). If Ki (Q) is large as a result of the comparison, the processing of (3) is recursively executed for LOSON (Q). If Ki (Q) is small as a result of the comparison, the process of (3) is recursively executed for HISON (Q). When the column cJ is not specified as a search condition, the process (3) is recursively executed for both LOSON (Q) and HISON (Q). (5) If Ki (P) <Ki (Q), LOSON (Q) is set to SON (Q). If Ki (P)> Ki (Q), HISON (Q) is set to SON ( Q). (6) If SON (Q) is “empty”, the search ends. When SON (Q) is not “empty”, the above (3) is executed with SON (Q) as Q. If Ki (P) = Ki (Q), Ki (P) and Ki (Q) are compared with a value obtained by connecting all the columns.

k−d木を用いた方法における削除操作の一例について説明する。この場合、(1)削除対象のレコードを持つノードをノードPと表すものとして説明する。ここで、(2)ノードPについて、LOSON(P)とHISON(P)が共に、「空」の場合、ノードPを指し示している親ノードRのLOSON(R)又はHISON(R)を「空」とし、ノードPをk−d木から取り除く。そして、(3)ノードPについて、LOSON(P)とHISON(P)のうち少なくとも、一方が「空」でないの場合、ノードPのディスクリミネータをJとすると、LOSON(P)をルートとする部分木の中で、カラムcJの最も大きいノードをQとするか、HISON(P)をルートとする部分木の中で、カラムcJの最も小さいノードをQとし、ノードPをノードQで置き換える。Qは、同様に、k−d木の元の位置から取り除く。   An example of the deletion operation in the method using the k-d tree will be described. In this case, description will be made assuming that (1) a node having a record to be deleted is represented as a node P. Here, (2) For the node P, when both LOSON (P) and HISON (P) are “empty”, the LOSON (R) or HISON (R) of the parent node R pointing to the node P is “empty”. And remove the node P from the k-d tree. (3) For node P, if at least one of LOSON (P) and HISON (P) is not “empty”, assuming that the discriminator of node P is J, LOSON (P) is the root. In the subtree, Q is the node with the largest column cJ or Q is the node with the smallest column cJ in the subtree rooted at HISON (P), and node P is replaced with node Q. Q is similarly removed from the original position of the k-d tree.

なお、レコードを抽出する上で必要となる特定情報の集合が受信時点において不明である場合がある。図27に示す例では、認証サーバ504や網制御サーバ505は、ネットワーク機器501からサービス特定情報を受信した時点において、サービス特定情報に含まれる特定情報のうち、レコードを抽出する上で必要となるサービス特定情報要素の集合が不明である場合がある。更に、ネットワーク機器501についても、認証サーバ504や網制御サーバ505に制御サービスを送信する時点において、送信するサービス特定情報に含まれる特定情報のうち、レコードを抽出する上で必要となるサービス特定情報要素の集合不明である場合もある。   In some cases, a set of specific information necessary for extracting a record is unknown at the time of reception. In the example shown in FIG. 27, the authentication server 504 and the network control server 505 are necessary for extracting a record from the specific information included in the service specific information when the service specific information is received from the network device 501. The set of service specific information elements may be unknown. Further, for the network device 501, the service specifying information necessary for extracting the record from the specified information included in the service specifying information to be transmitted at the time of transmitting the control service to the authentication server 504 or the network control server 505. In some cases, the set of elements is unknown.

「データ構造とアルゴリズム」、A.V.エイホ、J.E.ホップクロフト、J.D.ウルマン著、大野義夫訳、培風館、1987年発行“Data Structure and Algorithm”, A.I. V. Aiho, J.H. E. Hopcroft, J.H. D. Written by Ullman, translated by Yoshio Ohno, Baifukan, published in 1987 「Multidimensional Binary Search Trees Used for Associative Searching」、J.L.Bentley著、Communications of the ACM、Vol. 18、No. 9、 pp. 509−517、September 1975年“Multidimensional Binary Search Trees Used for Associate Searching”, J. Org. L. By Bentley, Communications of the ACM, Vol. 18, no. 9, pp. 509-517, September 1975

ここで、データベースからレコードを抽出する上で必要となる特定情報の集合が不明である場合に、上述した従来の検索アルゴリズムを応用し、以下に説明する処理を実行することが考えられるが、適切に検索できないという課題がある。   Here, when the set of specific information necessary for extracting records from the database is unknown, it is possible to apply the conventional search algorithm described above and execute the processing described below. There is a problem that cannot be searched.

なお、以下では、説明の便宜上、サービス特定情報要素に(E1、E2、E3)が含まれている場合を用いて説明する。また、E1に依存して、制御サービスデータの特定に必要なサービス特定情報要素の集合が、{E1}となるか、{E1, E2}となるか、{E1, E2, E3}となるかが決定される場合を用いて説明する。   In the following description, for convenience of explanation, a case where (E1, E2, E3) is included in the service identification information element will be described. Depending on E1, whether the set of service specification information elements necessary for specifying control service data is {E1}, {E1, E2}, or {E1, E2, E3} A description will be given using the case where is determined.

例えば、上述した従来の検索アルゴリズムを用いた検索を2回行う2回手法が考えられる。この場合、制御サービスデータの特定に用いられるサービス特定情報要素の集合を示すテーブルが予め作成される。図30は、制御サービスデータの特定に用いられるサービス特定情報要素の集合を示すテーブルの一例を示す図である。図30に示す例では、E1が「ServiceName−001」である場合には、サービス特定情報要素の集合として{E1}が用いられることになる場合を示した。同様に、図30に示す例では、E1が「ServiceName−002」である場合には、サービス特定情報要素の集合として{E1, E2, E3}が用いられることになる場合を示した。   For example, a two-time method of performing a search using the conventional search algorithm described above twice is conceivable. In this case, a table indicating a set of service specifying information elements used for specifying control service data is created in advance. FIG. 30 is a diagram illustrating an example of a table indicating a set of service specifying information elements used for specifying control service data. In the example illustrated in FIG. 30, when E1 is “ServiceName-001”, {E1} is used as a set of service specific information elements. Similarly, in the example illustrated in FIG. 30, when E1 is “ServiceName-002”, the case where {E1, E2, E3} is used as a set of service specific information elements is illustrated.

2回手法では、まず、予め作成したテーブルから、サービス特定情報要素の集合を検索する。その後、1回目の検索結果となるサービス特定情報要素の集合を一つのカラムとして2回目の検索を行うことで、制御サービスデータを特定する。図31−1〜図31−3は、2回目の検索にて用いられるサービス特定情報要素の組み合わせの一例を示す図である。図31−1〜図31−3は、それぞれ、サービス特定情報要素の集合が、{E1}{E1, E2}{E1, E2, E3}となる場合各々に対応する。なお、図31−1〜図31−3に示す例では、サービス特定情報要素の組み合わせに対応付けて、制御サービスデータの一例を併せて示した。   In the two-time method, first, a set of service specifying information elements is searched from a previously created table. Thereafter, the control service data is specified by performing a second search using a set of service specifying information elements as a first search result as one column. 31-1 to 31-3 are diagrams illustrating an example of combinations of service specifying information elements used in the second search. FIGS. 31-1 to 31-3 respectively correspond to cases where the set of service specifying information elements is {E1} {E1, E2} {E1, E2, E3}. In the example shown in FIGS. 31-1 to 31-3, an example of the control service data is shown in association with the combination of the service specifying information elements.

このように、2回手法を用いる場合には、検索アルゴリズムを2回実行することになり、検索性能が低下する。   As described above, when the twice method is used, the search algorithm is executed twice, and the search performance is deteriorated.

また、公知の検索アルゴリズムによる検索において、サービス特定情報要素の組み合わせ全てをキーとして、全てのキーについて検索を行う全手法が考えられる。図32は、全手法においてキーとして用いられるサービス特定情報要素の組み合わせを示すテーブルの一例を示す図である。図32に示すテーブルの場合、E1が「ServiceName−001」となる場合には、E2やE3に関係なく同じ制御サービスデータとなることを踏まえ、E1の値に対応付けられた制御サービスデータは、E2とE3との組み合わせ全てについて、同じ値が登録される。図32に示す例では、E1として「ServiceName−001」を含むレコードが6つ登録され、6つのレコードの制御サービスデータがどれも「データ1」となる。なお、図32に示す例では、サービス特定情報要素の組み合わせに対応付けて、制御サービスデータの一例を併せて示した。全手法の場合、{E1, E2, E3}を一つのカラムとして検索が行われることで、制御サービスデータを特定する。   Further, in a search using a known search algorithm, all methods for performing a search for all keys using all combinations of service specifying information elements as keys can be considered. FIG. 32 is a diagram illustrating an example of a table indicating combinations of service specifying information elements used as keys in all methods. In the case of the table shown in FIG. 32, when E1 is “ServiceName-001”, the control service data associated with the value of E1 is the same, regardless of E2 or E3. The same value is registered for all combinations of E2 and E3. In the example shown in FIG. 32, six records including “ServiceName-001” are registered as E1, and all the control service data of the six records are “data 1”. In the example shown in FIG. 32, an example of the control service data is also shown in association with the combination of service specifying information elements. In the case of all methods, the search is performed using {E1, E2, E3} as one column, thereby specifying the control service data.

このように、全手法を用いる場合には、同じ制御サービスデータを有するレコードを複数登録されることになり、サーバのメモリまたはハードディスクなどのサーバの記憶域が浪費される。また、キャッシュ技術を用いて、制御サービスデータを格納して高速に処理する設計にした場合、キャッシュサーバのメモリに同じ制御サービスデータを持つレコードが複数登録されることになり、キャッシュサーバのメモリが重複した制御サービスデータにより浪費される結果、キャッシュサーバにキャッシュ可能なレコード数が減少し、少数の制御サービスデータによる処理しか受け持つことができなくなる。   As described above, when all the methods are used, a plurality of records having the same control service data are registered, and a server storage area such as a server memory or a hard disk is wasted. In addition, when the cache service is used to store control service data and process it at high speed, multiple records having the same control service data are registered in the cache server memory. As a result of being wasted due to duplicate control service data, the number of records that can be cached in the cache server is reduced, and only processing by a small number of control service data can be handled.

また、全手法に対してk−d木を用いた手法を適用し、レコードを集約して完全一致と部分一致とを併用する集約手法も考えられる。図32を参照して説明すると、図32に示すテーブルにおいて、同じ制御サービスデータを持つレコードを一つに集約し、且つ、検索方法として、完全一致検索と部分一致検索とを併用することで、制御サービスデータを特定する手法が考えられる。   Further, an aggregation method in which a method using a k-d tree is applied to all methods, records are aggregated, and complete matching and partial matching are used together is also conceivable. Referring to FIG. 32, in the table shown in FIG. 32, records having the same control service data are aggregated into one, and as a search method, a complete match search and a partial match search are used together. A method for identifying control service data is conceivable.

図33は、図32に示すテーブルにおいて、同じ制御サービスデータを持つレコードを一つに集約したテーブルの一例を示す図である。図32に示す例では、制御サービスデータ「データ1」を含むレコードが6であるのに対して、図33に示す例では、1つのレコードに集約されている。   FIG. 33 is a diagram illustrating an example of a table in which records having the same control service data are combined into one in the table illustrated in FIG. 32. In the example illustrated in FIG. 32, the number of records including the control service data “data 1” is 6, whereas in the example illustrated in FIG. 33, the records are aggregated into one record.

集約手法では、全てのサービス特定情報要素の組み合わせについて、完全一致検索と部分一致検索とを行い、制御サービスデータの検索を行う。例えば、集約手法では、まず、{E1, E2, E3}を指定した完全一致検索を行い、レコードが検索できない場合は、{E1, E2}を指定して、部分一致検索を行い、更に、レコードが検索できない場合は、{E1}のみを指定した部分一致検索を行うことで、制御サービスデータを特定する。また、集約手法では、{E1}のみを指定してもレコードが検索できない場合には、該当レコードが存在しないと判断する。   In the aggregation method, for all combinations of service specifying information elements, a complete match search and a partial match search are performed to search for control service data. For example, in the aggregation method, first, an exact match search specifying {E1, E2, E3} is performed. If a record cannot be searched, a partial match search is performed by specifying {E1, E2}, Cannot be searched, the control service data is specified by performing a partial match search specifying only {E1}. In the aggregation method, if a record cannot be searched even if only {E1} is specified, it is determined that the corresponding record does not exist.

このように、集約手法を用いる場合には、複数回の制御サービスデータの検索を行うことがあり、検索性能が低下する場合がある。また、集約手法を用いる場合には、部分一致検索を用いた場合、k−d木の中で、2つある検索経路のうち、HISON及びLOSONの双方を検索しなければならないことになり、検索のための処理負荷が増大し、検索性能が低下する。   As described above, when the aggregation method is used, the control service data may be searched a plurality of times, and the search performance may be deteriorated. When the aggregation method is used, when partial match search is used, both HISON and LOSON must be searched for in the two search paths in the k-d tree. The processing load for increasing the search performance decreases.

開示の技術は、上述に鑑みてなされたものであって、適切に検索可能となるデータベースシステム及び制御方法を提供することを目的とする。   The disclosed technique has been made in view of the above, and an object thereof is to provide a database system and a control method that can be appropriately searched.

開示するデータベースシステムは、一つの態様において、データベースと、キャッシュサーバとを有する。データベースは、記憶部と、キャッシュ応答部とを有する。キャッシュサーバは、キャッシュと、判定部と、特定情報送信部と、格納部と、データ送信部とを有する。記憶部は、データごとに、該データを特定するための特定情報と、前記特定情報の複数の種類のうち該データを特定する際に用いられない種類である非特定種類を示す非特定種類情報との組み合わせを記憶する。キャッシュは、前記データベースに記憶された前記データの少なくとも一部について、前記特定情報と前記非特定種類情報との組み合わせと、複数種類の前記特定情報の組み合わせとのうち少なくとも一つと対応付けて記憶する。判定部は、データ要求を受信すると、該データ要求に含まれる複数種類の前記特定情報各々の組み合わせが前記キャッシュに記憶されているかを判定する。特定情報送信部は、前記判定部により記憶されていないと判定された場合に、前記データ要求に含まれる組み合わせを前記データベースに送信する。キャッシュ応答部は、前記特定情報送信部により送信された組み合わせである組み合わせを受信すると、受信した組み合わせである受信組み合わせに相当する前記記憶部に記憶された前記特定情報と前記非特定種類情報との組み合わせと、該特定情報と該非特定種類情報との組み合わせに対応付けられた前記データとを前記記憶部から取得し、前記キャッシュサーバに応答する。格納部は、前記キャッシュ応答部により送信された前記特定情報と前記非特定種類情報との組み合わせが前記キャッシュに記憶されている場合には、記憶されていた前記特定情報と前記非特定種類情報との組み合わせに対応付けられるデータと対応付けて、前記受信組み合わせを前記キャッシュに格納し、前記キャッシュに記憶されていない場合には、前記キャッシュ応答部により送信されたデータと対応付けて、前記キャッシュ応答部により送信された前記特定情報と前記非特定種類情報との組み合わせと、前記受信組み合わせとを前記キャッシュに格納する。データ送信部は、前記判定部により記憶されていると判定された場合には、前記キャッシュから前記データを取得して前記データ要求の送信元に送信し、前記判定部により記憶されていないと判定された場合には、前記キャッシュ応答部により送信された前記データを前記データ要求の送信元に送信する。   In one aspect, the disclosed database system includes a database and a cache server. The database includes a storage unit and a cache response unit. The cache server includes a cache, a determination unit, a specific information transmission unit, a storage unit, and a data transmission unit. The storage unit includes, for each data, specific information for specifying the data and non-specific type information indicating a non-specific type that is a type that is not used when specifying the data among a plurality of types of the specific information And remember the combination. The cache stores at least a part of the data stored in the database in association with at least one of a combination of the specific information and the non-specific type information and a combination of a plurality of types of the specific information. . When the determination unit receives the data request, the determination unit determines whether a combination of each of the plurality of types of specific information included in the data request is stored in the cache. The specific information transmission unit transmits the combination included in the data request to the database when the determination unit determines that the data is not stored. When the cache response unit receives the combination that is the combination transmitted by the specific information transmission unit, the cache response unit includes the specific information stored in the storage unit corresponding to the received combination that is the received combination and the non-specific type information. A combination and the data associated with the combination of the specific information and the non-specific type information are acquired from the storage unit and responded to the cache server. When the combination of the specific information and the non-specific type information transmitted by the cache response unit is stored in the cache, the storage unit stores the specific information and the non-specific type information stored in the cache. The cache response is stored in the cache in association with the data associated with the combination of the cache response and, if not stored in the cache, the cache response is associated with the data transmitted by the cache response unit. The combination of the specific information and the non-specific type information transmitted by the unit and the reception combination are stored in the cache. When it is determined that the data transmission unit is stored by the determination unit, the data transmission unit acquires the data from the cache, transmits the data to the transmission source of the data request, and determines that the data transmission unit is not stored by the determination unit If so, the data transmitted by the cache response unit is transmitted to the transmission source of the data request.

開示するデータベースシステムの一つの態様によれば、適切に検索可能となるという効果を奏する。   According to one aspect of the disclosed database system, there is an effect that search can be appropriately performed.

図1は、実施例1におけるデータベースシステムの全体像の一例を示す図である。FIG. 1 is a diagram illustrating an example of an overall image of the database system according to the first embodiment. 図2は、実施例1におけるデータベースサーバの構成の一例を示すブロック図である。FIG. 2 is a block diagram illustrating an example of the configuration of the database server in the first embodiment. 図3は、実施例1におけるユーザ情報DBに記憶された情報の一例を示す図である。FIG. 3 is a diagram illustrating an example of information stored in the user information DB according to the first embodiment. 図4は、実施例1におけるIR情報DBに記憶された情報の一例を示す図である。FIG. 4 is a diagram illustrating an example of information stored in the IR information DB according to the first embodiment. 図5は、実施例1におけるキャッシュ応答部により用いられる応答データ判定表の一例を示す図である。FIG. 5 is a diagram illustrating an example of a response data determination table used by the cache response unit according to the first embodiment. 図6は、実施例1におけるキャッシュサーバの構成の一例を示す図である。FIG. 6 is a diagram illustrating an example of the configuration of the cache server according to the first embodiment. 図7−1は、実施例1におけるキャッシュに記憶された情報の一例を示す図である。FIG. 7A is a schematic diagram illustrating an example of information stored in the cache according to the first embodiment. 図7−2は、実施例1におけるキャッシュに記憶された情報の一例を示す図である。FIG. 7-2 is a diagram illustrating an example of information stored in the cache according to the first embodiment. 図7−3は、実施例1におけるキャッシュに記憶された情報の一例を示す図である。FIG. 7C is a diagram of an example of information stored in the cache according to the first embodiment. 図8−1は、実施例1におけるキャッシュ判定部によりレコードが追加された後のキャッシュに記憶された情報の一例を示す図である。FIG. 8A is a diagram illustrating an example of information stored in the cache after the record is added by the cache determination unit according to the first embodiment. 図8−2は、実施例1におけるキャッシュ判定部によりレコードが追加された後のキャッシュに記憶された情報の一例を示す図である。FIG. 8-2 is a diagram illustrating an example of information stored in the cache after the record is added by the cache determination unit according to the first embodiment. 図8−3は、実施例1におけるキャッシュ判定部によりレコードが追加された後のキャッシュに記憶された情報の一例を示す図である。FIG. 8C is a diagram illustrating an example of information stored in the cache after the record is added by the cache determination unit according to the first embodiment. 図9は、実施例1におけるデータベースサーバのキャッシュ応答処理による処理の流れの一例を示すフローチャートである。FIG. 9 is a flowchart illustrating an example of a process flow of the cache response process of the database server according to the first embodiment. 図10は、実施例1におけるIR情報応答部による処理の流れの一例を示すフローチャートである。FIG. 10 is a flowchart illustrating an example of a process flow by the IR information response unit according to the first embodiment. 図11は、実施例1におけるデータベースサーバのIR情報削除部による流れの一例を示すフローチャートである。FIG. 11 is a flowchart illustrating an example of a flow by the IR information deletion unit of the database server in the first embodiment. 図12は、実施例1におけるデータベースサーバのユーザ情報更新部による処理の流れの一例を示すフローチャートである。FIG. 12 is a flowchart illustrating an example of a process flow by the user information update unit of the database server in the first embodiment. 図13は、実施例1におけるキャッシュサーバのキャッシュ判定部による処理の流れの一例を示すフローチャートである。FIG. 13 is a flowchart illustrating an example of a flow of processing performed by the cache determination unit of the cache server according to the first embodiment. 図14は、実施例1におけるキャッシュ登録処理の流れの一例を示すフローチャートである。FIG. 14 is a flowchart illustrating an example of a flow of cache registration processing according to the first embodiment. 図15は、実施例1におけるキャッシュ削除処理の流れの一例を示すフローチャートである。FIG. 15 is a flowchart illustrating an example of the flow of cache deletion processing according to the first embodiment. 図16は、実施例1におけるキャッシュサーバのIR情報判定部による処理の流れの一例を示すフローチャートである。FIG. 16 is a flowchart illustrating an example of a processing flow by the IR information determination unit of the cache server according to the first embodiment. 図17は、実施例1におけるキャッシュサーバの応答部による処理の流れの一例を示すフローチャートである。FIG. 17 is a flowchart illustrating an example of a flow of processing by the response unit of the cache server according to the first embodiment. 図18−1は、実施例2におけるキャッシュに記憶された情報の一例を示す図である。FIG. 18A is a diagram illustrating an example of information stored in a cache according to the second embodiment. 図18−2は、実施例2におけるキャッシュに記憶された情報の一例を示す図である。FIG. 18-2 is a diagram illustrating an example of information stored in the cache according to the second embodiment. 図18−3は、実施例2におけるキャッシュに記憶された情報の一例を示す図である。FIG. 18C is a diagram illustrating an example of information stored in the cache according to the second embodiment. 図19は、実施例2における事前に決定されているサービス特定要素の値の一覧の例である。FIG. 19 is an example of a list of service specific element values determined in advance in the second embodiment. 図20−1は、実施例2におけるキャッシュ判定部によるレコード登録処理後のキャッシュに記憶された情報の一例を示す図である。FIG. 20A is a diagram illustrating an example of information stored in the cache after the record registration processing by the cache determination unit according to the second embodiment. 図20−2は、実施例2におけるキャッシュ判定部によるレコード登録処理後のキャッシュに記憶された情報の一例を示す図である。FIG. 20B is a diagram illustrating an example of information stored in the cache after the record registration process by the cache determination unit according to the second embodiment. 図20−3は、実施例2におけるキャッシュ判定部によるレコード登録処理後のキャッシュに記憶された情報の一例を示す図である。FIG. 20C is a diagram illustrating an example of information stored in the cache after the record registration process by the cache determination unit according to the second embodiment. 図21は、実施例2におけるキャッシュ登録処理の一例を示すフローチャートである。FIG. 21 is a flowchart illustrating an example of a cache registration process according to the second embodiment. 図22は、実施例3におけるユーザ情報DBに記憶された情報の一例を示す図である。FIG. 22 is a diagram illustrating an example of information stored in the user information DB according to the third embodiment. 図23は、実施例3におけるIR情報DBに記憶された情報の一例を示す図である。FIG. 23 is a diagram illustrating an example of information stored in the IR information DB according to the third embodiment. 図24は、実施例3におけるデータベースサーバのキャッシュ応答部による処理の流れの一例を示すフローチャートである。FIG. 24 is a flowchart illustrating an example of a process flow by the cache response unit of the database server according to the third embodiment. 図25は、実施例3におけるキャッシュ削除処理の流れの一例を示すフローチャートである。FIG. 25 is a flowchart illustrating an example of the flow of cache deletion processing according to the third embodiment. 図26は、データベースシステムによる処理をプログラムにて実行するための制御プログラムによる情報処理が、コンピュータを用いて具体的に実現されることを示す図である。FIG. 26 is a diagram showing that the information processing by the control program for executing the processing by the database system by the program is specifically realized by using a computer. 図27は、検索アルゴリズムを用いて目的となるレコードを抽出することになる場面の一例を示す図である。FIG. 27 is a diagram illustrating an example of a scene in which a target record is extracted using a search algorithm. 図28は、オープンハッシュ法の基本的なデータ構造の一例を示す図である。FIG. 28 is a diagram illustrating an example of a basic data structure of the open hash method. 図29は、k−d木を用いた方法のデータ構造の一例を示す図である。FIG. 29 is a diagram illustrating an example of a data structure of a method using a kd tree. 図30は、制御サービスデータの特定に用いられるサービス特定情報要素の集合を示すテーブルの一例を示す図である。FIG. 30 is a diagram illustrating an example of a table indicating a set of service specifying information elements used for specifying control service data. 図31−1は、2回目の検索にて用いられるサービス特定情報要素の組み合わせの一例を示す図である。FIG. 31A is a diagram illustrating an example of combinations of service specifying information elements used in the second search. 図31−2は、2回目の検索にて用いられるサービス特定情報要素の組み合わせの一例を示す図である。FIG. 31-2 is a diagram illustrating an example of combinations of service specifying information elements used in the second search. 図31−3は、2回目の検索にて用いられるサービス特定情報要素の組み合わせの一例を示す図である。FIG. 31C is a diagram illustrating an example of combinations of service specifying information elements used in the second search. 図32は、全手法においてキーとして用いられるサービス特定情報要素の組み合わせを示すテーブルの一例を示す図である。FIG. 32 is a diagram illustrating an example of a table indicating combinations of service specifying information elements used as keys in all methods. 図33は、図32に示すテーブルにおいて、同じ制御サービスデータを持つレコードを一つに集約したテーブルの一例を示す図である。FIG. 33 is a diagram illustrating an example of a table in which records having the same control service data are combined into one in the table illustrated in FIG. 32.

以下に、開示するデータベースシステム及び制御方法の実施例について、図面に基づいて詳細に説明する。なお、本実施例により開示する発明が限定されるものではない。各実施例は、処理内容を矛盾させない範囲で適宜組み合わせることが可能である。   Hereinafter, embodiments of the disclosed database system and control method will be described in detail with reference to the drawings. Note that the invention disclosed by this embodiment is not limited. Each embodiment can be appropriately combined within a range in which processing contents do not contradict each other.

[実施例1における全体構成]
図1を用いて、実施例1におけるデータベースシステムの像を簡単に説明する。図1は、実施例1におけるデータベースシステムの全体像の一例を示す図である。図1に示すように、データベースシステムは、クライアント100と、データベースサーバ200と、キャッシュサーバ300とを有する。クライアント100と、データベースサーバ200と、キャッシュサーバ300とは、ネットワークを介して接続される。なお、図1に示す例では、クライアント100が1つあり、データベースサーバ200が1つあり、キャッシュサーバ300が2つある場合を示したが、これに限定されるものではなく、各装置は任意の数あって良い。
[Overall Configuration in Example 1]
An image of the database system in the first embodiment will be briefly described with reference to FIG. FIG. 1 is a diagram illustrating an example of an overall image of the database system according to the first embodiment. As shown in FIG. 1, the database system includes a client 100, a database server 200, and a cache server 300. The client 100, the database server 200, and the cache server 300 are connected via a network. In the example shown in FIG. 1, the case where there is one client 100, one database server 200, and two cache servers 300 is shown, but the present invention is not limited to this, and each device is arbitrary. There may be a number.

クライアント100は、キャッシュサーバ300又はデータベースサーバ200に格納されているデータを要求するデータ要求をキャッシュサーバ300に送信する。また、クライアント100は、キャッシュサーバ300又はキャッシュサーバ300からのデータ応答を受信する。その後、例えば、クライアント100は、データ応答に含まれるデータを用いて、各種サービスを実行する。クライアント100は、例えば、利用者により用いられる情報処理端末が該当する。   The client 100 transmits a data request for requesting data stored in the cache server 300 or the database server 200 to the cache server 300. Further, the client 100 receives a data response from the cache server 300 or the cache server 300. Thereafter, for example, the client 100 executes various services using data included in the data response. The client 100 corresponds to an information processing terminal used by a user, for example.

データベースサーバ200は、大容量の記憶部を有する。データベースサーバ200は、クライアント100により参照されるデータを記憶部に記憶する。具体的には、データベースサーバ200は、データごとに、データを特定するための特定情報と、特定情報の複数の種類のうちデータを特定する際に用いられない種類である非特定種類を示す非特定種類情報との組み合わせを記憶部に記憶する。   The database server 200 has a large-capacity storage unit. The database server 200 stores data referred to by the client 100 in the storage unit. Specifically, for each data, the database server 200 specifies specific information for specifying data and a non-specific type that is a type that is not used when specifying data among a plurality of types of specific information. The combination with the specific type information is stored in the storage unit.

また、データベースサーバ200は、図1の(i)に示すように、データが更新されると、Invalidation Report技術を用い、データベース上で変更となった情報(IR情報)を生成する。なお、以下に説明するように、データベースサーバ200とキャッシュサーバ300とは、IR情報を用いて、データベースサーバ200に記憶された情報のうち更新された情報を共有する。ただし、これに限定されるものではなく、IR情報を用いるのではなく、任意の手法を用いてデータベースサーバ200とキャッシュサーバ300とが共有しても良い。   Further, as shown in (i) of FIG. 1, when the data is updated, the database server 200 generates information (IR information) changed on the database by using the Invalidation Report technology. As will be described below, the database server 200 and the cache server 300 share updated information among information stored in the database server 200 using IR information. However, the present invention is not limited to this, and the database server 200 and the cache server 300 may be shared by using any method instead of using IR information.

キャッシュサーバ300は、データベースサーバ200に記憶されたデータのうち、過去にキャッシュサーバ300が使用したデータをキャッシュ311に記憶する。具体的には、キャッシュサーバ300は、データベースサーバ200に記憶されたデータの少なくとも一部について、特定情報と非特定種類情報との組み合わせと、複数種類の特定情報の組み合わせとのうち少なくとも一つと対応付けてキャッシュ311に記憶する。キャッシュサーバ300は、過去に使用したデータをキャッシュ311に記憶して用いることで、高速なアクセスを実現する。   The cache server 300 stores data used by the cache server 300 in the past among the data stored in the database server 200 in the cache 311. Specifically, the cache server 300 corresponds to at least one of a combination of specific information and non-specific type information and a combination of multiple types of specific information for at least a part of the data stored in the database server 200. In addition, it is stored in the cache 311. The cache server 300 realizes high-speed access by storing and using data used in the past in the cache 311.

キャッシュサーバ300は、クライアント100からデータ要求を受信すると、データ要求により要求されたデータを自装置のキャッシュ311に記憶している場合には、図1の(4)に示すように、キャッシュ311に記憶されたデータをデータ応答として送信する。一方、キャッシュサーバ300は、データ要求により要求されたデータを自装置のキャッシュ311に記憶していない場合には、図1の(2)に示すように、データ検索要求をデータベースサーバ200に送信する。その後、キャッシュサーバ300は、図1の(3)に示すように、データ検索要求に対する応答となるデータ応答をデータベースサーバ200から受信することで、データ要求により要求されたデータをデータベースサーバ200から取得する。キャッシュサーバ300は、受信したデータを自装置のキャッシュ311に格納した上で、図1の(4)に示すように、クライアント100にデータ応答として送信する。   When the cache server 300 receives the data request from the client 100 and stores the data requested by the data request in the cache 311 of its own device, as shown in (4) of FIG. The stored data is transmitted as a data response. On the other hand, when the data requested by the data request is not stored in the cache 311 of the own device, the cache server 300 transmits a data search request to the database server 200 as shown in (2) of FIG. . Thereafter, as shown in (3) of FIG. 1, the cache server 300 receives the data response as a response to the data search request from the database server 200, thereby acquiring the data requested by the data request from the database server 200. To do. The cache server 300 stores the received data in the cache 311 of its own device, and transmits it as a data response to the client 100 as shown in (4) of FIG.

つまり、キャッシュサーバ300は、データ要求を受信すると、データ要求に含まれる複数種類の特定情報各々の組み合わせがキャッシュ311に記憶されているかを判定する。ここで、キャッシュサーバ300は、記憶されていないと判定した場合に、データ要求に含まれる組み合わせをデータベースサーバ200に送信する。その後、データベースサーバ200は、キャッシュサーバ300により送信された組み合わせである組み合わせを受信すると、受信した組み合わせである受信組み合わせに相当する特定情報と非特定種類情報との組み合わせと、特定情報と非特定種類情報との組み合わせに対応付けられたデータとを記憶部から取得し、キャッシュサーバ300に応答する。その後、キャッシュサーバ300は、データベースサーバ200により送信された特定情報と非特定種類情報との組み合わせがキャッシュ311に記憶されている場合には、記憶されていた特定情報と非特定種類情報との組み合わせに対応付けられるデータと対応付けて、受信組み合わせをキャッシュに格納する。また、キャッシュサーバ300は、キャッシュ311に記憶されていない場合には、データベースサーバ200により送信されたデータと対応付けて、データベースサーバ200により送信された特定情報と非特定種類情報との組み合わせと、受信組み合わせとをキャッシュ311に格納する。また、キャッシュサーバ300は、キャッシュ311に記憶されていると判定した場合には、キャッシュ311からデータを取得してデータ要求の送信元に送信し、キャッシュ311に記憶されていないと判定された場合には、データベースサーバ200により送信されたデータをデータ要求の送信元に送信する。   In other words, when receiving the data request, the cache server 300 determines whether a combination of each of a plurality of types of specific information included in the data request is stored in the cache 311. Here, if the cache server 300 determines that the data is not stored, the cache server 300 transmits the combination included in the data request to the database server 200. After that, when the database server 200 receives the combination that is the combination transmitted by the cache server 300, the combination of the specific information and the non-specific type information corresponding to the received combination that is the received combination, the specific information and the non-specific type Data associated with the combination with the information is acquired from the storage unit and responds to the cache server 300. Thereafter, when the combination of the specific information and the non-specific type information transmitted from the database server 200 is stored in the cache 311, the cache server 300 combines the stored specific information and the non-specific type information. The received combination is stored in the cache in association with the data associated with. In addition, if the cache server 300 is not stored in the cache 311, the cache server 300 is associated with the data transmitted by the database server 200 and a combination of specific information and non-specific type information transmitted by the database server 200; The received combination is stored in the cache 311. When the cache server 300 determines that the data is stored in the cache 311, the cache server 300 acquires the data from the cache 311, transmits the data to the transmission source of the data request, and determines that the data is not stored in the cache 311. In this case, the data transmitted by the database server 200 is transmitted to the transmission source of the data request.

また、キャッシュサーバ300は、図1の(a)に示すように、IR情報を要求するIR情報要求をデータベースサーバ200に送信し、図1の(b)に示すように、IR情報要求に対する応答であるIR情報応答を受信する。すなわち、キャッシュサーバ300は、自装置に対するIR情報の有無を確認する。ここで、自装置に対するIR情報がある場合とは、データベースサーバ200に記憶されたデータが更新され、キャッシュサーバ300のキャッシュ311に記憶されたデータが過去のデータとなっていることを示す。キャッシュサーバ300は、IR情報がデータベースサーバ200に存在する場合には、自装置のキャッシュ311に記憶された過去のデータをクライアント100に送信しないよう、キャッシュ311に記憶されているデータを削除する。   Further, the cache server 300 transmits an IR information request for requesting IR information to the database server 200 as shown in FIG. 1A, and a response to the IR information request as shown in FIG. An IR information response is received. That is, the cache server 300 confirms the presence / absence of IR information for its own device. Here, the case where there is IR information for the own device indicates that the data stored in the database server 200 is updated, and the data stored in the cache 311 of the cache server 300 is past data. When the IR information exists in the database server 200, the cache server 300 deletes the data stored in the cache 311 so that the past data stored in the cache 311 of the own device is not transmitted to the client 100.

また、キャッシュサーバ300は、IR情報が自装置のキャッシュ311に適用された場合には、図1の(c)に示すように、IR情報を削除する要求であるIR情報削除要求をデータベースサーバ200に送信する。その後、データベースサーバ200では、キャッシュサーバ300に適用されたIR情報が削除され、キャッシュサーバ300が、図1の(d)に示すように、IR情報削除要求に対する応答であるIR情報削除応答をデータベースサーバ200から受信する。   Further, when the IR information is applied to the cache 311 of the own device, the cache server 300 issues an IR information deletion request, which is a request for deleting the IR information, as shown in FIG. Send to. Thereafter, in the database server 200, the IR information applied to the cache server 300 is deleted, and the cache server 300 sends an IR information deletion response, which is a response to the IR information deletion request, to the database as shown in FIG. Receive from server 200.

[実施例1におけるデータベースサーバの構成]
図2は、実施例1におけるデータベースサーバの構成の一例を示すブロック図である。図2に示すように、データベースサーバ200は、通信制御I/F部201と、記憶部210と、制御部220とを有する。
[Configuration of Database Server in Embodiment 1]
FIG. 2 is a block diagram illustrating an example of the configuration of the database server in the first embodiment. As shown in FIG. 2, the database server 200 includes a communication control I / F unit 201, a storage unit 210, and a control unit 220.

通信制御I/F部201は、制御部220と接続される。通信制御I/F部201は、キャッシュサーバ300との間でやりとりする各種情報に関する通信を制御する。具体的には、通信制御I/F部201は、制御部220による制御に基づき、データ要求やIR情報要求、IR情報削除要求をキャッシュサーバ300に送信する。また、通信制御I/F部201は、制御部220による制御に基づき、キャッシュ311応答やIR情報応答、IR情報削除応答をキャッシュサーバ300に送信する。   The communication control I / F unit 201 is connected to the control unit 220. The communication control I / F unit 201 controls communication related to various information exchanged with the cache server 300. Specifically, the communication control I / F unit 201 transmits a data request, an IR information request, and an IR information deletion request to the cache server 300 based on control by the control unit 220. Further, the communication control I / F unit 201 transmits a cache 311 response, an IR information response, and an IR information deletion response to the cache server 300 based on the control by the control unit 220.

記憶部210は、制御部220と接続される。記憶部210は、制御部220による各種処理に用いるデータを記憶する。記憶部210は、例えば、RAM(Random Access Memory)やROM(Read Only Memory)、フラッシュメモリ(Flash Memory)などの半導体メモリ素子、又は、ハードディスクや光ディスクなどである。図2に示す例では、記憶部210は、ユーザ情報DB211と、IR情報DB212とを有する。   The storage unit 210 is connected to the control unit 220. The storage unit 210 stores data used for various processes performed by the control unit 220. The storage unit 210 is, for example, a semiconductor memory device such as a random access memory (RAM), a read only memory (ROM), or a flash memory, a hard disk, an optical disk, or the like. In the example illustrated in FIG. 2, the storage unit 210 includes a user information DB 211 and an IR information DB 212.

ユーザ情報DB211は、少なくとも1種類の特定情報により特定されるデータごとに、該データを特定するための特定情報と、複数ある特定情報の種類のうちデータを特定する際に用いられない種類である非特定種類を示す非特定種類情報との組み合わせを記憶する。例えば、ユーザ情報DB211は、データごとに、データを特定する際に用いられる特定情報種類に属する特定情報と、非特定種類情報との組み合わせを記憶する。   The user information DB 211 is a type that is not used when data is specified from among a plurality of types of specific information and a plurality of types of specific information for each data specified by at least one type of specific information. A combination with non-specific type information indicating a non-specific type is stored. For example, the user information DB 211 stores, for each data, a combination of specific information belonging to a specific information type used when specifying data and non-specific type information.

例えば、ユーザ情報DB211は、キー情報と属性値とを対応付けて記憶する。属性値とは、クライアント100により参照されるデータである。言い換えると、データ要求により要求される対象となるデータである。キー情報とは、属性値を一意に特定するための情報である。キー情報は、一つ又は複数の特定要素を含む。キー情報を「サービス特定情報」とも記載し、キー情報に含まれる要素各々を「サービス特定情報要素」や「特定情報」とも記載する。キー情報は、クライアント100により送信されるデータ要求に含まれる。なお、データ要求には、複数の種類の特定情報が含まれており、データ要求に含まれる特定情報の全てがキー情報として用いられない場合もある。言い換えると、データ要求には、データを特定する際に用いられない種類である非特定種類に属する特定情報が含まれる場合もある。   For example, the user information DB 211 stores key information and attribute values in association with each other. The attribute value is data referred to by the client 100. In other words, it is the data to be requested by the data request. The key information is information for uniquely identifying the attribute value. The key information includes one or more specific elements. The key information is also referred to as “service specific information”, and each element included in the key information is also referred to as “service specific information element” or “specific information”. The key information is included in the data request transmitted by the client 100. The data request includes a plurality of types of specific information, and all of the specific information included in the data request may not be used as key information. In other words, the data request may include specific information belonging to a non-specific type that is a type that is not used when specifying data.

なお、データ要求に含まれるキー情報に、N個の要素が含まれる場合を例に用いて、属性値とキー情報との関係について簡単に説明する。属性値には、N個の要素のうちN個の要素全てによって特定される属性値もあれば、N個の要素のうち一部の要素により特定される属性値もある。   The relationship between the attribute value and the key information will be briefly described using an example in which N elements are included in the key information included in the data request. Some attribute values are specified by all N elements out of N elements, and some attribute values are specified by some of the N elements.

図3は、実施例1におけるユーザ情報DBに記憶された情報の一例を示す図である。図3に示すように、ユーザ情報DB211は、キー情報と属性値とを対応付けて記憶する。なお、図3に示す例では、キー情報に3つの要素が含まれる場合を示したが、これに限定されるものではなく、要素の数は任意であって良い。図3に示す例では、キー情報に含まれる3つの要素をそれぞれ「K1」「K2」「K3」と示した。なお、図3における「ANY」は、任意の要素に合致することを示す。言い換えると、非特定種類であることを示す。「ANY」を「ANY要素」「非特定種類情報」とも記載する。同様に、図3に示す例では、キー情報ごとに一つの属性値が対応付けられた場合を示したが、これに限定されるものではなく、属性値の数は任意であって良い。   FIG. 3 is a diagram illustrating an example of information stored in the user information DB according to the first embodiment. As illustrated in FIG. 3, the user information DB 211 stores key information and attribute values in association with each other. In the example illustrated in FIG. 3, the case where the key information includes three elements is illustrated, but the present invention is not limited to this, and the number of elements may be arbitrary. In the example shown in FIG. 3, the three elements included in the key information are indicated as “K1”, “K2”, and “K3”, respectively. Note that “ANY” in FIG. 3 indicates matching with an arbitrary element. In other words, it indicates a non-specific type. “ANY” is also described as “ANY element” and “non-specific type information”. Similarly, in the example illustrated in FIG. 3, a case where one attribute value is associated with each key information is illustrated, but the present invention is not limited to this, and the number of attribute values may be arbitrary.

図3に示す例では、ユーザ情報DB211は、K1「ServiceName−001」とK2「ANY」とK3「ANY」とを含むキー情報と、属性値「データ1」とを対応付けて記憶する。すなわち、ユーザ情報DB211は、キー情報が「ServiceName−001、UserType−001、AccountType−001」や、「ServiceName−001、UserType−002、AccountType−002」である場合には、属性値「データ1」が特定されることを記憶する。言い換えると、「ServiceName−001、UserType−001、AccountType−001」や、「ServiceName−001、UserType−002、AccountType−002」がキー情報に含まれるデータ要求がクライアント100により送信された場合には、クライアント100に属性値「データ1」が送信されることを記憶する。   In the example illustrated in FIG. 3, the user information DB 211 stores key information including K1 “ServiceName-001”, K2 “ANY”, and K3 “ANY” in association with the attribute value “data 1”. That is, when the key information is “ServiceName-001, UserType-001, AccountType-001”, or “ServiceName-001, UserType-002, AccountType-002”, the user information DB 211 has an attribute value “data 1”. Remember that is identified. In other words, when a data request including “ServiceName-001, UserType-001, AccountType-001” or “ServiceName-001, UserType-002, AccountType-002” is transmitted by the client 100, The fact that the attribute value “data 1” is transmitted to the client 100 is stored.

また、図3に示す例では、ユーザ情報DB211は、K1「ServiceName−002」とK2「UserType−001」とK3「AccountType−001」とを含むキー情報と、属性値「データ100」とを対応付けて記憶する。言い換えると、ユーザ情報DB211は、「ANY」が含まれないキー情報に対応づけて属性値を記憶する。この場合、「ServiceName−002」と「UserType−001」と「AccountType−001」とをキー情報にデータ要求がクライアント100により送信された場合に、クライアント100に属性値「データ100」が送信されることを記憶する。   In the example illustrated in FIG. 3, the user information DB 211 associates key information including K1 “ServiceName-002”, K2 “UserType-001”, and K3 “AccountType-001” with the attribute value “data 100”. Add and remember. In other words, the user information DB 211 stores attribute values in association with key information not including “ANY”. In this case, when a data request is transmitted by the client 100 using “ServiceName-002”, “UserType-001”, and “AccountType-001” as key information, the attribute value “data 100” is transmitted to the client 100. Remember that.

IR情報DB212は、IR情報を記憶する。具体的には、IR情報DB212は、IR情報の適用先となるキャッシュサーバ300を識別するキャッシュサーバ名と、更新された属性値を特定するキー情報とを含むIR情報を記憶する。   The IR information DB 212 stores IR information. Specifically, the IR information DB 212 stores IR information including a cache server name that identifies the cache server 300 to which the IR information is applied, and key information that specifies the updated attribute value.

図4は、実施例1におけるIR情報DBに記憶された情報の一例を示す図である。図4に示すように、IR情報DB212は、キャッシュサーバ名「キャッシュサーバA」と、K1「ServiceName−001」とK2「ANY」とK3「ANY」とを含むキー情報とを含むIR情報を記憶する。すなわち、IR情報DB212は、K1「ServiceName−001」とK2「ANY」とK3「ANY」とにより特定される属性値が更新されたことを示し、キャッシュサーバAに適用されるIR情報を記憶する。   FIG. 4 is a diagram illustrating an example of information stored in the IR information DB according to the first embodiment. As shown in FIG. 4, the IR information DB 212 stores IR information including a cache server name “cache server A”, key information including K1 “ServiceName-001”, K2 “ANY”, and K3 “ANY”. To do. That is, the IR information DB 212 indicates that the attribute value specified by K1 “ServiceName-001”, K2 “ANY”, and K3 “ANY” has been updated, and stores IR information applied to the cache server A. .

IR情報DB212に記憶されるIR情報は、ユーザ情報DB211が更新される際に格納され、キャッシュサーバ300に適用された後に削除される。   The IR information stored in the IR information DB 212 is stored when the user information DB 211 is updated, and is deleted after being applied to the cache server 300.

制御部220は、通信制御I/F部201及び記憶部210と接続される。制御部220は、OS(Operating System)などの制御プログラム、各種の処理手順などを規定したプログラム及び所要データなどを格納するための内部メモリを有し、種々の処理を制御する。制御部220は、例えば、ASIC(Application Specific Integrated Circuit)、FPGA(Field Programmable Gate Array)、CPU(Central Processing Unit)、MPU(Micro Processing Unit)などである。図2に示す例では、制御部220は、キャッシュ応答部221と、IR情報応答部222と、IR情報削除部223と、ユーザ情報更新部224とを有する。   The control unit 220 is connected to the communication control I / F unit 201 and the storage unit 210. The control unit 220 has an internal memory for storing a control program such as an OS (Operating System), a program defining various processing procedures, and necessary data, and controls various processes. The control unit 220 is, for example, an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), a central processing unit (CPU), or a micro processing unit (MPU). In the example illustrated in FIG. 2, the control unit 220 includes a cache response unit 221, an IR information response unit 222, an IR information deletion unit 223, and a user information update unit 224.

キャッシュ応答部221は、キャッシュサーバ300からデータ検索要求を受信すると、データ検索要求に含まれるキー情報が、ユーザ情報DB211に記憶されているか否かを判定する。言い換えると、キャッシュ応答部221は、ユーザ情報DB211を検索することで、データ検索要求に含まれるキー情報と一致するレコードを検索結果として取得する。   When the cache response unit 221 receives the data search request from the cache server 300, the cache response unit 221 determines whether the key information included in the data search request is stored in the user information DB 211. In other words, the cache response unit 221 searches the user information DB 211 to acquire a record that matches the key information included in the data search request as a search result.

例えば、キー情報にサービス特定情報要素(E1、E2、E3)が含まれる場合には、キャッシュ応答部221は、ユーザ情報DB211を検索することで、サービス特定情報要素(E1、E2、E3)に相当するキー情報を含むレコードを検索結果とする。   For example, when the service specification information elements (E1, E2, E3) are included in the key information, the cache response unit 221 searches the user information DB 211 to search for the service specification information elements (E1, E2, E3). A record including corresponding key information is used as a search result.

なお、ユーザ情報DB211は、特定情報として「ANY」を記憶する場合がある。この結果、サービス特定情報要素(E1、E2、E3)に相当するキー情報を含むレコードが複数ある場合がある。このことを踏まえ、キャッシュ応答部221は、複数のレコードのうち優先するレコードを決定するための判定表である応答データ判定表を生成し、生成した応答データ判定表と合致するレコード全てをユーザ情報DB211から検索した上で、最も優先度の高いレコードを一つ検索結果として選択する。   Note that the user information DB 211 may store “ANY” as specific information. As a result, there may be a plurality of records including key information corresponding to the service specifying information elements (E1, E2, E3). Based on this, the cache response unit 221 generates a response data determination table that is a determination table for determining a priority record among a plurality of records, and sets all the records that match the generated response data determination table as user information. After searching from the DB 211, one record having the highest priority is selected as a search result.

図5は、実施例1におけるキャッシュ応答部により用いられる応答データ判定表の一例を示す図である。図5に示す例では、サービス特定情報要素として、「K1」「K2」「K3」とがキー情報に含まれる場合を例に示した。言い換えると、例えば、ユーザ情報DB211に記憶されているデータのうち、「K1」「K2」「K3」をキー情報として含むレコードだけでなく、「K1」「K2」「ANY」をキー情報として含むレコードや、「K1」「ANY」「K3」をキー情報として含むレコード、「K1」「ANY」「ANY」をキー情報として含むレコードなどについても検索結果となる場合を例に示した。図5に示す例では、応答データ判定表に記憶されたサービス特定情報要素の組み合わせのうち検索結果となり得る組み合わせと、優先度とが対応付けられた表となる。図5に示す例では、優先度の数字が大きければ大きい程、優先して検索結果とする場合を示した。すなわち、図5に示す例では、「K1」「K2」「K3」をキー情報として含むレコードが検索結果となる場合には、かかるレコードが検索結果とされることを示す。次に、「K1」「K2」「ANY」をキー情報として含むレコードが検索結果となる場合には、かかるレコードが検索結果とされることを示す。   FIG. 5 is a diagram illustrating an example of a response data determination table used by the cache response unit according to the first embodiment. In the example illustrated in FIG. 5, the case where “K1”, “K2”, and “K3” are included in the key information as service identification information elements is illustrated as an example. In other words, for example, of the data stored in the user information DB 211, not only records including “K1”, “K2”, and “K3” as key information but also “K1”, “K2”, and “ANY” are included as key information. As an example, a record, a record including “K1”, “ANY”, and “K3” as key information, a record including “K1”, “ANY”, and “ANY” as key information are used as search results. In the example illustrated in FIG. 5, a combination of service specific information elements stored in the response data determination table that can be a search result is associated with a priority. In the example illustrated in FIG. 5, the search result is given priority as the priority number increases. That is, in the example illustrated in FIG. 5, when a record including “K1”, “K2”, and “K3” as key information is a search result, this record is the search result. Next, when a record including “K1”, “K2”, and “ANY” as key information is a search result, this indicates that the record is a search result.

なお、図5に示す例では、キャッシュ応答部221が、応答データ判定表を用いて検索結果を一つ選択する場合を示したが、キャッシュ応答部221による処理はこれに限定されるものではなく、任意の手法を用いて良い。例えば、データ問い合わせ言語などで実現しても良い。   In the example illustrated in FIG. 5, the cache response unit 221 selects one search result using the response data determination table, but the processing by the cache response unit 221 is not limited to this. Any method may be used. For example, it may be realized by a data inquiry language.

ここで、図3に示すユーザ情報DB211と図5に示す応答データ判定表とを用いて、詳細な一例を説明する。また、キャッシュサーバ300からのデータ検索要求に含まれるキー情報が、「ServiceName−003、UserType−001、AccounType−003」である場合を用いて説明する。この場合、キャッシュ応答部221は、図5の応答データ判定表を用いてユーザ情報DB211を検索することで、優先度「4」の「ServiceName−003、UserType−001、AccounType−003、データ105」を含むレコードと、優先度「3」の「ServiceName−003、UserType−001、ANY、データ10」を含むレコードとが得られる。ここで、図5に示す応答データ判定表では、優先度「4」は優先度「3」と比較して高優先として扱われることとなり、キャッシュ応答部221は、検索結果として、「ServiceName−003、UserType−001、AccounType−003、データ105」を含むレコードを選択する。   Here, a detailed example will be described using the user information DB 211 shown in FIG. 3 and the response data determination table shown in FIG. Further, the case where the key information included in the data search request from the cache server 300 is “ServiceName-003, UserType-001, AccountType-003” will be described. In this case, the cache response unit 221 searches the user information DB 211 using the response data determination table of FIG. 5 to obtain “ServiceName-003, UserType-001, AccountType-003, data 105” with the priority “4”. And a record including “ServiceName-003, UserType-001, ANY, data 10” having a priority “3”. Here, in the response data determination table illustrated in FIG. 5, the priority “4” is treated as higher priority than the priority “3”, and the cache response unit 221 uses “ServiceName-003” as a search result. , UserType-001, AccountType-003, data 105 "is selected.

キャッシュ応答部221は、キャッシュサーバ300から受信したデータ検索要求に含まれるキー情報に相当するレコードをユーザ情報DB211が記憶している場合には、ユーザ情報DB211に記憶されたレコードを取得し、キャッシュサーバ300にデータ応答として送信する。例えば、キャッシュ応答部221は、検索結果となるレコードのキー情報と属性値とをユーザ情報DB211から取得し、データ応答をキャッシュサーバ300に送信する。また、キャッシュ応答部221は、キャッシュサーバ300から受信したデータ検索要求に含まれるキー情報を含むレコードをユーザ情報DB211が記憶していない場合には、「キー情報なし」をキャッシュサーバ300に応答する。   When the user information DB 211 stores a record corresponding to the key information included in the data search request received from the cache server 300, the cache response unit 221 acquires the record stored in the user information DB 211, It transmits to the server 300 as a data response. For example, the cache response unit 221 acquires the key information and attribute value of the record that is the search result from the user information DB 211, and transmits a data response to the cache server 300. In addition, when the user information DB 211 does not store the record including the key information included in the data search request received from the cache server 300, the cache response unit 221 responds “no key information” to the cache server 300. .

なお、キャッシュ応答部221により送信されるデータ応答に含まれるキー情報は、データ検索要求に含まれるキー情報とは異なるキー情報と同一とはならない場合がある。例えば、キャッシュ応答部221が、ユーザ情報DB211から「ANY」を含むレコードを検索結果として選択した場合には、データ検索要求に含まれるキー情報と同一とはならない。データ検索要求に含まれるキー情報には「ANY」は含まれないからである。このことを踏まえ、以下では、データ応答に含まれるキー情報に含まれる特定情報各々について、「部分特定情報要素」「D1」「D2」「D3」などと記載する。   Note that the key information included in the data response transmitted by the cache response unit 221 may not be the same as the key information different from the key information included in the data search request. For example, when the cache response unit 221 selects a record including “ANY” from the user information DB 211 as a search result, the key information included in the data search request is not the same. This is because “ANY” is not included in the key information included in the data search request. Based on this, hereinafter, the specific information included in the key information included in the data response will be described as “partial specific information element” “D1” “D2” “D3” or the like.

上述したように、キャッシュ応答部221は、キャッシュサーバ300により送信されたデータ検索要求に含まれる特定情報の組み合わせを受信すると、受信した組み合わせである受信組み合わせに相当する特定情報と非特定種類情報との組み合わせと、特定情報と非特定種類情報との組み合わせに対応付けられたデータとをユーザ情報DB211から取得し、キャッシュサーバ300に応答する。より詳細には、キャッシュ応答部221は、キャッシュサーバ300により送信された受信組み合わせを受信すると、組み合わせに相当する特定情報と非特定種類情報との組み合わせ各々のうち一つを選択し、選択した特定情報と非特定種類情報との組み合わせと、選択した組み合わせに対応付けて記憶されたデータとを送信する。   As described above, when the cache response unit 221 receives the combination of specific information included in the data search request transmitted by the cache server 300, the specific information corresponding to the received combination that is the received combination and the non-specific type information And the data associated with the combination of specific information and non-specific type information are acquired from the user information DB 211 and responded to the cache server 300. More specifically, when the cache response unit 221 receives the reception combination transmitted by the cache server 300, the cache response unit 221 selects one of the combinations of the specific information corresponding to the combination and the non-specific type information, and selects the selected specific A combination of information and non-specific type information and data stored in association with the selected combination are transmitted.

IR情報応答部222は、キャッシュサーバ300からIR情報要求を受信すると、IR情報要求の送信元となるキャッシュサーバ300のキャッシュサーバ名を含むIR情報がIR情報DB212に記憶されているか否かを判定する。そして、IR情報応答部222は、IR情報DB212に記憶されていると判定した場合には、送信元となるキャッシュサーバ名を含む全てのIR情報から、キー情報を取得し、取得したキー情報を含むIR情報応答をキャッシュサーバ300に送信する。ここで、IR情報応答に含まれるキー情報は、ユーザ情報DB211において更新された属性値を特定するキー情報となる。また、IR情報応答部222は、IR情報DB212に記憶されていないと判定した場合には、「IR情報なし」をキャッシュサーバ300に応答する。   When receiving the IR information request from the cache server 300, the IR information response unit 222 determines whether or not IR information including the cache server name of the cache server 300 that is the transmission source of the IR information request is stored in the IR information DB 212. To do. If the IR information response unit 222 determines that the IR information is stored in the IR information DB 212, the IR information response unit 222 acquires key information from all IR information including the cache server name that is the transmission source, and obtains the acquired key information. The IR information response including the information is transmitted to the cache server 300. Here, the key information included in the IR information response is key information for specifying the attribute value updated in the user information DB 211. If the IR information response unit 222 determines that the IR information DB 212 is not stored in the IR information DB 212, the IR information response unit 222 responds “no IR information” to the cache server 300.

IR情報削除部223は、キャッシュサーバ300からIR情報削除要求を受信すると、IR情報削除要求の送信元となるキャッシュサーバ300のキャッシュサーバ名を含むIR情報をIR情報DB212から削除し、削除結果をキャッシュサーバ300に応答する。   When receiving the IR information deletion request from the cache server 300, the IR information deletion unit 223 deletes the IR information including the cache server name of the cache server 300 that is the transmission source of the IR information deletion request from the IR information DB 212, and displays the deletion result. Responds to the cache server 300.

ユーザ情報更新部224は、ユーザ情報DB211が更新されるごとに、更新されたレコードを示すキー情報と、データベースサーバ200に接続されたキャッシュサーバ300のキャッシュサーバ名とを含むIR情報を生成してIR情報DB212に格納する。ユーザ情報DB211が更新される場合とは、例えば、利用者によって、ユーザ情報DB211に記憶されたレコードが更新された場合や、ユーザ情報DB211に新たなレコードが追加された場合や、ユーザ情報DB211に記憶されたレコードが削除された場合などが該当する。   Each time the user information DB 211 is updated, the user information update unit 224 generates IR information including key information indicating the updated record and the cache server name of the cache server 300 connected to the database server 200. Store in the IR information DB 212. When the user information DB 211 is updated, for example, when a user updates a record stored in the user information DB 211, when a new record is added to the user information DB 211, This is the case when the stored record is deleted.

[実施例1におけるキャッシュサーバの構成]
図6は、実施例1におけるキャッシュサーバの構成の一例を示す図である。図6に示す例では、キャッシュサーバ300は、通信制御I/F部301と、記憶部310と、制御部320を有する。
[Configuration of Cache Server in Embodiment 1]
FIG. 6 is a diagram illustrating an example of the configuration of the cache server according to the first embodiment. In the example illustrated in FIG. 6, the cache server 300 includes a communication control I / F unit 301, a storage unit 310, and a control unit 320.

通信制御I/F部301は、制御部320と接続される。通信制御I/F部301は、データベースサーバ200、クライアント100との間でやりとりする各種情報に関する通信を制御する。具体的には、通信制御I/F部301は、制御部320による制御に基づき、クライアント100からデータ要求を受信し、データ応答をクライアント100に送信する。また、通信制御I/F部301は、制御部320による制御に基づき、データベースサーバ200にデータ検索要求やIR情報要求、IR情報削除要求を送信しデータ応答やIR情報応答、IR情報削除応答を受信する。   The communication control I / F unit 301 is connected to the control unit 320. The communication control I / F unit 301 controls communication related to various information exchanged between the database server 200 and the client 100. Specifically, the communication control I / F unit 301 receives a data request from the client 100 and transmits a data response to the client 100 based on control by the control unit 320. In addition, the communication control I / F unit 301 transmits a data search request, an IR information request, and an IR information deletion request to the database server 200 based on control by the control unit 320, and sends a data response, an IR information response, and an IR information deletion response. Receive.

記憶部310は、制御部320と接続される。記憶部310は、制御部320による各種処理に必要なデータ及びプログラムを格納する。記憶部310は、例えば、キャッシュ311が該当する。図6に示す例では、記憶部310は、キャッシュ311を有する。   Storage unit 310 is connected to control unit 320. The storage unit 310 stores data and programs necessary for various processes performed by the control unit 320. The storage unit 310 corresponds to, for example, the cache 311. In the example illustrated in FIG. 6, the storage unit 310 includes a cache 311.

キャッシュ311は、データベースサーバ200のユーザ情報DB211に記憶された情報のうち一部を記憶する。つまり、キャッシュ311は、データベースに記憶されたデータの少なくとも一部について、特定情報と非特定種類情報との組み合わせと、複数種類の特定情報の組み合わせとのうち少なくとも一つと対応付けて記憶する。具体的には、ユーザ情報DB211に記憶された情報のうち、キャッシュサーバ300により用いられたデータのキャッシュを記憶する。以下では、オープンハッシュ法によるデータ構造を例に説明する。   The cache 311 stores a part of the information stored in the user information DB 211 of the database server 200. That is, the cache 311 stores at least a part of the data stored in the database in association with at least one of a combination of specific information and non-specific type information and a combination of plural types of specific information. Specifically, a cache of data used by the cache server 300 among the information stored in the user information DB 211 is stored. Hereinafter, a data structure based on the open hash method will be described as an example.

図7−1〜図7−3は、実施例1におけるキャッシュに記憶された情報の一例を示す図である。図7に示す例では、キャッシュ311が、ハッシュテーブルと、レコードテーブルと、属性情報テーブルとを有する場合を示した。図7−1〜図7−3は、ハッシュテーブルと、レコードテーブルと、属性情報テーブルとの一例を示す。それぞれ、図7−1〜図7−3に示すように、ハッシュテーブルと、レコードテーブルと、属性情報テーブルとは、「レコードID」と「属性情報ID」とによって連結される。言い換えると、図7−1〜図7−3に示す例では、キャッシュ311において、「レコードID」と「属性情報ID」とは、キャッシュ311に記憶されたデータを識別するためのデータとして用いられる。ただし、これに限定されるものではなく、任意の手法を用いて良く、例えば、レコードごとのメモリ上のアドレスなどを用いても良い。   FIGS. 7A to 7C are diagrams illustrating an example of information stored in the cache according to the first embodiment. In the example illustrated in FIG. 7, the cache 311 includes a hash table, a record table, and an attribute information table. 7A to 7C illustrate examples of a hash table, a record table, and an attribute information table. As shown in FIGS. 7A to 7C, the hash table, the record table, and the attribute information table are linked by “record ID” and “attribute information ID”. In other words, in the example illustrated in FIGS. 7A to 7C, in the cache 311, “record ID” and “attribute information ID” are used as data for identifying data stored in the cache 311. . However, the present invention is not limited to this, and an arbitrary method may be used. For example, an address on a memory for each record may be used.

図7−1に示す例では、ハッシュテーブルは、「ハッシュ値」と「レコードID」とを対応付けて記憶する。ここで、ハッシュテーブルに記憶されたハッシュ値は、キー情報を所定のハッシュ関数を用いて変換した値である。ハッシュテーブルに記憶されたレコードIDは、ハッシュテーブルとレコードテーブルとの連結に用いられる。図7−1に示す例では、ハッシュテーブルは、ハッシュ値「0」に対応付けてレコードID「0」を記憶する。また、同様に、ハッシュテーブルは、ハッシュ値「1」に対応付けてレコードID「1」を記憶する。   In the example illustrated in FIG. 7A, the hash table stores “hash value” and “record ID” in association with each other. Here, the hash value stored in the hash table is a value obtained by converting the key information using a predetermined hash function. The record ID stored in the hash table is used for connecting the hash table and the record table. In the example illustrated in FIG. 7A, the hash table stores the record ID “0” in association with the hash value “0”. Similarly, the hash table stores the record ID “1” in association with the hash value “1”.

図7−2に示すように、レコードテーブルは、「レコードID」とキー情報と「属性情報ID」とを対応付けて記憶する。レコードテーブルに記憶されたレコードIDは、ハッシュテーブルに記憶されたレコードIDと対応する。「属性情報ID」は、レコードテーブルと属性情報テーブルとの連結に用いられる。図7−2に示す例では、レコードテーブルは、レコードID「0」と、K1「ServiceName−001」とK2「ANY」とK3「ANY」とを含むキー情報と、属性情報ID「0」とを対応付けて記憶する。   As illustrated in FIG. 7B, the record table stores “record ID”, key information, and “attribute information ID” in association with each other. The record ID stored in the record table corresponds to the record ID stored in the hash table. The “attribute information ID” is used to connect the record table and the attribute information table. In the example illustrated in FIG. 7B, the record table includes a record ID “0”, key information including K1 “ServiceName-001”, K2 “ANY”, and K3 “ANY”, and an attribute information ID “0”. Are stored in association with each other.

図7−3に示すように、属性情報テーブルは、「属性情報ID」と、「属性値」と、属性値の有効期限を示す「有効期限」と「参照元レコード一覧」とを対応付けて記憶する。ここで、「参照元レコード一覧」は、同一の属性情報IDに対応付けられたレコードテーブルに含まれるレコードのレコードIDの一覧を示す。参照元レコード一覧は、可変長配列のような、複数の要素を含むことのできる構造をとる。図7−3に示す例では、属性情報テーブルは、属性情報ID「0」と属性値「1」と有効期限「2011/1/1」と参照元レコード一覧「0、1」とを対応付けて記憶する。なお、有効期限は、例えば、キャッシュ311にレコードが追加される時点から一定期間後の期日が用いられる。ただし、これに限定されるものではなく、任意の期日を用いて良い。   As shown in FIG. 7C, the attribute information table associates “attribute information ID”, “attribute value”, “expiration date” indicating the expiration date of the attribute value, and “reference source record list”. Remember. Here, “reference source record list” indicates a list of record IDs of records included in the record table associated with the same attribute information ID. The reference source record list has a structure that can include a plurality of elements such as a variable length array. In the example illustrated in FIG. 7C, the attribute information table associates the attribute information ID “0”, the attribute value “1”, the expiration date “2011/1/1”, and the reference source record list “0, 1”. And remember. The expiration date is, for example, a date after a certain period from the time when the record is added to the cache 311. However, the present invention is not limited to this, and an arbitrary date may be used.

なお、図7では、ハッシュテーブルの構造として、オープンハッシュ法を用いて記憶させる例を示したが、データ構造はこれに限るものではない。例えば、クローズドハッシュ法を用いても良い。また、図7に示す例では、キー情報が3個、属性値が1個の情報である場合を図示しているが、これに限定されるものではなく、任意の数の情報によって構成されても良い。   Although FIG. 7 shows an example in which the hash table structure is stored using the open hash method, the data structure is not limited to this. For example, a closed hash method may be used. Further, in the example shown in FIG. 7, the case where the key information is three pieces of information and the attribute value is one piece of information is illustrated, but the present invention is not limited to this, and it is configured by an arbitrary number of pieces of information. Also good.

制御部320は、通信制御I/F部301及び記憶部310と接続される。制御部320は、OSなどの制御プログラム、各種の処理手順などを規定したプログラム及び所要データを格納するための内部メモリを有し、種々の処理を制御する。制御部320は、例えば、ASIC、FPGA、CPU、MPUなどである。また、図6に示す例では、制御部320は、キャッシュ判定部321と、IR情報判定部322と、応答処理部323とを有する。   The control unit 320 is connected to the communication control I / F unit 301 and the storage unit 310. The control unit 320 includes an internal memory for storing a control program such as an OS, a program defining various processing procedures, and necessary data, and controls various processes. The control unit 320 is, for example, an ASIC, FPGA, CPU, MPU, or the like. In the example illustrated in FIG. 6, the control unit 320 includes a cache determination unit 321, an IR information determination unit 322, and a response processing unit 323.

キャッシュ判定部321は、クライアント100からデータ要求を受信すると、受信したデータ要求に含まれるサービス特定情報要素を取得し、取得したサービス特定情報要素をキー情報としてキャッシュ311を検索する。つまり、キャッシュ判定部321は、データ要求を受信すると、データ要求に含まれる複数種類の特定情報各々の組み合わせがキャッシュ311に記憶されているかを判定する。   When the cache determination unit 321 receives a data request from the client 100, the cache determination unit 321 acquires a service specifying information element included in the received data request, and searches the cache 311 using the acquired service specifying information element as key information. That is, when the cache determination unit 321 receives a data request, the cache determination unit 321 determines whether a combination of each of a plurality of types of specific information included in the data request is stored in the cache 311.

また、キャッシュ判定部321は、判定結果に応じて、以下に説明する処理を実行する。具体的には、キャッシュ判定部321は、キャッシュ311に記憶されていないと判定した場合に、データ要求に含まれる組み合わせをデータベースサーバ200に送信する。その後、キャッシュ判定部321は、データベースサーバ200により送信された特定情報と非特定種類情報との組み合わせを受信する。ここで、キャッシュ判定部321は、データベースサーバ200により送信された特定情報と非特定種類情報との組み合わせがキャッシュ311に記憶されている場合には、記憶されていた特定情報と非特定種類情報との組み合わせに対応付けられるデータと対応付けて、受信組み合わせをキャッシュ311に格納する。一方、キャッシュ判定部321は、キャッシュに記憶されていない場合には、データベースサーバ200により送信されたデータと対応付けて、データベースサーバ200により送信された特定情報と非特定種類情報との組み合わせと、受信組み合わせとをキャッシュ311に格納する。   In addition, the cache determination unit 321 executes processing described below according to the determination result. Specifically, when the cache determination unit 321 determines that the data is not stored in the cache 311, the cache determination unit 321 transmits the combination included in the data request to the database server 200. Thereafter, the cache determination unit 321 receives a combination of specific information and non-specific type information transmitted by the database server 200. Here, when the combination of the specific information and the non-specific type information transmitted by the database server 200 is stored in the cache 311, the cache determination unit 321 stores the stored specific information and non-specific type information. The received combination is stored in the cache 311 in association with the data associated with the combination. On the other hand, when the cache determination unit 321 is not stored in the cache, the cache determination unit 321 associates the data transmitted by the database server 200 with the combination of the specific information and the non-specific type information transmitted by the database server 200, and The received combination is stored in the cache 311.

また、キャッシュ判定部321は、キャッシュ311に記憶されていると判定した場合には、キャッシュ311からデータを取得してデータ要求の送信元に送信する。また、キャッシュ判定部321は、キャッシュ311に記憶されていないと判定した場合には、データベースサーバ200により送信されたデータをデータ要求の送信元に送信する。なお、キャッシュ判定部321は、「判定部」や「特定情報送信部」、「格納部」「データ送信部」とも称する。   If the cache determination unit 321 determines that the data is stored in the cache 311, the cache determination unit 321 acquires data from the cache 311 and transmits the data to the transmission source of the data request. If the cache determination unit 321 determines that the data is not stored in the cache 311, the cache determination unit 321 transmits the data transmitted by the database server 200 to the transmission source of the data request. The cache determination unit 321 is also referred to as “determination unit”, “specific information transmission unit”, “storage unit”, and “data transmission unit”.

ここで、キャッシュ判定部321は、キャッシュ311の検索結果に応じて実行する一連の処理について、場合分けした上で、更に具体的に説明する。   Here, the cache determination unit 321 will more specifically describe a series of processes to be executed according to the search result of the cache 311 after classifying the cases.

以下では、まず、キャッシュ311にキー情報が記憶されていた場合における処理について説明する。次に、キャッシュ判定部321による処理のうち、キャッシュ311にキー情報が記憶されておらず、データベースサーバ200から属性情報を取得できた場合における処理について説明する。続いて、キャッシュ判定部321による処理のうち、キャッシュ311にキー情報が記憶されておらず、データベースサーバ200から属性情報を取得できなかった場合における処理について説明する。   In the following, a process when key information is stored in the cache 311 will be described first. Next, of the processes performed by the cache determination unit 321, a process when key information is not stored in the cache 311 and attribute information can be acquired from the database server 200 will be described. Next, a process performed when the key information is not stored in the cache 311 and attribute information cannot be acquired from the database server 200 among the processes performed by the cache determination unit 321 will be described.

キャッシュ判定部321による処理のうち、キャッシュ311にキー情報が記憶されていた場合における処理について説明する。この場合、キャッシュ判定部321は、キャッシュ311に記憶されていたキー情報に対応する属性値をキャッシュ311から取得し、データ応答をクライアント100に送信する。   Of the processes performed by the cache determination unit 321, the process in the case where key information is stored in the cache 311 will be described. In this case, the cache determination unit 321 acquires an attribute value corresponding to the key information stored in the cache 311 from the cache 311 and transmits a data response to the client 100.

なお、ここで、キャッシュ判定部321は、取得した属性値に対応付けられた有効期限が有効期限切れとなっている場合には、データ応答を実行することなく、該当するレコードを削除する処理を実行する。キャッシュ判定部321は、取得した属性値に対応付けられたキー情報全てをキャッシュ311から特定し、特定したキー情報と属性値とを削除する。例えば、キャッシュ判定部321は、属性情報ID「2」に対応付けられた参照元レコード一覧に含まれるレコードID「3」を取得し、取得したレコードIDを含むレコードをキャッシュ311のレコードテーブルから削除する。この場合、その後、後述するキャッシュ311にキー情報が記憶されていない場合の処理を行う。   Here, when the expiration date associated with the acquired attribute value has expired, the cache determination unit 321 executes a process of deleting the corresponding record without executing a data response. To do. The cache determination unit 321 identifies all the key information associated with the acquired attribute value from the cache 311 and deletes the identified key information and attribute value. For example, the cache determination unit 321 acquires the record ID “3” included in the reference source record list associated with the attribute information ID “2”, and deletes the record including the acquired record ID from the record table of the cache 311. To do. In this case, after that, a process when key information is not stored in a cache 311 described later is performed.

図3と図7を用いて具体的に説明する。また、クライアント100から受信したデータ要求にK1「ServiceName−002」とK2「UserType−001」とK3「AccountType−002」とが含まれていた場合を用いて説明する。この場合、キャッシュ判定部321は、キー情報となる「ServiceName−002、UserType−001、AccountType−002」からハッシュ値を算出する。以下では、ハッシュ値「B−1」が算出されたものとして説明する。キャッシュ判定部321は、ハッシュ値「B−1」を用いてキャッシュ311のハッシュテーブルを検索することで、レコードID「3」を取得する。そして、キャッシュ判定部321は、レコードID「3」を用いてキャッシュ311のレコードテーブルを検索し、検索結果となるレコードに含まれるキー情報と、クライアント100からのデータ要求から取得したキー情報とを比較し、検索対象となるキー情報が既に記憶されていると判定する。その後、キャッシュ判定部321は、キャッシュ311のレコードテーブルに記憶されたレコードのうち、レコードID「3」を含むレコードから属性情報ID「2」を取得し、キャッシュ311の属性情報テーブルから属性情報ID「2」に対応付けられた属性値「データ101」を取得する。また、キャッシュ判定部321は、取得した属性値「データ101」を応答処理部323に出力する。   This will be specifically described with reference to FIGS. Further, the case where the data request received from the client 100 includes K1 “ServiceName-002”, K2 “UserType-001”, and K3 “AccountType-002” will be described. In this case, the cache determination unit 321 calculates a hash value from “ServiceName-002, UserType-001, AccountType-002” as key information. In the following description, it is assumed that the hash value “B-1” has been calculated. The cache determination unit 321 acquires the record ID “3” by searching the hash table of the cache 311 using the hash value “B-1”. Then, the cache determination unit 321 searches the record table of the cache 311 using the record ID “3”, and obtains the key information included in the record that is the search result and the key information acquired from the data request from the client 100. By comparison, it is determined that the key information to be searched is already stored. Thereafter, the cache determination unit 321 acquires the attribute information ID “2” from the record including the record ID “3” among the records stored in the record table of the cache 311, and acquires the attribute information ID from the attribute information table of the cache 311. The attribute value “data 101” associated with “2” is acquired. Further, the cache determination unit 321 outputs the acquired attribute value “data 101” to the response processing unit 323.

なお、ここで、キャッシュ判定部321は、属性情報ID「2」に対応付けられた有効期限が有効期限切れとなっていた場合には、キャッシュを削除する処理を実行する。その後、後述するキャッシュ311にキー情報が記憶されていない場合の処理を行う。   Here, if the expiration date associated with the attribute information ID “2” has expired, the cache determination unit 321 executes processing for deleting the cache. Thereafter, processing is performed when key information is not stored in a cache 311 described later.

次に、キャッシュ判定部321による処理のうち、キャッシュ311にキー情報が記憶されておらず、データベースサーバ200から属性情報を取得できた場合における処理について説明する。すなわち、例えば、キャッシュ311にキー情報が記憶されていた場合における処理において説明したように、キャッシュ判定部321は、検索対象となるキー情報が既に記憶されていると判定する。この際、クライアント100からのデータ要求から取得したキー情報が記憶されていないと判定する場合が該当する。   Next, of the processes performed by the cache determination unit 321, a process when key information is not stored in the cache 311 and attribute information can be acquired from the database server 200 will be described. That is, for example, as described in the processing in the case where key information is stored in the cache 311, the cache determination unit 321 determines that key information to be searched is already stored. At this time, a case where it is determined that the key information acquired from the data request from the client 100 is not stored is applicable.

この場合、キャッシュ判定部321は、データ要求から取得したキー情報を含むデータ検索要求をデータベースサーバ200に送信する。例えば、キャッシュ判定部321は、サービス特定情報要素(E1、E2、E3)を含むデータ検索要求をデータベースサーバ200に送信する。その後、キャッシュ判定部321は、データベースサーバ200から、データ検索結果として、部分特定情報要素(D1、D2、D3)と属性値とを含むデータ応答を受信する。   In this case, the cache determination unit 321 transmits a data search request including key information acquired from the data request to the database server 200. For example, the cache determination unit 321 transmits a data search request including service identification information elements (E1, E2, E3) to the database server 200. Thereafter, the cache determination unit 321 receives a data response including the partial identification information elements (D1, D2, D3) and the attribute value as a data search result from the database server 200.

ここで、受信したデータ応答に含まれる部分特定情報要素(D1、D2、D3)が、自装置のキャッシュ311にキー情報として既に記憶されている場合について説明する。この場合、キャッシュ判定部321は、データ要求から取得したサービス特定情報要素(E1、E2、E3)を、部分特定情報要素(D1、D2、D3)に対応付けて既に記憶されていた属性値に対応付けてキャッシュ311に格納する。より詳細な一例をあげて説明すると、キャッシュ判定部321は、データ要求から取得したサービス特定情報要素(E1、E2、E3)をキー情報とし、部分特定情報要素(D1、D2、D3)に対応付けて既に記憶されていた属性値と、新たに付与したレコードIDとを含むレコードをキャッシュ311のレコードテーブルに格納する。また、キャッシュ判定部321は、新たに付与したレコードIDを、サービス特定情報要素(E1、E2、E3)から算出したハッシュ値に対応付けてハッシュテーブルに格納する。また、キャッシュ判定部321は、キャッシュ311の属性情報テーブルに記憶されたレコードのうち、部分特定情報要素(D1、D2、D3)に対応付けて既に記憶されていた属性値を含むレコードについて、「参照元レコード一覧」に、新たに付与したレコードIDを追加する。そして、キャッシュ判定部321は、部分特定情報要素(D1、D2、D3)に対応付けて既に記憶されていた属性値を応答処理部323に出力する。   Here, a case where the partial identification information elements (D1, D2, D3) included in the received data response are already stored as key information in the cache 311 of the own device will be described. In this case, the cache determination unit 321 associates the service identification information elements (E1, E2, E3) acquired from the data request with the attribute values already stored in association with the partial identification information elements (D1, D2, D3). The data is stored in the cache 311 in association with each other. To explain with a more detailed example, the cache determination unit 321 uses the service identification information elements (E1, E2, E3) acquired from the data request as key information, and corresponds to the partial identification information elements (D1, D2, D3). In addition, a record including the attribute value that has already been stored and the newly assigned record ID is stored in the record table of the cache 311. In addition, the cache determination unit 321 stores the newly assigned record ID in the hash table in association with the hash value calculated from the service identification information elements (E1, E2, E3). In addition, the cache determination unit 321 selects, among the records stored in the attribute information table of the cache 311, for records including attribute values that are already stored in association with the partial identification information elements (D 1, D 2, D 3). The newly assigned record ID is added to the “reference source record list”. Then, the cache determination unit 321 outputs the attribute values that are already stored in association with the partial identification information elements (D1, D2, D3) to the response processing unit 323.

図3と図7を用いて具体的に説明する。また、クライアント100から受信したデータ要求にK1「ServiceName−001」とK2「UserType−001」とK3「AccountType−002」とが含まれていた場合を用いて説明する。この場合、キャッシュ判定部321は、キー情報となるK1「ServiceName−001」とK2「UserType−001」とK3「AccountType−002」とからハッシュ値を算出する。以下では、ハッシュ値「2」が算出されたものとして説明する。今回の場合、キャッシュ311のハッシュテーブルは、ハッシュ値「2」に対応付けられたレコードIDを記憶していないため、キャッシュ判定部321は、K1「ServiceName−001」とK2「UserType−001」とK3「AccountType−002」とを含めた上でデータ検索要求をデータベースサーバ200に送信する。その後、例えば、キャッシュ判定部321は、データベースサーバ200から、部分特定情報要素(D1、D2、D3)として、「ServiceName−001、ANY、ANY」とを含み、属性値「データ1」とを含むデータ応答を受信する。その後、キャッシュ判定部321は、部分特定要素(D1、D2、D3)からハッシュ値をキー情報として、自装置のキャッシュ311のハッシュテーブルを検索する。ここで、キャッシュ判定部321は、レコードID「0」が得られた場合には、部分特定要素(D1、D2、D3)がキー情報として既に記憶されていると判定することとなる。この結果、キャッシュ判定部321は、例えば、レコードID「0」を用いて、キャッシュ311のレコードテーブルから属性情報ID「0」を取得する。そして、キャッシュ判定部321は、キャッシュ311のレコードテーブルに、新たに付与したレコードID「4」と、K1「ServiceName−001」とK2「UserType−001」とK3「AccountType−002」と、属性情報ID「0」とを含む新たなレコードをキャッシュ311のレコードテーブルに格納する。また、キャッシュ判定部321は、K1「ServiceName−001」とK2「UserType−001」とK3「AccountType−002」により算出されるハッシュ値が「2」である場合には、キャッシュ311のハッシュテーブルに対して、ハッシュ値「2」に対応付けてレコードID「4」を格納する。また、キャッシュ判定部321は、キャッシュ311の属性情報テーブルのうち、属性情報ID「0」を含むレコードの参照元レコード一覧にレコードID「4」を追加する。その後、キャッシュ判定部321は、属性情報ID「0」に対応付けられた属性値「データ1」を取得し、応答処理部323に出力する。   This will be specifically described with reference to FIGS. Further, a case where the data request received from the client 100 includes K1 “ServiceName-001”, K2 “UserType-001”, and K3 “AccountType-002” will be described. In this case, the cache determination unit 321 calculates a hash value from K1 “ServiceName-001”, K2 “UserType-001”, and K3 “AccountType-002” which are key information. In the following description, it is assumed that the hash value “2” has been calculated. In this case, since the hash table of the cache 311 does not store the record ID associated with the hash value “2”, the cache determination unit 321 determines that K1 “ServiceName-001” and K2 “UserType-001”. A data search request is transmitted to the database server 200 after including K3 “AccountType-002”. Thereafter, for example, the cache determination unit 321 includes “ServiceName-001, ANY, ANY” and the attribute value “data 1” as the partial identification information elements (D1, D2, D3) from the database server 200. Receive a data response. Thereafter, the cache determination unit 321 searches the hash table of the cache 311 of the own device using the hash value as key information from the partial identification elements (D1, D2, D3). Here, when the record ID “0” is obtained, the cache determination unit 321 determines that the partial identification elements (D1, D2, D3) are already stored as key information. As a result, the cache determination unit 321 acquires the attribute information ID “0” from the record table of the cache 311 using, for example, the record ID “0”. The cache determination unit 321 then adds the newly assigned record ID “4”, K1 “ServiceName-001”, K2 “UserType-001”, and K3 “AccountType-002” to the record table of the cache 311 and attribute information. A new record including ID “0” is stored in the record table of the cache 311. The cache determination unit 321 also stores the hash value calculated by K1 “ServiceName-001”, K2 “UserType-001”, and K3 “AccountType-002” in the hash table of the cache 311. On the other hand, the record ID “4” is stored in association with the hash value “2”. Further, the cache determination unit 321 adds the record ID “4” to the reference source record list of the record including the attribute information ID “0” in the attribute information table of the cache 311. Thereafter, the cache determination unit 321 acquires the attribute value “data 1” associated with the attribute information ID “0” and outputs the attribute value “data 1” to the response processing unit 323.

図8−1〜図8−3は、実施例1におけるキャッシュ判定部によりレコードが追加された後のキャッシュに記憶された情報の一例を示す図である。図8−1〜図8−3は、それぞれ、図7−1〜図7−3に対応する。なお、図8−1〜図8−3に示す例では、レコードID「4」に加えて、レコードID「5」「6」についても追加されている場合を示した。   8A to 8C are diagrams illustrating an example of information stored in the cache after the record is added by the cache determination unit according to the first embodiment. FIGS. 8-1 to 8-3 correspond to FIGS. 7-1 to 7-3, respectively. In the example illustrated in FIGS. 8A to 8C, the record IDs “5” and “6” are added in addition to the record ID “4”.

なお、属性情報ID「2」に対応付けられた有効期限が有効期限切れとなっていた場合には、参照元レコード一覧に含まれるレコードID「0」「1」「3」に対応するレコードを、キャッシュ311のレコードテーブルやハッシュテーブルから削除し、属性情報ID「2」を含むレコードを属性情報テーブルから削除する。   If the expiration date associated with the attribute information ID “2” has expired, the records corresponding to the record IDs “0”, “1”, and “3” included in the reference source record list are The record is deleted from the record table or the hash table of the cache 311 and the record including the attribute information ID “2” is deleted from the attribute information table.

ここで、受信したデータ応答に含まれる部分特定情報要素(D1、D2、D3)が、自装置のキャッシュ311にキー情報として既に記憶されていなかった場合について説明する。この場合、キャッシュ判定部321は、部分特定情報要素(D1、D2、D3)と、データベースサーバ200から取得した属性値を対応付けて、自装置のキャッシュ311に格納する。その後、キャッシュ判定部321は、部分特定情報要素(D1、D2、D3)に対応付けて格納した属性値を、サービス特定情報要素(E1、E2、E3)に対応させてキャッシュ311にレコードを格納し、属性値を応答処理部323に出力する。   Here, a case where the partial identification information elements (D1, D2, D3) included in the received data response are not already stored as key information in the cache 311 of the own device will be described. In this case, the cache determination unit 321 associates the partial identification information elements (D1, D2, D3) with the attribute values acquired from the database server 200 and stores them in the cache 311 of the own device. Thereafter, the cache determination unit 321 stores the records in the cache 311 in association with the attribute values stored in association with the partial identification information elements (D1, D2, D3) and the service identification information elements (E1, E2, E3). The attribute value is output to the response processing unit 323.

図3と図8を用いて具体的に説明する。また、クライアント100から受信したデータ要求にK1「ServiceName−003」とK2「UserType−001」とK3「AccountType−001」とが含まれていた場合を用いて説明する。この場合、キャッシュ判定部321は、キー情報となるK1「ServiceName−003」とK2「UserType−001」とK3「AccountType−001」とからハッシュ値を算出する。以下では、ハッシュ値「3」が算出されたものとして説明する。今回の場合、キャッシュ311のハッシュテーブルは、ハッシュ値「3」に対応付けられたレコードIDを記憶していないため、キャッシュ判定部321は、K1「ServiceName−003」とK2「UserType−001」とK3「AccountType−001」とを含めた上でデータ検索要求をデータベースサーバ200に送信する。その後、例えば、キャッシュ判定部321は、データベースサーバ200から、部分特定情報要素(D1、D2、D3)として、「ServiceName−003、UserType−001、ANY」を含み、属性値「データ10」を含むデータ応答を受信する。その後、キャッシュ判定部321は、部分特定要素(D1、D2、D3)からハッシュ値をキー情報として、自装置のキャッシュ311のハッシュテーブルを検索する。ここで、キャッシュ判定部321は、レコードID「3」が得られない場合には、部分特定要素(D1、D2、D3)がキー情報として既に記憶されていないと判定することとなる。この結果、キャッシュ判定部321は、新たに付与した属性情報ID「3」と属性値「データ10」とを含むレコードをキャッシュ311の属性情報テーブルに格納する。また、キャッシュ判定部321は、キャッシュ311のレコードテーブルに対して、新たに付与したレコード「5」と、キー情報として部分特定情報要素(D1、D2、D3)「ServiceName−003、UserType−001、ANY」と、属性情報ID「3」とを含むレコードを新たに格納する。また、キャッシュ判定部321は、キャッシュ311のハッシュテーブルに対して、新たに格納したレコードID「5」をハッシュ値「4」に対応付けて格納する。その後、キャッシュ判定部321は、キャッシュ311のレコードテーブルに対して、新たに付与したレコード「5」と、データ要求に含まれるキー情報(K1、K2、K3)「ServiceName−003、UserType−001、AccountType−001」、属性情報ID「3」とを含むレコードを格納する。また、キャッシュ判定部321は、キャッシュ311のハッシュテーブルに対して、データ要求に含まれるキー情報(K1、K2、K3)から算出されたハッシュ値が「3」である場合には、ハッシュ値「3」に対応付けてレコードID「6」を対応付けて格納する。その後、キャッシュ判定部321は、属性情報ID「3」の属性情報から、属性値「データ10」を取得し、応答処理部323に出力する。   This will be specifically described with reference to FIGS. Further, a case where the data request received from the client 100 includes K1 “ServiceName-003”, K2 “UserType-001”, and K3 “AccountType-001” will be described. In this case, the cache determination unit 321 calculates a hash value from K1 “ServiceName-003”, K2 “UserType-001”, and K3 “AccountType-001” that are key information. In the following description, it is assumed that the hash value “3” has been calculated. In this case, since the hash table of the cache 311 does not store the record ID associated with the hash value “3”, the cache determination unit 321 uses K1 “ServiceName-003” and K2 “UserType-001”. A data search request is transmitted to the database server 200 after including K3 “AccountType-001”. Thereafter, for example, the cache determination unit 321 includes “ServiceName-003, UserType-001, ANY” and the attribute value “data 10” from the database server 200 as the partial identification information elements (D1, D2, D3). Receive a data response. Thereafter, the cache determination unit 321 searches the hash table of the cache 311 of the own device using the hash value as key information from the partial identification elements (D1, D2, D3). Here, when the record ID “3” is not obtained, the cache determination unit 321 determines that the partial identification elements (D1, D2, D3) are not already stored as key information. As a result, the cache determination unit 321 stores a record including the newly assigned attribute information ID “3” and the attribute value “data 10” in the attribute information table of the cache 311. In addition, the cache determination unit 321 adds the newly added record “5” to the record table of the cache 311 and the partial identification information elements (D1, D2, D3) “ServiceName-003, UserType-001, A record including “ANY” and attribute information ID “3” is newly stored. Further, the cache determination unit 321 stores the newly stored record ID “5” in association with the hash value “4” in the hash table of the cache 311. Thereafter, the cache determination unit 321 adds the newly added record “5” to the record table of the cache 311 and the key information (K1, K2, K3) “ServiceName-003, UserType-001, A record including “AccountType-001” and attribute information ID “3” is stored. In addition, when the hash value calculated from the key information (K1, K2, K3) included in the data request is “3” with respect to the hash table of the cache 311, the cache determination unit 321 has the hash value “ Record ID “6” is stored in association with “3”. Thereafter, the cache determination unit 321 acquires the attribute value “data 10” from the attribute information of the attribute information ID “3”, and outputs the attribute value “data 10” to the response processing unit 323.

最後に、キャッシュ判定部321による処理のうち、キャッシュ311にキー情報が記憶されておらず、データベースサーバ200から属性情報を取得できなかった場合における処理について説明する。この場合、キャッシュ判定部321は、「データなし」をクライアント100に送信する。   Finally, of the processes performed by the cache determination unit 321, a process when key information is not stored in the cache 311 and attribute information cannot be acquired from the database server 200 will be described. In this case, the cache determination unit 321 transmits “no data” to the client 100.

IR情報判定部322は、データベースサーバ200にIR情報要求を送信する。例えば、IR情報判定部322は、定期的にIR情報要求を送信したり、任意のタイミングにてIR情報要求を送信したりする。また、IR情報判定部322は、IR情報要求に対するIR情報をデータベースサーバ200から受信することで、データベースサーバ200から、自キャッシュサーバ300向けのIR情報として、ユーザ情報DB211に記憶された属性値のうち更新された属性値を示す「キー情報(K1、K2、K3)」を取得する。   The IR information determination unit 322 transmits an IR information request to the database server 200. For example, the IR information determination unit 322 periodically transmits an IR information request or transmits an IR information request at an arbitrary timing. Further, the IR information determination unit 322 receives the IR information for the IR information request from the database server 200, and thereby the attribute value stored in the user information DB 211 as IR information for the own cache server 300 from the database server 200. Among them, “key information (K1, K2, K3)” indicating the updated attribute value is acquired.

IR情報判定部322は、データベースサーバ200から受信したIR情報を用いて、キャッシュ311を更新する。つまり、IR情報判定部322は、キャッシュ311情報の最新化を行う。IR情報に含まれるキー情報が(K1、K2、K3)である場合を用いて説明する。IR情報判定部322は、IR情報の「キー情報(K1、K2、K3)」に基づき、自装置のキャッシュ311にキー情報(K1、K2、K3)と一致するキー情報が記憶されている場合には、自装置のキャッシュ311から「キー情報(K1、K2、K3)」と、「キー情報(K1、K2、K3)」に対応付けられた「属性値」とを削除する。つまり、IR情報判定部322は、後述するキャッシュ削除処理を実行したり、キャッシュ判定部321にキャッシュ削除処理を実行させたりする。   The IR information determination unit 322 updates the cache 311 using the IR information received from the database server 200. That is, the IR information determination unit 322 updates the cache 311 information. Description will be made using a case where the key information included in the IR information is (K1, K2, K3). When the IR information determination unit 322 stores key information that matches the key information (K1, K2, K3) in the cache 311 of the own device based on the “key information (K1, K2, K3)” of the IR information. In this case, “key information (K1, K2, K3)” and “attribute value” associated with “key information (K1, K2, K3)” are deleted from the cache 311 of the own apparatus. That is, the IR information determination unit 322 executes a cache deletion process described later or causes the cache determination unit 321 to execute a cache deletion process.

また、IR情報判定部322は、IR情報に基づいてキャッシュ311を更新すると、IR情報に含まれるキー情報を含むIR情報削除要求をデータベースサーバ200に送信することで、データベースサーバ200から受信したIR情報をデータベースサーバ200から削除する。   Further, when the IR information determination unit 322 updates the cache 311 based on the IR information, the IR information determination unit 322 transmits the IR information deletion request including the key information included in the IR information to the database server 200, thereby receiving the IR received from the database server 200 The information is deleted from the database server 200.

図8を用いて具体的に説明する。また、IR情報に含まれるキー情報(K1、K2、K3)が、「ServiceName−001、User Type−001、AccountType−001」である場合を用いて説明する。言い換えると、「ServiceName−001、User Type−001、AccountType−001」により特定される属性値が、更新されたか、新たに格納された場合を用いて説明する。この場合、例えば、IR情報判定部322は、最初に、キー情報からハッシュ値を算出する。以下では、ハッシュ値「1」が算出された場合を用いて説明する。IR情報判定部322は、ハッシュ値「1」に対応するレコードID「1」をキャッシュ311のハッシュテーブルから取得し、レコードID「1」に対応するレコードをキャッシュ311のレコードテーブルから取得する。そして、IR情報判定部322は、レコードID「1」を含むレコードをキャッシュ311のレコードテーブルから削除する。また、IR情報判定部322は、このタイミングにて、ハッシュテーブルからも、該当のレコードを削除するという動作を行う。また、IR情報判定部322は、取得したレコードID「1」を含むレコード内にある属性情報ID「0」を取得し、属性情報ID「0」を含むレコードをキャッシュ311の属性情報テーブルから取得し、参照元レコード一覧からレコードID「1」を削除する。ここで、上述した例では、属性情報テーブルから取得したレコードの参照元レコード一覧には、レコードID「0」「4」が残っており、IR情報判定部322は、属性情報テーブルから取得したレコードそのものは削除しない。ただし、IR情報判定部322は、参照元レコード一覧からレコードIDを削除することで、参照元レコードID一覧にレコードIDが存在しなくなる場合には、取得したレコードそのものを属性情報テーブルから削除する。また、IR情報判定部322は、データベースサーバ200に、キー情報として「ServiceName−001、User Type−001、AccountType−001」を含むIR情報削除要求を送信する。   This will be specifically described with reference to FIG. Further, the case where the key information (K1, K2, K3) included in the IR information is “ServiceName-001, User Type-001, AccountType-001” will be described. In other words, the description will be made using a case where the attribute value specified by “ServiceName-001, User Type-001, AccountType-001” has been updated or newly stored. In this case, for example, the IR information determination unit 322 first calculates a hash value from the key information. Hereinafter, the case where the hash value “1” is calculated will be described. The IR information determination unit 322 acquires the record ID “1” corresponding to the hash value “1” from the hash table of the cache 311, and acquires the record corresponding to the record ID “1” from the record table of the cache 311. Then, the IR information determination unit 322 deletes the record including the record ID “1” from the record table of the cache 311. In addition, the IR information determination unit 322 performs an operation of deleting the corresponding record from the hash table at this timing. Further, the IR information determination unit 322 acquires the attribute information ID “0” in the record including the acquired record ID “1”, and acquires the record including the attribute information ID “0” from the attribute information table of the cache 311. The record ID “1” is deleted from the reference source record list. Here, in the above-described example, the record IDs “0” and “4” remain in the reference source record list of the records acquired from the attribute information table, and the IR information determination unit 322 records the records acquired from the attribute information table. Do not delete it. However, the IR information determination unit 322 deletes the acquired record itself from the attribute information table when the record ID does not exist in the reference source record ID list by deleting the record ID from the reference source record list. Also, the IR information determination unit 322 transmits an IR information deletion request including “ServiceName-001, User Type-001, AccountType-001” as key information to the database server 200.

ここで、キー情報(K1、K2、K3)にANY要素が含まれている場合について説明する。この場合、IR情報に含まれるキー情報により示される属性値に、複数のレコードが対応付けられていることがある。このことを踏まえ、IR情報判定部322は、削除対象の属性値の参照元レコード一覧を用いて、IR情報に含まれるキー情報により示される属性値を参照する全てのキー情報を削除する。   Here, a case where the ANY element is included in the key information (K1, K2, K3) will be described. In this case, a plurality of records may be associated with the attribute value indicated by the key information included in the IR information. Based on this, the IR information determination unit 322 deletes all the key information that refers to the attribute value indicated by the key information included in the IR information, using the reference record list of the attribute value to be deleted.

例えば、IR情報に含まれるキー情報(K1、K2、K3)が、「ServiceName−003、User Type−001、ANY」である場合を用いて説明する。言い換えると、「ServiceName−003、User Type−001、ANY」により特定される属性値が、更新されたか、新たに格納された場合を用いて説明する。この場合、IR情報判定部322は、最初に、キー情報からハッシュ値を算出する。以下では、ハッシュ値「4」が算出された場合を用いて説明する。IR情報判定部322は、ハッシュ値「4」に対応するレコードID「5」をキャッシュ311のハッシュテーブルから取得し、レコードID「5」に対応するレコードをキャッシュ311のレコードテーブルから取得する。そして、IR情報判定部322は、取得したレコードに含まれる属性情報ID「3」を取得し、属性情報ID「3」を含むレコードをキャッシュ311の属性情報テーブルから取得する。そして、IR情報判定部322は、属性情報テーブルから取得したレコードの参照元レコード一覧に含まれるレコードID「5」「6」のレコードを、キャッシュ311のレコードテーブルから削除する。また、IR情報判定部322は、このタイミングにて、ハッシュテーブルからも、該当のレコード(レコードID「5」「6」のレコード)を削除するという動作を行う。また、IR情報判定部322は、属性情報テーブルから、属性情報ID「3」のレコードを削除する。その後、IR情報判定部322は、データベースサーバ200に、キー情報として「ServiceName−003、User Type−001、ANY」を含むIR情報削除要求を送信する。   For example, the case where the key information (K1, K2, K3) included in the IR information is “ServiceName-003, User Type-001, ANY” will be described. In other words, description will be made using a case where the attribute value specified by “ServiceName-003, User Type-001, ANY” has been updated or newly stored. In this case, the IR information determination unit 322 first calculates a hash value from the key information. Hereinafter, the case where the hash value “4” is calculated will be described. The IR information determination unit 322 acquires the record ID “5” corresponding to the hash value “4” from the hash table of the cache 311, and acquires the record corresponding to the record ID “5” from the record table of the cache 311. Then, the IR information determination unit 322 acquires the attribute information ID “3” included in the acquired record, and acquires a record including the attribute information ID “3” from the attribute information table of the cache 311. Then, the IR information determination unit 322 deletes the records with the record IDs “5” and “6” included in the reference source record list of the records acquired from the attribute information table from the record table of the cache 311. In addition, the IR information determination unit 322 performs an operation of deleting a corresponding record (records with record IDs “5” and “6”) from the hash table at this timing. Also, the IR information determination unit 322 deletes the record with the attribute information ID “3” from the attribute information table. Thereafter, the IR information determination unit 322 transmits an IR information deletion request including “ServiceName-003, User Type-001, ANY” as key information to the database server 200.

応答処理部323は、キャッシュ判定部321から受信した属性値をクライアント100に送信する。具体的には、応答処理部323は、キャッシュ判定部321から受信した属性値と、クライアント100から受信したデータ要求に含まれるキー情報とを含むデータ応答をクライアント100に送信する。なお、上述した説明では、応答処理部323が、クライアント100から受信したデータ要求に含まれるキー情報を含むデータ応答を送信する場合を例に示したが、これに限定されるものではなく、キー情報を含めなくても良い。   The response processing unit 323 transmits the attribute value received from the cache determination unit 321 to the client 100. Specifically, the response processing unit 323 transmits a data response including the attribute value received from the cache determination unit 321 and key information included in the data request received from the client 100 to the client 100. In the above description, the case where the response processing unit 323 transmits the data response including the key information included in the data request received from the client 100 is described as an example, but the present invention is not limited to this. It is not necessary to include information.

[データベースサーバのキャッシュ応答部による処理の流れ]
図9は、実施例1におけるデータベースサーバのキャッシュ応答処理による処理の流れの一例を示すフローチャートである。
[Processing flow by the cache response unit of the database server]
FIG. 9 is a flowchart illustrating an example of a process flow of the cache response process of the database server according to the first embodiment.

図9に示すように、キャッシュ応答部221は、キャッシュサーバ300からデータ検索要求を受信すると(ステップS101)、受信したデータ検索要求から、キー情報K1〜KNを取得する(ステップS102)。   As shown in FIG. 9, when the cache response unit 221 receives a data search request from the cache server 300 (step S101), the cache response unit 221 acquires key information K1 to KN from the received data search request (step S102).

そして、キャッシュ応答部221は、キー情報から、応答データ判定表を得る(ステップS103)。具体的には、キャッシュ応答部221は、取得したキー情報をもとに、図5に示すような応答データ判定表を作成する。そして、キャッシュ応答部221は、ユーザ情報DB211から、応答データ判定表に合致するデータを全て取得する(ステップS104)。具体的には、キャッシュ応答部221は、応答データ判定表に記載されたキー情報と合致するデータが自装置内のユーザ情報DB211に存在するかを検索し、合致したデータ全てを取得する。   Then, the cache response unit 221 obtains a response data determination table from the key information (step S103). Specifically, the cache response unit 221 creates a response data determination table as shown in FIG. 5 based on the acquired key information. Then, the cache response unit 221 acquires all data that matches the response data determination table from the user information DB 211 (step S104). Specifically, the cache response unit 221 searches the user information DB 211 in the own apparatus for data that matches the key information described in the response data determination table, and acquires all the matched data.

ここで、キャッシュ応答部221は、データが存在する場合には(ステップS105肯定)、検索結果のうち、応答データ判定表の最も優先度が高いデータをデータ応答とする(ステップS106)。具体的には、キャッシュ応答部221は、応答データ判定表の優先度が最も高いデータとなる属性値を検索結果として選択し、検索結果として属性値を選択した際に用いられた応答データ判定表のキー情報を部分特定情報要素(D1〜DN)として含むデータ応答であって、検索結果として取得した属性値を含むデータ応答をキャッシュサーバ300に送信する。一方、キャッシュ応答部221は、データが存在しない場合には(ステップS105否定)、キー情報なしを応答する(ステップS107)。つまり、キャッシュ応答部221は、データ検索要求に含まれるキー情報が自装置のユーザ情報DB211に存在しない旨を示すデータ応答をキャッシュサーバ300に送信する。   Here, when there is data (Yes at Step S105), the cache response unit 221 sets data having the highest priority in the response data determination table as a data response among the search results (Step S106). Specifically, the cache response unit 221 selects the attribute value that is the highest priority data in the response data determination table as a search result, and the response data determination table used when the attribute value is selected as the search result. A data response including the key information as the partial identification information elements (D1 to DN) and including the attribute value acquired as the search result is transmitted to the cache server 300. On the other hand, when there is no data (No at Step S105), the cache response unit 221 responds that there is no key information (Step S107). That is, the cache response unit 221 transmits a data response indicating that the key information included in the data search request does not exist in the user information DB 211 of the own device to the cache server 300.

[データベースサーバのIR情報応答部による処理の流れ]
図10は、実施例1におけるIR情報応答部による処理の流れの一例を示すフローチャートである。
[Flow of processing by IR information response unit of database server]
FIG. 10 is a flowchart illustrating an example of a process flow by the IR information response unit according to the first embodiment.

図10に示すように、IR情報応答部222は、キャッシュサーバ300からIR情報要求を受信すると(ステップS201)と、受信したIR情報要求から、要求元のキャッシュサーバ名を取得する(ステップS202)。つまり、IR情報応答部222は、IR情報要求の送信元となるキャッシュサーバ300のキャッシュサーバ名を取得する。   As shown in FIG. 10, when receiving the IR information request from the cache server 300 (step S201), the IR information response unit 222 acquires the requesting cache server name from the received IR information request (step S202). . That is, the IR information response unit 222 acquires the cache server name of the cache server 300 that is the transmission source of the IR information request.

そして、IR情報応答部222は、自装置のIR情報DB212から、IR情報一覧を取得する(ステップS203)。つまり、IR情報応答部222は、取得したキャッシュサーバ名に対応するIR情報を全て取得する。   Then, the IR information response unit 222 acquires an IR information list from the IR information DB 212 of the own device (step S203). That is, the IR information response unit 222 acquires all IR information corresponding to the acquired cache server name.

ここで、IR情報応答部222は、自装置のIR情報DB212に該当のデータが存在する場合には(ステップS204肯定)、つまり、取得したキャッシュサーバ名を含むIR情報がIR情報DB212に記憶されており、IR情報を取得した場合には、IR情報応答部222は、キャッシュサーバ名に対応するIR情報の一覧をIR情報応答としてキャッシュサーバ300に送信する(ステップS205)。言い換えると、IR情報応答部222は、IR情報要求の送信元となるキャッシュサーバ300に適用されるIR情報の一覧を送信する。一方、自装置のIR情報DB212に該当のデータが存在しない場合には(ステップS204否定)、IR情報応答部222は、「IR情報なし」を、キャッシュサーバ300に応答する(ステップS206)。つまり、IR情報がないことを示すIR情報応答をキャッシュサーバ300に送信する。   Here, the IR information response unit 222 stores the IR information including the acquired cache server name in the IR information DB 212 when the corresponding data exists in the IR information DB 212 of the own device (Yes in Step S204). If IR information is acquired, the IR information response unit 222 transmits a list of IR information corresponding to the cache server name to the cache server 300 as an IR information response (step S205). In other words, the IR information response unit 222 transmits a list of IR information applied to the cache server 300 that is the transmission source of the IR information request. On the other hand, when the corresponding data does not exist in the IR information DB 212 of the own device (No at Step S204), the IR information response unit 222 responds “no IR information” to the cache server 300 (Step S206). That is, an IR information response indicating that there is no IR information is transmitted to the cache server 300.

[データベースサーバのIR情報削除部による流れ]
図11は、実施例1におけるデータベースサーバのIR情報削除部による流れの一例を示すフローチャートである。
[Flow by IR information deletion unit of database server]
FIG. 11 is a flowchart illustrating an example of a flow by the IR information deletion unit of the database server in the first embodiment.

図11に示すように、IR情報削除部223は、キャッシュサーバ300からIR情報削除要求を受信すると(ステップS301)、受信したIR情報削除要求から、要求元キャッシュサーバ名と、削除対象となるキー情報(K1〜KN)を取得する(ステップS302)。   As shown in FIG. 11, when receiving the IR information deletion request from the cache server 300 (step S301), the IR information deletion unit 223 receives the request source cache server name and the key to be deleted from the received IR information deletion request. Information (K1 to KN) is acquired (step S302).

そして、IR情報削除部223は、自装置のIR情報DB212から、取得したキャッシュサーバ名とキー情報(K1〜KN)とに該当するレコードを削除する(ステップS303)。つまり、IR情報削除部223は、取得した「キャッシュサーバ名」及び「キー情報」に対応するIR情報がIR情報DB212に記憶されている場合には、IR情報DB212から該当のIR情報を削除する。そして、IR情報応答部222はIR削除応答をキャッシュサーバ300に送信する(ステップS304)。   Then, the IR information deletion unit 223 deletes the record corresponding to the acquired cache server name and key information (K1 to KN) from the IR information DB 212 of the own device (step S303). That is, when the IR information corresponding to the acquired “cache server name” and “key information” is stored in the IR information DB 212, the IR information deletion unit 223 deletes the corresponding IR information from the IR information DB 212. . Then, the IR information response unit 222 transmits an IR deletion response to the cache server 300 (step S304).

[データベースサーバのユーザ情報更新部による処理]
図12は、実施例1におけるデータベースサーバのユーザ情報更新部による処理の流れの一例を示すフローチャートである。
[Processing by the database server user information update unit]
FIG. 12 is a flowchart illustrating an example of a process flow by the user information update unit of the database server in the first embodiment.

図12に示すように、ユーザ情報更新部224は、登録対象データを受信すると(ステップS401)、受信した登録対象データから、対象データの操作(追加、更新、削除等)、操作対象となるレコードの「キー情報(K1〜KN)」及び「属性値」を取得する(ステップS402)。例えば、ユーザ情報更新部224は、利用者から登録対象データを受信する。なお、登録対象データには、例えば、操作内容を特定するための情報や、キー情報、属性値などが含まれる。   As shown in FIG. 12, when the user information update unit 224 receives registration target data (step S401), the user data update unit 224 operates the target data from the received registration target data (addition, update, deletion, etc.), and records to be operated. “Key information (K1 to KN)” and “attribute value” are acquired (step S402). For example, the user information update unit 224 receives registration target data from the user. Note that the registration target data includes, for example, information for specifying the operation content, key information, attribute values, and the like.

そして、ユーザ情報更新部224は、ユーザ情報DB211の「キー情報(K1〜KN)」のレコードを編集する(ステップS403)。具体的には、操作内容が「追加」である場合には、ユーザ情報更新部224は、登録対象データから取得した「キー情報」と「属性値」とを対応付けてユーザ情報DB211に格納する。また、操作内容が「更新」である場合には、ユーザ情報更新部224は、ユーザ情報DB211に記憶されたレコードのうち更新対象となるレコードの属性値を更新する。また、操作内容が「削除」である場合には、ユーザ情報更新部224は、登録対象データから取得したキー情報により特定されるレコードをユーザ情報DB211から削除する。   Then, the user information update unit 224 edits the record of “key information (K1 to KN)” in the user information DB 211 (step S403). Specifically, when the operation content is “addition”, the user information update unit 224 associates “key information” acquired from the registration target data with “attribute value” and stores them in the user information DB 211. . When the operation content is “update”, the user information update unit 224 updates the attribute value of the record to be updated among the records stored in the user information DB 211. When the operation content is “delete”, the user information update unit 224 deletes the record specified by the key information acquired from the registration target data from the user information DB 211.

そして、ユーザ情報更新部224は、自装置に接続されるキャッシュサーバ名の一覧を取得する(ステップS404)。そして、ユーザ情報更新部224は、キャッシュサーバ名の一覧の先頭のキャッシュサーバ名を取得する(ステップS405)。そして、ユーザ情報更新部224は、IR情報DB212へ、ユーザ情報DB211へ格納した情報のキー情報部分を格納する(ステップS406)。つまり、ユーザ情報DB211は、取得したキャッシュサーバ名と、ユーザ情報DB211に対する操作対象となったレコードを特定するキー情報とを含むIR情報を生成し、IR情報DB212に格納する。例えば、ユーザ情報更新部224は、レコードを削除した場合には、削除されたレコードに含まれていたキー情報とキャッシュサーバ名とを含むIR情報を生成して格納する。   Then, the user information update unit 224 acquires a list of cache server names connected to the own device (step S404). Then, the user information update unit 224 acquires the first cache server name in the list of cache server names (step S405). Then, the user information update unit 224 stores the key information part of the information stored in the user information DB 211 in the IR information DB 212 (step S406). That is, the user information DB 211 generates IR information including the acquired cache server name and key information for specifying a record that is an operation target for the user information DB 211, and stores the IR information in the IR information DB 212. For example, when the record is deleted, the user information update unit 224 generates and stores IR information including the key information and the cache server name included in the deleted record.

そして、ユーザ情報更新部224は、キャッシュサーバ名の一覧を全て処理したかを判定し、処理していない場合には(ステップS407否定)、キャッシュサーバ名の一覧から次のキャッシュサーバ名を取得し(ステップS408)、上述したステップS406に戻り、処理を繰り返す。一方、ユーザ情報更新部224は、キャッシュサーバ名の一覧を全て処理した場合には(ステップS407肯定)、処理を終了する。   Then, the user information update unit 224 determines whether or not the entire list of cache server names has been processed, and if not processed (No at step S407), acquires the next cache server name from the list of cache server names. (Step S408), the process returns to step S406 described above, and the process is repeated. On the other hand, when all the cache server name lists have been processed (Yes at step S407), the user information update unit 224 ends the process.

[キャッシュサーバのキャッシュ判定部による処理の流れ]
図13は、実施例1におけるキャッシュサーバのキャッシュ判定部による処理の流れの一例を示すフローチャートである。
[Flow of processing by cache judgment unit of cache server]
FIG. 13 is a flowchart illustrating an example of a flow of processing performed by the cache determination unit of the cache server according to the first embodiment.

図13に示すように、キャッシュ判定部321は、クライアント100からデータ要求を受信すると(ステップS501)、受信したデータ要求からサービス特定情報要素(E1〜EN)を取得し、取得したサービス特定情報要素をキー情報として、キャッシュ311のハッシュテーブルを検索する(ステップS502)。例えば、キャッシュ判定部321は、データ要求から取得したサービス特定情報要素(E1〜EN)各々を事前に決定しておいた手法にて連結し、連結した値をxとして、ハッシュ関数h(x)の入力とする。そして、キャッシュ判定部321は、ハッシュ関数h(x)で計算されたハッシュ値を用いて、キャッシュ311のハッシュテーブルに記憶されたレコードを絞り込む。そして、キャッシュ判定部321は、絞り込んだレコードのリストにおいて、サービス特定要素(E1〜EN)と一致するキー情報(K1〜KN)を有するレコードを検索する。なお、キャッシュ判定部321は、「x」として、「E1〜EN」の連結を用いる場合を用いて説明したが、これに限定されるものではなく、任意の手法を用いて良い。例えば、キャッシュ判定部321は、「E1〜EN」に対する特定の演算により「x」を導出して用いても良く、「E1〜EN」までのN個の値をパラメータとする関数を、ハッシュ関数として用いても良い。   As illustrated in FIG. 13, when the cache determination unit 321 receives a data request from the client 100 (step S501), the cache determination unit 321 acquires service specification information elements (E1 to EN) from the received data request, and acquires the acquired service specification information element. As a key information, the hash table of the cache 311 is searched (step S502). For example, the cache determination unit 321 concatenates each of the service identification information elements (E1 to EN) acquired from the data request by a method determined in advance, and sets the concatenated value as x to a hash function h (x) Input. Then, the cache determination unit 321 narrows down the records stored in the hash table of the cache 311 using the hash value calculated by the hash function h (x). Then, the cache determination unit 321 searches the narrowed list of records for records having key information (K1 to KN) that matches the service identification elements (E1 to EN). The cache determination unit 321 has been described using the case where “E1 to EN” is connected as “x”, but the present invention is not limited to this, and any method may be used. For example, the cache determination unit 321 may derive and use “x” by a specific operation with respect to “E1 to EN”, and a function having N values from “E1 to EN” as parameters as a hash function It may be used as

ここで、キャッシュ311のハッシュテーブルにキー情報として「E1〜EN」を持つレコードが存在しない場合には(ステップS503否定)、キャッシュ判定部321は、サービス特定情報要素(E1〜EN)をキー情報として含むデータ検索要求をデータベースサーバ200に送信する(ステップS504)。そして、キャッシュ判定部321は、データベースサーバ200から、データ検索要求に対するデータ応答として、部分特定情報要素(D1〜DN)と、属性値を受信する(ステップS505)。ここで、データベースサーバ200からのデータ応答が、検索結果なしの場合には(ステップS506否定)、キャッシュ判定部321は、キー情報なしとし(ステップS509)、応答処理部323に結果を出力する(ステップS514)。   If there is no record having “E1 to EN” as key information in the hash table of the cache 311 (No in step S503), the cache determination unit 321 uses the service identification information element (E1 to EN) as the key information. A data search request including the following is transmitted to the database server 200 (step S504). And the cache determination part 321 receives a partial specific information element (D1-DN) and an attribute value from the database server 200 as a data response with respect to a data search request (step S505). Here, if the data response from the database server 200 indicates that there is no search result (No at Step S506), the cache determination unit 321 determines that there is no key information (Step S509), and outputs the result to the response processing unit 323 ( Step S514).

一方、上述したステップS506に戻り、データベースサーバ200からの検索結果が検索結果ありの場合には(ステップS506肯定)、キャッシュ判定部321は、サービス特定情報要素(E1〜EN)、データベースサーバ200からのデータ応答に含まれる部分特定情報要素(D1〜DN)、データベースサーバ200からのデータ応答に含まれる属性値、有効期限情報として、事前に決定しておく有効期限情報計算方法の結果を用いて、キャッシュ登録処理を行う(ステップS507)。なお、キャッシュ登録処理の流れについては、図14を用いて後述する。   On the other hand, returning to the above-described step S506, if the search result from the database server 200 is a search result (Yes at step S506), the cache determination unit 321 determines that the service specifying information element (E1 to EN) Using the result of the expiration date information calculation method determined in advance as the partial identification information elements (D1 to DN) included in the data response, the attribute value included in the data response from the database server 200, and the expiration date information Then, a cache registration process is performed (step S507). The flow of the cache registration process will be described later with reference to FIG.

キャッシュ登録処理が完了すると、キャッシュ判定部321は、キャッシュ登録処理の結果としてキャッシュ311に登録されたレコードを取得し、取得したレコードに含まれる属性情報IDから属性情報を取得(ステップS508)し、属性情報から属性値を取得する(ステップS513)。つまり、キャッシュ判定部321は、取得したレコードに含まれる属性情報IDを含むレコードをキャッシュ311の属性情報テーブルから取得し、取得したレコードに含まれる属性値を取得する。そして、キャッシュ判定部321は、応答処理部323へ結果を出力する(ステップS514)。つまり、キャッシュ判定部321は、取得した属性値を応答処理部323に出力する。   When the cache registration process is completed, the cache determination unit 321 acquires a record registered in the cache 311 as a result of the cache registration process, acquires attribute information from the attribute information ID included in the acquired record (step S508), An attribute value is acquired from the attribute information (step S513). That is, the cache determination unit 321 acquires a record including the attribute information ID included in the acquired record from the attribute information table of the cache 311 and acquires an attribute value included in the acquired record. Then, the cache determination unit 321 outputs the result to the response processing unit 323 (step S514). That is, the cache determination unit 321 outputs the acquired attribute value to the response processing unit 323.

また、上述したステップS503に戻り、キャッシュ311のハッシュテーブルにキー情報としてE1〜ENを持つレコードが存在する場合には(ステップS503肯定)、キャッシュ判定部321は、レコード内の属性情報IDから属性情報を取得し、属性情報から有効期限情報を取得する(ステップS510)。ここで、属性情報の有効期限が切れていない場合(ステップS511否定)、キャッシュ判定部321は、属性情報から属性値を取得(ステップS513)し、取得した属性値を用いて、応答処理部323へ属性値を出力する(ステップS514)。   Returning to step S503 described above, if there is a record having E1 to EN as key information in the hash table of the cache 311 (Yes in step S503), the cache determination unit 321 determines the attribute from the attribute information ID in the record. Information is acquired, and expiration date information is acquired from the attribute information (step S510). If the attribute information has not expired (No at step S511), the cache determination unit 321 acquires the attribute value from the attribute information (step S513), and uses the acquired attribute value to respond to the response processing unit 323. The attribute value is output to (Step S514).

また、上述したステップS511に戻り、属性情報の有効期限が切れていた場合には(ステップS511肯定)、キャッシュ判定部321は、サービス特定情報要素(E1〜EN)を、キー情報として、キャッシュ削除処理を行う(ステップS512)。なお、キャッシュ削除処理については、図15を用いて後述する。キャッシュ削除処理では、指定されたキー情報のレコードがキャッシュ311のハッシュテーブルに存在する場合、該当するレコードをハッシュテーブルから削除する。その後、キャッシュ判定部321は、キャッシュ削除処理が完了すると、ステップS504以降の処理を継続する。   Returning to step S511 described above, if the attribute information has expired (Yes in step S511), the cache determination unit 321 uses the service identification information elements (E1 to EN) as key information to delete the cache. Processing is performed (step S512). The cache deletion process will be described later with reference to FIG. In the cache deletion process, if a record with the specified key information exists in the hash table of the cache 311, the corresponding record is deleted from the hash table. Thereafter, when the cache deletion process is completed, the cache determination unit 321 continues the process from step S504.

[キャッシュ登録処理の流れ]
図14は、実施例1におけるキャッシュ登録処理の流れの一例を示すフローチャートである。
[Flow of cache registration processing]
FIG. 14 is a flowchart illustrating an example of a flow of cache registration processing according to the first embodiment.

図14に示すように、キャッシュ判定部321は、サービス特定情報要素(E1〜EN)、部分特定情報要素(D1〜DN)、属性値、有効期限情報を取得する(ステップS601)。そして、キャッシュ判定部321は、部分特定情報要素(D1〜DN)をキー情報としてハッシュ値を算出し、キャッシュ311のハッシュテーブルを検索する(ステップS602)。   As illustrated in FIG. 14, the cache determination unit 321 acquires service identification information elements (E1 to EN), partial identification information elements (D1 to DN), attribute values, and expiration date information (step S601). Then, the cache determination unit 321 calculates a hash value using the partial identification information elements (D1 to DN) as key information, and searches the hash table of the cache 311 (step S602).

ここで、キャッシュ311のハッシュテーブルにレコードが存在しない場合には(ステップS603否定)、キャッシュ判定部321は、属性値、有効期限情報を用いて新たな属性情報を作成する(ステップS604)。例えば、キャッシュ判定部321は、取得した属性値と有効期限情報に加えて、新たに付与した属性情報IDを含むレコードをキャッシュ311の属性情報テーブルに格納する。そして、作成した属性情報の属性情報IDを取得(ステップS605)し、キャッシュ311のレコードテーブルに、新たなレコードIDを付与した上で、キー情報(D1〜DN)と作成した属性情報IDとを対応付けてレコードを追加するとともに、新たに付与したレコードIDをハッシュテーブルに追加する(ステップS606)。   If there is no record in the hash table of the cache 311 (No at Step S603), the cache determination unit 321 creates new attribute information using the attribute value and the expiration date information (Step S604). For example, the cache determination unit 321 stores a record including the newly assigned attribute information ID in the attribute information table of the cache 311 in addition to the acquired attribute value and expiration date information. Then, the attribute information ID of the created attribute information is acquired (step S605), a new record ID is assigned to the record table of the cache 311, and the key information (D1 to DN) and the created attribute information ID are obtained. In addition to adding records in association with each other, the newly assigned record ID is added to the hash table (step S606).

具体的には、キャッシュ判定部321は、部分特定情報要素(D1〜DN)を、事前に決定しておいた方法を用いて連結し、連結した値をxとして、ハッシュ関数h(x)の入力とする。そして、キャッシュ判定部321は、ハッシュ関数h(x)で計算されたハッシュ値を用いて、ハッシュテーブルのレコードを絞り込み、絞り込んだレコードのリストに、レコードのキー情報としてD1〜DN、属性情報IDを設定したレコードを追加する。また、キャッシュ判定部321は、新たなレコードIDをハッシュテーブルに追加する。   Specifically, the cache determination unit 321 concatenates the partial identification information elements (D1 to DN) using a method determined in advance, and sets the concatenated value as x to the hash function h (x). As input. Then, the cache determination unit 321 narrows down the records of the hash table using the hash value calculated by the hash function h (x), and D1 to DN and attribute information ID as the key information of the records in the narrowed list of records. Add a record with. In addition, the cache determination unit 321 adds a new record ID to the hash table.

そして、キャッシュ判定部321は、キャッシュ311のレコードテーブルに追加したレコードのレコードIDを取得し(ステップS607)、属性情報の参照元レコード一覧に、レコードIDを追加する(ステップS608)。つまり、キャッシュ判定部321は、上述したステップS604にて属性情報テーブルに格納したレコードの参照元レコード一覧に対して、上述したステップS606にてレコードテーブルに格納したレコードのレコードIDを追加する。   Then, the cache determination unit 321 acquires the record ID of the record added to the record table of the cache 311 (step S607), and adds the record ID to the attribute information reference source record list (step S608). That is, the cache determination unit 321 adds the record ID of the record stored in the record table in step S606 described above to the reference source record list of the record stored in the attribute information table in step S604 described above.

そして、キャッシュ判定部321は、ステップS601にて取得しているサービス特定情報要素(E1〜EN)と、部分特定情報要素(D1〜DN)の各要素をそれぞれ比較し、各要素が全て等しい場合には(ステップS613肯定)、ハッシュテーブルに新たに追加したレコードを返却(ステップS617)し、処理を終了する。   Then, the cache determination unit 321 compares the service specific information elements (E1 to EN) acquired in step S601 and the partial specific information elements (D1 to DN), respectively, and the elements are all equal. (Yes in step S613), the newly added record is returned to the hash table (step S617), and the process is terminated.

また、ステップS613に戻り、サービス特定情報要素(E1〜EN)と、部分特定情報要素(D1〜DN)の各要素が異なった場合には(ステップS613否定)、キャッシュ判定部321は、レコードテーブルに、新たにレコードIDを付与した上で、キー情報としてサービス特定情報要素(E1〜EN)と、属性情報IDとを対応付けてレコードを追加し、新たに付与したレコードIDをハッシュテーブルに追加する(ステップS614)。   Returning to step S613, if the service identification information elements (E1 to EN) and the partial identification information elements (D1 to DN) are different (No in step S613), the cache determination unit 321 In addition, a record ID is newly assigned, a service identification information element (E1 to EN) as key information is associated with the attribute information ID, and a record is added, and the newly assigned record ID is added to the hash table. (Step S614).

そして、キャッシュ判定部321は、キャッシュ311のレコードテーブルに追加したレコードのレコードIDを取得し(ステップS615)、属性情報の参照元レコード一覧に、レコードIDを追加する(ステップS616)。その後、ハッシュテーブルに新たに追加したレコードを返却(ステップS617)し、処理を終了する。   Then, the cache determination unit 321 acquires the record ID of the record added to the record table of the cache 311 (Step S615), and adds the record ID to the reference record list of attribute information (Step S616). Thereafter, the newly added record is returned to the hash table (step S617), and the process ends.

また、ステップS603に戻り、レコードテーブルにレコードが存在する場合には(ステップS603肯定)、キャッシュ判定部321は、該当するレコード内の属性情報IDから、属性情報を取得し、属性情報に含まれる有効期限情報を取得する(ステップS609)。そして、キャッシュ判定部321は、属性情報の有効期限情報が、有効期限切れでない場合には(ステップS610否定)、該当するレコードの属性情報IDから、属性情報を取得し(ステップS611)、ステップS613以降の処理を継続する。   Returning to step S603, if a record exists in the record table (Yes in step S603), the cache determination unit 321 acquires attribute information from the attribute information ID in the corresponding record, and is included in the attribute information. The expiration date information is acquired (step S609). Then, when the expiration date information of the attribute information is not expired (No at Step S610), the cache determination unit 321 acquires the attribute information from the attribute information ID of the corresponding record (Step S611), and after Step S613 Continue processing.

一方、ステップS610に戻り、属性情報の有効期限情報が有効期限切れであった場合には(ステップS610肯定)、部分特定情報要素(D1〜DN)をキー情報として、キャッシュ削除処理を行う。キャッシュ削除処理では、キャッシュ判定部321は、指定されたキー情報のレコードがハッシュテーブルに存在する場合、そのレコードをハッシュテーブルから削除する。その後、キャッシュ判定部321は、キャッシュ削除処理が完了すると、ステップS604以降の処理を継続する。   On the other hand, returning to step S610, if the expiration date information of the attribute information is expired (Yes at step S610), a cache deletion process is performed using the partial identification information elements (D1 to DN) as key information. In the cache deletion process, the cache determination unit 321 deletes the record of the specified key information from the hash table when the record of the specified key information exists in the hash table. Thereafter, when the cache deletion processing is completed, the cache determination unit 321 continues the processing from step S604.

[キャッシュ削除処理の流れ]
図15には、実施例1におけるキャッシュ削除処理の流れの一例を示すフローチャートである。以下では、サービス特定情報要素(K1〜KN)をキー情報として、キャッシュ削除処理を行う場合を例に説明する。以下では、キャッシュ判定部321を例に説明するが、これに限定されるものではなく、IR情報判定部322が実行しても良い。
[Flow of cache deletion processing]
FIG. 15 is a flowchart illustrating an example of the flow of cache deletion processing according to the first embodiment. Hereinafter, a case where the cache deletion process is performed using the service identification information elements (K1 to KN) as key information will be described as an example. Hereinafter, the cache determination unit 321 will be described as an example. However, the present invention is not limited to this, and the IR information determination unit 322 may execute the cache determination unit 321.

図15に示すように、キャッシュ判定部321は、削除対象を示すキー情報であるサービス特定情報要素(K1〜KN)を取得する(ステップS701)。そして、キャッシュ判定部321は、サービス特定情報要素(K1〜KN)をキー情報としてハッシュ値を算出し、キャッシュ311のハッシュテーブルを検索する(ステップS702)。そして、キャッシュ判定部321は、ハッシュテーブルにレコードが存在しない場合には(ステップS703否定)、削除対象のレコードは存在しないため、処理を終了する。   As illustrated in FIG. 15, the cache determination unit 321 acquires service specifying information elements (K1 to KN) that are key information indicating deletion targets (step S701). Then, the cache determination unit 321 calculates a hash value using the service identification information elements (K1 to KN) as key information, and searches the hash table of the cache 311 (step S702). Then, if there is no record in the hash table (No in step S703), the cache determination unit 321 ends the process because there is no record to be deleted.

一方、ハッシュテーブルにレコードが存在する場合には(ステップS703肯定)、キャッシュ判定部321は、有効期限切れに基づく削除として呼び出されたものかを判定する(ステップS704)。ここで、有効期限切れによる削除ではない場合には(ステップS704否定)、キャッシュ判定部321は、キー情報K1〜KN対応するレコードの中に、ANY要素があるかを判定する(ステップS705)。ここで、キー情報K1〜KNにANY要素がない場合には(ステップS705否定)、キャッシュ判定部321は、キー情報K1〜KNに対応するレコードから属性情報IDを取得し(ステップS706)、属性情報IDで示される属性情報から、参照元レコード一覧を取得する(ステップS707)。つまり、キャッシュ判定部321は、属性情報IDを含むレコードを属性情報テーブルから取得し、取得したレコードに含まれる参照元レコード一覧を取得する。   On the other hand, if there is a record in the hash table (Yes at step S703), the cache determination unit 321 determines whether it has been called as deletion based on the expiration date (step S704). If the deletion is not due to expiration (No in step S704), the cache determination unit 321 determines whether there is an ANY element in the records corresponding to the key information K1 to KN (step S705). If there is no ANY element in the key information K1 to KN (No at Step S705), the cache determination unit 321 acquires the attribute information ID from the record corresponding to the key information K1 to KN (Step S706). A reference source record list is acquired from the attribute information indicated by the information ID (step S707). That is, the cache determination unit 321 acquires a record including the attribute information ID from the attribute information table, and acquires a reference source record list included in the acquired record.

そして、キャッシュ判定部321は、参照元レコード一覧からレコードを削除する(ステップS708)。つまり、キャッシュ判定部321は、参照元レコード一覧に存在するレコードIDから、キー情報K1〜KNに対応するレコードIDを削除する。ここで、ステップS708の結果、参照元レコード一覧が空のリストとなった場合には(ステップS709肯定)、キャッシュ判定部321は、参照元レコード一覧が空となった属性情報を削除する(ステップS710)。つまり、キャッシュ判定部321は、参照元レコード一覧が空となったレコードを属性情報テーブルから削除する。そして、キャッシュ判定部321は、キー情報K1〜KNを用いて、レコードテーブルからレコードを削除するとともに、ハッシュテーブルからレコードIDを削除する(ステップS711)。一方、ステップS709に戻り、参照元レコード一覧が空のリストとならなかった場合(ステップS709否定)、ステップS711からの処理を継続する。   Then, the cache determination unit 321 deletes the record from the reference source record list (step S708). That is, the cache determination unit 321 deletes the record IDs corresponding to the key information K1 to KN from the record IDs existing in the reference source record list. If the reference source record list becomes an empty list as a result of step S708 (Yes at step S709), the cache determination unit 321 deletes attribute information whose reference source record list is empty (step S709). S710). That is, the cache determination unit 321 deletes a record whose reference source record list is empty from the attribute information table. Then, the cache determination unit 321 uses the key information K1 to KN to delete the record from the record table and delete the record ID from the hash table (step S711). On the other hand, returning to step S709, if the reference source record list is not an empty list (No in step S709), the processing from step S711 is continued.

次に、ステップS704に戻り、有効期限切れによる削除の場合(ステップS704肯定)、又は、ステップS705に戻り、キー情報の中にANY要素がある場合(ステップS705肯定)について説明する。なお、有効期限切れによる削除の場合とは、例えば、図13のステップS511において、有効期限切れであるとしてキャッシュ削除処理が実行される場合が該当する。   Next, returning to step S704, the case of deletion due to expiration (Yes in step S704) or the case of returning to step S705 and having an ANY element in the key information (Yes in step S705) will be described. Note that the deletion due to the expiration date corresponds to, for example, the case where the cache deletion process is executed in step S511 in FIG.

この場合、キャッシュ判定部321は、該当のレコードから属性情報IDを取得(ステップS712)し、属性情報IDで示される属性情報から参照元レコード一覧を取得する(ステップS713)。そして、キャッシュ判定部321は、参照元レコード一覧の最初のレコードIDを取得する(ステップS714)。その後、キャッシュ判定部321は、取得したレコードIDで示されるレコードをキャッシュ311のレコードテーブルから取得し、取得したレコードのキー情報がキー情報K1〜KNと合致する場合に取得したレコードをレコードテーブルから削除するとともに、ハッシュテーブルからレコードIDを削除する(ステップS715)。   In this case, the cache determination unit 321 acquires the attribute information ID from the corresponding record (step S712), and acquires the reference source record list from the attribute information indicated by the attribute information ID (step S713). Then, the cache determination unit 321 acquires the first record ID of the reference source record list (step S714). Thereafter, the cache determination unit 321 acquires the record indicated by the acquired record ID from the record table of the cache 311, and acquires the acquired record from the record table when the key information of the acquired record matches the key information K1 to KN. In addition to deleting, the record ID is deleted from the hash table (step S715).

そして、キャッシュ判定部321は、参照元レコード一覧の全てのレコードIDをハッシュテーブルから削除していない場合には(ステップS716否定)、参照元レコード一覧の次のレコードIDを取得し(ステップS717)、ステップS715の処理を継続する。   If all the record IDs in the reference source record list have not been deleted from the hash table (No in step S716), the cache determination unit 321 acquires the next record ID in the reference source record list (step S717). The process of step S715 is continued.

また、ステップS716に戻り、参照元レコードの全てのレコードIDで示されるレコードをハッシュテーブルから削除した場合には(ステップS716肯定)、キャッシュ判定部321は、属性情報を削除し(ステップS718)、処理を終了する。つまり、キャッシュ判定部321は、ステップS712にて取得した属性情報IDを含むレコードを属性情報テーブルから削除する。   Returning to step S716, when the records indicated by all record IDs of the reference source records are deleted from the hash table (Yes in step S716), the cache determination unit 321 deletes the attribute information (step S718), End the process. That is, the cache determination unit 321 deletes the record including the attribute information ID acquired in step S712 from the attribute information table.

[キャッシュサーバのIR情報判定部による処理の流れ]
図16は、実施例1におけるキャッシュサーバのIR情報判定部による処理の流れの一例を示すフローチャートである。
[Flow of processing by IR information determination unit of cache server]
FIG. 16 is a flowchart illustrating an example of a processing flow by the IR information determination unit of the cache server according to the first embodiment.

図16に示すように、IR情報判定部322は、定期的にデータベースサーバ200へIR情報要求を送信し(ステップS801)、データベースサーバ200からIR情報の一覧を受信する(ステップS802)。   As shown in FIG. 16, the IR information determination unit 322 periodically transmits an IR information request to the database server 200 (step S801), and receives a list of IR information from the database server 200 (step S802).

そして、IR情報判定部322は、受信したIR情報一覧が存在する場合(ステップS803肯定)、つまり、データベースサーバ200からIR情報を受信したIR情報応答にIR情報が含まれている場合には、IR情報の一覧の先頭のIR情報を取得し(ステップS804)、IR情報から、キー情報K1〜KNを取得する(ステップS805)。そして、IR情報判定部322は、キー情報K1〜KNを用いて、図15で示されるキャッシュ削除処理を行い(ステップS806)、キャッシュ削除処理終了後、データベースサーバ200に該当のIR情報について、IR情報削除要求を送信する(ステップS807)。つまり、IR情報判定部322は、キャッシュサーバ300においてキー情報K1〜KNを含むレコードについて削除されたことを踏まえ、キャッシュサーバ300に適用済みとなったIR情報を削除する旨の指示をデータベースサーバ200に送信する。   Then, the IR information determination unit 322, when the received IR information list exists (Yes at Step S803), that is, when the IR information is received in the IR information response that received the IR information from the database server 200, IR information at the head of the IR information list is acquired (step S804), and key information K1 to KN are acquired from the IR information (step S805). Then, the IR information determination unit 322 performs the cache deletion process shown in FIG. 15 using the key information K1 to KN (step S806), and after the cache deletion process is finished, An information deletion request is transmitted (step S807). That is, the IR information determination unit 322 gives an instruction to delete the IR information that has been applied to the cache server 300 based on the fact that the cache server 300 has deleted the records including the key information K1 to KN. Send to.

その後、全てのIR情報を処理していない場合には(ステップS808否定)、IR情報判定部322は、IR情報の一覧から次のIR情報を取得し(ステップS809)、ステップS805からの処理を繰り返す。   After that, when all the IR information has not been processed (No at Step S808), the IR information determination unit 322 acquires the next IR information from the list of IR information (Step S809), and performs the processing from Step S805. repeat.

一方、ステップS803に戻り、IR情報の一覧が存在しない場合には(ステップS803否定)、又は、ステップS808に戻り、全てのIR情報を処理した場合には(ステップS808肯定)、IR情報判定部322は、処理を終了する。   On the other hand, if the list of IR information does not exist (No at Step S803) or if all IR information has been processed by returning to Step S808 (Yes at Step S808), the IR information determination unit returns to Step S803. In step 322, the process ends.

[キャッシュサーバの応答部による処理の流れ]
図17は、実施例1におけるキャッシュサーバの応答部による処理の流れの一例を示すフローチャートである。
[Flow of processing by the response unit of the cache server]
FIG. 17 is a flowchart illustrating an example of a flow of processing by the response unit of the cache server according to the first embodiment.

図17に示すように、応答処理部323は、キャッシュ判定部321から指定された属性情報をクライアントへの応答として組み立てる(ステップS901)。つまり、応答処理部323は、キャッシュ判定部321から受信した属性値と、クライアント100から受信したデータ要求に含まれるキー情報とを含むデータ応答を生成したり、キー情報がないことを示すデータ応答を生成したりする。なお、上述した説明では、応答処理部323が、クライアント100から受信したデータ要求に含まれるキー情報を含むデータ応答を送信する場合を例に示したが、これに限定されるものではなく、キー情報を含めなくても良い。   As shown in FIG. 17, the response processing unit 323 assembles the attribute information designated by the cache determination unit 321 as a response to the client (step S901). That is, the response processing unit 323 generates a data response including the attribute value received from the cache determination unit 321 and the key information included in the data request received from the client 100, or a data response indicating that there is no key information. Or generate. In the above description, the case where the response processing unit 323 transmits the data response including the key information included in the data request received from the client 100 is described as an example, but the present invention is not limited to this. It is not necessary to include information.

そして、応答処理部323は、生成したデータ応答をクライアント100に送信し(ステップS902)、処理を終了する。   Then, the response processing unit 323 transmits the generated data response to the client 100 (step S902), and ends the process.

[実施例1による効果]
少なくとも1種類の特定情報により特定されるデータごとに、データを特定するための特定情報と、複数ある特定情報の種類のうちデータを特定する際に用いられない種類である非特定種類を示す非特定種類情報との組み合わせと対応付けて記憶する。また、キャッシュサーバ300は、データベースサーバ200に記憶されたデータの少なくとも一部について、特定情報と非特定種類情報との組み合わせと、複数種類の特定情報の組み合わせとのうち少なくとも一つと対応付けて記憶するキャッシュ311を有する。ここで、キャッシュサーバ300は、データ要求を受信すると、データ要求に含まれる複数種類の特定情報各々の組み合わせがキャッシュに記憶されているかを判定し、記憶されていないと判定した場合に、データ要求に含まれる組み合わせをデータベースサーバ200に送信する。また、データベースサーバ200は、キャッシュサーバ300により送信された組み合わせである組み合わせを受信すると、受信した組み合わせである受信組み合わせに相当する特定情報と非特定種類情報との組み合わせと、特定情報と非特定種類情報との組み合わせに対応付けられたデータとを記憶部から取得し、キャッシュサーバ300に応答する。また、キャッシュサーバ300は、データベースサーバ200により送信された特定情報と非特定種類情報との組み合わせがキャッシュ311に記憶されている場合には、記憶されていた特定情報と非特定種類情報との組み合わせに対応付けられるデータと対応付けて、受信組み合わせをキャッシュ311に格納する。また、データベースサーバ200は、キャッシュ311に記憶されていない場合には、データベースサーバ200により送信されたデータと対応付けて、データベースサーバ200により送信された特定情報と非特定種類情報との組み合わせと、受信組み合わせとをキャッシュ311に格納する。また、キャッシュサーバ300は、キャッシュ311に記憶されていると判定された場合には、キャッシュ311からデータを取得してデータ要求の送信元に送信し、記憶されていないと判定した場合には、データベースサーバ200により送信されたデータをデータ要求の送信元に送信する。この結果、適切に検索可能となる。
[Effects of Example 1]
For each piece of data specified by at least one type of specific information, specific information for specifying data and a non-specific type that is a type not used when specifying data among a plurality of types of specific information The information is stored in association with the combination with the specific type information. Further, the cache server 300 stores at least a part of the data stored in the database server 200 in association with at least one of a combination of specific information and non-specific type information and a combination of plural types of specific information. A cache 311 is provided. Here, when the cache server 300 receives the data request, the cache server 300 determines whether a combination of each of a plurality of types of specific information included in the data request is stored in the cache. Are transmitted to the database server 200. When the database server 200 receives the combination that is the combination transmitted by the cache server 300, the database server 200 receives the combination of the specific information corresponding to the received combination that is the received combination and the non-specific type information, the specific information, and the non-specific type. Data associated with the combination with the information is acquired from the storage unit and responds to the cache server 300. Further, when the combination of the specific information and the non-specific type information transmitted from the database server 200 is stored in the cache 311, the cache server 300 stores the combination of the stored specific information and the non-specific type information. The received combination is stored in the cache 311 in association with the data associated with. If the database server 200 is not stored in the cache 311, the database server 200 is associated with the data transmitted by the database server 200 and a combination of specific information and non-specific type information transmitted by the database server 200. The received combination is stored in the cache 311. When the cache server 300 determines that the data is stored in the cache 311, the cache server 300 acquires the data from the cache 311 and transmits the data to the transmission source of the data request. The data transmitted by the database server 200 is transmitted to the data request transmission source. As a result, it becomes possible to search appropriately.

具体的には、ANY要素を有するデータ構造のデータベースサーバとキャッシュサーバとを組み合わせ可能となる。また、データベースサーバからデータを抽出する上で必要となる特定情報の集合が受信時点において不明である場合が想定される状況下においても、キャッシュの容量を節約することが可能であり、一度の検索で抽出できることで検索性能の低下を防止可能となる。   Specifically, a database server having a data structure having an ANY element and a cache server can be combined. In addition, it is possible to save the cache capacity even under the situation where the set of specific information necessary for extracting data from the database server is unknown at the time of reception, it is possible to save the cache once. It is possible to prevent a decrease in search performance by being extracted with.

すなわち、例えば、キャッシュ311では、データが複数のキー情報と共有される結果、キャッシュ311の容量を節約することが可能となる。また、キャッシュサーバ300は、一度の検索において、キャッシュにデータが記憶されているか否かを判定可能となり、検索性能の低下を防止可能となる。   That is, for example, in the cache 311, as a result of data being shared with a plurality of key information, the capacity of the cache 311 can be saved. In addition, the cache server 300 can determine whether or not data is stored in the cache in one search, and can prevent a decrease in search performance.

また、データベースサーバ200では、{E1,ANY,…ANY}という1レコードで複数のキー情報を表現可能となり、データベースサーバ200の記憶装置の消費を防止可能となる。また、キャッシュサーバ300では、複数の属性値が複数のキー情報と対応付けられる結果、メモリ等の記憶装置に冗長に持つことを防止可能となる。このように、実施例1によれば、属性値が複数のキー情報にて共有される結果、キャッシュ311の容量を節約可能となる。   Further, in the database server 200, a plurality of key information can be expressed by one record {E1, ANY,... ANY}, and consumption of the storage device of the database server 200 can be prevented. Further, in the cache server 300, as a result of associating a plurality of attribute values with a plurality of key information, it is possible to prevent redundant storage devices such as a memory. As described above, according to the first embodiment, the attribute value is shared by a plurality of pieces of key information, so that the capacity of the cache 311 can be saved.

また、上述したように、データ要求に含まれる複数種類の特定情報各々の組み合わせがキャッシュ311に記憶されているかの判定を、ハッシュ値を用いて実行することで、キャッシュ311に記憶されているかを迅速に判定可能となる。   Further, as described above, whether or not a combination of each of a plurality of types of specific information included in the data request is stored in the cache 311 is determined using the hash value to determine whether the combination is stored in the cache 311. Judgment can be made quickly.

また、データベースサーバ200は、データごとに、データを特定する際に用いられる特定情報種類に属する特定情報と、非特定種類情報との組み合わせを対応付けて記憶する。また、データベースサーバ200は、キャッシュサーバ300により送信された受信組み合わせを受信すると、組み合わせに相当する特定情報と非特定種類情報との組み合わせ各々のうち一つを選択し、選択した特定情報と非特定種類情報との組み合わせと、選択した組み合わせに対応付けて記憶されたデータとを送信する。この結果、データベースサーバ200が、ANY要素を含むレコードを記憶することで、記憶部にて使用される容量を節約することが可能となる。   Further, the database server 200 stores, for each data, a combination of the specific information belonging to the specific information type used when specifying the data and the non-specific type information in association with each other. In addition, when the database server 200 receives the reception combination transmitted by the cache server 300, the database server 200 selects one of the combinations of specific information and non-specific type information corresponding to the combination, and selects the specific information and non-specific information. A combination with the type information and data stored in association with the selected combination are transmitted. As a result, the database server 200 stores the record including the ANY element, so that the capacity used in the storage unit can be saved.

実施例1に加えて、キャッシュサーバ300が、非特定種類情報を含む組み合わせと属性値とを受信した場合に、受信した属性値を、非特定種類情報に適用される可能性がある特定情報各々に特定種類情報を置き換えた組み合わせ各々と共有する場合について説明する。   In addition to the first embodiment, when the cache server 300 receives a combination including non-specific type information and an attribute value, each specific information that may be applied to the non-specific type information using the received attribute value A case where the information is shared with each combination in which specific type information is replaced will be described.

すなわち、例えば、ANY要素を含む組み合わせをキャッシュサーバ300が受信すると、受信した組み合わせに含まれるANY要素を、ANY要素に適用される可能性がある特定情報各々に置き換えた組み合わせ各々を生成し、生成した組み合わせ各々についても、受信したデータと対応付けてキャッシュ311に格納しても良い。以下では、実施例1と異なる点について説明し、その他の点については適宜説明を省略する。   That is, for example, when the cache server 300 receives a combination including an ANY element, each combination is generated by replacing the ANY element included in the received combination with each specific information that may be applied to the ANY element. Each of the combinations may be stored in the cache 311 in association with the received data. Below, a different point from Example 1 is demonstrated and description is abbreviate | omitted suitably about another point.

[実施例2におけるキャッシュサーバの構成]
実施例2におけるキャッシュサーバでは、キャッシュ判定部321b以外については、実施例1と同様であり、説明を省略する。
[Configuration of Cache Server in Embodiment 2]
The cache server according to the second embodiment is the same as the first embodiment except for the cache determination unit 321b, and a description thereof is omitted.

実施例2において、キャッシュ判定部321bは、クライアント100から受信したデータ要求から、サービス特定情報要素(E1、E2、E3)を取得し、これを、キー情報として、キャッシュ311に記憶される属性情報を検索する。キャッシュ判定部321bはキャッシュ311検索の結果に応じた処理を行い、応答を行う。   In the second embodiment, the cache determination unit 321b obtains service identification information elements (E1, E2, E3) from the data request received from the client 100, and uses this as key information for attribute information stored in the cache 311. Search for. The cache determination unit 321b performs a process according to the result of the cache 311 search and makes a response.

キャッシュ311にキー情報が記憶されておらず、データベースサーバ200から属性情報を取得できた場合における処理について説明する。すなわち、クライアント100からのデータ要求から取得したキー情報がキャッシュ311に記憶されていない場合について説明する。   A process when key information is not stored in the cache 311 and attribute information can be acquired from the database server 200 will be described. That is, a case where key information acquired from a data request from the client 100 is not stored in the cache 311 will be described.

この場合、キャッシュ判定部321bは、データ要求から取得したキー情報を含むデータ検索要求をデータベースサーバ200に送信する。例えば、キャッシュ判定部321は、サービス特定情報要素(E1、E2、E3)を含むデータ検索要求をデータベースサーバ200に送信する。その後、キャッシュ判定部321は、データベースサーバ200から、データ検索結果として、部分特定情報要素(D1、D2、D3)と属性値とを含むデータ応答を受信する。   In this case, the cache determination unit 321b transmits a data search request including key information acquired from the data request to the database server 200. For example, the cache determination unit 321 transmits a data search request including service identification information elements (E1, E2, E3) to the database server 200. Thereafter, the cache determination unit 321 receives a data response including the partial identification information elements (D1, D2, D3) and the attribute value as a data search result from the database server 200.

ここで、キャッシュ判定部321bは、部分特定情報要素(D1、D2、D3)が、自装置のキャッシュ311に既に存在する場合には、事前にキャッシュ311上に展開されるべき、サービス特定情報要素(E1、E2、E3)と、部分特定情報要素(D1、D2、D3)の対応が取れていないと判断し、部分特定情報要素(D1、D2、D3)を用いてキャッシュ311を削除した上で、部分特定情報要素(D1、D2、D3)がキャッシュ311に既に存在しない場合における処理を実行する。なお、部分特定情報要素(D1、D2、D3)がキャッシュ311に既に存在しない場合における処理については後述する。   Here, the cache determination unit 321b determines that the service specification information element to be developed in advance in the cache 311 when the partial specification information elements (D1, D2, D3) already exist in the cache 311 of the own device. (E1, E2, E3) and the partial identification information elements (D1, D2, D3) are determined not to correspond to each other, and the cache 311 is deleted using the partial identification information elements (D1, D2, D3). Thus, the process in the case where the partial identification information elements (D1, D2, D3) do not already exist in the cache 311 is executed. The processing when the partial identification information elements (D1, D2, D3) are not already present in the cache 311 will be described later.

なお、実施例2の場合には、ANY要素が得られた場合には、ANY要素に適用される可能性のある特定情報の組み合わせ各々を生成し、受信した属性値と対応付けてキャッシュ311に予め登録しておくことになる。この結果、データベースサーバ200に問い合わせる際には、キャッシュ311に対応するレコードが何も記憶されていない場合となり、データベースサーバ200に問い合わせが行われない際には、キャッシュ311に対応するレコードがすべて記憶されている場合となる。このことを踏まえ、キャッシュ判定部321bは、問い合わせたにもかかわらず、データベースサーバ200から受信した部分特定情報要素(D1、D2、D3)が、自装置のキャッシュ311に既に存在する場合には、おかしいと判断し、キャッシュ311から削除した上で一連の処理を実行する。   In the second embodiment, when an ANY element is obtained, each combination of specific information that may be applied to the ANY element is generated and associated with the received attribute value in the cache 311. It will be registered in advance. As a result, when inquiring to the database server 200, no record corresponding to the cache 311 is stored, and when no inquiry is made to the database server 200, all records corresponding to the cache 311 are stored. It will be the case. Based on this, when the cache determination unit 321b has inquired and the partial identification information elements (D1, D2, D3) received from the database server 200 already exist in the cache 311 of the own device, A series of processing is executed after it is determined to be strange and deleted from the cache 311.

図7を用いて具体的に説明する。データ要求から取得したキー情報(K1、K2、K3)が「ServiceName−001、UserType−001、AccountType−002」である場合を用いて説明する。キャッシュ判定部321bは、キー情報からハッシュ値を算出する。以下では、キャッシュ判定部321bにより算出されたハッシュ値が「2」である場合を用いて説明する。ここで、キャッシュ判定部321bは、キャッシュ311のハッシュテーブルには、ハッシュ値「2」に対応付けられたレコードIDが存在しないため、キー情報(K1、K2、K3)を含むデータ検索要求をデータベースサーバ200に送信する。例えば、キャッシュ判定部321bは、データベースサーバ200から、部分特定情報要素(D1、D2、D3)として、「ServiceName−001、ANY、ANY」とを含み、属性値「データ1」とを含むデータ応答を受信する。その後、キャッシュ判定部321は、部分特定要素(D1、D2、D3)をキー情報として、自装置のキャッシュ311のハッシュテーブルを検索する。ここで、キャッシュ判定部321は、レコードID「0」が得られた場合には、キャッシュ311のレコードテーブルからレコードID「0」に対応付けられる属性情報ID「0」を取得する。そして、キャッシュ判定部321bは、属性情報ID「0」を含むレコードを属性情報テーブルから取得し、取得したレコードの参照元レコード一覧に含まれるレコードID「0」「1」を取得し、レコードID「0」「1」を含むレコードをキャッシュ311のレコードテーブルから削除する。また、キャッシュ判定部321bは、属性情報ID「0」を含むレコードを属性情報テーブルから削除する。   This will be specifically described with reference to FIG. Description will be made using a case where the key information (K1, K2, K3) acquired from the data request is “ServiceName-001, UserType-001, AccountType-002”. The cache determination unit 321b calculates a hash value from the key information. Hereinafter, the case where the hash value calculated by the cache determination unit 321b is “2” will be described. Here, since the cache ID of the cache 311 does not have a record ID associated with the hash value “2”, the cache determination unit 321b sends a data search request including key information (K1, K2, K3) to the database. Transmit to server 200. For example, the cache determination unit 321b includes “ServiceName-001, ANY, ANY” as the partial identification information elements (D1, D2, D3) from the database server 200, and a data response including the attribute value “data 1”. Receive. Thereafter, the cache determination unit 321 searches the hash table of the cache 311 of the own device using the partial identification elements (D1, D2, D3) as key information. Here, when the record ID “0” is obtained, the cache determination unit 321 acquires the attribute information ID “0” associated with the record ID “0” from the record table of the cache 311. Then, the cache determination unit 321b acquires the record including the attribute information ID “0” from the attribute information table, acquires the record ID “0” “1” included in the reference source record list of the acquired record, and records ID A record including “0” and “1” is deleted from the record table of the cache 311. In addition, the cache determination unit 321b deletes the record including the attribute information ID “0” from the attribute information table.

キャッシュ311にキー情報が記憶されておらず、データベースサーバ200から受信したデータ応答に含まれる部分特定情報要素(D1、D2、D3)がキャッシュ311に存在しない場合における処理について説明する。以下では、データベースサーバ200からデータ応答を受信した後の処理について説明する。   A process when key information is not stored in the cache 311 and the partial identification information elements (D1, D2, D3) included in the data response received from the database server 200 are not present in the cache 311 will be described. Hereinafter, processing after receiving a data response from the database server 200 will be described.

キャッシュ判定部321bは、データベースサーバ200から受信した部分特定情報要素(D1、D2、D3)と、データベースサーバから取得した属性値とについて、キャッシュ登録処理を実行する。   The cache determination unit 321b performs a cache registration process on the partial identification information elements (D1, D2, D3) received from the database server 200 and the attribute values acquired from the database server.

また、キャッシュ判定部321bは、データベースサーバ200から受信した部分特定情報要素のうち、ANY要素となっているカラムを取得する。そして、キャッシュ判定部321bは、ANY要素が存在する各々のカラムの位置から、事前に決定されているANY要素に入る可能性があるサービス特定情報要素の値の一覧を取得する。そして、キャッシュ判定部321bは、カラム各々のサービス特定情報要素の値の一覧を組み合わせ、ANY要素を展開したサービス特定情報要素の一覧を算出する。その後、キャッシュ判定部321bは、既にキャッシュ311に格納した属性情報を、算出したサービス特定情報要素の一覧のそれぞれのサービス特定情報要素(E1、E2、E3)の組み合わせに対応させたレコードを登録する。すなわち、キャッシュ判定部321bは、算出したサービス特定情報要素の一覧各々と、データベースサーバ200から取得した属性値とについて、キャッシュ登録処理を実行する。また、この際、キャッシュ判定部321bは、キャッシュ311の属性情報テーブルの参照元レコード一覧に、算出したサービス特定情報要素の一覧各々に対応するレコードIDを追加する。その後、キャッシュ判定部321bは、データベースサーバ200から受信した属性値を応答処理部323に出力する。   In addition, the cache determination unit 321 b acquires a column that is an ANY element among the partial identification information elements received from the database server 200. Then, the cache determination unit 321b acquires a list of service identification information element values that may enter the ANY element determined in advance from the position of each column where the ANY element exists. Then, the cache determination unit 321b calculates a list of service specific information elements obtained by developing the ANY element by combining the list of service specific information elements in each column. Thereafter, the cache determination unit 321b registers a record in which the attribute information already stored in the cache 311 is associated with a combination of each service specification information element (E1, E2, E3) in the list of calculated service specification information elements. . That is, the cache determination unit 321b executes a cache registration process for each of the calculated list of service specifying information elements and the attribute value acquired from the database server 200. At this time, the cache determination unit 321b adds record IDs corresponding to the calculated list of service specific information elements to the reference source record list of the attribute information table of the cache 311. Thereafter, the cache determination unit 321 b outputs the attribute value received from the database server 200 to the response processing unit 323.

図18−1〜図18−3を用いて具体的に説明する。図18−1〜図18−3は、実施例2におけるキャッシュに記憶された情報の一例を示す図である。図18−1〜図18−3に示す例では、キャッシュ311が、ハッシュテーブルと、レコードテーブルと、属性情報テーブルとを有する場合を示した。図18−1〜図18−3は、実施例2におけるハッシュテーブルと、レコードテーブルと、属性情報テーブルとの一例を示す。また、以下では、キャッシュ判定部321bが、クライアント100から受信したデータ要求にキー情報(K1、K2、K3)が「ServiceName−001、UserType−001、AccountType−001」が含まれていた場合を用いて説明する。また、以下では、キャッシュ判定部321bが、データベースサーバ200から、部分特定情報要素(D1、D2、D3)として、「ServiceName−001、ANY、ANY」を含み、属性値「データ1」を含むデータ応答を受信した場合を用いて説明する。   A specific description will be given with reference to FIGS. FIG. 18A to FIG. 18C are diagrams illustrating an example of information stored in the cache according to the second embodiment. In the example illustrated in FIGS. 18A to 18C, the cache 311 includes a hash table, a record table, and an attribute information table. 18A to 18C illustrate an example of the hash table, the record table, and the attribute information table according to the second embodiment. In the following description, the cache determination unit 321b uses the case where the data request received from the client 100 includes “ServiceName-001, UserType-001, AccountType-001” in the key information (K1, K2, K3). I will explain. In the following description, the cache determination unit 321b includes “ServiceName-001, ANY, ANY” as the partial identification information elements (D1, D2, D3) from the database server 200, and includes the attribute value “data 1”. A case where a response is received will be described.

この場合、キャッシュ判定部321bは、データベースサーバ200からのデータ応答に含まれる部分特定要素(D1、D2、D3)をキー情報として、自装置のキャッシュ311を確認する。つまり、キャッシュ判定部321bは、部分特定要素(D1、D2、D3)からハッシュ値を算出し、算出したハッシュ値を用いてキャッシュ311のハッシュテーブルを検索する。以下では、算出されたハッシュ値が「0」であるものとして説明する。図18−1に示す例では、ハッシュテーブルのハッシュ値「0」にはレコードIDが存在しない。この場合、キャッシュ判定部321bは、新たに付与した属性情報ID「0」と属性値「データ1」とを含むレコードをキャッシュ311の属性情報テーブルに格納する。そして、キャッシュ判定部321bは、新たに付与したレコードID「0」と、キー情報として部分特定情報要素(D1、D2、D3)「ServiceName−001、ANY、ANY」と、属性情報ID「0」とを含むレコードをキャッシュ311のレコードテーブルに格納する。また、キャッシュ判定部321bは、属性情報ID「0」を含む属性情報テーブルに記憶されたレコードの参照元レコード一覧に対して、レコードID「0」を追加し、キャッシュ311のハッシュテーブルのハッシュ値「0」に対応付けてレコードID「0」を格納する。   In this case, the cache determination unit 321b confirms the cache 311 of the own device using the partial identification elements (D1, D2, D3) included in the data response from the database server 200 as key information. That is, the cache determination unit 321b calculates a hash value from the partial identification elements (D1, D2, D3), and searches the hash table of the cache 311 using the calculated hash value. In the following description, it is assumed that the calculated hash value is “0”. In the example illustrated in FIG. 18A, there is no record ID in the hash value “0” of the hash table. In this case, the cache determination unit 321 b stores a record including the newly assigned attribute information ID “0” and the attribute value “data 1” in the attribute information table of the cache 311. Then, the cache determination unit 321b, the newly assigned record ID “0”, the partial identification information elements (D1, D2, D3) “ServiceName-001, ANY, ANY” and the attribute information ID “0” as key information. Are stored in the record table of the cache 311. Further, the cache determination unit 321b adds the record ID “0” to the reference source record list of the record stored in the attribute information table including the attribute information ID “0”, and the hash value of the hash table of the cache 311 The record ID “0” is stored in association with “0”.

また、キャッシュ判定部321bは、部分特定要素(D1、D2、D3)のうち、ANYとなっている要素である、D2、D3の要素の、事前に決定されているサービス特定要素の値の一覧をそれぞれ得る。図19は、実施例2における事前に決定されているサービス特定要素の値の一覧の例である。図19に示す例では、部分特定要素「D2」がANYであった場合には、「UserType−001」又は、「UserType−002」を取りうることを示し、D3がANYであった場合には、「AccountType−001」又は、「AccountType−002」を取りうることを示す。図19に示す一覧は、例えば、予め生成されたり、キャッシュ判定部321bにより適宜生成されたりする。ここで、キャッシュ判定部321bは、ANYとなっているカラムの全ての組み合わせをサービス特定要素の一覧として算出する。例えば、ANYではない要素(D1)の値である「ServiceName−001」と、図19により示されるD2及びD3のサービス特定要素の値の一覧から、以下に記載する組み合わせ各々を算出する。なお、図19に示す一覧は、データベースシステム一意の情報であり、キャッシュサーバ内に格納されている。   In addition, the cache determination unit 321b lists the values of the service specific elements determined in advance among the elements D2 and D3, which are elements that are ANY among the partial specific elements (D1, D2, and D3). Get each. FIG. 19 is an example of a list of service specific element values determined in advance in the second embodiment. In the example illustrated in FIG. 19, when the partial specifying element “D2” is ANY, it indicates that “UserType-001” or “UserType-002” can be taken, and when D3 is ANY, , “AccountType-001” or “AccountType-002”. For example, the list illustrated in FIG. 19 is generated in advance, or is appropriately generated by the cache determination unit 321b. Here, the cache determination unit 321b calculates all combinations of ANY columns as a list of service specifying elements. For example, “ServiceName-001” that is the value of the element (D1) that is not ANY and the list of service specific element values of D2 and D3 shown in FIG. 19 are used to calculate each combination described below. The list shown in FIG. 19 is information unique to the database system, and is stored in the cache server.

組み合わせ(1){ServiceName−001, UserType−001, AccountType−001},
組み合わせ(2){ServiceName−001, UserType−001, AccountType−002},
組み合わせ(3){ServiceName−001, UserType−002, AccountType−001},
組み合わせ(4){ServiceName−001, UserType−002, AccountType−002}
Combination (1) {ServiceName-001, UserType-001, AccountType-001},
Combination (2) {ServiceName-001, UserType-001, AccountType-002},
Combination (3) {ServiceName-001, UserType-002, AccountType-001},
Combination (4) {ServiceName-001, UserType-002, AccountType-002}

以下では、上述した組み合わせ(1)〜組み合わせ(4)から算出されるハッシュ値が、それぞれ「1」〜「4」であるものとして説明する。この場合、例えば、キャッシュ判定部321bは、キャッシュ311のレコードテーブルに対して、レコードID「1」と、キー情報として組み合わせ(1)と、属性情報ID「0」とを含むレコードを追加し、属性情報ID「0」を含む属性情報テーブルに格納されたレコードの参照元レコード一覧にレコードID「1」を追加し、ハッシュテーブルのハッシュ値「1」に対応付けてレコードID「1」を格納する。また、同様に、キャッシュ判定部321bは、他の組み合わせについても処理を実行する。図20−1〜図20−3は、実施例2におけるキャッシュ判定部によるレコード登録処理後のキャッシュに記憶された情報の一例を示す図である。図20−1〜図20−3は、それぞれ、キャッシュ311のハッシュテーブルと、レコードテーブルと、属性情報テーブルとに対応する。   In the following description, it is assumed that the hash values calculated from the above combinations (1) to (4) are “1” to “4”, respectively. In this case, for example, the cache determination unit 321b adds a record including the record ID “1”, the combination (1) as key information, and the attribute information ID “0” to the record table of the cache 311. The record ID “1” is added to the reference source record list of the record stored in the attribute information table including the attribute information ID “0”, and the record ID “1” is stored in association with the hash value “1” of the hash table. To do. Similarly, the cache determination unit 321b executes processing for other combinations. 20A to 20C are diagrams illustrating an example of information stored in the cache after the record registration processing by the cache determination unit according to the second embodiment. 20-1 to 20-3 correspond to the hash table, the record table, and the attribute information table of the cache 311 respectively.

[キャッシュ登録処理の流れ]
図21は、実施例2におけるキャッシュ登録処理の一例を示すフローチャートである。なお、図21に示す一連の処理のうち、S1001〜S1003、S1005〜S1010、S1019は、それぞれ、図14におけるステップS601〜S603、S604〜S608、S613、S617に対応する。以下では、図14に示す一連の処理と異なる点について説明し、同様の点については適宜省略する。
[Flow of cache registration processing]
FIG. 21 is a flowchart illustrating an example of a cache registration process according to the second embodiment. Of the series of processes shown in FIG. 21, S1001 to S1003, S1005 to S1010, and S1019 correspond to steps S601 to S603, S604 to S608, S613, and S617 in FIG. Hereinafter, differences from the series of processes illustrated in FIG. 14 will be described, and similar points will be omitted as appropriate.

図21に示すように、キャッシュ判定部321bは、サービス特定情報要素(E1〜EN)、部分特定情報要素(D1〜DN)、属性値、有効期限情報を取得し(ステップS1001)。部分特定情報要素(D1〜DN)をキー情報としてキャッシュ311のハッシュテーブルを検索する(ステップS1002)。   As illustrated in FIG. 21, the cache determination unit 321b acquires service identification information elements (E1 to EN), partial identification information elements (D1 to DN), attribute values, and expiration date information (step S1001). The hash table of the cache 311 is searched using the partial identification information elements (D1 to DN) as key information (step S1002).

ここで、キャッシュ311のハッシュテーブルにレコードが存在しない場合には(ステップS1003否定)、キャッシュ311のレコードテーブルや属性情報テーブルにレコードを格納する(ステップS1005〜S1009)。その後、キャッシュ判定部321bは、サービス特定情報要素(E1〜EN)と、部分特定情報要素(D1〜DN)の各要素をそれぞれ比較し、各要素が全て等しい場合には(ステップS1010肯定)、ハッシュテーブルに新たに追加したレコードを返却し(ステップS1019)、処理を終了する。   If there is no record in the hash table of the cache 311 (No at Step S1003), the record is stored in the record table or attribute information table of the cache 311 (Steps S1005 to S1009). Thereafter, the cache determination unit 321b compares each element of the service specific information element (E1 to EN) and the partial specific information element (D1 to DN), and when all the elements are equal (Yes in step S1010), The newly added record is returned to the hash table (step S1019), and the process ends.

一方、ステップS1010に戻り、キャッシュ判定部321bは、サービス特定情報要素(E1〜EN)と、部分特定情報要素(D1〜DN)の各要素が異なった場合について説明する(ステップS1010否定)。キャッシュ判定部321bは、部分特定情報要素(D1〜DN)の中で、ANYとなっているカラムに対応したサービス特定情報要素の値の一覧を取得する(ステップS1011)。例えば、キャッシュ判定部321bは、予め生成された図19に示す表に基づいて、サービス特定情報要素の一覧を取得する。   On the other hand, returning to step S1010, the cache determination unit 321b describes a case where the service specifying information elements (E1 to EN) and the partial specifying information elements (D1 to DN) are different (No in step S1010). The cache determination unit 321b acquires a list of service specification information element values corresponding to the ANY column among the partial specification information elements (D1 to DN) (step S1011). For example, the cache determination unit 321b acquires a list of service specifying information elements based on the table shown in FIG. 19 generated in advance.

そして、キャッシュ判定部321bは、ANY要素となっている全てのカラムのサービス特定情報要素の値の一覧と、非ANY要素となっているカラムのサービス特定情報をもとに、ANY要素が示す、サービス特定情報要素の全ての組み合わせの一覧を取得する(ステップS1012)。そして、キャッシュ判定部321bは、サービス特定情報要素の全ての組み合わせの一覧の最初のサービス特定情報要素を取得する(ステップS1013)。   Then, the cache determination unit 321b indicates the ANY element based on the list of service identification information element values of all columns that are ANY elements and the service identification information of columns that are non-ANY elements. A list of all combinations of service specifying information elements is acquired (step S1012). Then, the cache determination unit 321b acquires the first service identification information element in the list of all combinations of service identification information elements (step S1013).

そして、キャッシュ判定部321bは、キャッシュ311のハッシュテーブルに、キー情報としてサービス特定情報要素(E1〜EN)と、属性情報IDを対応付けてレコードを追加する(ステップS1014)。つまり、キャッシュ判定部321bは、取得した組み合わせをキー情報として含み、ステップS1005にて付与した属性情報IDを含み、新たに付与したレコードIDを含むレコードをキャッシュ311のレコードテーブルに格納する。   Then, the cache determination unit 321b adds a record in the hash table of the cache 311 in association with the service identification information elements (E1 to EN) and the attribute information ID as key information (step S1014). That is, the cache determination unit 321b includes the acquired combination as key information, includes the attribute information ID assigned in step S1005, and stores the record including the newly assigned record ID in the record table of the cache 311.

そして、キャッシュ判定部321bは、キャッシュ311のレコードテーブルに追加したレコードのレコードIDを取得し(ステップS1015)、属性情報の参照元レコード一覧に、レコードIDを追加する(ステップS1016)。   Then, the cache determination unit 321b acquires the record ID of the record added to the record table of the cache 311 (step S1015), and adds the record ID to the reference record list of attribute information (step S1016).

そして、サービス特定情報要素の全ての組み合わせの一覧を全て処理した場合には(ステップS1017肯定)、キャッシュ判定部321bは、ハッシュテーブルに新たに追加したサービス特定情報要素(E1〜EN)に対応したレコードを返却(ステップS1019)し、処理を終了する。一方、ステップS1017に戻り、サービス特定情報要素の全ての組み合わせの一覧を全て処理していない場合には(ステップS1017否定)、キャッシュ判定部321bは、サービス特定情報要素の全ての組み合わせの一覧から、次のサービス特定情報要素を取得し、ステップS1014以降を継続する(ステップS1018)。   When the list of all combinations of service specific information elements has been processed (Yes at Step S1017), the cache determination unit 321b corresponds to the service specific information elements (E1 to EN) newly added to the hash table. The record is returned (step S1019), and the process ends. On the other hand, returning to step S1017, when not processing all the list of all combinations of service specific information elements (No at step S1017), the cache determination unit 321b determines from the list of all combinations of service specific information elements, The next service specifying information element is acquired, and step S1014 and subsequent steps are continued (step S1018).

ステップS1003に戻り、ハッシュテーブルにレコードが存在する場合(ステップS1003肯定)について説明する。この場合、キャッシュ判定部321bは、部分特定情報要素(D1〜DN)をキー情報として、キャッシュ削除処理を行う(ステップS1004)。なお、キャッシュ削除処理の流れは、実施例1と同様であり、説明を省略する。そして、キャッシュ削除処理が完了すると、キャッシュ判定部321bは、ステップS1005以降の処理を継続する。   Returning to step S1003, the case where a record exists in the hash table (Yes in step S1003) will be described. In this case, the cache determination unit 321b performs a cache deletion process using the partial identification information elements (D1 to DN) as key information (step S1004). Note that the flow of the cache deletion process is the same as that in the first embodiment, and a description thereof will be omitted. When the cache deletion process is completed, the cache determination unit 321b continues the process from step S1005.

[実施例2の効果]
上述したように、実施例2によれば、キャッシュサーバ300は、組み合わせに含まれる非特定種類情報を、非特定種類情報に適用される可能性がある特定情報各々に置き換えた組み合わせ各々を生成し、生成した組み合わせ各々についても、データベースサーバ200により送信されたデータと対応付けてキャッシュ311に格納しておく。この結果、その後、キャッシュサーバ300には、ANY要素に対応する特定情報の組み合わせ各々が予めキャッシュ311に格納されることになり、キャッシュ311のヒット率を向上することが可能となる。
[Effect of Example 2]
As described above, according to the second embodiment, the cache server 300 generates each combination in which the non-specific type information included in the combination is replaced with each specific information that may be applied to the non-specific type information. Each of the generated combinations is also stored in the cache 311 in association with the data transmitted by the database server 200. As a result, after that, each combination of specific information corresponding to the ANY element is stored in the cache 311 in advance in the cache server 300, and the hit rate of the cache 311 can be improved.

実施例3では、データベースサーバ200のユーザ情報DB211cが、複数の要素からなるキー情報と属性値とに加えて、非特定要素情報を更に対応付けて記憶する。すなわち、以下では、データベースサーバ200が、データごとに、データが特定される複数種類の特定情報の組み合わせと、組み合わせに含まれる特定情報の種類に含まれる非特定種類を示す非特定種類情報との組み合わせを記憶する場合について説明する。以下では、実施例1と差分がある個所以外の点については、適宜省略する。   In the third embodiment, the user information DB 211c of the database server 200 further stores non-specific element information in association with key information and attribute values including a plurality of elements. That is, in the following, for each data, the database server 200 includes a combination of a plurality of types of specific information for which data is specified, and non-specific type information indicating a non-specific type included in the type of specific information included in the combination. A case of storing the combination will be described. In the following description, points other than those where there are differences from the first embodiment will be omitted as appropriate.

[実施例3におけるデータベースサーバの構成]
ユーザ情報DB211cは、複数の要素からなるキー情報と属性値とに加えて、非特定要素情報を更に対応付けて記憶する。つまり、ユーザ情報DB211cは、データごとに、データが特定される複数種類の特定情報の組み合わせと、組み合わせに含まれる特定情報の種類に含まれる非特定種類を示す非特定種類情報との組み合わせを記憶する。ここで、非特定要素情報とは、キー情報のうち、ANYとして扱われるサービス特定情報要素を示す情報である。
[Configuration of Database Server in Embodiment 3]
The user information DB 211c further stores non-specific element information in association with key information and attribute values including a plurality of elements. That is, the user information DB 211c stores, for each data, a combination of a plurality of types of specific information for which data is specified and a non-specific type information indicating a non-specific type included in the type of specific information included in the combination. To do. Here, the non-specific element information is information indicating a service specific information element treated as ANY among the key information.

図22は、実施例3におけるユーザ情報DBに記憶された情報の一例を示す図である。図22に示す例では、ユーザ情報DB211cは、「キー情報(K1、K2、K3)」と、「非特定要素情報(K2、K3)」と、「属性値」とを対応付けて記憶する。図22に示す例では、非特定要素情報として、「K2」又は「K3」がANY要素か否かを記憶する場合を示したがこれに限定されるものではなく、任意の情報を用いて良い。   FIG. 22 is a diagram illustrating an example of information stored in the user information DB according to the third embodiment. In the example illustrated in FIG. 22, the user information DB 211c stores “key information (K1, K2, K3)”, “non-specific element information (K2, K3)”, and “attribute values” in association with each other. In the example shown in FIG. 22, the case where “K2” or “K3” is an ANY element is stored as non-specific element information, but the present invention is not limited to this, and arbitrary information may be used. .

図22に示す例では、ユーザ情報DB211cは、キー情報「ServiceName−001、UserType−001、AccountType−001」と、非特定要素情報「K2:ANY」「K3:ANY」と、属性値「データ1」とを含むレコードを記憶する。すなわち、ユーザ情報DB211cは、サービス特定情報要素のうち、「UserType−001」と「AccountType−001」とについては、ANY要素であることを記憶する。つまり、ユーザ情報DB211cは、属性値「データ1」が、「ServiceName−001、ANY、ANY」と共有されることを記憶する。   In the example illustrated in FIG. 22, the user information DB 211c includes key information “ServiceName-001, UserType-001, AccountType-001”, non-specific element information “K2: ANY”, “K3: ANY”, and an attribute value “data 1”. "Is stored. That is, the user information DB 211c stores that “UserType-001” and “AccountType-001” among the service specifying information elements are ANY elements. That is, the user information DB 211c stores that the attribute value “data 1” is shared with “ServiceName-001, ANY, ANY”.

また、ユーザ情報DB211cは、キー情報「ServiceName−002、UserType−001、AccountType−001」と属性値「データ100」とを含み、非特定要素情報にデータがないレコードを記憶する。すなわち、ユーザ情報DB211cは、属性値「データ100」が、「ServiceName−002、UserType−001、AccountType−001」以外のキー情報と共有されないことを記憶する。言い換えると、ユーザ情報DB211cは、非特定要素情報「ANY」がない場合には、属性値が共有されないことを示す。   In addition, the user information DB 211c stores a record that includes key information “ServiceName-002, UserType-001, AccountType-001” and an attribute value “data 100” and has no data in the non-specific element information. In other words, the user information DB 211c stores that the attribute value “data 100” is not shared with key information other than “ServiceName-002, UserType-001, AccountType-001”. In other words, the user information DB 211c indicates that the attribute value is not shared when there is no non-specific element information “ANY”.

IR情報DB212cは、IR情報を記憶する。図23は、実施例3におけるIR情報DBに記憶された情報の一例を示す図である。図23に示すように、IR情報DB212cは、「キャッシュサーバ名、キー情報(K1、K2、K3)」として、「キャッシュサーバA、ServiceName−001、UserType−001、AccountType−001」などを記録する。   The IR information DB 212c stores IR information. FIG. 23 is a diagram illustrating an example of information stored in the IR information DB according to the third embodiment. As shown in FIG. 23, the IR information DB 212c records “cache server A, ServiceName-001, UserType-001, AccountType-001” and the like as “cache server name and key information (K1, K2, K3)”. .

キャッシュ応答部221cは、キャッシュサーバ300からデータ検索要求を受信すると、受信したデータ検索要求に含まれるサービス特定情報要素(E1、E2、E3)をキー情報として、キー情報がユーザ情報DB211cに記憶されているか否かを検索する。ここで、ユーザ情報DB211cには、上述したように、非特定要素情報を記憶している。このことを踏まえ、キャッシュ応答部221cは、データが存在する場合には、キー情報のうち、非特定要素情報がANYであるカラムの値をANY要素に置き換えた上で、置き換えた後のキー情報を部分特定情報要素として属性値とともにキャッシュサーバ300に送信する。   When the cache response unit 221c receives the data search request from the cache server 300, the key information is stored in the user information DB 211c using the service identification information elements (E1, E2, E3) included in the received data search request as key information. Search whether or not. Here, the non-specific element information is stored in the user information DB 211c as described above. Based on this, if there is data, the cache response unit 221c replaces the value of the column whose non-specific element information is ANY with the ANY element, and then replaces the key information with the ANY element. Is transmitted to the cache server 300 together with the attribute value as a partial identification information element.

図22に示すユーザ情報DB211cを例に更に説明する。また、キャッシュサーバ300からのデータ検索要求に含まれるキー情報が、「ServiceName−001、UserType−001、AccounType−001」である場合を用いて説明する。この場合、キャッシュ応答部221cは、データ応答として、部分特定情報要素「ServiceName−001、ANY、ANY」と属性値「データ1」とを送信する。   The user information DB 211c shown in FIG. 22 will be further described as an example. Further, the case where the key information included in the data search request from the cache server 300 is “ServiceName-001, UserType-001, AccountType-001” will be described. In this case, the cache response unit 221c transmits the partial identification information element “ServiceName-001, ANY, ANY” and the attribute value “data 1” as a data response.

つまり、キャッシュ応答部221cは、キャッシュサーバ300により送信された受信組み合わせを受信すると、組み合わせと一致する複数種類の特定情報の組み合わせと非特定種類情報との組み合わせを記憶部から取得し、取得した特定情報各々のうち取得した非特定種類情報により示される特定情報を非特定種類情報に置き換えた上で、置き換えた後の組み合わせと、組み合わせに対応付けて記憶されたデータとを送信する。   That is, when the cache response unit 221c receives the reception combination transmitted by the cache server 300, the cache response unit 221c acquires a combination of a plurality of types of specific information that matches the combination and a combination of non-specific type information from the storage unit, and acquires the specified After the specific information indicated by the acquired non-specific type information in each piece of information is replaced with non-specific type information, the combination after replacement and the data stored in association with the combination are transmitted.

[実施例3におけるキャッシュサーバの構成]
IR情報判定部322cは、データベースサーバ200から受信したIR情報を用いて、キャッシュ311を更新する。例えば、受信したIR情報に「キー情報(K1、K2、K3)」が含まれる場合を用いて説明する。この場合、IR情報判定部322cは、受信したIR情報に含まれるキー情報と一致するキー情報が自装置のキャッシュ311に存在する場合には、該当する「キー情報(K1、K2、K3)」と、該当するキー情報に対応付けられた属性値を削除することで、キャッシュ311を最新化する。
[Configuration of Cache Server in Embodiment 3]
The IR information determination unit 322c updates the cache 311 using the IR information received from the database server 200. For example, the case where “key information (K1, K2, K3)” is included in the received IR information will be described. In this case, if the key information that matches the key information included in the received IR information exists in the cache 311 of the own device, the IR information determination unit 322c corresponds to the “key information (K1, K2, K3)”. Then, the cache 311 is updated by deleting the attribute value associated with the corresponding key information.

ここで、IR情報判定部322cは、削除対象となる属性値に対応付けられた参照元レコード一覧を用いて、削除対象となる属性値を参照する全てのキー情報を削除する。そして、IR情報判定部322cは、キャッシュ311からレコードを削除した後、受信したIR情報に含まれる「キー情報」をもとに、データベースサーバ200からIR情報を削除する。つまり、IR情報判定部322cは、受信したIR情報に含まれるキー情報を含むIR情報削除要求をデータベースサーバ200に送信する。   Here, the IR information determination unit 322c deletes all the key information referring to the attribute value to be deleted using the reference source record list associated with the attribute value to be deleted. Then, after deleting the record from the cache 311, the IR information determination unit 322 c deletes the IR information from the database server 200 based on the “key information” included in the received IR information. That is, the IR information determination unit 322c transmits an IR information deletion request including key information included in the received IR information to the database server 200.

図20を用いて具体的に説明する。IR情報に含まれるキー情報(K1、K2、K3)が、「ServiceName−001、User Type−001、AccountType−001」であった場合を用いて説明する。言い換えると、データベースサーバ200において、「ServiceName−001、User Type−001、AccountType−001」により示される属性値が更新された場合を用いて説明する。   This will be specifically described with reference to FIG. Description will be made using a case where the key information (K1, K2, K3) included in the IR information is “ServiceName-001, User Type-001, AccountType-001”. In other words, the description will be made using the case where the attribute values indicated by “ServiceName-001, User Type-001, AccountType-001” are updated in the database server 200.

この場合、IR情報判定部322cは、該当するキー情報は、任意のカラムが他のキー情報と共有されている可能性があるため、属性値を共有している全てのレコードを削除する。具体的には、IR情報判定部322cは、「ServiceName−001、User Type−001、AccountType−001」からハッシュ値を算出する。以下では、算出されたハッシュ値が「1」であるものとして説明する。この場合、IR情報判定部322cは、キャッシュ311のハッシュテーブルからハッシュ値「1」に対応付けられたレコードID「1」を取得し、レコードID「1」を含むレコードをレコードテーブルから取得する。そして、IR情報判定部322cは、取得したレコード内の属性情報ID「0」を取得し、属性情報ID「0」を含むレコードを属性情報テーブルから取得し、取得したレコードに含まれる参照元レコード一覧で示されるレコードID「0」「1」「4」を取得する。そして、IR情報判定部322cは、レコードID「0」「1」「4」を含むレコードをレコードテーブルから削除し、属性情報ID「0」を含むレコードを属性情報テーブルから削除する。そして、IR情報判定部322cは、データベースサーバ200に、「ServiceName−001、User Type−001、AccountType−001」をキー情報として含むIR情報削除要求を送信する。   In this case, the IR information determination unit 322c deletes all the records that share the attribute value because the corresponding key information may have an arbitrary column shared with other key information. Specifically, the IR information determination unit 322c calculates a hash value from “ServiceName-001, User Type-001, and AccountType-001”. In the following description, it is assumed that the calculated hash value is “1”. In this case, the IR information determination unit 322c acquires the record ID “1” associated with the hash value “1” from the hash table of the cache 311 and acquires a record including the record ID “1” from the record table. Then, the IR information determination unit 322c acquires the attribute information ID “0” in the acquired record, acquires a record including the attribute information ID “0” from the attribute information table, and refers to the reference source record included in the acquired record Record IDs “0”, “1”, “4” shown in the list are acquired. Then, the IR information determination unit 322c deletes the record including the record IDs “0”, “1”, and “4” from the record table, and deletes the record including the attribute information ID “0” from the attribute information table. Then, the IR information determination unit 322c transmits an IR information deletion request including “ServiceName-001, User Type-001, AccountType-001” as key information to the database server 200.

[実施例3におけるデータベースサーバのキャッシュ応答部による処理の流れ]
図24は、実施例3におけるデータベースサーバのキャッシュ応答部による処理の流れの一例を示すフローチャートである。
[Flow of processing by cache response unit of database server in Embodiment 3]
FIG. 24 is a flowchart illustrating an example of a process flow by the cache response unit of the database server according to the third embodiment.

図24に示すように、キャッシュ応答部221cは、クライアント100からデータ検索要求を受信すると(ステップS1101)、受信したデータ検索要求から、キー情報K1〜KNを取得する(ステップS1102)。   As illustrated in FIG. 24, when the cache response unit 221c receives a data search request from the client 100 (step S1101), the cache response unit 221c acquires key information K1 to KN from the received data search request (step S1102).

そして、キャッシュ応答部221cは、受信したキー情報を持つレコードが自装置内のユーザ情報DB211cに存在するかを検索し、合致したデータを取得する(ステップS1103)。ここで、キャッシュ応答部221cは、データが存在する場合には(ステップS1104肯定)、検索結果の非特定要素情報カラムを”ANY要素”に置き換えて、部分特定情報要素と属性値を応答する(ステップS1105)。つまり、キャッシュ応答部221cは、検索結果として得られたレコードに含まれるキー情報のうち、非特定要素情報「ANY」に対応する要素について、ANY要素に置き換えた上で、置き換えられた後のキー情報と属性値とを含むデータ応答をキャッシュサーバ300に送信する。   Then, the cache response unit 221c searches the user information DB 211c in the own device for a record having the received key information, and obtains matching data (step S1103). Here, when there is data (Yes in step S1104), the cache response unit 221c replaces the non-specific element information column of the search result with “ANY element” and responds with the partial specific information element and the attribute value ( Step S1105). That is, the cache response unit 221c replaces the element corresponding to the non-specific element information “ANY” among the key information included in the record obtained as the search result with the ANY element, and then replaces the key. A data response including the information and the attribute value is transmitted to the cache server 300.

一方、ステップS1104に戻り、自装置内のユーザ情報DB211cにデータが存在しない場合には(ステップS1104否定)、キャッシュ応答部221cは、キー情報なしを応答する(ステップS1106)。   On the other hand, returning to step S1104, if there is no data in the user information DB 211c in the own apparatus (No in step S1104), the cache response unit 221c responds that there is no key information (step S1106).

[実施例3におけるキャッシュ削除処理の流れ]
図25は、実施例3におけるキャッシュ削除処理の流れの一例を示すフローチャートである。
[Flow of Cache Deletion Processing in Embodiment 3]
FIG. 25 is a flowchart illustrating an example of the flow of cache deletion processing according to the third embodiment.

図25に示すように、IR情報判定部322cは、削除対象を示すキー情報であるサービス特定情報要素(K1〜KN)を取得する(ステップS1201)。そして、IR情報判定部322cは、取得したK1〜KNをキー情報としてハッシュ値を算出し、キャッシュ311のハッシュテーブルを検索する(ステップS1202)。   As illustrated in FIG. 25, the IR information determination unit 322c acquires service identification information elements (K1 to KN) that are key information indicating the deletion target (step S1201). Then, the IR information determination unit 322c calculates a hash value using the acquired K1 to KN as key information, and searches the hash table of the cache 311 (step S1202).

ここで、IR情報判定部322cは、ハッシュテーブルに、キー情報K1〜KNに該当するレコードが存在しない場合には(ステップS1203否定)、削除対象のレコードは存在しないため、処理を終了する。   Here, when there is no record corresponding to the key information K1 to KN in the hash table (No in step S1203), the IR information determination unit 322c ends the process because there is no record to be deleted.

一方、キー情報K1〜KNに対応するレコードが、自装置内のハッシュテーブルに存在する場合には(ステップS1203肯定)、IR情報判定部322cは、該当するレコードから属性情報IDを取得し(ステップS1204)、属性情報IDで示される属性情報から、参照元レコード一覧を取得する(ステップS1205)。そして、IR情報判定部322cは、参照元レコード一覧の最初のレコードIDを取得する(ステップS1206)。   On the other hand, when the records corresponding to the key information K1 to KN exist in the hash table in the own device (Yes at Step S1203), the IR information determination unit 322c acquires the attribute information ID from the corresponding record (Step S1203). In step S1204, a reference source record list is acquired from the attribute information indicated by the attribute information ID (step S1205). Then, the IR information determination unit 322c acquires the first record ID of the reference source record list (step S1206).

そして、IR情報判定部322cは、取得したレコードIDで示されるレコードをレコードテーブルから削除するとともに、削除したレコードのレコードIDをハッシュテーブルから削除する(ステップS1207)。そして、IR情報判定部322cは、参照元レコード一覧の全てのレコードIDをハッシュテーブルから削除していない場合には(ステップS1208否定)、参照元レコード一覧の次のレコードIDを取得し(ステップS1209)、ステップS1207の処理を継続する。一方、ステップS1208に戻り、参照元レコードの全てのレコードIDで示されるレコードをハッシュテーブルから削除した場合には(ステップS1208肯定)、属性情報テーブルから取得したレコードを削除し(ステップS1210)、処理を終了する。   Then, the IR information determination unit 322c deletes the record indicated by the acquired record ID from the record table and deletes the record ID of the deleted record from the hash table (step S1207). Then, if all the record IDs in the reference source record list have not been deleted from the hash table (No in step S1208), the IR information determination unit 322c acquires the next record ID in the reference source record list (step S1209). ), The process of step S1207 is continued. On the other hand, returning to step S1208, when the records indicated by all record IDs of the reference source records are deleted from the hash table (Yes at step S1208), the records acquired from the attribute information table are deleted (step S1210), and processing is performed. Exit.

[実施例3の効果]
上述したように、実施例3によれば、データベースサーバ200は、データごとに、データが特定される複数種類の特定情報の組み合わせと、組み合わせに含まれる特定情報の種類に含まれる非特定種類を示す非特定種類情報との組み合わせを記憶する。また、データベースサーバ200は、特定情報送信部により送信された受信組み合わせを受信すると、組み合わせと一致する複数種類の特定情報の組み合わせと非特定種類情報との組み合わせを記憶部から取得し、取得した特定情報各々のうち取得した非特定種類情報により示される特定情報を非特定種類情報に置き換えた上で、置き換えた後の組み合わせと、組み合わせに対応付けて記憶されたデータとを送信する。この結果、データベースサーバ200における検索処理を迅速に実行可能となる。
[Effect of Example 3]
As described above, according to the third embodiment, the database server 200 determines, for each data, a combination of a plurality of types of specific information for which data is specified and a non-specific type included in the types of specific information included in the combination. The combination with the non-specific type information to be shown is stored. In addition, when the database server 200 receives the reception combination transmitted by the specific information transmission unit, the database server 200 acquires a combination of a plurality of types of specific information that matches the combination and a combination of non-specific type information from the storage unit, and acquires the specific After the specific information indicated by the acquired non-specific type information in each piece of information is replaced with non-specific type information, the combination after replacement and the data stored in association with the combination are transmitted. As a result, the search process in the database server 200 can be executed quickly.

さて、これまで本発明の実施例について説明したが、本発明は上述した実施例以外にも、その他の実施例にて実施されても良い。そこで、以下では、その他の実施例を示す。   Although the embodiments of the present invention have been described so far, the present invention may be implemented in other embodiments besides the above-described embodiments. Therefore, other embodiments will be described below.

例えば、上述した実施例3において、キャッシュサーバ300が、非特定種類情報を含む組み合わせを受信した場合に、特定情報に含まれる非特定種類情報に適用される可能性がある特定情報各々に特定種類情報を置き換えた組み合わせ各々をデータベースに送信しても良い。   For example, in the above-described third embodiment, when the cache server 300 receives a combination including non-specific type information, the specific type may be applied to each specific information that may be applied to the non-specific type information included in the specific information. Each combination in which information is replaced may be transmitted to the database.

[システム構成]
また、本実施例において説明した各処理のうち、自動的に行われるものとして説明した処理の全部又は一部を手動的に行うこともでき、あるいは、手動的に行われるものとして説明した処理の全部又は一部を公知の方法で自動的に行うこともできる。この他、上述文書中や図面中で示した処理手順、制御手順、具体的名称、各種のデータやパラメータを含む情報については(図1〜図25)、特記する場合を除いて任意に変更することができる。
[System configuration]
Also, among the processes described in this embodiment, all or part of the processes described as being performed automatically can be performed manually, or the processes described as being performed manually can be performed. All or a part can be automatically performed by a known method. In addition, the processing procedures, control procedures, specific names, and information including various data and parameters shown in the above-mentioned documents and drawings (FIGS. 1 to 25) are arbitrarily changed unless otherwise specified. be able to.

また、図示した各装置の各構成要素は機能概念的なものであり、必ずしも物理的に図示の如く構成されていることを要しない。すなわち、各装置の分散・統合の具体的形態は図示のものに限られず、その全部又は一部を、各種の負荷や使用状況などに応じて、任意の単位で機能的又は物理的に分散・統合して構成することができる。例えば、キャッシュサーバ300とデータベースサーバ200との一部を統合しても良い。   Further, each component of each illustrated apparatus is functionally conceptual, and does not necessarily need to be physically configured as illustrated. That is, the specific form of distribution / integration of each device is not limited to the one shown in the figure, and all or a part of the distribution / integration may be functionally or physically distributed in arbitrary units according to various loads or usage conditions. Can be integrated and configured. For example, a part of the cache server 300 and the database server 200 may be integrated.

[プログラム]
図26は、データベースシステムによる処理をプログラムにて実行するための制御プログラムによる情報処理が、コンピュータを用いて具体的に実現されることを示す図である。図26に例示するように、コンピュータ3000は、例えば、メモリ3010と、CPU(Central Processing Unit)3020とを有する。コンピュータ3000の各部はバス3100によって接続される。
[program]
FIG. 26 is a diagram showing that the information processing by the control program for executing the processing by the database system by the program is specifically realized by using a computer. As illustrated in FIG. 26, the computer 3000 includes, for example, a memory 3010 and a CPU (Central Processing Unit) 3020. Each part of the computer 3000 is connected by a bus 3100.

メモリ3010は、図26に例示するように、ROM3011及びRAM3012を含む。ROM3011は、例えば、BIOS(Basic Input Output System)等のブートプログラムを記憶する。   The memory 3010 includes a ROM 3011 and a RAM 3012 as illustrated in FIG. The ROM 3011 stores a boot program such as BIOS (Basic Input Output System).

ここで、図26に例示するように、ハードディスクドライブ3080は、例えば、OS3081、アプリケーションプログラム3082、プログラムモジュール3083、プログラムデータ3084を記憶する。すなわち、開示の技術に係る制御プログラムは、コンピュータによって実行される指令が記述されたプログラムモジュール3083として、例えばハードディスクドライブ3080に記憶される。具体的には、上記実施例で説明した制御部220や制御部320と同様の情報処理を実行する手順各々が記述されたプログラムモジュールが、ハードディスクドライブ3080に記憶される。   Here, as illustrated in FIG. 26, the hard disk drive 3080 stores, for example, an OS 3081, an application program 3082, a program module 3083, and program data 3084. In other words, the control program according to the disclosed technique is stored in, for example, the hard disk drive 3080 as the program module 3083 in which instructions executed by the computer are described. Specifically, a program module in which each procedure for executing the same information processing as the control unit 220 and the control unit 320 described in the above embodiment is described is stored in the hard disk drive 3080.

また、上記実施例で説明した記憶部210や記憶部310に記憶されるデータのように、制御プログラムによる情報処理に用いられるデータは、プログラムデータ3084として、例えばハードディスクドライブ3080に記憶される。そして、CPU3020が、ハードディスクドライブ3080に記憶されたプログラムモジュール3083やプログラムデータ3084を必要に応じてRAM3012に読み出し、各種の手順を実行する。   Further, like the data stored in the storage unit 210 and the storage unit 310 described in the above embodiment, data used for information processing by the control program is stored as, for example, the hard disk drive 3080 as the program data 3084. The CPU 3020 reads the program module 3083 and program data 3084 stored in the hard disk drive 3080 to the RAM 3012 as necessary, and executes various procedures.

なお、制御プログラムに係るプログラムモジュール3083やプログラムデータ3084は、ハードディスクドライブ3080に記憶される場合に限られない。例えば、プログラムモジュール3083やプログラムデータ3084は、着脱可能な記憶媒体に記憶されても良い。この場合、CPU3020は、ディスクドライブなどの着脱可能な記憶媒体を介してデータを読み出す。また、同様に、制御プログラムに係るプログラムモジュール3083やプログラムデータ3084は、ネットワーク(LAN(Local Area Network)、WAN(Wide Area Network)等)を介して接続された他のコンピュータに記憶されても良い。この場合、CPU3020は、ネットワークインタフェース3070を介して他のコンピュータにアクセスすることで各種データを読み出す。   Note that the program module 3083 and the program data 3084 related to the control program are not limited to being stored in the hard disk drive 3080. For example, the program module 3083 and the program data 3084 may be stored in a removable storage medium. In this case, the CPU 3020 reads data via a removable storage medium such as a disk drive. Similarly, the program module 3083 and the program data 3084 related to the control program may be stored in another computer connected via a network (LAN (Local Area Network), WAN (Wide Area Network), etc.). . In this case, the CPU 3020 reads various data by accessing another computer via the network interface 3070.

[その他]
なお、本実施例で説明した制御プログラムは、インターネットなどのネットワークを介して配布することができる。また、制御プログラムは、ハードディスク、フレキシブルディスク(FD)、CD−ROM、MO、DVDなどのコンピュータで読み取り可能な記録媒体に記録され、コンピュータによって記録媒体から読み出されることによって実行することもできる。
[Others]
Note that the control program described in this embodiment can be distributed via a network such as the Internet. The control program can also be executed by being recorded on a computer-readable recording medium such as a hard disk, a flexible disk (FD), a CD-ROM, an MO, and a DVD, and being read from the recording medium by the computer.

100 クライアント
200 データベースサーバ
201 通信制御I/F部
210 記憶部
211 ユーザ情報DB
212 IR情報DB
220 制御部
221 キャッシュ応答部
222 IR情報応答部
223 IR情報削除部
224 ユーザ情報更新部
300 キャッシュサーバ
301 通信制御I/F部
310 記憶部
311 キャッシュ
320 制御部
321 キャッシュ判定部
322 IR情報判定部
323 応答処理部
501 ネットワーク機器
502 ユーザ
503 ネットワーク機器
504 認証サーバ
505 網制御サーバ
100 Client 200 Database Server 201 Communication Control I / F Unit 210 Storage Unit 211 User Information DB
212 IR Information DB
220 Control unit 221 Cache response unit 222 IR information response unit 223 IR information deletion unit 224 User information update unit 300 Cache server 301 Communication control I / F unit 310 Storage unit 311 Cache 320 Control unit 321 Cache determination unit 322 IR information determination unit 323 Response processing unit 501 Network device 502 User 503 Network device 504 Authentication server 505 Network control server

Claims (5)

データごとに、該データを特定するための特定情報と、前記特定情報の複数の種類のうち該データを特定する際に用いられない種類である非特定種類を示す非特定種類情報との組み合わせを記憶する記憶部を有するデータベースと、
前記記憶部に記憶された前記データの少なくとも一部について、前記特定情報と前記非特定種類情報との組み合わせと、複数種類の前記特定情報の組み合わせとのうち少なくとも一つを対応付けて記憶するキャッシュを有するキャッシュサーバとを有し、
前記キャッシュサーバは、
データ要求を受信すると、該データ要求に含まれる複数種類の前記特定情報各々の組み合わせが前記キャッシュに記憶されているかを判定する判定部と、
前記判定部により記憶されていないと判定された場合に、前記データ要求に含まれる組み合わせを前記データベースに送信する特定情報送信部とを有し、
前記データベースは、
前記特定情報送信部により送信された組み合わせを受信すると、受信した組み合わせである受信組み合わせに相当する前記特定情報と前記非特定種類情報との組み合わせと、該特定情報と該非特定種類情報との組み合わせに対応付けられた前記データとを前記記憶部から取得し、前記キャッシュサーバに送信するキャッシュ応答部を有し、
前記キャッシュサーバは、
前記キャッシュ応答部により送信された前記特定情報と前記非特定種類情報との組み合わせが前記キャッシュに記憶されている場合には、記憶されていた前記特定情報と前記非特定種類情報との組み合わせに対応付けられるデータと対応付けて、前記受信組み合わせを前記キャッシュに格納し、前記キャッシュに記憶されていない場合には、前記キャッシュ応答部により送信されたデータと対応付けて、前記キャッシュ応答部により送信された前記特定情報と前記非特定種類情報との組み合わせと、前記受信組み合わせとを前記キャッシュに格納する格納部と、
前記判定部により記憶されていると判定された場合には、前記キャッシュから前記データを取得して前記データ要求の送信元に送信し、前記判定部により記憶されていないと判定された場合には、前記キャッシュ応答部により送信された前記データを前記データ要求の送信元に送信するデータ送信部と
を有することを特徴とするデータベースシステム。
For each data, a combination of specific information for specifying the data and non-specific type information indicating a non-specific type that is a type that is not used when specifying the data among a plurality of types of the specific information A database having a storage unit for storing;
A cache that stores at least one of a combination of the specific information and the non-specific type information and a combination of a plurality of types of the specific information in association with at least a part of the data stored in the storage unit. A cache server having
The cache server is
When a data request is received, a determination unit that determines whether a combination of each of the plurality of types of specific information included in the data request is stored in the cache;
A specific information transmission unit that transmits a combination included in the data request to the database when it is determined that the data is not stored by the determination unit;
The database is
When the combination transmitted by the specific information transmitting unit is received, the combination of the specific information corresponding to the received combination that is the received combination and the non-specific type information, and the combination of the specific information and the non-specific type information A cache response unit that acquires the associated data from the storage unit and transmits the data to the cache server;
The cache server is
When the combination of the specific information and the non-specific type information transmitted by the cache response unit is stored in the cache, it corresponds to the combination of the stored specific information and the non-specific type information The received combination is stored in the cache in association with the data to be attached, and is transmitted by the cache response unit in association with the data transmitted by the cache response unit when not stored in the cache. A storage unit that stores the combination of the specific information and the non-specific type information and the reception combination in the cache;
When it is determined that the data is stored by the determination unit, the data is acquired from the cache and transmitted to the transmission source of the data request, and when it is determined that the data is not stored by the determination unit And a data transmission unit that transmits the data transmitted by the cache response unit to a transmission source of the data request.
前記データベースの前記記憶部は、前記データごとに、該データを特定する際に用いられる特定情報種類に属する前記特定情報と、前記非特定種類情報との組み合わせを対応付けて記憶し、
前記キャッシュ応答部は、前記特定情報送信部により送信された前記受信組み合わせを受信すると、該組み合わせに相当する前記特定情報と前記非特定種類情報との組み合わせの一つを選択し、選択した前記特定情報と前記非特定種類情報との組み合わせと、選択した該組み合わせに対応付けて記憶された前記データとを送信することを特徴とする請求項1に記載のデータベースシステム。
The storage unit of the database stores, for each data, a combination of the specific information belonging to the specific information type used when specifying the data and a combination of the non-specific type information,
When the cache response unit receives the reception combination transmitted by the specific information transmission unit, the cache response unit selects one of the combinations of the specific information and the non-specific type information corresponding to the combination, and the selected specific The database system according to claim 1, wherein a combination of information and the non-specific type information and the data stored in association with the selected combination are transmitted.
前記データベースの前記記憶部は、前記データごとに、該データが特定される複数種類の前記特定情報の組み合わせと、該組み合わせに含まれる特定情報の種類のうち非特定種類となる特定情報を示す非特定種類情報との組み合わせを記憶し、
前記キャッシュ応答部は、前記特定情報送信部により送信された前記受信組み合わせを受信すると、該組み合わせと一致する前記特定情報の組み合わせと前記非特定種類情報との組み合わせを前記記憶部から取得し、取得した該特定情報各々のうち取得した該非特定種類情報により示される特定情報を該非特定種類情報に置き換えた上で、置き換えた後の該組み合わせと、該組み合わせに対応付けて記憶された前記データとを送信することを特徴とする請求項1に記載のデータベースシステム。
The storage unit of the database includes, for each data, a combination of a plurality of types of the specific information for which the data is specified, and a non-specific type indicating specific information among the types of specific information included in the combination. Memorize combinations with specific types of information,
When the cache response unit receives the reception combination transmitted by the specific information transmission unit, the cache response unit acquires the combination of the specific information that matches the combination and the combination of the non-specific type information from the storage unit, and acquires the combination The specific information indicated by the acquired non-specific type information in each of the specific information is replaced with the non-specific type information, and the combination after replacement and the data stored in association with the combination are The database system according to claim 1, wherein transmission is performed.
前記格納部は、前記キャッシュ応答部により送信された前記組み合わせに含まれる前記非特定種類情報を、該非特定種類情報に適用される可能性がある特定情報各々に置き換えた組み合わせ各々を生成し、生成した組み合わせ各々についても、該キャッシュ応答部により送信されたデータと対応付けて前記キャッシュに格納することを特徴とする請求項1〜3のいずれか一つに記載のデータベースシステム。   The storage unit generates each combination by replacing the non-specific type information included in the combination transmitted by the cache response unit with specific information that may be applied to the non-specific type information. The database system according to claim 1, wherein each of the combinations is stored in the cache in association with the data transmitted by the cache response unit. データごとに、該データを特定するための特定情報と、前記特定情報の複数の種類のうち該データを特定する際に用いられない種類である非特定種類を示す非特定種類情報との組み合わせを記憶する記憶部を有するデータベースと、
前記データベースに記憶された前記データの少なくとも一部について、前記特定情報と前記非特定種類情報との組み合わせと、複数種類の前記特定情報の組み合わせとのうち少なくとも一つを対応付けて記憶するキャッシュを有するキャッシュサーバとを有するデータベースシステムで実行される制御方法であって、
前記キャッシュサーバが、データ要求を受信すると、該データ要求に含まれる複数種類の前記特定情報各々の組み合わせが前記キャッシュに記憶されているかを判定する判定工程と、
前記キャッシュサーバが、前記判定工程により記憶されていないと判定された場合に、前記データ要求に含まれる組み合わせを前記データベースに送信する特定情報送信工程と、
前記データベースが、前記特定情報送信工程により送信された組み合わせを受信すると、受信した組み合わせである受信組み合わせに相当する前記記憶部に記憶された前記特定情報と前記非特定種類情報との組み合わせと、該特定情報と該非特定種類情報との組み合わせに対応付けられた前記データとを前記記憶部から取得し、前記キャッシュサーバに送信するキャッシュ応答工程と、
前記キャッシュサーバが、前記キャッシュ応答工程により送信された前記特定情報と前記非特定種類情報との組み合わせが前記キャッシュに記憶されている場合には、記憶されていた前記特定情報と前記非特定種類情報との組み合わせに対応付けられるデータと対応付けて、前記受信組み合わせを前記キャッシュに格納し、前記キャッシュに記憶されていない場合には、前記キャッシュ応答工程により送信されたデータと対応付けて、前記キャッシュ応答部により送信された前記特定情報と前記非特定種類情報との組み合わせと、前記受信組み合わせとを前記キャッシュに格納する格納工程と、
前記キャッシュサーバが、前記判定工程により記憶されていると判定された場合には、前記キャッシュから前記データを取得して前記データ要求の送信元に送信し、前記判定工程により記憶されていないと判定された場合には、前記キャッシュ応答工程により送信された前記データを前記データ要求の送信元に送信するデータ送信工程と
を含むことを特徴とする制御方法。
For each data, a combination of specific information for specifying the data and non-specific type information indicating a non-specific type that is a type that is not used when specifying the data among a plurality of types of the specific information A database having a storage unit for storing;
A cache that stores at least one of a combination of the specific information and the non-specific type information and a combination of a plurality of types of the specific information in association with at least a part of the data stored in the database. A control method executed in a database system having a cache server having
When the cache server receives a data request, a determination step of determining whether a combination of each of the plurality of types of specific information included in the data request is stored in the cache;
A specific information transmission step of transmitting a combination included in the data request to the database when it is determined that the cache server is not stored in the determination step;
When the database receives the combination transmitted by the specific information transmission step, the combination of the specific information and the non-specific type information stored in the storage unit corresponding to the received combination that is the received combination, A cache response step of acquiring from the storage unit the data associated with a combination of specific information and the non-specific type information, and transmitting to the cache server;
When the cache server stores a combination of the specific information and the non-specific type information transmitted in the cache response step in the cache, the stored specific information and the non-specific type information The received combination is stored in the cache in association with the data associated with the combination, and if the cache is not stored in the cache, the cache is associated with the data transmitted in the cache response step. A storing step of storing the combination of the specific information and the non-specific type information transmitted by the response unit and the reception combination in the cache;
When it is determined that the cache server is stored in the determination step, the data is acquired from the cache and transmitted to the transmission source of the data request, and is determined not to be stored in the determination step. And a data transmission step of transmitting the data transmitted by the cache response step to a transmission source of the data request.
JP2011131028A 2011-06-13 2011-06-13 Database system and control method Expired - Fee Related JP5492146B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011131028A JP5492146B2 (en) 2011-06-13 2011-06-13 Database system and control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011131028A JP5492146B2 (en) 2011-06-13 2011-06-13 Database system and control method

Publications (2)

Publication Number Publication Date
JP2013003637A true JP2013003637A (en) 2013-01-07
JP5492146B2 JP5492146B2 (en) 2014-05-14

Family

ID=47672189

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011131028A Expired - Fee Related JP5492146B2 (en) 2011-06-13 2011-06-13 Database system and control method

Country Status (1)

Country Link
JP (1) JP5492146B2 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014118914A1 (en) * 2013-01-30 2014-08-07 三菱電機株式会社 Array data caching system, array data cache management device and array data caching method
JP2017501510A (en) * 2013-10-21 2017-01-12 アマゾン テクノロジーズ インコーポレイテッド Media content management
JP2017070467A (en) * 2015-10-07 2017-04-13 株式会社藤商事 Game machine
CN111459931A (en) * 2019-01-21 2020-07-28 中车信息技术有限公司 Data duplication checking method and data duplication checking device
JP2020522920A (en) * 2017-06-06 2020-07-30 インターナショナル・ビジネス・マシーンズ・コーポレーションInternational Business Machines Corporation Edge caching for cognitive applications

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000020385A (en) * 1998-07-07 2000-01-21 Hitachi Ltd Data retrieving system and data caching method
JP2006011989A (en) * 2004-06-28 2006-01-12 Ntt Docomo Inc Authentication method, terminal device, repeater, and authentication server
JP2009193336A (en) * 2008-02-14 2009-08-27 Nec Corp Processing distribution system, authentication server, distribution server, and processing distribution method
JP2011018278A (en) * 2009-07-10 2011-01-27 Nippon Telegr & Teleph Corp <Ntt> Authentication apparatus, authentication method, authentication program, and authentication system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000020385A (en) * 1998-07-07 2000-01-21 Hitachi Ltd Data retrieving system and data caching method
JP2006011989A (en) * 2004-06-28 2006-01-12 Ntt Docomo Inc Authentication method, terminal device, repeater, and authentication server
JP2009193336A (en) * 2008-02-14 2009-08-27 Nec Corp Processing distribution system, authentication server, distribution server, and processing distribution method
JP2011018278A (en) * 2009-07-10 2011-01-27 Nippon Telegr & Teleph Corp <Ntt> Authentication apparatus, authentication method, authentication program, and authentication system

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014118914A1 (en) * 2013-01-30 2014-08-07 三菱電機株式会社 Array data caching system, array data cache management device and array data caching method
JP2017501510A (en) * 2013-10-21 2017-01-12 アマゾン テクノロジーズ インコーポレイテッド Media content management
JP2017070467A (en) * 2015-10-07 2017-04-13 株式会社藤商事 Game machine
JP2020522920A (en) * 2017-06-06 2020-07-30 インターナショナル・ビジネス・マシーンズ・コーポレーションInternational Business Machines Corporation Edge caching for cognitive applications
US11283894B2 (en) 2017-06-06 2022-03-22 International Business Machines Corporation Edge caching for cognitive applications
JP7067845B2 (en) 2017-06-06 2022-05-16 インターナショナル・ビジネス・マシーンズ・コーポレーション Edge caching for cognitive applications
CN111459931A (en) * 2019-01-21 2020-07-28 中车信息技术有限公司 Data duplication checking method and data duplication checking device

Also Published As

Publication number Publication date
JP5492146B2 (en) 2014-05-14

Similar Documents

Publication Publication Date Title
CN106815350B (en) Dynamic ciphertext multi-keyword fuzzy search method in cloud environment
US8676951B2 (en) Traffic reduction method for distributed key-value store
JP5320433B2 (en) Integrated search device, integrated search system, and integrated search method
JP5492146B2 (en) Database system and control method
CN108696496A (en) Multi-protocols accesses control list
JP2006252085A (en) File server for converting user identification information
JP2001313639A (en) System and method for managing network configuration data and recording medium
JP5638608B2 (en) Method for accessing file system files according to metadata and apparatus for implementing the method
CN107004013A (en) System and method for providing distributed tree traversal using hardware based processing
US20140143549A1 (en) Information processing apparatus, information processing method, and program
JP2020013539A (en) Information management device, information management method and information management program
JP6951846B2 (en) Computer system and task allocation method
CN110457307B (en) Metadata management system, user cluster creation method, device, equipment and medium
US20180203908A1 (en) Distributed database system and distributed data processing method
CN103902554B (en) Data access method and device
JP2003316811A (en) Inquiry optimization processing device in different kind of database integration system, method and program making computer execute the method
JP7390356B2 (en) Identifying records for tenant identifier conversion after cloning
JP2007156700A (en) Information retrieval method, information registration method and network service information retrieval system
KR20170125665A (en) Semantic Information Management Method for a M2M/IoT platform
WO2014147811A1 (en) File storage system and user data management method
JP5402066B2 (en) Information search system, information search device, information search program, and information search method
JP6229997B2 (en) Data management system and program
JP7364039B2 (en) Information management method, information management program and information management device
WO2014176954A1 (en) Processing method, device and system for data of distributed storage system
JP7355219B2 (en) Information management method, information management program and information management device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20130627

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20140124

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: 20140225

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140228

R150 Certificate of patent or registration of utility model

Ref document number: 5492146

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees