JP2004127074A - File retrieval method in p2p network, terminal, program, and recording medium - Google Patents

File retrieval method in p2p network, terminal, program, and recording medium Download PDF

Info

Publication number
JP2004127074A
JP2004127074A JP2002292246A JP2002292246A JP2004127074A JP 2004127074 A JP2004127074 A JP 2004127074A JP 2002292246 A JP2002292246 A JP 2002292246A JP 2002292246 A JP2002292246 A JP 2002292246A JP 2004127074 A JP2004127074 A JP 2004127074A
Authority
JP
Japan
Prior art keywords
terminal
file
query packet
ttl value
network
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2002292246A
Other languages
Japanese (ja)
Inventor
Masato Uchida
内田 真人
Shinya Nogami
能上 慎也
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 JP2002292246A priority Critical patent/JP2004127074A/en
Publication of JP2004127074A publication Critical patent/JP2004127074A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To reduce the number of Query packets to be transferred when each servant performs file retrieval without using file retrieval technique based on multicast such as Gnutella in a P2P without having a server for retrieving a file. <P>SOLUTION: A servant at a file retrieving origin creates a packet in which retrieval conditions are recorded and transmits it in the P2P network. A servant which receives the packet checks whether or not the present servant holds a file conforming to the retrieval conditions recorded in the received packet (when the servant has the file, informs the servant at the file retrieving origin of a fact according to a predetermined method) and transfers the received packet to other servants. In this case, the packet is successively transferred as tracing tree structure of the network. <P>COPYRIGHT: (C)2004,JPO

Description

【0001】
【発明の属する技術分野】
本発明は、P2P(ピア・ツー・ピア)型のネットワーク(P2Pネットワーク)において用いられるファイル検索方法、端末、プログラム、およびそのプログラムを記録した記録媒体に関する。
【0002】
【従来の技術】
最近注目を集めているP2P型のネットワークは、従来のクライアント・サーバ(C/S)型とは異なり、サーバに頼ることなくコンピュータ資源やサービスをシステム間で直接共有する。
【0003】
例えば、端末間で音楽などのファイルを交換するためのP2Pネットワークを構成するプログラムとして、従来より「Gnutella」と呼ばれるソフトウェアを用いたネットワークが知られている。Gnutellaのネットワークは、ファイル検索機能を備えるサーバが接続されていない純粋なP2Pネットワークである。Gnutellaのネットワークに接続している各端末は、ファイルの検索機能を備えており、サーバントと呼ばれる。
【0004】
Gnutellaのネットワークにおけるファイル検索は次のようにして行われる(非特許文献1、非特許文献2参照)。
1.ファイル検索元のサーバントは直接接続しているサーバントに対して、Queryパケット(「Query」は「問い合わせ」の意味)を送信する。Queryパケットのペイロードには、“この検索要求に応じるサーバントの最低通信速度”や“検索キーワード”といった検索条件が記録されている。
2.Queryパケットを受け取ったサーバントはQueryパケットのヘッダーに記録されているTTL(Time To Live)値を1つ減らし、それが0でなければ、自サーバントの接続している全てのサーバント(Queryパケットを送信してきたサーバントは含まない)へQueryパケットをそれぞれ転送する。
3.転送されてきたQueryパケットの条件に合致するファイルを持っているサーバントは、Query Hitパケットを返す。持っていないサーバントは、単にパケットを転送するだけである。
4.Query Hitパケットは、Queryパケットが転送されてきた経路を逆順にたどって発信元に戻っていく。Query Hitパケットのペイロードには、条件に合ったファイルの総数、Query Hitしたサーバントの待ち受けTCPポート番号、Query HitしたサーバントのIPアドレス、Query Hitしたサーバントの接続通信速度、条件に合ったファイルの名前とサイズとファイルインデックス(どのファイルであるかを示すために、サーバント側で付けている一連の番号)、Query HitしたサーバントのGUID(Grobally Unique Identifier)といった情報が記録されている。
【0005】
【非特許文献1】
伊藤直樹著「P2Pコンピューティング;技術解説とアプリケーション」(株)ソフトリサーチセンタ発行
【非特許文献2】
小松恵一編著「P2P、インターネットの新世紀」社団法人電気通信協会発行
【0006】
【発明が解決しようとする課題】
ファイルを検索するためのサーバを持たないP2Pネットワークにおいて、Gnutellaのようなファイル検索手法を用いる場合、ファイル検索条件が記録されたパケット(以下、Queryパケット)は各端末(以下、サーバント)において中継されるたびに複製され増加し続ける。このことは、ファイル検索に伴う回線帯域、あるいはサーバントのCPUへの負荷につながる。
【0007】
本発明の目的は、複数の端末が接続され、ファイルを検索するためのサーバを持たないP2Pネットワークにおいて、Queryパケットを用いてファイル検索する際に、転送するQueryパケット数(あるいは、転送先のサーバント数)を抑制するファイル検索方法、端末、そのプログラム、およびそのプログラムを記録した記録媒体を提供することにある。
【0008】
【課題を解決するための手段】
本発明の第1の態様では、Queryパケットを転送する際に、自端末の接続している全ての端末(Queryパケットを送信してきた端末は含まない)へ転送(マルチキャスト)するのではなく、ネットワークの木構造をなぞるように順次転送する。本発明の第2の態様では、Queryパケットを転送する際に、自端末の接続している全ての端末(Queryパケットを送信してきた端末は含まない)へ転送(マルチキャスト)するのではなく、TTL値に基づいて転送方法を変化させる。
【0009】
ファイルを検索するためのサーバを持たないP2Pネットワークにおいて、Gnutellaのようなファイル検索手法を用いる場合、Queryパケットは各端末において中継されるたびに複製され増加し続ける。
【0010】
本発明では、ファイルを検索するためのサーバを持たないP2Pネットワークにおいて、Queryパケットをネットワークの木構造をなぞるように転送することにより、あるいはTTL値に基づいて転送方法を変化させることにより、各端末がファイル検索を行う際に、転送するQueryパケット数を抑制する。
【0011】
【発明の実施の形態】
次に、本発明の実施の形態について図面を参照して説明する。
【0012】
まず、P2Pネットワークにおける木構造について図1により説明する。
【0013】
ファイル検索元のサーバントを根とし、根に対応するサーバントに接続しているサーバントを、根に連結する節点とする。これにより、深さ1の木構造が得られる。さらに、根に連結する節点に対応するサーバントに接続しているサーバント(根に対応するサーバントを除く)を、根に連結する節点の節点とする。これにより、深さ2の木構造が得られる。この処理を繰り返すことで、深さdの木構造が得られる。ただし、接続サーバント数が不足している場合には深さdの木構造が構成できない場合もある。なお、この木構造は、TTL値をdとし、ファイル検索元のサーバントを根とし、Gnutellaにおけるファイル検索方法を用いた時にQueryパケットが通過するサーバントを節点として次々に連結することにより得られる木構造と同等である。
【0014】
[第1の実施形態]
本実施形態におけるQueryパケットの転送方法について説明する。
【0015】
ファイル検索元のサーバントは、TTL値をdとしQueryパケットをただ一つ送信する。このQueryパケットは、上記の木構造を行きがけ順(例えば、“データ構造とアルゴリズム”,A.V.エイホ,J.E.ホップクロフト,J.D.ウルマン,培風館,1990を参照)に従って、なぞるように順次転送される(図2)。このことにより、TTL値をdとし、Gnutellaにおけるファイル検索方法を用いた場合と同じサーバントを一つのQueryパケットにより検索することができる。
【0016】
各サーバントは、図3に示すように、Queryパケット入力部11と、木を行きがける順でなぞる転送方法実行部12と、Queryパケット出力部13を有している。
【0017】
次に、本実施形態における各サーバントの動作を説明する。
【0018】
まず、ファイル検索元のサーバントがQueryパケットを送出するまでの動作について説明する。ここでは、ファイル検索元のサーバントをSとおく。
【0019】
アルゴリズムA(図4,5)
1. ファイル検索元のサーバントSが接続している全てのサーバント(この例ではn個存在しているとする)に対して、予め定められた方法に従ってインデックスを付け、それをS,S,…,Sとおく(ステップ21,図4)。
2. Queryパケットを作成し(TTL値はdとする)、SにQueryパケットを転送する(ステップ22)。
【0020】
次に、あるサーバントS(ファイル検索元のサーバントとは限らない)がQueryパケットを受信した際の動作について説明する。サーバントS自身がファイル検索元のサーバントとして作成したものと同じQueryパケットを受信した際(自分が作成したQueryパケットがサーバント間をまわって戻ってきた場合)の動作がアルゴリズムBで、異なるQueryパケットを受信した際の動作がアルゴリズムCである(図6)。
【0021】
アルゴリズムB(図7,8)
1.ファイル検索元のサーバントとして作成したものと同じQueryパケットを受信する(ステップ31)。
2.受信したQueryパケットの転送元Sを判定する(ステップ32)。
3.k=1,…,n−1ならば(図7(1))、QueryパケットのTTL値を1つ減らして、Sk+1へ転送して終了する(ステップ33)。
4.k=nならば(図7(2))、Queryパケットを廃棄して終了する(ステップ34)。
【0022】
アルゴリズムC(図9,10)
1.ファイル検索元のサーバントとして作成したものとは異なるQueryパケットを受信する(ステップ41)。
2.受信したQueryパケットと同じQueryパケットを過去に受信したことがあるか判定する(ステップ42)。
3.無い場合、受信したQueryパケットの条件に合致するファイルを持っているか否かを調べ、持っている場合は予め定められた方法に従ってファイル検索元のサーバントに通知する(ステップ43)。ある場合、処理はステップ45に進む。
4.受信したQueryパケットの転送元のサーバント(ファイル検索元のサーバントとは限らない)をSとおき、さらに、S以外にSが接続している全てのサーバント(この例ではn個存在しているとする)に対して、予め定められた方法に従ってインデックスを付け、それをS,S,…,Sとおく(ステップ44)。
5.受信したQueryパケットのヘッダに記録されているTTL値が1かどうか判定する(ステップ45)。
6.TTL値が1であれば受信したQueryパケットのTTL値を一つ増やし、転送元のサーバントSへ転送して終了する(ステップ46)。
7.TTL値が1でない場合、受信したQueryパケットの転送元Sを判定する(ステップ47)。
8.k=0,1,…,n−1ならば、TTL値を1つ減らしてQueryパケットをサーバントSk+1へ転送して終了する(ステップ48,図9(1))。
9.k=nならば、TTL値を一つ増やして転送元のサーバントSへQueryパケットを転送して終了する(ステップ49,図9(2))。
【0023】
木構造に含まれている全てのサーバントが上記のアルゴリズムA,B,Cに従ってQueryパケットを転送することで、木構造を行きがけ順でなぞるようにQueryパケットを転送することが可能になる。
【0024】
また、着目するP2Pネットワーク内の全てのサーバントはファイル検索元のサーバントとしても動作するし、それ以外のサーバントとしても動作するため、適宜、アルゴリズムA,B,Cを使い分けることによって、ファイルを検索するためのサーバを持たないP2PネットワークにおいてQueryパケット数を抑制するようなファイル検索が可能になる。
【0025】
[第2の実施形態]
第1の実施形態では、木構造を行きがけ順でなぞるようにQueryパケットを転送する方法のみを利用しているが、第2の実施形態では、TTL値に基づいて、Gnutellaの転送方法を併用する(図12)。
【0026】
各サーバントは、図11に示すように、Queryパケット入力部51と、TTL値読み取り部52と、TTL値比較部53と、Gnutellaの転送方法実行部54と、木を行きがけ順でなぞる転送方法実行部55と、Queryパケット出力部56を有する。
【0027】
自サーバントが保持するQueryパケット(自サーバントが検索元サーバントとしてQueryパケットを作成した場合と、他サーバントから受信した場合がある)のTTL値tと、予め定められた値sに基づいて、下記のようにしてGnutellaの転送方向を併用する(ステップ61〜64)。
【0028】
・ stであればGnutellaの転送方法を利用する。
【0029】
・ t<sであれば木をなぞる転送方法を利用する。
【0030】
木をなぞるためのアルゴリズムは第1の実施形態と同様である。
【0031】
[第3の実施形態]
本実施形態の転送方法は、Gnutellaの転送方法を基礎にしているが、保持するQueryパケット(自サーバントが検索元サーバントとして作成したQueryパケットである場合と、他サーバントから受信したQueryパケットである場合がある)のTTL値tに基づいて、転送先サーバントと転送先サーバント数が変化する点が異なる転送方法である(図13)。
【0032】
各サーバントは、図14に示すように、Queryパケット入力部71とTTL値読み取り部72と転送先サーバント数決定部73と転送先サーバント選択部74とTTL値変更部75とQueryパケット出力部76を有している。
【0033】
本実施形態における各サーバントの動作アルゴリズムは下記の通りである(図15)。
1.TTL値読み取り部72により、保持しているQueryパケットのTTL値tを読み取る(ステップ81)。
2.転送先サーバント数決定部73により、予め定められた関数N(・)に基づいて転送先サーバント数をN(t)と決定する(ステップ82)。N(t)は転送可能なサーバント数以下の値を取る。
3.予め定められた方法に基づいて、転送先のサーバントをN(t)個選択する(ステップ83)。
4.TTL値tが1かどうか判定する(ステップ84)。
5.TTL値が1であればQueryパケットを廃棄して終了(ステップ85)。
6.TTL値が1であれば、TTL値tをt−1とし(ファイル検索元のサーバントの場合にはTTL値を変更しない)、ステップ82で選択したサーバントへQueryパケットを転送する(ステップ86)。
【0034】
ステップ83においては、ランダム選択法などを用いればよい。
【0035】
以下に、関数N(・)の具体例を列挙する。ただし、着目するサーバントが直接に接続しているサーバント数をnとおく。
例1.
【0036】
【数1】

Figure 2004127074
例2.
【0037】
【数2】
Figure 2004127074
例3.
【0038】
【数3】
Figure 2004127074
なお、関数N(・)はTTL値tのみに依存する関数でなくてもよい。例えば、TTL値tの初期値tを用いて関数N(t,t)としてもよい。ただし、この場合、各サーバントがtの値を知るための方法を備えておく必要がある。例えば、Queryパケットにtの値を記録するという方法などがある。また、関数N(・)は各サーバント毎に変更するようにしてもよい。
【0039】
なお、本発明は専用のハードウェアにより実現されるもの以外に、その機能を実現するためのプログラムを、コンピュータ読み取り可能な記録媒体に記録して、この記録媒体に記録されたプログラムをコンピュータシステムに読み込ませ、実行するものであってもよい。コンピュータ読み取り可能な記録媒体とは、フロッピーディスク、光磁気ディスク、CD−ROM等の記録媒体、コンピュータシステムに内蔵されるハードディスク装置等の記憶装置を指す。さらに、コンピュータ読み取り可能な記録媒体は、インターネットを介してプログラムを送信する場合のように、短時間の間、動的にプログラムを保持するもの(伝送媒体もしくは伝送波)、その場合のサーバとなるコンピュータシステム内部の揮発性メモリのように、一定時間プログラムを保持しているものも含む。
【0040】
【発明の効果】
以上説明した本発明によれば、ファイルを検索するためのサーバを持たないP2Pネットワークにおいて、Gnutellaのようなマルチキャストに基づくファイル検索手法を用いずに、各サーバントがファイル検索を行う際に転送するQueryパケット数を抑制することが可能になる。
【図面の簡単な説明】
【図1】P2Pネットワークにおける木構造の概念図である。
【図2】本発明の第1の実施形態の概念図である。
【図3】第1の実施形態における各サーバントの構成図である。
【図4】第1の実施形態におけるアルゴリズムAの概念図である。
【図5】アルゴリズムAのフローチャートである。
【図6】第1の実施形態において、Queryパケットを受信した際の処理を示すフローチャートである。
【図7】第1の実施形態におけるアルゴリズムBの概念図である。
【図8】アルゴリズムBのフローチャートである。
【図9】第1の実施形態におけるアルゴリズムCの概念図である。
【図10】アルゴリズムCのフローチャートである。
【図11】本発明の第2の実施形態における各サーバントの構成図である。
【図12】第2の実施形態の動作を示すフローチャートである。
【図13】本発明の第3の実施形態の概念図である。
【図14】第3の実施形態における各サーバントの構成図である。
【図15】第3の実施形態の動作を示すフローチャートである。
【符号の説明】
11  Queryパケット入力部
12  木を行きがけ順でなぞる転送方法実行部
13  Queryパケット出力部
21,22,31〜34,41〜49  ステップ
51  Queryパケット入力部
52  TTL値読み取り部
53  TTL値比較部
54  第1の転送方法実行部
55  第2の転送方法実行部
56  Queryパケット出力部
61〜64  ステップ
71  Queryパケット入力部
72  TTL値読み取り部
73  転送先サーバント数決定部
74  転送先サーバント選択部
75  TTL値変更部
76  Queryパケット出力部
81〜86  ステップ[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a file search method, a terminal, and a program used in a P2P (peer-to-peer) network (P2P network), and a recording medium on which the program is recorded.
[0002]
[Prior art]
The P2P type network, which has recently attracted attention, differs from the conventional client / server (C / S) type in that computer resources and services are directly shared between systems without relying on a server.
[0003]
For example, as a program constituting a P2P network for exchanging files such as music between terminals, a network using software called "Gnutella" has been conventionally known. Gnutella's network is a pure P2P network to which no server having a file search function is connected. Each terminal connected to the Gnutella network has a file search function and is called a servant.
[0004]
The file search in the Gnutella network is performed as follows (see Non-Patent Documents 1 and 2).
1. The file search source servant transmits a Query packet (“Query” means “inquiry”) to the directly connected servant. In the payload of the Query packet, search conditions such as "minimum communication speed of servant responding to this search request" and "search keyword" are recorded.
2. The servant that has received the Query packet decrements the TTL (Time To Live) value recorded in the header of the Query packet by one, and if it is not 0, all servants connected to the servant (transmit the Query packet). To each other) (not including the servant that has been sent).
3. A servant having a file matching the conditions of the transferred Query packet returns a Query Hit packet. A servant who does not have one simply forwards the packet.
4. The Query Hit packet returns to the transmission source by following the route in which the Query packet was transferred in reverse order. The total number of files that meet the conditions, the TCP port number of the servant that performed the Query Hit, the IP address of the servant that performed the Query Hit, the connection communication speed of the servant that performed the Query Hit, and the name of the file that matches the conditions are included in the payload of the Query Hit packet. And information such as a file size, a file index (a series of numbers assigned on the servant side to indicate which file the file is), and a GUID (Globally Unique Identifier) of the servant that performed the Query Hit.
[0005]
[Non-patent document 1]
Naoki Ito, "P2P Computing: Technical Explanations and Applications" Published by Soft Research Center, Inc. [Non-Patent Document 2]
Edited by Keiichi Komatsu, "P2P, the New Century of the Internet" Published by The Telecommunications Association [0006]
[Problems to be solved by the invention]
When a file search method such as Gnutella is used in a P2P network without a server for searching for a file, a packet in which file search conditions are recorded (hereinafter, a Query packet) is relayed by each terminal (hereinafter, a servant). Each time it is replicated and continues to increase. This leads to a line bandwidth associated with the file search or a load on the CPU of the servant.
[0007]
It is an object of the present invention to provide a P2P network in which a plurality of terminals are connected and which do not have a server for retrieving a file. An object of the present invention is to provide a file search method, a terminal, its program, and a recording medium on which the program is recorded, which suppresses the number.
[0008]
[Means for Solving the Problems]
In the first aspect of the present invention, when a Query packet is transferred, the packet is not transferred (multicast) to all terminals connected to the own terminal (not including the terminal that transmitted the Query packet), but is transferred to the network. Are sequentially transferred so as to trace the tree structure of. According to the second aspect of the present invention, when a Query packet is transferred, the TTL is not transferred (multicast) to all the terminals connected to the own terminal (excluding the terminal that transmitted the Query packet), but the TTL is transferred. Change the transfer method based on the value.
[0009]
When a file search method such as Gnutella is used in a P2P network that does not have a server for searching for a file, the Query packet is copied and continuously increased each time relayed at each terminal.
[0010]
According to the present invention, in a P2P network having no server for retrieving a file, each terminal is transferred by tracing a Query packet so as to trace the tree structure of the network or by changing a transfer method based on a TTL value. Suppresses the number of Query packets to be transferred when performing a file search.
[0011]
BEST MODE FOR CARRYING OUT THE INVENTION
Next, embodiments of the present invention will be described with reference to the drawings.
[0012]
First, a tree structure in a P2P network will be described with reference to FIG.
[0013]
The servant connected to the servant corresponding to the root is defined as a node connected to the root, with the servant of the file search source as the root. As a result, a tree structure having a depth of 1 is obtained. Further, a servant connected to the servant corresponding to the node connected to the root (excluding the servant corresponding to the root) is set as a node of the node connected to the root. Thereby, a tree structure having a depth of 2 is obtained. By repeating this process, a tree structure having a depth d is obtained. However, when the number of connected servants is insufficient, a tree structure having a depth d may not be formed. Note that this tree structure is obtained by successively connecting servants with a TTL value of d, a servant of a file search source as a root, and a servant through which a Query packet passes when using the file search method in Gnutella as a node. Is equivalent to
[0014]
[First Embodiment]
A method of transferring a Query packet in the present embodiment will be described.
[0015]
The servant of the file search source transmits only one Query packet with the TTL value set to d. This Query packet traces the above tree structure in the order of the destination (for example, see “Data Structure and Algorithm”, AV Eho, JE Hopcroft, JD Ullman, Baifukan, 1990). (FIG. 2). Thus, the same servant as in the case of using the file search method in Gnutella can be searched by one Query packet, with the TTL value set to d.
[0016]
As shown in FIG. 3, each servant has a Query packet input unit 11, a transfer method execution unit 12 for tracing the tree in the order of traversing the tree, and a Query packet output unit 13.
[0017]
Next, the operation of each servant in the present embodiment will be described.
[0018]
First, an operation until the servant of the file search source transmits a Query packet will be described. Here, the servant of the file search source is set to S.
[0019]
Algorithm A (Figs. 4 and 5)
1. All servants to which the file search source servant S is connected (in this example, it is assumed that there are n servants) are indexed according to a predetermined method, and are indexed by S 1 , S 2 ,. , put an S n (step 21, Figure 4).
2. Create a Query packet (TTL value is set to d), the forward Query packets to S 1 (step 22).
[0020]
Next, an operation when a certain servant S (not necessarily a file search source servant) receives a Query packet will be described. The operation performed when the servant S itself receives the same Query packet as the servant created as the file search source (when the Query packet created by the servant S returns between the servants) is algorithm B. The operation upon reception is algorithm C (FIG. 6).
[0021]
Algorithm B (Figs. 7 and 8)
1. The same Query packet created as the servant of the file search source is received (step 31).
2. It determines the source S k of the received Query Packet (step 32).
3. If k = 1,..., n−1 ((1) in FIG. 7), the TTL value of the Query packet is reduced by one , transferred to Sk + 1 , and the processing ends (step 33).
4. If k = n (FIG. 7 (2)), the query packet is discarded and the process ends (step 34).
[0022]
Algorithm C (FIGS. 9 and 10)
1. A Query packet different from the one created as the servant of the file search source is received (step 41).
2. It is determined whether the same Query packet as the received Query packet has been received in the past (step 42).
3. If not, it is checked whether or not the file has a file that meets the conditions of the received Query packet. If so, the file search source servant is notified according to a predetermined method (step 43). If so, the process proceeds to step 45.
4. Transfer source servant of the received Query packets (not necessarily file search source servant) S 0 Distant, further, in all the servant (this example S other than S 0 is connected to n pieces exist relative to) have, indexed according to a predetermined method, it S 1, S 2, ..., put and S n (step 44).
5. It is determined whether the TTL value recorded in the header of the received Query packet is 1 (step 45).
6. TTL value incremented by one the TTL value of the Query packets received if 1, then exit transferred to the transfer source servant S O (step 46).
7. If the TTL value is not 1, judges the source S k of the received Query Packet (step 47).
8. If k = 0, 1,..., n−1, the TTL value is reduced by one, the Query packet is transferred to the servant S k + 1 , and the process ends (step 48, FIG. 9 (1)).
9. If k = n, and transfer the Query packet ends by increasing one TTL value to the transfer source servant S 0 (step 49, FIG. 9 (2)).
[0023]
When all servants included in the tree structure transfer the Query packets according to the above algorithms A, B, and C, it becomes possible to transfer the Query packets so that the Query packets trace the tree structure in the order in which they are traversed.
[0024]
Further, all servants in the P2P network of interest operate as servants as file search sources and also operate as other servants. Therefore, a file is searched by using algorithms A, B, and C as appropriate. File search that suppresses the number of Query packets in a P2P network that does not have a server for use.
[0025]
[Second embodiment]
In the first embodiment, only the method of transferring Query packets so as to trace the tree structure in a traversal order is used, but in the second embodiment, the transfer method of Gnutella is also used based on the TTL value. (FIG. 12).
[0026]
As shown in FIG. 11, each servant executes a query method input unit 51, a TTL value reading unit 52, a TTL value comparison unit 53, a Gnutella transfer method execution unit 54, and a transfer method for tracing a tree in a traversal order. And a Query packet output unit 56.
[0027]
Based on a TTL value t of a Query packet held by the own servant (a case where the own servant creates a Query packet as a search source servant and a case where it is received from another servant) and a predetermined value s, Thus, the transfer direction of Gnutella is used together (steps 61 to 64).
[0028]
If s < t, use Gnutella's transfer method.
[0029]
If t <s, use the transfer method that traces the tree.
[0030]
The algorithm for tracing the tree is the same as in the first embodiment.
[0031]
[Third Embodiment]
Although the transfer method of the present embodiment is based on the transfer method of Gnutella, a query packet to be held (a case where the own servant is a Query packet created as a search source servant and a case where the query packet is received from another servant) The transfer method is different in that the transfer destination servant and the number of transfer destination servants change based on the TTL value t) (FIG. 13).
[0032]
As shown in FIG. 14, each servant includes a Query packet input unit 71, a TTL value reading unit 72, a destination servant number determining unit 73, a destination servant selection unit 74, a TTL value changing unit 75, and a Query packet output unit 76. Have.
[0033]
The operation algorithm of each servant in the present embodiment is as follows (FIG. 15).
1. The TTL value reading unit 72 reads the TTL value t of the held Query packet (step 81).
2. The transfer destination servant number determination unit 73 determines the transfer destination servant number as N (t) based on a predetermined function N (·) (step 82). N (t) takes a value equal to or less than the number of servants that can be transferred.
3. Based on a predetermined method, N (t) servants as transfer destinations are selected (step 83).
4. It is determined whether the TTL value t is 1 (step 84).
5. If the TTL value is 1, the Query packet is discarded and the process ends (step 85).
6. If the TTL value is 1, the TTL value t is set to t-1 (the TTL value is not changed in the case of the file search source servant), and the Query packet is transferred to the servant selected in step 82 (step 86).
[0034]
In step 83, a random selection method or the like may be used.
[0035]
Hereinafter, specific examples of the function N (•) will be listed. However, let n be the number of servants to which the servant of interest is directly connected.
Example 1
[0036]
(Equation 1)
Figure 2004127074
Example 2.
[0037]
(Equation 2)
Figure 2004127074
Example 3
[0038]
[Equation 3]
Figure 2004127074
Note that the function N (•) may not be a function that depends only on the TTL value t. For example, the function N (t, t 0 ) may be set using the initial value t 0 of the TTL value t. However, in this case, it is necessary to each servant should provide a way to know the value of t 0. For example, there is a method that records the value of t 0 to Query packets. Further, the function N (•) may be changed for each servant.
[0039]
In addition, the present invention records a program for realizing the function other than that realized by dedicated hardware on a computer-readable recording medium, and stores the program recorded on the recording medium in a computer system. It may be read and executed. The computer-readable recording medium refers to a recording medium such as a floppy disk, a magneto-optical disk, a CD-ROM, or a storage device such as a hard disk device built in a computer system. Further, the computer-readable recording medium is one that dynamically holds the program for a short time (transmission medium or transmission wave), such as a case where the program is transmitted via the Internet, and serves as a server in that case. It also includes those that hold programs for a certain period of time, such as volatile memory inside a computer system.
[0040]
【The invention's effect】
According to the present invention described above, in a P2P network that does not have a server for searching for a file, each servant transfers a query when performing a file search without using a file search method based on multicast such as Gnutella. It is possible to reduce the number of packets.
[Brief description of the drawings]
FIG. 1 is a conceptual diagram of a tree structure in a P2P network.
FIG. 2 is a conceptual diagram of the first embodiment of the present invention.
FIG. 3 is a configuration diagram of each servant in the first embodiment.
FIG. 4 is a conceptual diagram of an algorithm A according to the first embodiment.
FIG. 5 is a flowchart of algorithm A.
FIG. 6 is a flowchart illustrating processing when a Query packet is received in the first embodiment.
FIG. 7 is a conceptual diagram of an algorithm B according to the first embodiment.
FIG. 8 is a flowchart of algorithm B.
FIG. 9 is a conceptual diagram of an algorithm C according to the first embodiment.
FIG. 10 is a flowchart of algorithm C.
FIG. 11 is a configuration diagram of each servant according to the second embodiment of the present invention.
FIG. 12 is a flowchart illustrating the operation of the second embodiment.
FIG. 13 is a conceptual diagram of a third embodiment of the present invention.
FIG. 14 is a configuration diagram of each servant in the third embodiment.
FIG. 15 is a flowchart showing the operation of the third embodiment.
[Explanation of symbols]
11 Query packet input unit 12 Transfer method execution unit 13 tracing a tree in a traversal order 13 Query packet output units 21, 22, 31 to 34, 41 to 49 Step 51 Query packet input unit 52 TTL value reading unit 53 TTL value comparison unit 54 1 transfer method execution unit 55 second transfer method execution unit 56 Query packet output units 61 to 64 Step 71 Query packet input unit 72 TTL value read unit 73 Transfer destination servant number determination unit 74 Transfer destination servant selection unit 75 TTL value change Unit 76 Query packet output units 81 to 86 Step

Claims (9)

複数の端末が接続され、ファイルを検索するためのサーバを持たないP2Pネットワークにおいてファイルを検索する方法であって、
ファイル検索元の端末が作成し、前記P2Pネットワーク内に送出した、検索条件を記録したQueryパケットを受信する第1のステップと、
受信したQueryパケットに記録されている検索条件に合致するファイルを自端末が保持しているか否かを調べ、もし、保持している場合には予め定められた方法に従ってファイル検索元の端末に通知する第2のステップと、
受け取ったQueryパケットを他端末へネットワークの木構造をなぞるように順次転送する第3のステップを有するファイル検索方法。
A method for searching for a file in a P2P network in which a plurality of terminals are connected and does not have a server for searching for a file,
A first step of receiving a Query packet created by the terminal that is the file search source and transmitted into the P2P network and recording the search conditions;
It checks whether the own terminal holds a file that matches the search condition recorded in the received Query packet, and if so, notifies the file search source terminal according to a predetermined method. A second step to
A file search method including a third step of sequentially transferring received Query packets to another terminal so as to trace a tree structure of a network.
前記第1と第2のステップが、
受信したQueryパケットがファイル検索元の端末として作成したものと同じかどうか判定するステップと、
前記Queryパケットがファイル検索元の端末として作成したものと同じであった場合、受信したQueryパケットの転送元が自端末に接続されている端末群の、ファイル転送順序で最後の端末でなければ前記QueryパケットのTTL値を1つ減らして前記端末群の次のファイル転送順序の端末へ前記Queryパケットを転送し、受信したQueryパケットの転送元が前記端末群の、ファイル転送順序で最後の端末であれば前記Queryパケットを破棄するステップと、
前記Queryパケットがファイル検索元の端末として作成したものと異なる場合、これと同じQueryパケットを過去に受信したことがなければ、受信したQueryパケットの条件に合致するファイルを持っているかどうか調べ、持っていればファイル検索元の端末に通知した後、受信したQueryパケットのTTL値が1であればTTL値を1つ増やし、転送元の端末へQueryパケットを転送し、受信したQueryパケットのTTL値が1でなければ、前記Queryパケットの転送先が自端末に接続されている端末群の、ファイル転送順序で最後の端末でなければ前記Queryパケットを、TTL値を1つ減らして前記端末群の次のファイル転送順序の端末へ転送し、前記Queryパケットの転送先が自端末に接続されている端末群のファイル転送順序で最後の端末であれば前記Queryパケットを、TTL値を1つ増やして転送元の端末に転送するステップを含む、請求項1に記載のファイル検索方法。
The first and second steps include:
Determining whether the received Query packet is the same as the one created as the file search source terminal;
If the Query packet is the same as the one created as the file search source terminal, the transfer source of the received Query packet is not the last terminal in the file transfer order of the terminal group connected to the own terminal. The TTL value of the Query packet is reduced by one, the Query packet is transferred to the terminal in the next file transfer order of the terminal group, and the transfer source of the received Query packet is the last terminal in the file transfer order of the terminal group. Discarding the Query packet, if any;
If the Query packet is different from the one created as the file search source terminal, if the same Query packet has not been received in the past, it is checked whether or not a file matching the conditions of the received Query packet is possessed. If the TTL value of the received Query packet is 1, after the notification, the TTL value is increased by one, the Query packet is transferred to the transfer source terminal, and the TTL value of the received Query packet is notified. Is not 1, the query packet is transferred to the terminal group connected to its own terminal, and if it is not the last terminal in the file transfer order, the Query packet is decremented by one and the TTL value is reduced by one. The file is transferred to the terminal in the next file transfer order, and the transfer destination of the Query packet is connected to the terminal itself. The Query packet if the last terminal in the file transfer sequence of the terminal group in which, comprising the step of transferring the transfer source terminal TTL value is incremented by one, the file search method of claim 1.
複数の端末が接続され、ファイルを検索するためのサーバを持たないP2Pネットワークにおいてファイルを検索する方法であって、
ファイル検索元の端末が作成し、P2Pネットワーク内に送出した、検索条件を記録したQueryパケットを受信する第1のステップと、
受信したQueryパケットに記録されている検索条件に合致するファイルを自端末が保持しているか否かを調べ、もし、保持している場合には予め定められた方法に従ってファイル検索元の端末に通知する第2のステップと、
受け取ったQueryパケットを他端末へ転送し、その際該Queryパケットに記録されているTTL値に基づいて転送方法を変化させる第3のステップを有するファイル検索方法。
A method for searching for a file in a P2P network in which a plurality of terminals are connected and does not have a server for searching for a file,
A first step of receiving a Query packet created by the terminal that is the file search source and sent out in the P2P network and recording the search conditions;
It checks whether the own terminal holds a file that matches the search condition recorded in the received Query packet, and if so, notifies the file search source terminal according to a predetermined method. A second step to
A file search method comprising: transferring a received Query packet to another terminal; and, at that time, changing the transfer method based on a TTL value recorded in the Query packet.
前記第3のステップは、TTL値を読み取るステップと、予め定められた関数に基づいて転送先端末数を決定するステップと、予め定められた方法に基づいて転送先の端末を決定された転送先端末数選択するステップと、TTL値が1かどうか判定するステップと、TTL値が1であればQueryパケットを廃棄するステップと、TTL値が1でなければTTL値を−1してQueryパケットを選択された端末へ転送するステップを含む、請求項3に記載のファイル転送方法。The third step is a step of reading a TTL value, a step of determining the number of destination terminals based on a predetermined function, and a step of determining the destination terminal based on a predetermined method. A step of selecting the number of terminals, a step of determining whether or not the TTL value is 1; a step of discarding the Query packet if the TTL value is 1; 4. The file transfer method according to claim 3, further comprising transferring the file to a selected terminal. ファイルを検索するためのサーバを持たないP2Pネットワークにおける端末であって、
ファイル検索元の端末が作成し、前記P2Pネットワーク内に送出した、検索条件を記録したQueryパケットを受信する手段と、
受信したQueryパケットに記録されている検索条件に合致するファイルを自端末が保持しているか否かを調べ、もし、保持している場合には予め定められた方法に従ってファイル検索元の端末に通知する手段と、
受け取ったQueryパケットを他端末へネットワークの木構造をなぞるように順次転送する手段を有する端末。
A terminal in a P2P network without a server for retrieving a file,
Means for receiving a Query packet created by the terminal that is the file search source and sent out in the P2P network and recording the search conditions;
It checks whether the own terminal holds a file that matches the search condition recorded in the received Query packet, and if so, notifies the file search source terminal according to a predetermined method. Means to
A terminal having means for sequentially transferring a received Query packet to another terminal so as to trace the tree structure of the network.
ファイルを検索するためのサーバを持たないP2Pネットワークにおける端末であって、
ファイル検索元の端末が作成し、P2Pネットワーク内に送出した、検索条件を記録したQueryパケットを受信する手段と、
受信したQueryパケットに記録されている検索条件に合致するファイルを自端末が保持しているか否かを調べ、もし、保持している場合には予め定められた方法に従ってファイル検索元の端末に通知する手段と、
受け取ったQueryパケットを他端末へ転送し、その際該Queryパケットに記録されているTTL値に基づいて転送方法を変化させる手段を有する端末。
A terminal in a P2P network without a server for retrieving a file,
Means for receiving a Query packet created by the file search source terminal and transmitted into the P2P network, in which the search condition is recorded;
It checks whether the own terminal holds a file that matches the search condition recorded in the received Query packet, and if so, notifies the file search source terminal according to a predetermined method. Means to
A terminal having means for transferring a received Query packet to another terminal and changing the transfer method based on a TTL value recorded in the Query packet.
前記Queryパケットを他端末へ転送する手段は、前記QueryパケットのTTL値を読み取る手段と、予め定められた関数に基づいて転送先端末数を決定する手段と、予め定められた方法に基づいて転送先の端末を、前記転送先端末数選択する手段と、TTL値が1かどうか判断し、TTL値が1であればQueryパケットを廃棄し、TTL値が1でなければTTL値を−1してQueryパケットを選択された端末に出力する手段を含む、請求項6に記載の端末。Means for transferring the query packet to another terminal, means for reading a TTL value of the query packet, means for determining the number of destination terminals based on a predetermined function, and transfer based on a predetermined method. Means for selecting the number of transfer destination terminals to the destination terminal; determining whether the TTL value is 1; discarding the Query packet if the TTL value is 1; decrementing the TTL value by -1 if the TTL value is not 1; The terminal according to claim 6, further comprising: means for outputting a Query packet to the selected terminal. 請求項1から4に記載の方法をコンピュータに実行させるためのプログラム。A program for causing a computer to execute the method according to claim 1. 請求項8に記載のプログラムを記録した、コンピュータ読み取り可能な記録媒体。A computer-readable recording medium on which the program according to claim 8 is recorded.
JP2002292246A 2002-10-04 2002-10-04 File retrieval method in p2p network, terminal, program, and recording medium Pending JP2004127074A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002292246A JP2004127074A (en) 2002-10-04 2002-10-04 File retrieval method in p2p network, terminal, program, and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002292246A JP2004127074A (en) 2002-10-04 2002-10-04 File retrieval method in p2p network, terminal, program, and recording medium

Publications (1)

Publication Number Publication Date
JP2004127074A true JP2004127074A (en) 2004-04-22

Family

ID=32283561

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002292246A Pending JP2004127074A (en) 2002-10-04 2002-10-04 File retrieval method in p2p network, terminal, program, and recording medium

Country Status (1)

Country Link
JP (1) JP2004127074A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7821945B2 (en) 2005-01-08 2010-10-26 Sejong Industry-Academy Cooperation Foundation Method of downloading data in peer-to-peer service of wired and wireless integrated network and node therefor
US7853718B2 (en) 2006-01-30 2010-12-14 Brother Kogyo Kabushiki Kaisha Information delivery system, reregistration message sending method, node device, and recording medium recording node processing program
US8312065B2 (en) 2006-04-11 2012-11-13 Brother Kogyo Kabushiki Kaisha Tree-type broadcast system, reconnection process method, node device, node process program, server device, and server process program
US8654678B2 (en) 2006-04-12 2014-02-18 Brother Kogyo Kabushiki Kaisha Node device, recording medium where storage control program is recorded, and information storing method
JP2016060122A (en) * 2014-09-18 2016-04-25 富士ゼロックス株式会社 Image forming device and program

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7821945B2 (en) 2005-01-08 2010-10-26 Sejong Industry-Academy Cooperation Foundation Method of downloading data in peer-to-peer service of wired and wireless integrated network and node therefor
US7853718B2 (en) 2006-01-30 2010-12-14 Brother Kogyo Kabushiki Kaisha Information delivery system, reregistration message sending method, node device, and recording medium recording node processing program
US8312065B2 (en) 2006-04-11 2012-11-13 Brother Kogyo Kabushiki Kaisha Tree-type broadcast system, reconnection process method, node device, node process program, server device, and server process program
US8654678B2 (en) 2006-04-12 2014-02-18 Brother Kogyo Kabushiki Kaisha Node device, recording medium where storage control program is recorded, and information storing method
JP2016060122A (en) * 2014-09-18 2016-04-25 富士ゼロックス株式会社 Image forming device and program
US9485367B2 (en) 2014-09-18 2016-11-01 Fuji Xerox Co., Ltd. Connecting image forming devices based on a communication session count

Similar Documents

Publication Publication Date Title
US6839769B2 (en) Limiting request propagation in a distributed file system
US7644167B2 (en) Identifying a service node in a network
US8788573B2 (en) Method and apparatus for efficiently expanding a P2P network
US8280970B2 (en) Method and apparatus for improving data transfers in peer-to-peer networks
US20050080858A1 (en) System and method for searching a peer-to-peer network
US20100027442A1 (en) Constructing scalable overlays for pub-sub with many topics: the greedy join-leave algorithm
EP2988512B1 (en) System and method for reconstructable all-in-one content stream
WO2006111970A1 (en) Method and system for detecting and managing peer-to-peer traffic over a data network
US7346669B2 (en) Method, apparatus and system for processing message bundles on a network
Woodrow et al. SPIN-IT: a data centric routing protocol for image retrieval in wireless networks
Pitkanen et al. Searching for content in mobile DTNs
JP2004127074A (en) File retrieval method in p2p network, terminal, program, and recording medium
JP2006048507A (en) File search method, terminal, program, and recording medium
JP4300292B2 (en) Distributed information sharing / retrieval method and system in peer-to-peer network
JP2004258994A (en) Dynamic file retrieval method for p2p network, terminal, program, and recording medium
Suthir et al. Contemporary and efficient shared area network in Peer-to-Peer Communication
Hoang et al. A backward-compatible protocol for inter-routing over heterogeneous overlay networks
JP2009134341A (en) Peer searching method and communication apparatus
Perera et al. Broadcast Updates with Local Look-up Search (BULLS) a new peer-to-peer protocol
JP5060927B2 (en) Information search method, information search device, information search response device, and computer program
JP2005234762A (en) Resource retrieval device and method, and computer program
Khalil et al. NEST: Efficient transport of data summaries over named data networks
Velazco et al. Laser injection of spot defects on integrated circuits
Najafi et al. The use of super node to process query in peer-to-peer networks
JP2004341912A (en) Information searching method, servant, program, and recording medium with program recorded thereon