JP2011253299A - Retrieval device, retrieval method and retrieval program - Google Patents
Retrieval device, retrieval method and retrieval program Download PDFInfo
- Publication number
- JP2011253299A JP2011253299A JP2010126043A JP2010126043A JP2011253299A JP 2011253299 A JP2011253299 A JP 2011253299A JP 2010126043 A JP2010126043 A JP 2010126043A JP 2010126043 A JP2010126043 A JP 2010126043A JP 2011253299 A JP2011253299 A JP 2011253299A
- Authority
- JP
- Japan
- Prior art keywords
- document
- search
- cache storage
- response data
- acquired
- 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
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
本発明は、メタデータを検索する技術に関する。 The present invention relates to a technique for searching metadata.
従来、クライアントからの検索クエリに該当するメタデータをRelational DataBase Management System(RDBMS)から検索して検索結果を返却するアプリケーションサーバにおいて、初回問い合わせの検索クエリと検索結果をキャッシュとして保存しておき、2回目以降の同一の検索クエリの問い合わせがあった場合にキャッシュから検索結果を返却することで、応答時間を短縮していた(例えば、特許文献1)。 2. Description of the Related Art Conventionally, in an application server that retrieves metadata corresponding to a search query from a client from the Relational DataBase Management System (RDBMS) and returns the search result, the search query and the search result of the initial inquiry are stored as a cache. The response time is shortened by returning the search result from the cache when there is an inquiry of the same search query after the first time (for example, Patent Document 1).
アプリケーションサーバでは、メタデータがラージオブジェクト型で格納されたxml等の構造化文書である場合、RDBMS上の検索時間やRDBMSからのラージオブジェクトの取得時間がボトルネックとなる。ラージオブジェクトとは、RDBMSに格納するデータの型であり、データページを超えたサイズのデータを格納できるという特徴がある。 In the application server, when the metadata is a structured document such as xml stored in a large object type, the search time on the RDBMS and the acquisition time of the large object from the RDBMS become a bottleneck. A large object is a type of data stored in an RDBMS and has a feature that data having a size exceeding the data page can be stored.
従来技術のように、初回検索時に返却データをキャッシュしておき、次回以降の問い合わせ時はキャッシュに保存されている返却データを用いることで、応答時間を短縮し、リソースの消費量を低減することができる。しかしながら、検索クエリと返却データを1対1で管理している従来のキャッシュでは、返却データがRDBMS上に格納されたラージオブジェクト型データの集合である場合、RDBMS上で、返却データを構成する1つのラージオブジェクト型データが更新されるとキャッシュされた返却データとRDBMSに不整合が生じるという問題がある。 As in the prior art, return data is cached at the time of the first search, and the return data stored in the cache is used for the subsequent inquiries, thereby shortening the response time and reducing resource consumption. Can do. However, in the conventional cache that manages the search query and the return data on a one-to-one basis, when the return data is a set of large object type data stored on the RDBMS, the return data is configured on the RDBMS. When one large object type data is updated, there is a problem that inconsistency occurs between the cached return data and the RDBMS.
本発明は、上記に鑑みてなされたものであり、返却データがラージオブジェクト型データの集合である場合に、データベースとの不整合を生じることなく検索の応答時間を短縮することを目的とする。 The present invention has been made in view of the above, and an object of the present invention is to shorten the response time of a search without causing inconsistency with a database when return data is a set of large object type data.
第1の本発明に係る検索装置は、ドキュメントを格納したデータベースから検索条件に該当する前記ドキュメントを検索する検索装置であって、検索クエリを受信する受信手段と、前記検索クエリを用いて前記データベースを検索し、当該検索クエリの検索条件に該当するドキュメントに関して、前記ドキュメントの識別子及び前記ドキュメントの格納場所を示す格納場所情報を有する検索結果を取得する検索手段と、以前取得したドキュメント、当該ドキュメントの識別子を格納する第1キャッシュ保存手段と、前記検索結果のドキュメントの識別子に対応するドキュメントが前記第1キャッシュ保存手段に存在するか否か判定し、前記ドキュメントが前記第1キャッシュ保存手段に存在する場合は、前記第1キュッシュ保存手段から前記ドキュメントを取得し、存在しない場合は、前記検索結果の格納場所情報に基づいて前記データベースから前記ドキュメントを取得する取得手段と、前記データベースから取得した前記ドキュメントを当該ドキュメントの識別子とともに前記第1キャッシュ保存手段に格納する格納手段と、前記取得手段が取得した1つ以上の前記ドキュメントを結合して応答データを生成する生成手段と、前記応答データを返却する返却手段と、を有することを特徴とする。 A search device according to a first aspect of the present invention is a search device for searching for a document corresponding to a search condition from a database storing documents, receiving means for receiving a search query, and the database using the search query. Search means for obtaining a search result having a storage location information indicating the identifier of the document and the storage location of the document, and a previously acquired document, A first cache storage unit for storing an identifier, and a determination is made as to whether or not a document corresponding to the identifier of the document of the search result exists in the first cache storage unit, and the document exists in the first cache storage unit In the case, from the first cuche storage means, An acquisition means for acquiring the document from the database based on the storage location information of the search result, and the first cache storage of the document acquired from the database together with an identifier of the document. Storage means for storing in the means, generation means for combining one or more documents acquired by the acquisition means to generate response data, and return means for returning the response data .
第2の本発明に係る検索方法は、検索装置がドキュメントを格納したデータベースから検索条件に該当する前記ドキュメントを検索する検索方法であって、検索クエリを受信するステップと、前記検索クエリを用いて前記データベースを検索し、当該検索クエリの検索条件に該当するドキュメントに関して、前記ドキュメントの識別子及び前記ドキュメントの格納場所を示す格納場所情報を有する検索結果を取得するステップと、前記検索結果のドキュメントの識別子に対応するドキュメントが、以前取得したドキュメント、当該ドキュメントの識別子を格納する前記第1キャッシュ保存手段に存在するか否か判定し、前記ドキュメントが前記第1キャッシュ保存手段に存在する場合は、前記第1キュッシュ保存手段から前記ドキュメントを取得し、存在しない場合は、前記検索結果の格納場所情報に基づいて前記データベースから前記ドキュメントを取得するステップと、前記データベースから取得した前記ドキュメントを当該ドキュメントの識別子とともに前記第1キャッシュ保存手段に格納するステップと、前記取得手段が取得した1つ以上の前記ドキュメントを結合して応答データを生成するステップと、前記応答データを返却するステップと、を有することを特徴とする。 A search method according to a second aspect of the present invention is a search method in which a search device searches for a document corresponding to a search condition from a database storing documents, the step of receiving a search query, and using the search query Searching the database, obtaining a search result having storage location information indicating the identifier of the document and the storage location of the document with respect to a document corresponding to the search condition of the search query, and the identifier of the document of the search result It is determined whether or not a document corresponding to the above-mentioned document exists in the first cache storage unit that stores the previously acquired document and the identifier of the document, and if the document exists in the first cache storage unit, The document is saved from one cuche storage means. And if not present, obtaining the document from the database based on the storage location information of the search result, and storing the document obtained from the database together with an identifier of the document in the first cache storage means A step of combining the one or more documents acquired by the acquiring unit to generate response data, and a step of returning the response data.
第3の本発明に係る検索プログラムは、上記検索方法をコンピュータに実行させるための検索プログラムである。 A search program according to a third aspect of the present invention is a search program for causing a computer to execute the search method.
本発明によれば、返却データがラージオブジェクト型データの集合である場合に、データベースとの不整合を生じることなく検索の応答時間を短縮することができる。 According to the present invention, when the return data is a set of large object type data, the search response time can be shortened without causing inconsistency with the database.
以下、本発明の実施の形態について図面を用いて説明する。 Hereinafter, embodiments of the present invention will be described with reference to the drawings.
図1は、本実施の形態における検索装置1の構成を示す機能ブロック図である。同図に示す検索装置1は、端末3から検索クエリを受信し、RDBMS2から放送番組やビデオ・オン・デマンドコンテンツの番組メタデータを検索して端末3へ返却する装置である。検索クエリとは、端末3から検索装置1への情報検索要求であり、例えば、タイトル、ジャンル、日時等の検索条件を論理演算子や修飾子で結合したものである。端末3は、検索装置1へ検索クエリを送信し、検索クエリに対する検索結果を応答データとして受信するものであり、例えば、Internet Protocol Television(IPTV)サービスにおける受信端末などがある。
FIG. 1 is a functional block diagram showing the configuration of the
まず、RDBMS2の構成について説明する。RDBMS2は、複数のアトリビュートテーブル201、ドキュメントテーブル202、一次検索結果テーブル203、およびキャッシュ管理テーブル204で構成される。アトリビュートテーブル201は、番組メタデータが記述されたドキュメントを属性に展開したものであり、コンテンツID(crid)、タイトル、概要、出演者等の番組に関する情報(番組メタデータ)で構成されている。ドキュメントとはXML等で記述された構造化文書のことであり、属性とは名前と値のペアで記述される文書の構成要素のことである。ドキュメントテーブル202は、フラグメントID(fid)、フラグメントバージョン(fver)、コンテンツID(crid)、および番組メタデータを返却単位に分割したドキュメント(フラグメント)をラージオブジェクト型としたものを格納する。一次検索結果テーブル203は、検索クエリから生成したhash値と、検索条件に該当する番組メタデータを持つコンテンツIDのリスト(cridlist)を格納する。キャッシュ管理テーブル204は、hash値と、一次検索結果テーブル203に格納した一次検索結果および後述するレスポンスキャッシュの有効期限を格納する。 First, the configuration of the RDBMS 2 will be described. The RDBMS 2 includes a plurality of attribute tables 201, a document table 202, a primary search result table 203, and a cache management table 204. The attribute table 201 is an expansion of a document in which program metadata is described, and includes information (program metadata) related to a program such as a content ID (crid), a title, an outline, and performers. A document is a structured document described in XML or the like, and an attribute is a component of a document described by name / value pairs. The document table 202 stores a fragment object (fragment) obtained by dividing a fragment ID (fid), fragment version (fver), content ID (crid), and program metadata (fragment) into return units. The primary search result table 203 stores a hash value generated from the search query and a list (content list) of content IDs having program metadata corresponding to the search condition. The cache management table 204 stores a hash value, a primary search result stored in the primary search result table 203, and an expiration date of a response cache described later.
続いて、検索装置1の構成について説明する。図1に示すように、検索装置1は、クエリ受信部101、キャッシュ有効期限判定部102、構文解析部103、SQL生成部104、検索実行部105、ドキュメント取得部106、応答データ生成部107、応答データ返却部108、レスポンスキャッシュ保存部110、およびフラグメントキャッシュ保存部111を備える。検索装置1が備える各部は、演算処理装置、記憶装置等を備えたコンピュータにより構成して、各部の処理がプログラムによって実行されるものとしてもよい。このプログラムは検索装置1が備える記憶装置に記憶されており、磁気ディスク、光ディスク、半導体メモリ等の記録媒体に記録することも、ネットワークを通して提供することも可能である。
Next, the configuration of the
クエリ受信部101は、端末3から検索クエリを受信する。
The
キャッシュ有効期限判定部102は、受信した検索クエリからhash値を計算し、キャッシュ管理テーブル204からそのhash値に対応する有効期限、つまり検索クエリに対応する有効期限を取得して、一次検索結果とレスポンスキャッシュの有効期限判定を行う。受信した検索クエリと同じ検索クエリにより検索したことがある場合は、有効期限を取得でき、受信した検索クエリと同じ検索クエリにより検索したことがない場合は、有効期限を取得できない。計算したhash値は、有効期限を付してキュッシュ管理テーブル204に格納される。
The cache expiration
構文解析部103、SQL生成部104、検索実行部105は、hash値に対応する有効期限が存在しない場合、あるいは、hash値が有効期限切れの場合に、検索クエリからSQLを生成し、RDBMS2に対して検索を実行する。具体的には、構文解析部103が検索クエリから構文木を作成し、SQL生成部104がその構文木からSQLを生成し、検索実行部105が生成したSQLによりRDBMS2に対して検索を実行する。
The
ドキュメント取得部106は、RDBMS2から得られる検索結果であるResultSetオブジェクト205からfid、fverを取得し、fidに該当するドキュメント(フラグメント)をフラグメントキャッシュ保存部111、あるいはRDBMS2から取得する。ResultSetオブジェクト205は、fid、fver、および実体データの格納場所を示すoidの情報を含む。ResultSetオブジェクト205から取得したfidに一致するfidのフラグメントがフラグメントキャッシュ保存部111に存在し、ResultSetオブジェクト205から取得したfverがフラグメントキャッシュ保存部111のfver以下の値であれば、fidに該当するフラグメントをフラグメントキャッシュ保存部111から取得する。一致するfidのフラグメントがフラグメントキャッシュ保存部111に存在しない場合、あるいは、ResultSetオブジェクト205から取得したfverがフラグメントキャッシュ保存部111のfverより大きい場合は、ResultSetオブジェクト205のoidに従って、RDBMS2から実体データを取得する。取得した実体データは、フラグメントキャッシュ保存部111に保存する。
The
応答データ生成部107は、ドキュメント取得部106が取得したドキュメントをデリミタで区切り結合したものを応答データとして生成する。生成した応答データは、hash値とともにレスポンスキャッシュ保存部110に保存する。
The response
応答データ返却部108は、応答データを端末3へ返却する。検索クエリから生成したhash値が有効期限内であって、hash値に対応する応答データがレスポンスキャッシュ保存部110に存在する場合は、応答データ返却部108がレスポンスキャッシュ保存部110からhash値に対応するレスポンスキャッシュ(応答データ)を読み出して端末3へ返却する。hash値が有効期限切れ、あるいはhash値に対応する応答データがレスポンスキャッシュ保存部110に存在しない場合は、応答データ生成部107が生成した応答データを端末3へ返却する。
The response
レスポンスキャッシュ保存部110は、検索クエリから計算したhash値とその検索クエリにより得られた応答データとを関連付けてレスポンスキャッシュとして保存する。
The response
フラグメントキャッシュ保存部111は、fid、fverとともにfidに該当するドキュメント(フラグメント)をフラグメントキャッシュとして保存する。
The fragment
図2に、レンポンスキャッシュとフラグメントキャッシュを説明する概略図を示す。同図に示す応答データは、番組A,Bに関する情報を検索して得られたものである。番組単位に単数もしくは複数のフラグメントが存在することができる。図2において、番組Aの番組メタデータはフラグメントa1〜a3、番組Bの番組メタデータはフラグメントb1〜b3である。フラグメントa1〜b3は、ドキュメントテーブル202において、fid、fverに関連付けられて格納されている。応答データは、番組A,Bに関する情報を検索して得られた、番組メタデータの返却単位であるフラグメントa1〜b3を結合したものである。 FIG. 2 is a schematic diagram illustrating the remence cache and the fragment cache. The response data shown in the figure is obtained by searching for information on programs A and B. There can be one or more fragments per program. In FIG. 2, program metadata of program A is fragments a1 to a3, and program metadata of program B is fragments b1 to b3. Fragments a1 to b3 are stored in the document table 202 in association with fid and fver. The response data is obtained by combining fragments a1 to b3, which are program metadata return units, obtained by searching for information on programs A and B.
レスポンスキャッシュ保存部110は、検索要求単位で応答データをキャッシュする。具体的には、レスポンスキャッシュ保存部110は、番組A,Bに関する情報を検索するための検索クエリから計算したhash値とフラグメントa1〜b3を結合した応答データとを関連付けて保持する。
The response
フラグメントキャッシュ保存部111は、フラグメント単位でフラグメントをキャッシュする。具体的には、フラグメントキャッシュ保存部111は、ドキュメント取得部106がRDBMS2から取得した各フラグメントa1〜b3とfid、fverとを関連付けて保持する。fidは、フラグメントa1〜b3それぞれに一意に割り付けられた識別子である。fverは、フラグメントのバージョンを表す値であり、例えば、番組Aの番組メタデータであるフラグメントa1が更新された場合、fverが1から2へ更新される。fverとして単純に更新時刻を用いてもよい。
The fragment
次に、検索装置1の処理の流れについて説明する。
Next, the processing flow of the
図3は、検索装置1の処理の流れを示すフローチャートである。
FIG. 3 is a flowchart showing the flow of processing of the
クエリ受信部101は、端末3から検索クエリを受信すると、検索クエリからhash値を生成する(ステップS101)。
When receiving the search query from the
そして、キャッシュ有効期限判定部102は、そのhash値に対応する有効期限をRDBMS2のキャッシュ管理テーブル204より取得し(ステップS102)、hash値に対応する有効期限の有無を判定する(ステップS103)。
Then, the cache expiration
hash値に対応する有効期限が取得できた場合、キャッシュ有効期限判定部102は、その有効期限が期限内か否かを判定する(ステップS104)。期限切れの場合は、一次検索結果テーブル203、キャッシュ管理テーブル204から該当レコードを削除する(ステップS105)。
When the expiration date corresponding to the hash value can be acquired, the cache expiration
ステップS103においてhash値に対応する有効期限が無いと判定された場合、あるいはステップS104において取得した有効期限が期限切れと判定された場合は、受信した検索クエリを用いて、構文解析部103、SQL生成部104、検索実行部105によりRDBMS2に対して一次検索を実施する(ステップS106)。一次検索とは、検索条件に該当するコンテンツIDをアトリビュートテーブル201から検索するものである。具体的には、検索条件に従って、アトリビュートテーブル201の属性に該当するコンテンツIDを検索する。一次検索結果である、検索条件に該当するコンテンツIDのリスト(cridlist)を、検索クエリから生成したhash値とともに一次検索結果テーブル203に格納する。
If it is determined in step S103 that there is no expiration date corresponding to the hash value, or if the expiration date acquired in step S104 is determined to have expired, the
一方、hash値に対応する有効期限が期限内の場合は、hash値に対応する応答データがレスポンスキャッシュ保存部110に存在するか否か判定する(ステップS107)。 On the other hand, when the expiration date corresponding to the hash value is within the time limit, it is determined whether or not response data corresponding to the hash value exists in the response cache storage unit 110 (step S107).
レスポンスキャッシュ保存部110にhash値に対応する応答データが存在する場合は、応答データ返却部108は、レスポンスキャッシュ保存部110からその応答データを取得し(ステップS108)、端末3に返却する(ステップS113)。
When the response data corresponding to the hash value exists in the response
一次検索を実施した後、あるいはhash値に対応する応答データが存在しない場合は、二次検索を実施する(ステップS109)。二次検索とは、一次検索結果テーブル203の一次検索結果とドキュメントテーブル202を結合し、コンテンツIDのリスト(cridlist)に該当するドキュメントをResultSetオブジェクト205として取得するものである。具体的には、一次検索で得られたコンテンツIDのリスト(cridlist)とドキュメントテーブル202をコンテンツID(crid)で内部結合した表を取得する。
After performing the primary search or when there is no response data corresponding to the hash value, a secondary search is performed (step S109). The secondary search combines the primary search result of the primary search result table 203 and the document table 202 and acquires a document corresponding to a content ID list (cridlist) as a
二次検索後、ドキュメント取得部106が二次検索で得られたResultSetオブジェクト205を参照し、フラグメントキャッシュ保存部111あるいはRDBMS2からドキュメントを取得する(ステップS110)。ドキュメントを取得するステップS110の詳細は後述する。
After the secondary search, the
そして、応答データ生成部107が、取得したドキュメントを結合して応答データを生成し(ステップS111)、生成した応答データをhash値とともにレスポンスキャッシュ保存部110に保存する(ステップS112)。
Then, the response
そして、応答データ返却部108が生成した応答データを端末3に返却する(ステップS113)。
Then, the response data generated by the response data return
続いて、ドキュメントを取得する処理の流れについて説明する。 Next, the flow of processing for acquiring a document will be described.
図4は、ドキュメント取得部106がドキュメントを取得する処理の流れを示すフローチャートである。
FIG. 4 is a flowchart illustrating a flow of processing in which the
まず、ドキュメント取得部106は、ResultSetオブジェクト205よりfid,fverを1件取得し(ステップS201)、fid,fverが取得できたか否か判定する(ステップS202)。fid,fverが取得できない場合は、検索条件に該当するすべてのドキュメントを取得したのでドキュメントを取得する処理を終了する。
First, the
そして、取得したfidに対応するフラグメントがフラグメントキャッシュ保存部111に存在するか否か判定する(ステップS203)。取得したfidに対応するフラグメントがフラグメントキャッシュ保存部111に存在する場合、取得したfverとフラグメントキャッシュ保存部111に格納されたフラグメントキャッシュのfverとを比較する(ステップS204)。
Then, it is determined whether or not a fragment corresponding to the acquired fid exists in the fragment cache storage unit 111 (step S203). When the fragment corresponding to the acquired fid exists in the fragment
取得したfverがフラグメントキャッシュのfver以下の場合は、フラグメントキャッシュ保存部111からドキュメント(フラグメント)を取得する(ステップS205)。 If the acquired fver is less than or equal to the fver of the fragment cache, the document (fragment) is acquired from the fragment cache storage unit 111 (step S205).
一方、取得したfverがフラグメントキャッシュのfverより大きい場合は、ResultSetオブジェクト205のoidに該当するドキュメントをRDBMS2から取得する(ステップS206)。取得したドキュメントは、fid,fverとともにフラグメントキャッシュ保存部111に保存する(ステップS207)。
On the other hand, if the acquired fver is larger than the fver of the fragment cache, the document corresponding to the oid of the
ドキュメントを取得した後は、ステップS201に戻り、これらの処理をResultSetオブジェクト205が保持する全てのfidについて行う。
After the document is acquired, the process returns to step S201, and these processes are performed for all fids held in the
以上説明したように、本実施の形態によれば、応答データを構成する個別のドキュメントをフラグメントキャッシュ保存部111に保存しておき、ドキュメント取得部106は、取得するドキュメントがフラグメントキャッシュ保存部111に存在すればフラグメントキャッシュ保存部111からドキュメントを取得し、存在しなければ、RDBMS2からドキュメントを取得することにより、ドキュメントをRDBMS2から取得する回数を最小限にすることが可能となり、検索の応答時間を短縮することができる。
As described above, according to the present embodiment, individual documents constituting response data are stored in the fragment
本実施の形態によれば、フラグメントキャッシュ保存部111にドキュメントのバージョンを保存しておき、ドキュメント取得部106は、フラグメントキャッシュ保存部111のドキュメントのバージョンがRDBMS2のドキュメントのバージョンより古い場合は、RDBMS2からドキュメントを取得することにより、キャッシュされたドキュメントとRDBMS2のドキュメントに不整合が生じない。
According to the present embodiment, the document version is stored in the fragment
また、レスポンスキャッシュ保存部110に検索要求単位で応答データをキャッシュしておくことで、同一の検索クエリを受信した場合には、より応答時間を短縮することができる。
In addition, by caching the response data for each search request in the response
1…検索装置
101…クエリ受信部
102…キャッシュ有効期限判定部
103…構文解析部
104…SQL生成部
105…検索実行部
106…ドキュメント取得部
107…応答データ生成部
108…応答データ返却部
110…レスポンスキャッシュ保存部
111…フラグメントキャッシュ保存部
2…RDBMS
201…アトリビュートテーブル
202…ドキュメントテーブル
203…一次検索結果テーブル
204…キャッシュ管理テーブル
205…ResultSetオブジェクト
3…端末
DESCRIPTION OF
201 ... Attribute table 202 ... Document table 203 ... Primary search result table 204 ... Cache management table 205 ...
Claims (7)
検索クエリを受信する受信手段と、
前記検索クエリを用いて前記データベースを検索し、当該検索クエリの検索条件に該当するドキュメントに関して、前記ドキュメントの識別子及び前記ドキュメントの格納場所を示す格納場所情報を有する検索結果を取得する検索手段と、
以前取得したドキュメント、当該ドキュメントの識別子を格納する第1キャッシュ保存手段と、
前記検索結果のドキュメントの識別子に対応するドキュメントが前記第1キャッシュ保存手段に存在するか否か判定し、前記ドキュメントが前記第1キャッシュ保存手段に存在する場合は、前記第1キュッシュ保存手段から前記ドキュメントを取得し、存在しない場合は、前記検索結果の格納場所情報に基づいて前記データベースから前記ドキュメントを取得する取得手段と、
前記データベースから取得した前記ドキュメントを当該ドキュメントの識別子とともに前記第1キャッシュ保存手段に格納する格納手段と、
前記取得手段が取得した1つ以上の前記ドキュメントを結合して応答データを生成する生成手段と、
前記応答データを返却する返却手段と、
を有することを特徴とする検索装置。 A search device for searching for a document corresponding to a search condition from a database storing documents,
Receiving means for receiving a search query;
Search means for searching the database using the search query, and for obtaining a search result having storage location information indicating a storage location of the document and an identifier of the document with respect to a document corresponding to a search condition of the search query;
First cache storage means for storing a previously acquired document and an identifier of the document;
It is determined whether or not a document corresponding to the document identifier of the search result exists in the first cache storage unit. If the document exists in the first cache storage unit, the first cache storage unit If the document is acquired and does not exist, acquisition means for acquiring the document from the database based on the storage location information of the search result;
Storage means for storing the document acquired from the database together with an identifier of the document in the first cache storage means;
Generating means for combining the one or more documents acquired by the acquiring means to generate response data;
Return means for returning the response data;
A search device comprising:
前記第1キャッシュ保存手段は、前記ドキュメントのバージョンを格納するものであって、
前記取得手段は、前記検索結果中のバージョンが前記第1キャッシュ保存手段中のバージョンと同じかそれよりも古い場合は、前記第1キュッシュ保存手段から前記ドキュメントを取得し、前記検索結果中のバージョンが前記第1キャッシュ保存手段中のバージョンより新しい場合は、前記検索結果の格納場所情報に基づいて前記データベースから前記ドキュメントを取得し、
前記格納手段は、前記データベースから取得した前記ドキュメントのバージョンをさらに前記第1キャッシュ保存手段に格納することを特徴とする請求項1記載の検索装置。 The search result has a version of the document;
The first cache storage means stores a version of the document,
If the version in the search result is the same as or older than the version in the first cache storage unit, the acquisition unit acquires the document from the first cache storage unit, and the version in the search result Is newer than the version in the first cache storage means, obtains the document from the database based on the storage location information of the search result,
The search device according to claim 1, wherein the storage means further stores the version of the document acquired from the database in the first cache storage means.
前記検索クエリに対応させて以前返却した応答データを格納する第2キャッシュ保存手段と、
前記検索クエリに対応する前記有効期限を取得し、有効期限が取得でき、当該有効期限が期限内の場合は、前記第2キャッシュ保存手段から応答データを取得すると判定する判定手段と、を有し、
前記返却手段は、前記判定手段が前記第2キャッシュ保存手段から応答データを取得すると判定した場合は、前記第2キャッシュ保存手段から前記検索クエリに対応する前記応答データを取得して返却し、前記生成手段が生成した応答データを返却する場合は、当該応答データを前記検索クエリに対応させて前記第2キャッシュ保存手段に格納することを特徴とする請求項1又は2記載の検索装置。 An expiration date management table that holds an expiration date corresponding to the search query;
Second cache storage means for storing response data previously returned corresponding to the search query;
A determination unit that acquires the expiration date corresponding to the search query, can acquire the expiration date, and determines that the response data is acquired from the second cache storage unit when the expiration date is within the expiration date; ,
If the determination means determines that the response data is acquired from the second cache storage means, the return means acquires and returns the response data corresponding to the search query from the second cache storage means, 3. The search device according to claim 1, wherein when the response data generated by the generation unit is returned, the response data is stored in the second cache storage unit in association with the search query.
検索クエリを受信するステップと、
前記検索クエリを用いて前記データベースを検索し、当該検索クエリの検索条件に該当するドキュメントに関して、前記ドキュメントの識別子及び前記ドキュメントの格納場所を示す格納場所情報を有する検索結果を取得するステップと、
前記検索結果のドキュメントの識別子に対応するドキュメントが、以前取得したドキュメント、当該ドキュメントの識別子を格納する前記第1キャッシュ保存手段に存在するか否か判定し、前記ドキュメントが前記第1キャッシュ保存手段に存在する場合は、前記第1キュッシュ保存手段から前記ドキュメントを取得し、存在しない場合は、前記検索結果の格納場所情報に基づいて前記データベースから前記ドキュメントを取得するステップと、
前記データベースから取得した前記ドキュメントを当該ドキュメントの識別子とともに前記第1キャッシュ保存手段に格納するステップと、
前記取得手段が取得した1つ以上の前記ドキュメントを結合して応答データを生成するステップと、
前記応答データを返却するステップと、
を有することを特徴とする検索方法。 A search method in which a search device searches the document corresponding to a search condition from a database storing documents,
Receiving a search query;
Searching the database using the search query, and obtaining a search result having storage location information indicating an identifier of the document and a storage location of the document with respect to a document corresponding to a search condition of the search query;
It is determined whether or not a document corresponding to the document identifier of the search result exists in the first cache storage unit that stores the previously acquired document and the identifier of the document, and the document is stored in the first cache storage unit. Obtaining the document from the first cache storage means if present, and obtaining the document from the database based on storage location information of the search result if not present;
Storing the document obtained from the database together with an identifier of the document in the first cache storage unit;
Combining one or more of the documents acquired by the acquisition means to generate response data;
Returning the response data;
A search method characterized by comprising:
前記第1キャッシュ保存手段は、前記ドキュメントのバージョンを格納するものであって、
前記取得するステップは、前記検索結果中のバージョンが前記第1キャッシュ保存手段中のバージョンと同じかそれよりも古い場合は、前記第1キュッシュ保存手段から前記ドキュメントを取得し、前記検索結果中のバージョンが前記第1キャッシュ保存手段中のバージョンより新しい場合は、前記検索結果の格納場所情報に基づいて前記データベースから前記ドキュメントを取得し、
前記格納するステップは、前記データベースから取得した前記ドキュメントのバージョンをさらに前記第1キャッシュ保存手段に格納することを特徴とする請求項4記載の検索方法。 The search result has a version of the document;
The first cache storage means stores a version of the document,
The obtaining step obtains the document from the first cache storage means when the version in the search result is the same as or older than the version in the first cache storage means, If the version is newer than the version in the first cache storage means, the document is acquired from the database based on the storage location information of the search result;
5. The search method according to claim 4, wherein the storing step further stores the version of the document acquired from the database in the first cache storage unit.
前記返却するステップは、前記判定するステップにおいて、前記第2キャッシュ保存手段から応答データを取得すると判定した場合は、前記第2キャッシュ保存手段から前記検索クエリに対応する前記応答データを取得して返却し、前記生成するステップにおいて生成した応答データを返却する場合は、当該応答データを前記検索クエリに対応させて前記第2キャッシュ保存手段に格納することを特徴とする請求項4又は5記載の検索方法。 The expiration date corresponding to the search query is acquired from an expiration date management table that holds an expiration date corresponding to the search query, the expiration date can be acquired, and if the expiration date is within the expiration date, the search query Determining to obtain the response data from the second cache storage means for storing the response data previously returned in correspondence;
The returning step acquires and returns the response data corresponding to the search query from the second cache storage unit when it is determined in the determining step that the response data is acquired from the second cache storage unit. 6. The search according to claim 4, wherein when the response data generated in the generating step is returned, the response data is stored in the second cache storage unit in association with the search query. Method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010126043A JP5374444B2 (en) | 2010-06-01 | 2010-06-01 | SEARCH DEVICE, SEARCH METHOD, AND SEARCH PROGRAM |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010126043A JP5374444B2 (en) | 2010-06-01 | 2010-06-01 | SEARCH DEVICE, SEARCH METHOD, AND SEARCH PROGRAM |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2011253299A true JP2011253299A (en) | 2011-12-15 |
JP5374444B2 JP5374444B2 (en) | 2013-12-25 |
Family
ID=45417200
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2010126043A Active JP5374444B2 (en) | 2010-06-01 | 2010-06-01 | SEARCH DEVICE, SEARCH METHOD, AND SEARCH PROGRAM |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5374444B2 (en) |
Cited By (4)
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 |
KR101544560B1 (en) * | 2014-04-02 | 2015-08-17 | (주)비아이매트릭스 | An online analytical processing system for big data by caching the results and generating 2-level queries by SQL parsing |
KR20160036447A (en) * | 2014-09-25 | 2016-04-04 | 주식회사 엘지씨엔에스 | Database apparatus, database management methof performing in database apparatus and storage media storing the same |
WO2016208779A1 (en) * | 2015-06-22 | 2016-12-29 | (주) 비아이매트릭스 | Two-level query-based online analytical processing method for processing large volume of data |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0218641A (en) * | 1988-07-07 | 1990-01-22 | Mitsubishi Electric Corp | Data control method |
JP2001325280A (en) * | 2000-05-15 | 2001-11-22 | Tsubasa System Co Ltd | Data base retrieval system |
JP2004234122A (en) * | 2003-01-28 | 2004-08-19 | Hitachi Information Technology Co Ltd | Server system |
JP2008146380A (en) * | 2006-12-11 | 2008-06-26 | Sony Computer Entertainment Inc | Cache server, control method for it, program, and information storage medium |
JP2008243229A (en) * | 2008-06-12 | 2008-10-09 | Hitachi Ltd | Database management method |
-
2010
- 2010-06-01 JP JP2010126043A patent/JP5374444B2/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0218641A (en) * | 1988-07-07 | 1990-01-22 | Mitsubishi Electric Corp | Data control method |
JP2001325280A (en) * | 2000-05-15 | 2001-11-22 | Tsubasa System Co Ltd | Data base retrieval system |
JP2004234122A (en) * | 2003-01-28 | 2004-08-19 | Hitachi Information Technology Co Ltd | Server system |
JP2008146380A (en) * | 2006-12-11 | 2008-06-26 | Sony Computer Entertainment Inc | Cache server, control method for it, program, and information storage medium |
JP2008243229A (en) * | 2008-06-12 | 2008-10-09 | Hitachi Ltd | Database management method |
Cited By (5)
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 |
KR101544560B1 (en) * | 2014-04-02 | 2015-08-17 | (주)비아이매트릭스 | An online analytical processing system for big data by caching the results and generating 2-level queries by SQL parsing |
KR20160036447A (en) * | 2014-09-25 | 2016-04-04 | 주식회사 엘지씨엔에스 | Database apparatus, database management methof performing in database apparatus and storage media storing the same |
KR101646954B1 (en) * | 2014-09-25 | 2016-08-09 | 주식회사 엘지씨엔에스 | Database apparatus, database management methof performing in database apparatus and storage media storing the same |
WO2016208779A1 (en) * | 2015-06-22 | 2016-12-29 | (주) 비아이매트릭스 | Two-level query-based online analytical processing method for processing large volume of data |
Also Published As
Publication number | Publication date |
---|---|
JP5374444B2 (en) | 2013-12-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR102133951B1 (en) | Short link handling methods, devices, and servers | |
US8402052B2 (en) | Search device, search method, and computer-readable recording medium storing search program | |
US8185546B2 (en) | Enhanced control to users to populate a cache in a database system | |
US20100281005A1 (en) | Asynchronous Database Index Maintenance | |
RU2691595C2 (en) | Constructed data stream for improved event processing | |
US10891302B2 (en) | Scalable synchronization with cache and index management | |
US20150205834A1 (en) | PROVIDING FILE METADATA QUERIES FOR FILE SYSTEMS USING RESTful APIs | |
KR102144534B1 (en) | Search cache update method and device | |
CN110597852B (en) | Data processing method, device, terminal and storage medium | |
CN107783985B (en) | Distributed database query method, device and management system | |
WO2008140937A2 (en) | Query handling in databases with replicated data | |
JP5374444B2 (en) | SEARCH DEVICE, SEARCH METHOD, AND SEARCH PROGRAM | |
CN111046036A (en) | Data synchronization method, device, system and storage medium | |
WO2015096609A1 (en) | Method and system for creating inverted index file of video resource | |
US9177001B2 (en) | Data index using a linked data standard | |
CN114372064B (en) | Data processing apparatus, method, computer readable medium and processor | |
US9875249B1 (en) | Reducing database fragmentation | |
JP2012203792A (en) | Validity period calculation device, validity period calculation method, and validity period calculation program | |
US11625399B2 (en) | Methods and devices for dynamic filter pushdown for massive parallel processing databases on cloud | |
US20080263017A1 (en) | System for unordered relational database retrieval returning distinct values | |
CN107004036B (en) | Method and system for searching logs containing a large number of entries | |
CN106682197B (en) | Search cache updating method and device | |
CN112732751B (en) | Medical data processing method, device, storage medium and equipment | |
JP2012048280A (en) | Content generation device, content generation method, and content generation program | |
KR101780041B1 (en) | Method and apparatus for improving throughput of database |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20130131 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20130212 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20130402 |
|
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: 20130917 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20130920 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5374444 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
S531 | Written request for registration of change of domicile |
Free format text: JAPANESE INTERMEDIATE CODE: R313531 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |