JP2009134341A - Peer searching method and communication apparatus - Google Patents

Peer searching method and communication apparatus Download PDF

Info

Publication number
JP2009134341A
JP2009134341A JP2007307595A JP2007307595A JP2009134341A JP 2009134341 A JP2009134341 A JP 2009134341A JP 2007307595 A JP2007307595 A JP 2007307595A JP 2007307595 A JP2007307595 A JP 2007307595A JP 2009134341 A JP2009134341 A JP 2009134341A
Authority
JP
Japan
Prior art keywords
peer
content
hash
transfer destination
search
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
JP2007307595A
Other languages
Japanese (ja)
Inventor
Yukio Hirano
幸男 平野
Jun Mizuguchi
潤 水口
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2007307595A priority Critical patent/JP2009134341A/en
Publication of JP2009134341A publication Critical patent/JP2009134341A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To obtain a peer searching method capable of reducing the fluctuation of processing time, and capable of rapidly performing the processing. <P>SOLUTION: The peer searching method allows the peers constituting a peer-to-peer network with a distributed hash table system adopted thereto to find a transmission destination or a transfer destination of a content request among transfer destination peer information. The method includes: a step (S107) of generating a search tree with a branch condition defined therein through the use of the hash values of the peers included in the transfer destination peer information, and determining whether or not the hash value of the key of the content satisfies the branch condition in order from the upper stage of the search tree; and a step (S108) of adopting the peer corresponding to the branch condition, which is determined to satisfy the branch condition and in the lowest stage, as a search result. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、コンテンツが分散管理されるピアツーピアネットワークにおいて、検索対象のコンテンツを保持する通信装置(ピア)を探索するピア検索方法および通信装置に関するものである。   The present invention relates to a peer search method and a communication device for searching for a communication device (peer) holding content to be searched in a peer-to-peer network in which content is distributed and managed.

近年、インターネットなどのIP(Internet Protocol)ネットワークを利用して、既存のネットワーク機器の機能を変更せずに、特定のサービスを行うために、様々な種類のピアツーピアネットワークが構築されており、ネットワークの数や規模は年々増加している。ピアツーピアネットワークでは、参加するピア(通信装置)の増加に比例してコンテンツ情報量が増加する。そのため、参加するピア数の多い大規模なピアツーピアネットワークでは、コンテンツをサーバで集中管理することが困難になる。   In recent years, various types of peer-to-peer networks have been constructed to perform specific services using IP (Internet Protocol) networks such as the Internet without changing the functions of existing network devices. The number and scale are increasing year by year. In a peer-to-peer network, the amount of content information increases in proportion to an increase in participating peers (communication devices). Therefore, in a large-scale peer-to-peer network with a large number of participating peers, it becomes difficult to centrally manage content with a server.

そこで、大規模なピアツーピアネットワークでは、コンテンツを各ピアに分散させて管理するコンテンツ分散管理方式が用いられている。コンテンツ分散管理方式の一つに、分散ハッシュテーブル技術(以降、DHT(Distributed Hash Table)という)がある。DHTでは、コンテンツの題名といったコンテンツを探し出す鍵を、ハッシュ関数を用いて固定長のbit列(ハッシュ)に変換し、ハッシュの値に応じて、そのハッシュを管理すべきピアを決める。DHTでは、ハッシュが作り出すハッシュ空間の表現方法の違いにより、幾つかの実装方式が提案されている。   Thus, in a large-scale peer-to-peer network, a content distribution management method is used in which content is distributed to each peer for management. One of the content distribution management methods is a distributed hash table technique (hereinafter referred to as DHT (Distributed Hash Table)). In DHT, a key for searching for content such as a title of the content is converted into a fixed-length bit string (hash) using a hash function, and a peer that should manage the hash is determined according to the hash value. In DHT, several implementation methods have been proposed depending on the difference in the representation method of the hash space created by the hash.

たとえば、ハッシュ空間を一次元で表したDHT実装方式として、カリフォルニア大学バークレー校のStoicaらが開発したChordがある(下記非特許文献1参照)。Chordでは、ハッシュをNbitで示す場合、ハッシュ値2N−1の次をハッシュ値0とすることによりハッシュ空間を円状の空間と見なしている。 For example, Chord developed by Stoica et al. At the University of California, Berkeley (see Non-Patent Document 1 below) is a DHT implementation method that represents a one-dimensional hash space. In Chord, when the hash is represented by N bits, the hash space is regarded as a circular space by setting the hash value 0 next to the hash value 2 N −1.

Chordネットワークでは、参加するピアにそれぞれユニークなハッシュが与えられる。各ピアでは、自分のハッシュ以下で、かつハッシュ空間で小さい方に隣接するピアのハッシュより大きいハッシュを持つコンテンツを管理する。例えば、3bit(N=3)の一次元ハッシュ空間で、3台のピアのハッシュがそれぞれ“0”,“1”,“3”であるケースでは、ハッシュが“0”のピア(以降、ハッシュがmのピアをピア#mと呼ぶ)はコンテンツの鍵のハッシュが“4”,“5”,“6”,“7”,“0”となるコンテンツ情報だけを管理する。   In the Chord network, each participating peer is given a unique hash. Each peer manages content that has a hash that is less than its own hash and that is greater than the hash of the neighboring peer that is smaller in the hash space. For example, in the case of a 3-bit (N = 3) one-dimensional hash space where the hash of the three peers is “0”, “1”, “3”, respectively, the peer with the hash “0” (hereinafter referred to as the hash) The peer having the m is called peer #m) manages only the content information in which the hash of the content key is “4”, “5”, “6”, “7”, “0”.

また、参加するピアの数が多くなると、各々のピアが参加するピアの全てと接続できるメッシュ形態の転送先を管理するテーブルを持つことが、困難になる。そこで、Chordでは各ピアは、一部のピアだけと接続する。これらのピアをFingerと呼び、Fingerを管理するテーブルをFingerテーブルと呼ぶ。各ピアは、自分のハッシュに2i(iは0≦i<Nの整数)を加算したハッシュと等しいか、それより大きなハッシュを持つ一番近いピア(以降、このピアをFinger[i]と呼ぶ)をFingerテーブルで管理し、Fingerテーブルに含まれるピアだけに転送を行う。上記の3台のピアの例では、ピア#0は、i=0のFingerに相当するピア1と、i=1のFingerに相当するピア#3のみを転送先として管理し、この2つのピアのみにデータの転送ができる。同様に、ピア#1は、ピア#3とピア#0を転送先として管理し、この2つのピアのみにデータの転送ができる。また、ピア3は、ピア0のみを転送先として管理し、ピア#0のみにデータの転送ができる。 Further, as the number of participating peers increases, it becomes difficult to have a table for managing the transfer destinations in mesh form that can be connected to all of the participating peers. Therefore, in the Chord, each peer connects with only some of the peers. These peers are called Fingers, and a table that manages the Fingers is called a Finger table. Each peer is equal to or equal to a hash obtained by adding 2 i (i is an integer satisfying 0 ≦ i <N) to its own hash (hereinafter referred to as “Finger [i]”). Are managed in the Finger table, and transfer is performed only to peers included in the Finger table. In the above example of three peers, Peer # 0 manages only Peer 1 corresponding to i = 0 Finger and Peer # 3 corresponding to i = 1 Finger as transfer destinations. Can only transfer data. Similarly, peer # 1 manages peers # 3 and # 0 as transfer destinations and can transfer data only to these two peers. The peer 3 manages only the peer 0 as a transfer destination, and can transfer data only to the peer # 0.

各ピアは、データを受信すると、まず、そのデータのコンテンツの鍵のハッシュを求め、自分のDHTで管理するハッシュかどうかを比較する。比較の結果、自分のDHTの管理外のハッシュである場合には、Fingerテーブルの中から適切なピアを検索して求め、受信データを転送する。   When each peer receives data, it first obtains a hash of the key of the content of the data, and compares whether or not the hash is managed by its own DHT. As a result of the comparison, if the hash is not managed by its own DHT, an appropriate peer is searched from the Finger table and obtained, and the received data is transferred.

このときのピア探索の具体的な処理内容について、説明する。ここで、[x,y)の表記は、x以上y未満のハッシュ空間の領域を示すものとする。また、コンテンツの鍵のハッシュをhとする。はじめに、i=N−1、y=自ピアのハッシュとする。つぎに、xをFinger[i]のハッシュとし、hが[x,y)の領域に含まれているかを判断し、含まれていればFinger[i]のピアを転送先として決定する。含まれていなければ、yをxとし、iから1を減じる。そして、再び、xをFinger[i]のハッシュとして、再度hが[x,y)の領域に含まれているかを判断し、含まれていればFinger[i]のピアを転送先とする。含まれていなければ、yをxとし、さらにiから1を減じる。そして、ピアの転送先を決定するか、i=0となるまで、iの値を1ずつ減じて処理を繰り返す。i=0としてもhが[x,y)の領域に含まれていない場合には、転送先のピアはFinger[0]のピアとする。   The specific processing contents of the peer search at this time will be described. Here, the notation [x, y) indicates an area of a hash space not less than x and less than y. Also, the hash of the content key is set to h. First, i = N−1 and y = the hash of its own peer. Next, x is a hash of Finger [i], and it is determined whether h is included in the area [x, y). If it is included, the peer of Finger [i] is determined as the transfer destination. If not, y is x and 1 is subtracted from i. Then, x is determined again as a hash of Finger [i], and it is determined again whether h is included in the area [x, y). If included, the peer of Finger [i] is set as the transfer destination. If not, y is x and 1 is subtracted from i. Then, the transfer destination of the peer is determined, or the process is repeated by decreasing the value of i by 1 until i = 0. If h is not included in the area [x, y) even if i = 0, the transfer destination peer is the peer of Finger [0].

ハッシュ空間では2N−1と0が繋がっていることから、xがyより大きい場合もある。この場合には、hが[x,y)の領域に含まれているかの判断に替えて、hが[x,2N−1]または[0,y)に含まれているかを判断する。 Since 2 N −1 and 0 are connected in the hash space, x may be larger than y. In this case, instead of determining whether h is included in the region [x, y), it is determined whether h is included in [x, 2 N −1] or [0, y).

たとえば、ピア#1が、コンテンツの鍵のハッシュが“4”となるコンテンツを管理するピアを求めたい場合は、上述の検索処理によってFinger[2]=ピア3が転送先として決定され、ピア#1はピア#3にデータを転送する。ピア#3は、上述の検索処理を行い、i=0の場合もhが[x,y)の領域に含まれていないため、転送先としてFinger[0]であるピア#0を決定し、ピア#0にデータを転送する。最後に、このデータを受信したピア0は、ハッシュ(鍵のハッシュ)“4”のコンテンツは自分のDHTにあることから、自分が管理するコンテンツであると認識し、該当コンテンツを探し出し、ピア#1宛てに送付する。   For example, when the peer # 1 wants to find a peer that manages the content whose hash of the content key is “4”, Finger [2] = Peer 3 is determined as the transfer destination by the above search process, and the peer # 1 transfers data to peer # 3. Peer # 3 performs the above-described search process, and even when i = 0, h is not included in the area of [x, y). Therefore, Peer # 0 that is Finger [0] is determined as the transfer destination, Transfer data to peer # 0. Finally, the peer 0 that has received this data recognizes that the content of the hash (key hash) “4” is in its own DHT, so that it is the content that it manages, searches for the corresponding content, and peer # Send to 1

要求元のピアにコンテンツを送付するときにも、ピアツーピアネットワークを用いる場合がある。この場合も上述の検索処理によって要求元のピアを見つける。上記の例ではピア#0が、ハッシュが“1”であるピア#1にコンテンツを送付するために上述の検索処理を行い、ピア#0のFinger[0]であるピア#1にコンテンツを送付する。ピア#1は、受信したコンテンツデータの要求元のピアが自ピアと一致するので、このコンテンツを取得する。   A peer-to-peer network may also be used when sending content to a requesting peer. Also in this case, the requesting peer is found by the above-described search process. In the above example, peer # 0 performs the above-described search process to send content to peer # 1 whose hash is “1”, and sends content to peer # 1 that is Finger [0] of peer # 0. To do. Peer # 1 obtains this content because the peer that requested the received content data matches the peer.

このようにFingerテーブルを用いることで、参加ピア数がKのピアツーピアネットワークでは、任意のコンテンツをO(logK)の転送回数で得ることができる。また、ピアツーピアネットワークに参加するピア数が多く、ピアのハッシュやコンテンツのハッシュが均等に分散されている場合、一つのピアが、hがFinger[i]の管理領域に含まれているかどうかの判断(領域比較)を行う回数の期待値は、Σ{コンテンツの鍵のハッシュがFinger[i]に存在する確率×Finger[i]に至る比較回数}で求めることができる。iが大きいものほど比較回数は少なく、かつハッシュ空間に占める領域は広いため、ハッシュの存在確率が高くなり、期待値の最大は2回となる。実際のピアツーピアネットワークでは、Finger[i]とFinger[i+1]が重なっている(Finger[i]とFinger[i+1]が同じピア)場合があるので、重なっている場合に領域比較しない工夫を施すと、期待値は2回より小さくなる。   In this way, by using the Finger table, in a peer-to-peer network where the number of participating peers is K, it is possible to obtain arbitrary content by the number of O (logK) transfers. Also, when there are a large number of peers participating in the peer-to-peer network and peer hashes and content hashes are evenly distributed, it is determined whether one peer is included in the management area of Finger [i]. The expected value of the number of times (region comparison) can be obtained by Σ {probability of content key hash in Finger [i] × number of comparisons reaching Finger [i]}. The larger i is, the smaller the number of comparisons and the larger the area occupied in the hash space, the higher the probability of existence of the hash, and the maximum expected value is 2. In an actual peer-to-peer network, there may be a case where Finger [i] and Finger [i + 1] overlap (Finger [i] and Finger [i + 1] are the same peer). The expected value is smaller than twice.

また、Chordでは、ハッシュ関数にSecure Hash Algorithm 1(以降SHA−1と呼ぶ)を採用している。SHA−1は米国標準技術局によってアメリカ政府に採用された標準ハッシュ関数であり、電子文書の認証、改ざん検出などに用いられている。SHA−1では160bitのハッシュを生成するので、ChordのFingerでは理論上、最大で160台のピアを管理する。また、SHA−1では、160bitの正の整数同士で領域比較を行うことになる。現時点では、160bitの整数比較を1命令で行えるようなプロセッサは、特殊品を除いては無い。このため、複数の命令を使って領域比較を実行することになり、比較回数が増えると処理速度に影響を与えるほどの処理負荷となる。   Also, Chord employs Secure Hash Algorithm 1 (hereinafter referred to as SHA-1) as a hash function. SHA-1 is a standard hash function adopted by the United States Standards Technology Agency for the US government, and is used for authentication of electronic documents, detection of falsification, and the like. Since SHA-1 generates a 160-bit hash, the Chord Finger theoretically manages a maximum of 160 peers. In SHA-1, region comparison is performed between positive integers of 160 bits. At the present time, there are no special processors that can perform 160-bit integer comparison with one instruction. For this reason, a region comparison is executed using a plurality of instructions, and as the number of comparisons increases, the processing load is such that the processing speed is affected.

一方、ピアツーピアネットワーク上でも、動画配信に代表されるような、高い伝送レートを要するサービスを利用したい要求が高まってきている。前述したように、コンテンツの要求元のピアまたはコンテンツを管理するピア以外のピアでも、データ転送を行う必要があるため、伝送レートはそれぞれのピアの転送性能に大きく左右される。サービスの伝送レートを上げるため、各ピアでデータ転送処理を効率良く実行する必要がある。   On the other hand, even on a peer-to-peer network, there is an increasing demand for using a service that requires a high transmission rate, as represented by video distribution. As described above, since it is necessary to transfer data even in a peer other than the peer requesting the content or the peer managing the content, the transmission rate greatly depends on the transfer performance of each peer. In order to increase the transmission rate of the service, it is necessary to efficiently execute the data transfer process at each peer.

I.Stoica,R.Morris,D.Karger,M.F.Kaashoek and H.Balakrishnan,“Chord: A scalable peer-to-peer lookup service for Internet applications”,In Proceedings of ACM SIGCOMM 2001,San Diego,CA.I. Stoica, R.A. Morris, D.M. Karger, M.A. F. Kaashoek and H. Balakrishnan, “Chord: A scalable peer-to-peer lookup service for Internet applications”, In Proceedings of ACM SIGCOMM 2001, San Diego, CA.

しかしながら、上記従来の技術によれば従来技術では、Chordなど一次元ハッシュ空間を用いるピアツーピアネットワークにおける転送先のピアの探索処理の、ハッシュの値によって領域比較を行う回数が異なるため、処理時間が異なる。このため、音声サービスなど、一定の間隔でデータ受信するアプリケーションの場合、処理時間が揺らぎ、データ品質の劣化が生じる、という問題がある。たとえば、送信元ピアで音声データを一定間隔で送信した場合でも、データを中継するピアがその音声データ以外のコンテンツも転送していると、コンテンツごとに検索処理を行うため、他データの検索処理の影響を受け、音声データを出力する間隔は揺らいでしまう。その場合、音声データの要求元のピア(受信ピア)では、デコード方式によっては、受信が遅れた音声データに相当する時間だけ再生される音声が無音になってしまうこともある。中継するピアが多くなるほど、受信ピアでのデータ到着間隔が大きく揺らいでしまい、音声品質が悪くなる。   However, according to the above-described conventional technique, the processing time differs in the conventional technique because the number of area comparisons in the peer peer-to-peer network that uses a one-dimensional hash space such as Chord differs depending on the hash value. . For this reason, in the case of an application that receives data at regular intervals, such as a voice service, there is a problem that processing time fluctuates and data quality deteriorates. For example, even if audio data is transmitted at a fixed interval at the source peer, if the peer that relays the data also transfers content other than the audio data, the search processing is performed for each content. As a result, the interval at which the audio data is output fluctuates. In that case, at the peer requesting the audio data (reception peer), depending on the decoding method, the audio reproduced for a time corresponding to the audio data delayed in reception may be silenced. As the number of peers to be relayed increases, the data arrival interval at the receiving peer greatly fluctuates and the voice quality deteriorates.

このようなデータの到着間隔の揺らぎを防ぐための対策として、各ピアで、常にSHA−1での最大の領域比較回数である160回の領域比較を行う時間を検索処理時間として確保するという方法がある。しかし、この方法では、揺らぎが無くても遅延が大きくなってしまう。遅延が大きくなると、音声が遅れて聞こえるため、通話相手の反応が遅くなり、通話者に不快を与える、という問題がある。   As a measure for preventing such fluctuations in the arrival interval of data, a method of ensuring, as a search processing time, each peer always performs 160 area comparisons, which is the maximum number of area comparisons in SHA-1. There is. However, this method increases the delay even if there is no fluctuation. When the delay becomes large, the voice is heard with a delay, so that there is a problem that the other party's reaction becomes slow and uncomfortable for the caller.

また、遅延を低減するため、処理を並列化することで処理時間の低減を図る方法があるが、前述のように比較回数の期待値は2回なので、SHA−1で160回の領域比較の処理時間は80並列化して期待値と同等の処理時間となる。しかし、80もの並列処理は現実的ではない。したがって、ある程度の並列処理を行ったとしても、揺らぎを防ぐ対策を行うと、対策をしない場合より遅延が大きくなってしまう、という問題がある。   In order to reduce the delay, there is a method of reducing the processing time by parallelizing the processing. However, as described above, since the expected value of the number of comparisons is two, SHA-1 performs 160 region comparisons. The processing time is parallelized to 80 and the processing time is equal to the expected value. However, 80 parallel processing is not realistic. Therefore, even if a certain amount of parallel processing is performed, there is a problem that if measures are taken to prevent fluctuations, the delay becomes larger than when measures are not taken.

また、ファイル転送サービスのような、データ到着間隔の影響を受けないサービスを考える。多くのファイル転送サービスでは、IPネットワークにおいてTCP/IPプロトコルを用いている。TCP/IPは、ピア間の伝送特性により伝送レートを変更するフロー制御機能を持つ。この機能は、データ到着遅延が大きくなるほど、送信元ピアの送信レートを落とすように作用する。そのため、上述のような揺らぎを防ぐ対策を行うと、TCP/IPを用いたデータ転送レートが低くなってしまう、という問題がある。   Also consider a service that is not affected by the data arrival interval, such as a file transfer service. Many file transfer services use the TCP / IP protocol in IP networks. TCP / IP has a flow control function for changing a transmission rate according to transmission characteristics between peers. This function acts to lower the transmission rate of the source peer as the data arrival delay increases. For this reason, there is a problem in that the data transfer rate using TCP / IP becomes low if measures are taken to prevent such fluctuations as described above.

本発明は、上記に鑑みてなされたものであって、コンテンツが分散管理されるピアツーピアネットワークにおいて、コンテンツを管理するピアの検索処理の処理時間の揺らぎを低減し、また、コンテンツを管理するピアの検索処理を高速に行うことができるピア検索方法および通信装置を得ることを目的とする。   The present invention has been made in view of the above, and in a peer-to-peer network in which content is distributedly managed, fluctuations in processing time of search processing of the peer managing the content are reduced, and the peer managing the content is managed. It is an object of the present invention to provide a peer search method and a communication device that can perform search processing at high speed.

上述した課題を解決し、目的を達成するために、本発明は、分散ハッシュテーブル方式を採用してコンテンツを分散管理するピアツーピアネットワークを構成するピアが、それぞれ自装置に割り当てられたハッシュ値に基づいて決定するデータ転送先のピアを転送先ピア情報として管理する場合に、コンテンツ要求の送信先または前記コンテンツ要求の転送先のピアを前記転送先ピア情報に含まれるピアのなかから検索するピア検索方法であって、前記転送先ピア情報に含まれるピアのハッシュ値である転送先ピアハッシュ値を用いて分岐条件が定義された検索木を生成する検索木生成ステップと、前記コンテンツ要求に対応するコンテンツの鍵のハッシュ値が前記検索木の上段から順に前記分岐条件を満たすか否かの判断を行う判断ステップと、前記分岐条件を満たすと判断された分岐条件のうち、前記検索木の最も下段に位置する分岐条件に対応する転送先ピアハッシュ値を求め、その転送先ピアハッシュ値に対応するピアを検索結果とするピア決定ステップと、を含むことを特徴とする。   In order to solve the above-described problems and achieve the object, the present invention is based on a hash value assigned to each of the peers constituting a peer-to-peer network that adopts a distributed hash table method to distribute and manage content. When a data transfer destination peer determined in this way is managed as transfer destination peer information, a peer search for searching for a content request transmission destination or a transfer destination of the content request from peers included in the transfer destination peer information A search tree generation step of generating a search tree in which a branch condition is defined using a transfer destination peer hash value that is a hash value of a peer included in the transfer destination peer information, and corresponding to the content request A determination step for determining whether the hash value of the content key satisfies the branch condition in order from the top of the search tree. The transfer destination peer hash value corresponding to the branch condition located at the bottom of the search tree among the branch conditions determined to satisfy the branch condition is obtained, and the peer corresponding to the transfer destination peer hash value is searched. And a resulting peer determination step.

この発明によれば、転送先ピアのハッシュ値を用いて分岐条件を定めた検索木を用いて、コンテンツの鍵のハッシュが分岐条件を満たすか否かを判断し、分岐条件を満たすハッシュに対応するピアのなかで検索木の最も下段のピアを検索結果とするようにしたので、コンテンツを管理するピアの検索処理の処理時間の揺らぎを低減し、かつ、ピアの検索処理を高速に行うことができる、という効果を奏する。   According to this invention, it is determined whether or not the hash of the content key satisfies the branch condition using the search tree in which the branch condition is determined using the hash value of the transfer destination peer, and corresponds to the hash satisfying the branch condition. The search result is the lowest peer in the search tree among the peers that perform the search, so that fluctuations in the processing time of the search process of the peer managing the content can be reduced and the search process of the peer can be performed at high speed There is an effect that can be.

以下に、本発明にかかるピア検索方法および通信装置の実施の形態を図面に基づいて詳細に説明する。なお、この実施の形態によりこの発明が限定されるものではない。   Embodiments of a peer search method and a communication device according to the present invention will be described below in detail with reference to the drawings. Note that the present invention is not limited to the embodiments.

実施の形態1.
図1は、本発明にかかる実施の形態1のネットワークシステムの一次元ハッシュ空間におけるピア(通信装置)の配置例を示す図である。図1の一次元ハッシュ空間1は、6ビットのハッシュ空間を示している。本実施の形態のネットワークシステムは、6ビットのハッシュを各ピアに割り当てるピアツーピアネットワークである。また、本実施例では、コンテンツを分散管理することとし、各ピアは、コンテンツの鍵のハッシュが自分のDHTの範囲にあるコンテンツを管理していることとする。
Embodiment 1 FIG.
FIG. 1 is a diagram illustrating an arrangement example of peers (communication devices) in the one-dimensional hash space of the network system according to the first embodiment of the present invention. A one-dimensional hash space 1 in FIG. 1 represents a 6-bit hash space. The network system according to the present embodiment is a peer-to-peer network that assigns a 6-bit hash to each peer. In this embodiment, it is assumed that content is managed in a distributed manner, and that each peer manages content whose content key hash is within the range of its own DHT.

図1のピア2は、コンテンツを検索するピアでありハッシュ“30”が割り当てられている。Fingerピア3は、ピア2が管理するFingerテーブルに含まれるピアである。図1では、ピア2とピア2がFingerテーブルで管理するピアのみを示しているが、本実施の形態のネットワークシステム全体としては、一次元ハッシュ空間1上にこれら以外のピアも含んでいることとする。   The peer 2 in FIG. 1 is a peer that searches for content, and is assigned a hash “30”. The Finger peer 3 is a peer included in a Finger table managed by the peer 2. In FIG. 1, only the peers 2 and 2 managed by the Finger table are shown, but the entire network system according to the present embodiment includes other peers in the one-dimensional hash space 1. And

図2−1は、ピア2が管理するDHTの一例を示す図である。ピア2は、コンテンツの鍵のハッシュがDHTの範囲に含まれるコンテンツを管理している。したがって、この場合は、ピア2は、コンテンツの鍵のハッシュが“26〜30”の範囲にあるコンテンツを管理している。   FIG. 2A is a diagram illustrating an example of a DHT managed by the peer 2. The peer 2 manages the content in which the hash of the content key is included in the DHT range. Therefore, in this case, the peer 2 manages content in which the hash of the content key is in the range of “26 to 30”.

本実施の形態では、所望のコンテンツを管理するピアを検索するために、2分検索木を用いる。図2−2は、ピア2の2分検索木の一例を示す図である。本実施の形態では、Fingerテーブルに含まれる各ピアのハッシュに基づいて2分検索木を生成する。本実施の形態では、DHT実装方式としてChord方式を採用することとし、自分のハッシュに2i(iは0≦i<Nの整数:Nはハッシュのビット数)を加算したハッシュと等しいか、それより大きなハッシュを持つ一番近いピアだけをFingerテーブルにより管理する。図2−2の上図は、ピア2のFingerテーブルを示し、iごとに、自分(ピア2)のハッシュに2iを加算したハッシュをFinger[i]のハッシュとして示している。以下では、FingerテーブルのiをFinger識別番号と呼ぶこととする。図2−1では下図の2分検索木の各ノードをハッシュの値で示しているが、実際には、2分検索木は、Finger識別番号と対応するハッシュの両方が2分検索木で管理されていることとする。なお、2分検索木の生成方法は、通常の検索木の生成方法であればどのような方法により生成してもよい。 In this embodiment, a binary search tree is used to search for peers that manage desired content. FIG. 2-2 is a diagram illustrating an example of the binary search tree of peer 2. In this embodiment, a binary search tree is generated based on the hash of each peer included in the Finger table. In this embodiment, the Chord method is adopted as the DHT implementation method, and is equal to a hash obtained by adding 2 i (i is an integer of 0 ≦ i <N: N is the number of bits of the hash) to the own hash, Only the nearest peer with a larger hash is managed by the Finger table. The upper diagram of FIG. 2-2 shows the Finger table of Peer 2 and shows, for each i , a hash obtained by adding 2 i to the hash of its own (Peer 2) as a hash of Finger [i]. Hereinafter, i in the Finger table is referred to as a Finger identification number. In FIG. 2A, each node of the binary search tree shown in the figure below is represented by a hash value. Actually, however, the binary search tree is managed by the binary search tree for both the Finger identification number and the corresponding hash. Suppose that it is done. The binary search tree generation method may be generated by any method as long as it is a normal search tree generation method.

つづいて、本実施の形態の、所望のコンテンツを管理するピアを検索するための処理(ピア検索処理)について説明する。図3は、本実施の形態のピア検索処理手順の一例を示すフローチャートである。   Next, a process (peer search process) for searching for a peer managing desired content according to the present embodiment will be described. FIG. 3 is a flowchart illustrating an example of a peer search processing procedure according to the present embodiment.

従来のピア検索処理では、Fingerごとに、コンテンツの鍵のハッシュがそれぞれのFingerが管理するコンテンツの範囲に含まれるか否かをそれぞれ判断していた。本実施の形態では、2分検索木の上段から順に、コンテンツの鍵のハッシュが2分検索木を構成する各ノードのハッシュ未満の値である(条件成立)か否かの判断を実施して、条件成立した最後のノードに対応するFingerをコンテンツの送信先のピアとして求める。   In the conventional peer search processing, for each Finger, it is determined whether or not the hash of the content key is included in the content range managed by each Finger. In the present embodiment, in order from the top of the binary search tree, it is determined whether or not the hash of the content key is a value less than the hash of each node constituting the binary search tree (condition is satisfied). Then, the Finger corresponding to the last node for which the condition is satisfied is obtained as a peer to which the content is transmitted.

図2−1,図2−2,図3を用いて本実施の形態のピア検索処理を説明する。まず、ピア2は、所望のコンテンツの鍵のハッシュを求め、hとする(ステップS101)。つぎに、ピア2は、hが自分のDHTのなかにあるか否かを判断する(ステップS102)。hが自分のDHTのなかにあると判断した場合(ステップS102 Yes)は、コンテンツは自分が管理していると判断し(ステップS103)、ピア検索処理を終了する。   Peer search processing according to the present embodiment will be described with reference to FIGS. First, the peer 2 obtains a hash of the key of the desired content and sets it as h (step S101). Next, the peer 2 determines whether or not h is in its own DHT (step S102). If it is determined that h is in its own DHT (Yes in step S102), it is determined that the content is managed by itself (step S103), and the peer search process is terminated.

hが自分のDHTのなかにないと判断した場合(ステップS102 No)は、変数dstを初期化する(たとえば、NULLを代入する)(ステップS104)。dstは、コンテンツ要求の送信先として求めるFingerのハッシュを示す数値である。つぎに、図2−2で示した2分検索木の根ノードに対応するFinger識別番号(図2−1のFingerテーブルのi)をpに代入する(ステップS105)。pは、後述のステップS107で条件成立の判断対象となるFingerのFinger識別番号を示す変数である。つぎに、ピア2は、変数xにFinger[p]を代入する(ステップS106)。   When it is determined that h is not in its own DHT (No in step S102), the variable dst is initialized (for example, NULL is substituted) (step S104). dst is a numerical value indicating the hash of the Finger obtained as the transmission destination of the content request. Next, the Finger identification number (i in the Finger table of FIG. 2-1) corresponding to the root node of the binary search tree shown in FIG. 2-2 is substituted for p (step S105). p is a variable indicating a Finger identification number of a Finger that is a determination target of condition establishment in Step S107 described later. Next, the peer 2 substitutes Finger [p] for the variable x (step S106).

つぎに、ピア2は、hがxより小さいか否かを判断し(ステップS107)、hがxより小さくないと判断した場合(ステップS107 No:条件成立)は、dstにxを代入する(ステップS108)。そして、pが2分検索木の最下段のノードであるか否かを判断し(ステップS109)、最下段のノードでないと判断した場合(ステップS109 No)は、2分検索木の右下のノードのFinger識別子をpに代入し(ステップS110)、ステップS106に戻り、ステップS106以降の処理を繰り返す。   Next, the peer 2 determines whether or not h is smaller than x (step S107). When it is determined that h is not smaller than x (step S107 No: condition is satisfied), x is substituted into dst ( Step S108). Then, it is determined whether p is the lowest node in the binary search tree (step S109). If it is determined that p is not the lowest node (No in step S109), The finger identifier of the node is substituted for p (step S110), the process returns to step S106, and the processes after step S106 are repeated.

また、ステップS107で、hがxより小さいと判断した場合(ステップS107 Yes:条件非成立)は、さらに、pが2分検索木の最下段のノードであるか否かを判断する(ステップS111)。そして、ステップS111で最下段のノードでないと判断した場合(ステップS111 No)は、2分検索木の左下のノードのFinger識別子をpに代入し(ステップS112)、ステップS106に戻り、ステップS106以降の処理を繰り返す。   If it is determined in step S107 that h is smaller than x (step S107 Yes: condition is not satisfied), it is further determined whether p is the lowest node in the binary search tree (step S111). ). If it is determined in step S111 that the node is not the lowest node (No in step S111), the finger identifier of the lower left node of the binary search tree is substituted for p (step S112), and the process returns to step S106, and after step S106. Repeat the process.

ステップS109で最下段のノードであると判断した場合(ステップS109 Yes)、および、ステップS111で最下段のノードであると判断した場合(ステップS111 Yes)は、dstが初期化されたままであるか否かを判断し(ステップS113)、初期化されたままでないと判断した場合(ステップS113 No)には、検索処理を終了する。ステップS113でdstが初期化されたままであると判断した場合(ステップS113 Yes)には、dstにFingerテーブル上のFinger[i]の最大値(最大Finger)を代入し(ステップS114)、処理を終了する。   If it is determined in step S109 that the node is the lowest node (step S109 Yes), and if it is determined that the node is the lowest node in step S111 (step S111 Yes), is dst still initialized? If it is determined whether it has not been initialized (step S113 No), the search process is terminated. If it is determined in step S113 that dst remains initialized (Yes in step S113), the maximum value (maximum Finger) of Finger [i] on the Finger table is substituted for dst (step S114), and the process is performed. finish.

ピア2は、以上のピア検索処理の後、ステップS103でコンテンツは自分が管理していると判断した場合(ステップS103 Yes)には、自分が管理しているそのコンテンツの情報に基づいてコンテンツを取得する。それ以外の場合は、ピア2は、検索処理の終了時点のdstに対応する(dstの値がハッシュとして割り当てられている)Fingerへコンテンツの取得要求(コンテンツの鍵を含む)を送信する。   When the peer 2 determines that the content is managed in step S103 after the above peer search process (Yes in step S103), the peer 2 selects the content based on the information of the content managed by the peer 2. get. In other cases, the peer 2 transmits a content acquisition request (including the content key) to the Finger corresponding to dst at the end of the search process (the value of dst is assigned as a hash).

h=31のケースを一例として、図3の処理を具体的に説明する。“31”はピア2のDHTのなかに無いため、ステップS104〜ステップS107を実施する。ステップS107では、“31”は、根ノードのハッシュ“36”より小さいため条件非成立となる。また、この時点でpは最下段ではないので、ステップS111,ステップS112を実施し、pを左下のノードとして、ステップS106へ戻る。2回目のステップS107では、hは、2番目のノードのハッシュ“31”より小さくないため条件成立となり、ステップS108へ進む。そして、この時点でpは最下段ではないので、ステップS109,ステップS110を実施し、pを右下のノードとして、ステップS106へ戻る。3回目のステップS107では、hは3番目のノードのハッシュ“32”より小さいので条件非成立となり、ステップS111にすすむ。この時点でpは最下段となるので、さらに、ステップS113に進む。ステップS113の判断では、dstは初期化されたままではないと判断される(ステップS113 No)ため、そのまま処理を終了する。そして、処理の終了時点では、最後に条件成立したノードのハッシュ“31”がdstに代入されており、ハッシュが“31”に対応するピアがコンテンツ要求の送信先となる。   Taking the case of h = 31 as an example, the processing of FIG. 3 will be specifically described. Since “31” is not in the DHT of the peer 2, Steps S104 to S107 are performed. In step S107, "31" is smaller than the root node hash "36", so the condition is not satisfied. At this point, p is not the lowest level, so steps S111 and S112 are performed, and p is set as the lower left node, and the process returns to step S106. In the second step S107, since h is not smaller than the hash “31” of the second node, the condition is satisfied, and the process proceeds to step S108. Since p is not the lowest stage at this point, Steps S109 and S110 are performed, and the process returns to Step S106 with p as the lower right node. In the third step S107, since h is smaller than the hash “32” of the third node, the condition is not satisfied, and the process proceeds to step S111. At this point, p is at the lowest level, and the process further proceeds to step S113. In the determination in step S113, it is determined that dst has not been initialized (No in step S113), and thus the process ends. At the end of the process, the hash “31” of the node that finally satisfies the condition is assigned to dst, and the peer corresponding to the hash “31” becomes the transmission destination of the content request.

つぎに、h=2のケースを一例として、同様に図3の処理を具体的に説明する。“2”はピア2のDHTのなかに無いため、ステップS104〜ステップS107を実施する。ステップS107では、“2”は、根ノードのハッシュ“36”より小さいため条件非成立となる。また、この時点でpは最下段ではないので、ステップS111,ステップS112を実施し、pを左下のノードとして、ステップS106へ戻る。2回目のステップS107では、hは、2番目のノードのハッシュ“31”より小さいためふたたび条件非成立となる。この時点でpは最下段ではないので、ステップS111,ステップS112を実施し、pを左下のノードとして、ステップS106へ戻る。3回目のステップS107では、hは3番目のノードのハッシュ“5”より小さいので条件非成立となり、ステップS111に進むが、この時点でpは最下段のノードである(ステップS111 Yes)ため、ステップS113に進む。この例では、dstは一度も更新されていないため初期値のままである。したがって、ステップS113では、dstは初期値のままであると判断し(ステップS113 Yes)、ステップS114でdstに最大Fingerが代入される。   Next, the process of FIG. 3 will be specifically described in the same manner, taking the case of h = 2 as an example. Since “2” is not in the DHT of peer 2, steps S104 to S107 are performed. In step S107, “2” is smaller than the root node hash “36”, so the condition is not satisfied. At this point, p is not the lowest level, so steps S111 and S112 are performed, and p is set as the lower left node, and the process returns to step S106. In step S107 for the second time, h is smaller than the hash “31” of the second node, so the condition is not satisfied again. Since p is not the lowest stage at this time, Steps S111 and S112 are performed, and the process returns to Step S106 with p as the lower left node. In the third step S107, since h is smaller than the hash “5” of the third node, the condition is not satisfied and the process proceeds to step S111. At this point, p is the lowest node (step S111 Yes). Proceed to step S113. In this example, dst has never been updated and remains at the initial value. Therefore, in step S113, it is determined that dst remains the initial value (step S113 Yes), and in step S114, the maximum Finger is substituted for dst.

h=2のように、Fingerテーブルの中の一番小さなハッシュより小さなhは、一次元ハッシュ空間1上で、ハッシュ0を挟んでFingerテーブルの中の最大のハッシュと最小のハッシュの間に存在する。このため、本実施の形態では、ステップS107の判断で条件成立が一度もなかった場合(dstが初期値のまま)に、コンテンツ要求の送信先を、Fingerテーブルの中の最大のハッシュである“48”に対応するピアとする。   As h = 2, h smaller than the smallest hash in the Finger table exists on the one-dimensional hash space 1 between the largest hash and the smallest hash in the Finger table across the hash 0. To do. For this reason, in the present embodiment, when the condition has never been satisfied in the determination in step S107 (dst remains the initial value), the destination of the content request is the maximum hash in the Finger table. A peer corresponding to 48 ″.

図4−1は、h=31の場合の本実施の形態のピア検索処理の概念を示す図であり、図4−2は、h=2の場合の本実施の形態のピア検索処理の概念を示す図である。図4−1,4−2では、条件成立するノードに○を示し、条件非成立となるノードに×を示している。   FIG. 4A is a diagram illustrating the concept of the peer search process of the present embodiment when h = 31, and FIG. 4B is the concept of the peer search process of the present embodiment when h = 2. FIG. In FIGS. 4A and 4B, a node where the condition is satisfied is indicated by ◯, and a node where the condition is not satisfied is indicated by X.

以上の説明では、ピア2が、コンテンツ要求の送信先を選択する例を述べたが、コンテンツ要求は、直接、そのコンテンツを管理するピアに送信されるとは限らない。したがって、コンテンツ要求を受信したピアでは、上述したピア検索処理を同様の処理で行い、そのコンテンツ要求が自ピアで管理するコンテンツに関する要求でないと判断した場合には、ピア検索処理によって送信先として求めたピアにそのコンテンツ要求を転送する。このような動作を繰り返すことにより、最終的にピア2から要求されたコンテンツを管理するピアへコンテンツ要求が送信されることになる。   In the above description, the example in which the peer 2 selects the transmission destination of the content request has been described. However, the content request is not always transmitted directly to the peer that manages the content. Therefore, the peer that has received the content request performs the peer search process described above in the same manner, and if it is determined that the content request is not a request for content managed by the peer, the peer search process determines the transmission destination. Forward the content request to the peer. By repeating such an operation, the content request is finally transmitted to the peer that manages the content requested from the peer 2.

なお、本実施の形態では、コンテンツを取得する際の処理について説明したが、コンテンツを管理するピアが、そのコンテンツを要求元(上述の例の場合はピア2)へコンテンツを送信する場合に、要求元のピアを検索する場合に、ピア検索処理と同様の処理を行ってコンテンツを送信すべきピアを検索するようにしてもよい。   In the present embodiment, the processing for acquiring content has been described. However, when a peer managing content transmits the content to the request source (peer 2 in the above example), When searching for a requesting peer, processing similar to peer search processing may be performed to search for a peer to which content should be transmitted.

また、本実施の形態では、2分検索木を用いてピア検索処理を行う例について説明したが、これに限らず、検索木を用いる方法であれば、これに限らずどのような検索木を用いてもよい。たとえば、4分検索木の場合、条件成立を判断するためのハッシュは3つの数値となるが、これらをz(1),z(2),z(3)とする。このとき、たとえば、hがz(1)より小さい場合は、条件非成立とし、hがz(1)以上かつz(2)未満の場合はz(1)に対して条件成立とし、hがz(2)以上かつz(3)未満の場合はz(2)に対して条件成立とし、hがz(3)以上の場合はz(3)に対して条件成立として、検索処理を順次すすめていくようにすればよい。   In this embodiment, an example in which peer search processing is performed using a binary search tree has been described. However, the present invention is not limited to this, and any search tree may be used as long as the method uses a search tree. It may be used. For example, in the case of a quadrant search tree, the hash for determining whether the condition is satisfied is three numerical values, and these are z (1), z (2), and z (3). At this time, for example, when h is smaller than z (1), the condition is not satisfied. When h is equal to or greater than z (1) and less than z (2), the condition is satisfied with respect to z (1). When z (2) or more and less than z (3), the condition is satisfied with respect to z (2), and when h is equal to or greater than z (3), the condition is satisfied with respect to z (3). You should make it go.

このように、本実施の形態では、Fingerを検索するための検索木を用いて、検索木の各ノードごとに条件成立のためのハッシュの範囲を定め、条件成立するノードのなかの検索木の最も下段のノードに対応するピアをコンテンツ要求の送信先として選択するようにした。このため、従来のピア検索処理にくらべ、高速に処理を行うことができる。また、hの値の違いによる処理時間の違い(揺らぎ)も低減することができる。   As described above, in this embodiment, a search tree for searching a finger is used to define a hash range for establishing a condition for each node of the search tree, and the search tree in the nodes that satisfy the condition is determined. The peer corresponding to the lowest node is selected as the content request destination. For this reason, processing can be performed at a higher speed than the conventional peer search processing. In addition, a difference in processing time (fluctuation) due to a difference in the value of h can be reduced.

たとえば、Fingerの二分木を平衡させるものとする(必須条件ではない)と、Nbitの一次元ハッシュ空間での本方式のハッシュ比較回数の最大は、Round(log2(N+1))に抑えることができる(Roundは切り上げの関数)。Chordの160bitの一次元ハッシュ空間で比較すると、従来技術での最大比較回数が160回(領域の両端で比較するため、実際には2倍になる)であったのに対し、本実施の形態では最大比較回数を9回に削減できる。   For example, if the Finner binary tree is balanced (not a necessary condition), the maximum number of hash comparisons of the present method in the Nbit one-dimensional hash space can be suppressed to Round (log2 (N + 1)). (Round is a function of rounding up). Compared with the 160-bit one-dimensional hash space of Chord, the maximum number of comparisons in the prior art was 160 times (actually doubled because the comparison is made at both ends of the area). Then, the maximum number of comparisons can be reduced to 9.

実施の形態2.
図5は、本発明にかかる実施の形態2のピア検索処理手順の一例を示すフローチャートである。本実施の形態のネットワークシステムの構成は実施の形態1と同様である。実施の形態1と同様の構成要素については、同一の符号を用いることとし、説明を省略する。本実施の形態のピア2のFingerテーブルおよび2分検索木も、実施の形態1と同様とする。
Embodiment 2. FIG.
FIG. 5 is a flowchart showing an example of a peer search processing procedure according to the second embodiment of the present invention. The configuration of the network system of the present embodiment is the same as that of the first embodiment. Constituent elements similar to those in Embodiment 1 are denoted by the same reference numerals, and description thereof is omitted. The Finger table and binary search tree of peer 2 in the present embodiment are the same as those in the first embodiment.

図5に示すように、ステップS101、ステップS102は実施の形態1と同様である。ステップS102でhが自分のDHTに含まれると判断した場合(ステップS102 Yes)は、実施の形態1と同様にステップS103に進み、処理を終了する。ステップS102でhが自分のDHTに含まれないと判断した場合(ステップS102 No)には、dstに最大Fingerを代入する(ステップS201)。そして、実施の形態1と同様のステップS105〜ステップS112を実施する。ただし、ステップS111でpが最下段であると判断した場合(ステップS111 Yes)、および、ステップS109でpが最下段であると判断した場合(ステップS109 Yes)には、実施の形態1のステップS113,S114を実施せず、処理を終了する。本実施の形態のこれ以外の処理は、実施の形態1と同様である。   As shown in FIG. 5, step S101 and step S102 are the same as in the first embodiment. If it is determined in step S102 that h is included in the own DHT (Yes in step S102), the process proceeds to step S103 as in the first embodiment, and the process ends. If it is determined in step S102 that h is not included in its own DHT (No in step S102), the maximum Finger is substituted for dst (step S201). And step S105-step S112 similar to Embodiment 1 are implemented. However, if it is determined in step S111 that p is the lowest level (step S111 Yes), and if it is determined in step S109 that p is the lowest level (step S109 Yes), the steps of the first embodiment are performed. S113 and S114 are not performed, and the process is terminated. Other processes in this embodiment are the same as those in the first embodiment.

h=31のケースを一例として、図5の処理を具体的に説明する。“31”はピア2のDHTのなかに無いため、dstに最大Fingerを代入する(ステップS201)。そして、ステップS105〜ステップS107を実施する。ステップS107では、“31”は、根ノードのハッシュ“36”より小さいため条件非成立となる。また、この時点でpは最下段ではないので、ステップS111,ステップS112を実施し、pを左下のノードとして、ステップS106へ戻る。2回目のステップS107では、hは、2番目のノードのハッシュ“31”より小さくないため条件成立となり、ステップS108へ進む。そして、この時点でpは最下段ではないので、ステップS109,ステップS110を実施し、pを右下のノードとして、ステップS106へ戻る。3回目のステップS107では、hは3番目のノードのハッシュ“32”より小さいので条件非成立となり、ステップS111にすすむ。この時点でpは最下段となるので、そのまま処理を終了する。そして、処理の終了時点では、最後に条件成立したノードのハッシュ“31”がdstに代入されており、ハッシュが“31”に対応するピアがコンテンツ要求の送信先となる。   Taking the case of h = 31 as an example, the process of FIG. 5 will be specifically described. Since “31” is not in the DHT of peer 2, the maximum Finger is substituted for dst (step S 201). And step S105-step S107 are implemented. In step S107, "31" is smaller than the root node hash "36", so the condition is not satisfied. At this point, p is not the lowest level, so steps S111 and S112 are performed, and p is set as the lower left node, and the process returns to step S106. In the second step S107, since h is not smaller than the hash “31” of the second node, the condition is satisfied, and the process proceeds to step S108. Since p is not the lowest stage at this point, Steps S109 and S110 are performed, and the process returns to Step S106 with p as the lower right node. In the third step S107, since h is smaller than the hash “32” of the third node, the condition is not satisfied, and the process proceeds to step S111. At this point, p is at the lowest level, so the process is terminated. At the end of the process, the hash “31” of the node that finally satisfies the condition is assigned to dst, and the peer corresponding to the hash “31” becomes the transmission destination of the content request.

つぎに、h=2のケースを一例として、同様に図5の処理を具体的に説明する。“2”はピア2のDHTのなかに無いため、dstに最大Fingerを代入する(ステップS201)。そして、ステップS105〜ステップS107を実施する。ステップS107では、“2”は、根ノードのハッシュ“36”より小さいため条件非成立となる。また、この時点でpは最下段ではないので、ステップS111,ステップS112を実施し、pを左下のノードとして、ステップS106へ戻る。2回目のステップS107では、hは、2番目のノードのハッシュ“31”より小さいためふたたび条件非成立となる。この時点でpは最下段ではないので、ステップS111,ステップS112を実施し、pを左下のノードとして、ステップS106へ戻る。3回目のステップS107では、hは3番目のノードのハッシュ“5”より小さいので条件非成立となり、ステップS111に進むが、この時点でpは最下段のノードである(ステップS111 Yes)ため、そのまま処理を終了する。処理の終了時点では、dstは最大Fingerが代入されたままなので、最大Fingerの“48”に対応するピアがコンテンツ要求の送信先となる。   Next, the case of h = 2 is taken as an example, and the processing of FIG. Since “2” is not in the DHT of the peer 2, the maximum Finger is substituted for dst (step S 201). And step S105-step S107 are implemented. In step S107, “2” is smaller than the root node hash “36”, so the condition is not satisfied. At this point, p is not the lowest level, so steps S111 and S112 are performed, and p is set as the lower left node, and the process returns to step S106. In step S107 for the second time, h is smaller than the hash “31” of the second node, so the condition is not satisfied again. Since p is not the lowest stage at this time, Steps S111 and S112 are performed, and the process returns to Step S106 with p as the lower left node. In the third step S107, since h is smaller than the hash “5” of the third node, the condition is not satisfied, and the process proceeds to step S111. At this point, p is the lowest node (step S111 Yes), so The process is terminated as it is. At the end of processing, since the maximum Finger is still substituted for dst, the peer corresponding to “48” of the maximum Finger becomes the transmission destination of the content request.

図6−1は、h=31の場合の本実施の形態のピア検索処理の概念を示す図であり、図6−2は、h=2の場合の本実施の形態のピア検索処理の概念を示す図である。図6−1,6−2では、条件成立するノードに○を示し、条件非成立となるノードに×を示している。   FIG. 6A is a diagram illustrating the concept of peer search processing according to the present embodiment when h = 31, and FIG. 6-2 illustrates the concept of peer search processing according to the present embodiment when h = 2. FIG. In FIGS. 6A and 6B, a node where the condition is satisfied is indicated by ◯, and a node where the condition is not satisfied is indicated by X.

このように、本実施の形態では、Fingerを検索するための検索木を用いて、検索木のノードごとに条件成立のためのハッシュの範囲を定め、送信先のピアのハッシュ値の初期値として最大Fingerを設定した後に、条件成立するノードのなかの最下段のノードに対応するピアをコンテンツ要求の送信先として選択するようにした。このため、実施の形態1と同様の効果を得られるとともに、実施の形態1にくらべ処理を削減することができる。本実施の形態の処理をハードウエアで実現する場合、実施の形態1には必要であった、ステップS113,S114の処理の回路が不要となり、初期値を与えるだけで済むので、全体の回路構成が簡単になり、ハードウエア化が容易となる。   Thus, in this embodiment, a search tree for searching a finger is used to define a hash range for establishing a condition for each node of the search tree, and as an initial value of a hash value of a destination peer After setting the maximum Finger, the peer corresponding to the lowermost node among the nodes that satisfy the condition is selected as the content request transmission destination. For this reason, the same effect as in the first embodiment can be obtained, and the processing can be reduced as compared with the first embodiment. When the processing of the present embodiment is realized by hardware, the processing circuit of steps S113 and S114, which is necessary for the first embodiment, is unnecessary, and it is only necessary to give an initial value, so that the entire circuit configuration Is simplified, and hardware implementation becomes easy.

実施の形態3.
図7は、本発明にかかる実施の形態3のネットワークシステムの一次元ハッシュ空間におけるピア(通信装置)の配置例を示す図である。図7の一次元ハッシュ空間1aは、15ビットのハッシュ空間を示している。本実施の形態のネットワークシステムは、15ビットのハッシュを各ピアに割り当てるピアツーピアネットワークである。また、本実施例では、コンテンツを分散管理することとし、各ピアは、コンテンツの鍵のハッシュが自分のDHTの範囲にあるコンテンツを管理していることとする。図7に示すハッシュ空間において、30〜40台ほどのピアがネットワークに参加していると仮定して以下の説明を行う。
Embodiment 3 FIG.
FIG. 7 is a diagram illustrating an arrangement example of peers (communication devices) in the one-dimensional hash space of the network system according to the third embodiment of the present invention. A one-dimensional hash space 1a in FIG. 7 represents a 15-bit hash space. The network system of the present embodiment is a peer-to-peer network that assigns a 15-bit hash to each peer. In this embodiment, it is assumed that content is managed in a distributed manner, and that each peer manages content whose content key hash is within the range of its own DHT. In the hash space shown in FIG. 7, the following description will be made assuming that about 30 to 40 peers are participating in the network.

本実施の形態では、コンテンツの要求元のピア2には、ハッシュ“6000h”(hは16進数を示す)が割り当てられているとする。図8は、本実施の形態のピア2のFingerテーブルの一例を示す図である。ネットワークに参加するピアのハッシュが特定の範囲に集中することは少なく、多くの場合分散するため、ハッシュ空間を“1000h”ごとの範囲に分割して考えると、それぞれの範囲に3〜6台ずつ位存在することが多い。そのため、Finger[i]のiが小さい場合には、複数のiに対応するFinger[i]が同一になることが多くなる。   In the present embodiment, it is assumed that the hash “6000h” (h indicates a hexadecimal number) is assigned to the peer 2 that requested the content. FIG. 8 is a diagram illustrating an example of the Finger table of the peer 2 according to the present embodiment. The hash of peers participating in the network is rarely concentrated in a specific range and is often distributed. Therefore, when the hash space is divided into ranges of every “1000h”, 3 to 6 units are included in each range. Often exist. Therefore, when i of Finger [i] is small, Finger [i] corresponding to a plurality of i often becomes the same.

たとえば、図8の例では、ピア2のハッシュ値に20,21,…,28をそれぞれ加算した範囲に相当する“6001h”〜“6100h”間のハッシュを持つピアが存在せず、ピア2に一番近いハッシュ値をもつのは、ハッシュが“61F0h”となるピアであるため、Finger[0]〜Finger[8]は“61F0h”となる。同様に、Finger[9]もFinger[10]も同一となる。 For example, in the example of FIG. 8, 0 2 to a hash value of the peer 2, 2 1, ..., absent peer with a hash of between 2 8 corresponds to a range obtained by adding each "6001h" ~ "6100h", The peer having the hash value closest to the peer 2 is the peer whose hash is “61F0h”, and therefore, Finger [0] to Finger [8] are “61F0h”. Similarly, Finger [9] and Finger [10] are the same.

一方、15bitのハッシュ空間では、Fingerの二分検索木は最大で4段の深さを持つ。図8の例では、Finger[i]が同一となるiが多くなるため、Finger[i]の実質のピア数が15より少ない。本実施の形態では、このような場合でも二分検索木を構成するノード(ピア)数が15個となるように、最大のハッシュとなるピアをダミーとして複製する。すなわち、本実施の形態では、二分検索木は平衡木となる。こうして作成した二分検索木の一例が図9−1,図9−2である。図9−1,図9−2では、条件成立するノードに○を示し、条件非成立となるノードに×を示している。図9−1は、h=7F00hとした場合の例であり、図9−2は、h=21E3hの場合の例である。   On the other hand, in the 15-bit hash space, the Finner binary search tree has a maximum depth of 4 levels. In the example of FIG. 8, i with the same Finger [i] increases, so the actual number of peers of Finger [i] is less than 15. In this embodiment, even in such a case, the peer that becomes the maximum hash is duplicated as a dummy so that the number of nodes (peers) constituting the binary search tree is 15. That is, in this embodiment, the binary search tree is a balanced tree. An example of the binary search tree created in this way is shown in FIGS. In FIGS. 9A and 9B, a node that satisfies the condition is indicated by a circle, and a node that does not satisfy the condition is indicated by a cross. FIG. 9-1 is an example when h = 7F00h, and FIG. 9-2 is an example when h = 21E3h.

本実施の形態のピア検索処理は、図3で説明した実施の形態1と同様である。また、コンテンツ検索処理以外の動作も、上述の二分検索木の生成方法以外は、実施の形態1と同様である。h=7F00hの場合を一例に、本実施の形態のピア検索処理を具体的に説明する。“7F00h”はピア2のDHTに含まれていないとする。まず、図3のステップS101およびステップS102を実施し、ステップS102では、hは、自分のDHTに含まれていないと判断して(ステップS102 No)、ステップS104〜S107を実施する。ステップS107では、hが根ノードのハッシュ“7321h”以上なので、条件成立となり、ステップS108へ進む。そして、この時点でpは最下段ではないので、ステップS109,ステップS110を実施し、pを右下のノードとして、ステップS106へ戻る。2回目のステップS107でもhを“7321h”と比較することになるので、1回目と同様にステップS108〜ステップS110を実施してステップS106へ戻る。以降、3回目、4回目のステップS107でも条件成立となり、4回目のステップS107の後は、ステップS108,S109を実施後、ステップS113に進み、処理を終了する。処理の終了時点で、最後に条件成立したハッシュ“7321h”に対応するピアがコンテンツ要求の送信先となる。   The peer search process of the present embodiment is the same as that of the first embodiment described with reference to FIG. The operations other than the content search process are the same as those in the first embodiment except for the above-described binary search tree generation method. Taking the case of h = 7F00h as an example, the peer search processing of this embodiment will be specifically described. It is assumed that “7F00h” is not included in the DHT of peer 2. First, step S101 and step S102 of FIG. 3 are performed. In step S102, h is determined not to be included in its own DHT (No in step S102), and steps S104 to S107 are performed. In step S107, since h is equal to or greater than the hash “7321h” of the root node, the condition is satisfied, and the process proceeds to step S108. Since p is not the lowest stage at this point, Steps S109 and S110 are performed, and the process returns to Step S106 with p as the lower right node. Since h is also compared with “7321h” in step S107 for the second time, steps S108 to S110 are performed as in the first time, and the process returns to step S106. Thereafter, the conditions are also satisfied in the third and fourth steps S107, and after the fourth step S107, steps S108 and S109 are performed, and then the process proceeds to step S113 and the process is terminated. At the end of the process, the peer corresponding to the hash “7321h” that finally satisfies the condition becomes the transmission destination of the content request.

また、h=21E3hの場合については以下のようになる。“21E3h”はピア2のDHTに含まれていないとする。まず、図3のステップS101およびステップS102を実施し、ステップS102では、hは、自分のDHTに含まれていないと判断して(ステップS102 No)、ステップS104〜S107を実施する。ステップS107では、hが根ノードのハッシュ“7321h”未満なので、条件非成立となり、ステップS111へ進む。そして、ステップS111,ステップS112の実施後にステップS106に戻る。2回目のステップS107では、hは2段目のノードの“66BAh”未満なので、条件非成立となり、ステップS111へ進む。そして、ステップS111,ステップS112の実施後にステップS106に戻る。そして、3回目のステップS107では、hは3段目のノードの“21E3h”以上なので、条件成立となりステップS108へ進む。そして、この時点でpは最下段ではないので、ステップS109,ステップS110を実施し、pを右下のノードとして、ステップS106へ戻る。4回目のステップS107では、hは4段目のノードの“61F0h”未満なので、条件非成立となり、ステップS111,ステップS113の後に処理を終了する。そして、処理の終了時に最後に成立したハッシュ“21E3h”に対応するピアがコンテンツ要求の送信先となる。   Further, the case of h = 21E3h is as follows. It is assumed that “21E3h” is not included in the DHT of peer 2. First, step S101 and step S102 of FIG. 3 are performed. In step S102, h is determined not to be included in its own DHT (No in step S102), and steps S104 to S107 are performed. In step S107, since h is less than the root node hash “7321h”, the condition is not satisfied, and the process proceeds to step S111. And after implementation of step S111 and step S112, it returns to step S106. In the second step S107, since h is less than “66BAh” of the second-stage node, the condition is not satisfied, and the process proceeds to step S111. And after implementation of step S111 and step S112, it returns to step S106. In step S107 for the third time, since h is equal to or greater than “21E3h” of the third-stage node, the condition is satisfied and the process proceeds to step S108. Since p is not the lowest stage at this point, Steps S109 and S110 are performed, and the process returns to Step S106 with p as the lower right node. In the fourth step S107, since h is less than “61F0h” of the fourth-stage node, the condition is not satisfied, and the process ends after steps S111 and S113. Then, the peer corresponding to the hash “21E3h” that is finally established at the end of the process becomes the transmission destination of the content request.

本実施の形態では、コンテンツ探索処理に要する時間は、コンテンツおよびピアのハッシュに依存せず、またFingerの個数にも依存せずに一定となる。図10−1は、本実施の形態のピア検索処理を用いた場合の並列処理タイミングの一例を示す図である。図10−2は、従来のピア検索処理を用いた場合の並列処理タイミングの一例を示す図である。図10−1に示すように、各ピアは、受信したピアツーピアネットワークデータを、3個のスレッド(スレッド#1〜スレッド#3)で並列処理して出力しているとする。また、コンテンツAのデータをデータAとし、コンテンツAとは異なるコンテンツであるコンテンツBのデータをデータBとする。このとき、ピア検索処理の処理時間が一定であるとすると、図10−1に示すように、データAの送信間隔は、受信間隔とほぼ等しくなり、到着間隔に揺らぎが生じないという効果がある。   In the present embodiment, the time required for the content search process is constant without depending on the content and the hash of the peer, and not depending on the number of fingers. FIG. 10A is a diagram illustrating an example of parallel processing timing when the peer search processing according to the present embodiment is used. FIG. 10B is a diagram of an example of parallel processing timing when the conventional peer search process is used. As illustrated in FIG. 10A, it is assumed that each peer outputs the received peer-to-peer network data by performing parallel processing with three threads (thread # 1 to thread # 3). Further, data of content A is data A, and data of content B, which is content different from content A, is data B. At this time, assuming that the processing time of the peer search process is constant, as shown in FIG. 10A, the transmission interval of data A is substantially equal to the reception interval, and there is an effect that the arrival interval does not fluctuate. .

一方、図10−2に示すコンテンツ検索処理を用いた例でも、図10−1と同様に、各ピアは、受信したピアツーピアネットワークデータを、3個のスレッドで並列処理して出力しているとする。このとき、図10−1の例の場合は、ピア検索処理時間が、ハッシュに依存するため一定ではない。ここでは、データAのピア検索処理時間の方が、データBのピア検索処理時間より短いものとする。この場合、スレッド#2がデータBの送信処理中(送信処理完了前)に、スレッド#3は、ピア検索処理が完了してしまう。したがって、スレッド#2とスレッド#3の使用するネットワークポートが重なっている場合には、スレッド#3は、スレッド#2のデータBの送信処理完了を待って、データAの送信処理を開始する。この待機時間が発生するため、データAの送信間隔が、受信間隔よりも長くなる。したがって、受信間隔に揺らぎが発生してしまうという問題が生じる。これに対し、上述のように本実施の形態では、受信間隔の揺らぎは生じない。   On the other hand, even in the example using the content search process shown in FIG. 10-2, as in FIG. 10-1, each peer outputs the received peer-to-peer network data in parallel using three threads. To do. At this time, in the case of the example of FIG. 10A, the peer search processing time is not constant because it depends on the hash. Here, it is assumed that the peer search processing time for data A is shorter than the peer search processing time for data B. In this case, while the thread # 2 is in the process of transmitting the data B (before the transmission process is completed), the thread # 3 completes the peer search process. Therefore, when the network ports used by the thread # 2 and the thread # 3 overlap, the thread # 3 waits for the completion of the data B transmission process of the thread # 2, and starts the data A transmission process. Since this waiting time occurs, the transmission interval of the data A becomes longer than the reception interval. Therefore, there arises a problem that fluctuation occurs in the reception interval. On the other hand, as described above, the reception interval does not fluctuate in this embodiment.

ところで、データの遅延時間を考えると、従来方式の方が処理時間が短く、データの遅延時間も短いケースもある。上述のように、Nbitのハッシュ空間では、従来のピア検索処理の領域比較を行う回数の期待値が2回×2(1領域で2回の比較)であるのに対し、本探索方式では、常に、Round(log(N+1))回の条件成立の判断を行うので、N=160のChord方式の場合、判断回数は9回となり、従来の領域比較回数の期待値より大きくなるためである。   By the way, when considering the data delay time, the conventional method may have a shorter processing time and a shorter data delay time. As described above, in the Nbit hash space, the expected value of the number of times of performing the area comparison of the conventional peer search process is 2 × 2 (2 comparisons in 1 area), whereas in this search method, This is because the determination of the satisfaction of the condition of Round (log (N + 1)) times is always made, so in the Chord method with N = 160, the number of determinations is 9, which is larger than the expected value of the conventional number of area comparisons.

しかしながら、本実施の形態のピア検索処理では、並列化の効果が線形的に得られる。すなわち、たとえば、図10−1のように3並列化を行うと、処理時間を3分の1に削減することができる。最大9回の判断を行う場合、並列化すると3回分の処理に相当するので、揺らぎの発生を防ぎつつ、従来の方式に比べて処理速度を向上させることも可能である。また、処理時間を一定にしていることから、ハードウエア回路では、待ち合わせ用バッファなどの回路を不要にできるため、従来方式に比べてさらに並列化の実現が容易になる。   However, in the peer search process of the present embodiment, the parallelization effect can be obtained linearly. That is, for example, when the parallelization is performed as shown in FIG. 10A, the processing time can be reduced to one third. In the case of making a determination nine times at the maximum, parallel processing corresponds to three times of processing, so that it is possible to improve processing speed as compared with the conventional method while preventing occurrence of fluctuation. In addition, since the processing time is constant, the hardware circuit can eliminate the need for a circuit such as a waiting buffer, and thus parallelization can be realized more easily than the conventional method.

図11は、本実施の形態のピア検索処理をハードウエアで実現する検索処理装置の機能構成例を示す図である。図11では、図3のステップS106およびステップS107(以下、比較処理という)に相当する処理を行う構成要素についてのみ示している。図11に示すように、検索処理装置は、比較回路(判断手段)4と、メモリ5と、メモリバス6と、で構成される。   FIG. 11 is a diagram illustrating a functional configuration example of a search processing device that implements the peer search processing of the present embodiment by hardware. FIG. 11 shows only components that perform processing corresponding to steps S106 and S107 (hereinafter referred to as comparison processing) in FIG. As shown in FIG. 11, the search processing device includes a comparison circuit (determination means) 4, a memory 5, and a memory bus 6.

各ピアのFingerテーブルは、メモリ5に格納されている。比較回路4は、メモリバス6経由でリード命令を送信することにより一つ分のFingerの情報(Finger[i])を読み出す。Fingerの情報は、2分検索木におけるFinger[i]の位置と関連付けて格納されているとする。比較回路4は、図3の比較処理を行う場合、Finger[p]に対応するアドレスを指定してメモリバス6経由でメモリ5にリード命令を送信し、メモリ5からメモリバス6経由でリード応答としてFinger[p]の値を得てxとする。そして、hとxを比較する。ここで、比較回路4,メモリ5,メモリバス6の処理はパイプライン化できる。パイプライン化すると、この構成例では、パイプライン化しない場合の3倍の速度で処理を行うことが可能である。図12は、パイプライン化した場合の処理の一例を示す図である。   The Finger table of each peer is stored in the memory 5. The comparison circuit 4 reads out one finger information (Finger [i]) by transmitting a read command via the memory bus 6. It is assumed that the information on Finger is stored in association with the position of Finger [i] in the binary search tree. When the comparison circuit 4 performs the comparison process of FIG. 3, the address corresponding to Finger [p] is designated and a read command is transmitted to the memory 5 via the memory bus 6, and a read response is transmitted from the memory 5 via the memory bus 6. And obtain the value of Finger [p] as x. Then, h and x are compared. Here, the processing of the comparison circuit 4, the memory 5, and the memory bus 6 can be pipelined. When pipelined, in this configuration example, it is possible to perform processing at a speed three times that when not pipelined. FIG. 12 is a diagram illustrating an example of processing when pipeline processing is performed.

なお、本実施の形態では処理時間を一定にしていることから、パイプライン化しても、比較処理の結果が出力される順番が入れ替わることが無い。そのため、後段に順序保証回路を設ける必要はなく、また、比較回路4から前段へ、探索が完了して入力を送っても良いことを知らせる信号を送る必要もない。また、前段での待ち合わせ回路も不要である。このため、パイプライン化による高速処理可能なハードウエアの実現が容易になる。   In the present embodiment, since the processing time is fixed, the order in which the results of the comparison processing are output is not changed even if the processing is pipelined. Therefore, it is not necessary to provide an order guarantee circuit in the subsequent stage, and it is not necessary to send a signal notifying that the search is completed and an input may be sent from the comparison circuit 4 to the previous stage. Further, a waiting circuit in the previous stage is not necessary. This facilitates the realization of hardware capable of high-speed processing by pipelining.

なお、本実施の形態では、2分検索木を平衡木となるようにして実施の形態1と同様のピア検索処理を行う場合について説明したが、2分検索木を平衡木となるようにして実施の形態2のピア検索処理を行うようにしてもよい。この場合も、比較処理の部分は実施の形態1と同様であるため、処理時間は一定となり、パイプライン化による高速処理が容易に実現できる。   In the present embodiment, the case where peer search processing similar to that in Embodiment 1 is performed with the binary search tree as an equilibrium tree has been described. However, the binary search tree is configured as an equilibrium tree. You may make it perform the peer search process of the form 2. Also in this case, since the comparison processing is the same as that in the first embodiment, the processing time is constant, and high-speed processing by pipelining can be easily realized.

このように、本実施の形態では、2分検索木の構成ノード数が最大ノード数となるように、不足するノードについては最大ハッシュに対応するノードを追加して2分検索木を生成し、実施の形態1と同様に2分検索木にしたがってピア検索処理を実施するようにした。このため、ピア検索処理の処理時間が一定となり、また、パイプライン化が容易になるため、実施の形態1よりさらに処理を高速化することができる。   As described above, in this embodiment, a binary search tree is generated by adding a node corresponding to the maximum hash for the insufficient nodes so that the number of nodes constituting the binary search tree becomes the maximum number of nodes. Similar to the first embodiment, peer search processing is performed according to a binary search tree. For this reason, the processing time of peer search processing is constant, and pipelining is facilitated, so that the processing speed can be further increased as compared with the first embodiment.

以上のように、本発明にかかる通信装置およびピア検索方法は、コンテンツを分散管理するピアツーピアネットワークに有用であり、特に、広帯域のデータを行うネットワークや多種のコンテンツのサービスを実施するピアツーピアネットワークに適している。   As described above, the communication device and the peer search method according to the present invention are useful for a peer-to-peer network that distributes and manages content, and are particularly suitable for a network that performs broadband data and a peer-to-peer network that implements various content services. ing.

本発明にかかる実施の形態1のネットワークシステムの一次元ハッシュ空間におけるピアの配置例を示す図である。It is a figure which shows the example of arrangement | positioning of the peer in the one-dimensional hash space of the network system of Embodiment 1 concerning this invention. コンテンツ要求元のピアが管理するDHTの一例を示す図である。It is a figure which shows an example of DHT which the peer of a content request origin manages. コンテンツ要求元のピアの2分検索木の一例を示す図である。It is a figure which shows an example of the binary search tree of the peer of a content request source. 実施の形態1のピア検索処理手順の一例を示すフローチャートである。5 is a flowchart illustrating an example of a peer search processing procedure according to the first embodiment. h=31の場合の実施の形態1のピア検索処理の概念を示す図である。It is a figure which shows the concept of the peer search process of Embodiment 1 in the case of h = 31. h=2の場合の実施の形態1のピア検索処理の概念を示す図である。It is a figure which shows the concept of the peer search process of Embodiment 1 in the case of h = 2. 実施の形態2のピア検索処理手順の一例を示すフローチャートである。10 is a flowchart illustrating an example of a peer search processing procedure according to the second embodiment. h=31の場合の実施の形態2のピア検索処理の概念を示す図である。It is a figure which shows the concept of the peer search process of Embodiment 2 in case of h = 31. h=2の場合の実施の形態2のピア検索処理の概念を示す図である。It is a figure which shows the concept of the peer search process of Embodiment 2 in case of h = 2. 実施の形態3のネットワークシステムの一次元ハッシュ空間におけるピアの配置例を示す図である。FIG. 11 is a diagram illustrating an example of arrangement of peers in the one-dimensional hash space of the network system according to the third embodiment. 実施の形態3の送信元のピアのFingerテーブルの一例を示す図である。FIG. 22 is a diagram illustrating an example of a finger table of a transmission source peer according to the third embodiment. 実施の形態3の二分検索木の一例を示す図である。FIG. 20 is a diagram illustrating an example of a binary search tree according to the third embodiment. 実施の形態3の二分検索木の一例を示す図である。FIG. 20 is a diagram illustrating an example of a binary search tree according to the third embodiment. 実施の形態3のピア検索処理を用いた場合の並列処理タイミングの一例を示す図である。FIG. 11 is a diagram illustrating an example of parallel processing timing when the peer search process according to the third embodiment is used. 従来のピア検索処理を用いた場合の並列処理タイミングの一例を示す図である。It is a figure which shows an example of the parallel processing timing at the time of using the conventional peer search process. 本実施の形態のピア検索処理をハードウエアで実現する検索処理装置の機能構成例を示す図である。It is a figure which shows the function structural example of the search processing apparatus which implement | achieves the peer search process of this Embodiment by hardware. パイプライン化した場合の処理の一例を示す図である。It is a figure which shows an example of the process at the time of pipelining.

符号の説明Explanation of symbols

1,1a 一次元ハッシュ空間
2 ピア
3 Fingerピア
4 比較回路
5 メモリ
6 メモリバス
1, 1a One-dimensional hash space 2 Peer 3 Finger peer 4 Comparison circuit 5 Memory 6 Memory bus

Claims (7)

分散ハッシュテーブル方式を採用してコンテンツを分散管理するピアツーピアネットワークを構成するピアが、それぞれ自装置に割り当てられたハッシュ値に基づいて決定するデータ転送先のピアを転送先ピア情報として管理する場合に、コンテンツ要求の送信先または前記コンテンツ要求の転送先のピアを前記転送先ピア情報に含まれるピアのなかから検索するピア検索方法であって、
前記転送先ピア情報に含まれるピアのハッシュ値である転送先ピアハッシュ値を用いて分岐条件が定義された検索木を生成する検索木生成ステップと、
前記コンテンツ要求に対応するコンテンツの鍵のハッシュ値が前記検索木の上段から順に前記分岐条件を満たすか否かの判断を行う判断ステップと、
前記分岐条件を満たすと判断された分岐条件のうち、前記検索木の最も下段に位置する分岐条件に対応する転送先ピアハッシュ値を求め、その転送先ピアハッシュ値に対応するピアを検索結果とするピア決定ステップと、
を含むことを特徴とするピア検索方法。
When peers that make up a peer-to-peer network that uses a distributed hash table method to distribute and manage content manage data transfer destination peers determined based on the hash value assigned to each device as transfer destination peer information A peer search method for searching a content request transmission destination or a peer to which the content request is transferred from peers included in the transfer destination peer information,
A search tree generation step of generating a search tree in which a branch condition is defined using a transfer destination peer hash value that is a hash value of a peer included in the transfer destination peer information;
A determination step of determining whether or not a hash value of a content key corresponding to the content request satisfies the branch condition in order from the top of the search tree;
Among the branch conditions determined to satisfy the branch condition, a transfer destination peer hash value corresponding to the branch condition located at the bottom of the search tree is obtained, and a peer corresponding to the transfer destination peer hash value is determined as a search result. A peer determination step,
A peer search method characterized by comprising:
コンテンツを管理するピアまたはコンテンツを受信したピアが、そのコンテンツを要求元に送信するために、転送先のピアであるコンテンツ転送ピアを検索する場合に、前記判断ステップおよび前記ピア決定ステップによって前記コンテンツ転送ピアを検索することを特徴とする請求項1に記載のピア検索方法。   When the peer that manages the content or the peer that has received the content searches for a content transfer peer that is a transfer destination peer to transmit the content to the request source, the content is determined by the determination step and the peer determination step. The peer search method according to claim 1, further comprising searching for a forwarding peer. 前記判断ステップで、一度も分岐条件を満たさなかった場合には、前記転送先ピア情報に含まれるピアのうち、ハッシュ値が特定の条件を満たすピアを検索結果とすることを特徴とする請求項1または2に記載のピア検索方法。   2. The method according to claim 1, wherein if the branching condition is never satisfied in the determination step, a peer whose hash value satisfies a specific condition among the peers included in the forwarding destination peer information is set as a search result. 3. The peer search method according to 1 or 2. 前記判断ステップの実施前に、「コンテンツ要求に対応するコンテンツの鍵のハッシュ値が前記転送先ピア情報に含まれるピアのうち、ハッシュ値が特定の条件を満たすピアにて分岐条件を満たすと判断した」と初期状態を設定し、前記判断ステップで前記分岐条件を満たすと判断された分岐条件が無かった場合には、前記ピア決定ステップでは前記初期状態を前記判断ステップの判断結果とすることを特徴とする請求項1または2に記載のピア検索方法。   Prior to the execution of the determination step, “determining that the hash value of the content key corresponding to the content request satisfies the branch condition at the peer that satisfies the specific condition among the peers included in the transfer destination peer information. The initial state is set, and if there is no branch condition determined to satisfy the branch condition in the determination step, the peer determination step uses the initial state as the determination result of the determination step. The peer search method according to claim 1 or 2, characterized in that: 前記検索木生成ステップでは、前記転送先ピア情報に含まれるピアの数が前記転送先ピア情報に含まれる最大のピア数より少ない場合は、生成した検索木に、前記最大のピア数と分岐条件の数が同一となりかつ平衡木となるように、前記転送先ピア情報に含まれるピアのうち、ハッシュ値が特定の条件を満たすピアを1つまたは複数個追加することを特徴とする請求項1〜4のいずれか1つに記載のピア検索方法。   In the search tree generation step, when the number of peers included in the transfer destination peer information is smaller than the maximum number of peers included in the transfer destination peer information, the maximum search number and the branch condition are added to the generated search tree. The peers included in the forwarding destination peer information are added with one or more peers whose hash values satisfy a specific condition so that the number of the same is equal and a balanced tree. 5. The peer search method according to any one of 4 above. 前記判断ステップにおける、前記検索木の上段から順に行う判断処理のそれぞれを、並列処理により実施することを特徴とする請求項1〜5のいずれか1つに記載のピア検索方法。   The peer search method according to any one of claims 1 to 5, wherein each of the determination processes performed in order from the upper stage of the search tree in the determination step is performed by parallel processing. 分散ハッシュテーブル方式を採用してコンテンツを分散管理するピアツーピアネットワークを構成し、それぞれ自装置に割り当てられたハッシュ値に基づいて決定するデータ転送先の通信装置を転送先ピア情報として管理し、コンテンツ要求の送信先または前記コンテンツ要求の転送先の通信装置を前記転送先ピア情報に含まれるピアのなかから検索する通信装置であって、
前記転送先ピア情報に含まれるピアのハッシュ値である転送先ピアハッシュ値を用いて分岐条件が定義された検索木を格納するための記憶手段と、
前記記憶手段から前記検索木を読み出し、前記コンテンツ要求に対応するコンテンツの鍵のハッシュ値が前記検索木の上段から順に前記分岐条件を満たすか否かを判断し、前記分岐条件を満たすと判断された分岐条件のうち、前記検索木の最も下段に位置する分岐条件に対応する転送先ピアハッシュ値を求め、その転送先ピアハッシュ値に対応する通信装置を検索結果とする判断手段と、
を備えることを特徴とする通信装置。
Configures a peer-to-peer network that distributes and manages content using a distributed hash table method, manages each data transfer destination communication device determined based on the hash value assigned to the device as transfer destination peer information, and requests content A communication device that searches a peer included in the transfer destination peer information for a communication device of a transmission destination of the content request or a transfer destination of the content request,
Storage means for storing a search tree in which a branch condition is defined using a transfer destination peer hash value that is a hash value of a peer included in the transfer destination peer information;
The search tree is read from the storage means, and it is determined whether or not the hash value of the content key corresponding to the content request satisfies the branch condition in order from the top of the search tree, and is determined to satisfy the branch condition. Determining means for obtaining a transfer destination peer hash value corresponding to the branch condition located at the bottom of the search tree among the branch conditions, and determining a communication device corresponding to the transfer destination peer hash value as a search result;
A communication apparatus comprising:
JP2007307595A 2007-11-28 2007-11-28 Peer searching method and communication apparatus Pending JP2009134341A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007307595A JP2009134341A (en) 2007-11-28 2007-11-28 Peer searching method and communication apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007307595A JP2009134341A (en) 2007-11-28 2007-11-28 Peer searching method and communication apparatus

Publications (1)

Publication Number Publication Date
JP2009134341A true JP2009134341A (en) 2009-06-18

Family

ID=40866195

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007307595A Pending JP2009134341A (en) 2007-11-28 2007-11-28 Peer searching method and communication apparatus

Country Status (1)

Country Link
JP (1) JP2009134341A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012079240A1 (en) * 2010-12-17 2012-06-21 Empire Technology Development Llc Device discovery in a ubiquitous computing environment
JP2013156960A (en) * 2012-01-31 2013-08-15 Fujitsu Ltd Generation program, generation method, and generation system

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012079240A1 (en) * 2010-12-17 2012-06-21 Empire Technology Development Llc Device discovery in a ubiquitous computing environment
JP2014500551A (en) * 2010-12-17 2014-01-09 エンパイア テクノロジー ディベロップメント エルエルシー Device discovery in the ubiquitous computing environment
US8850021B2 (en) 2010-12-17 2014-09-30 Empire Technology Development Llc Device discovery in a ubiquitous computing environment
KR101540868B1 (en) * 2010-12-17 2015-07-30 엠파이어 테크놀로지 디벨롭먼트 엘엘씨 Device discovery in a ubiquitous computing environment
JP2013156960A (en) * 2012-01-31 2013-08-15 Fujitsu Ltd Generation program, generation method, and generation system

Similar Documents

Publication Publication Date Title
US7984182B2 (en) Node device, information transfer processing program, and network participation processing method and the like
US8321586B2 (en) Distributed storage system, node device, recording medium in which node processing program is recorded, and address information change notifying method
JP4375303B2 (en) Information communication system, information communication method, node device included in information communication system, information processing program, and node device program
JP2008234445A (en) Content distributed storage system, duplicate data acquisition method, node device, and node processing program
JP2005323346A (en) Routing in peer-to-peer network
US20200059353A1 (en) Data fetching in data exchange networks
WO2012142844A1 (en) P2p-based file distribution system and slicing method
JP2007148545A (en) Information delivery system, information delivery method, node device and node processing program
JP2008262507A (en) Data retrieval device, data retrieval system, data retrieval method, and program for data retrieval
US7853718B2 (en) Information delivery system, reregistration message sending method, node device, and recording medium recording node processing program
CN108337170B (en) Distributed resource searching method and system
WO2007023636A1 (en) Information delivery system, information delivery method, node apparatus included in information delivery system, and storing medium in which information processing program has been stored
JP2008234563A (en) Overlay management device, overlay management system, overlay management method, and program for managing overlay
JP4702314B2 (en) Content distributed storage system, node device, node processing program, and content data acquisition method
US8903885B2 (en) Information communication system, node device, information processing method and computer-readable storage medium
US20100306303A1 (en) Distributed storage system, connection information notifying method, and recording medium in which distributed storage program is recorded
JP4877107B2 (en) Terminal device and information processing program in information distribution system, and information processing method of terminal device
JP2009134341A (en) Peer searching method and communication apparatus
US8312068B2 (en) Node device, information communication system, method for managing content data, and computer readable medium
Zhang et al. A new algorithm of service discovery based on DHT for mobile application
WO2013027784A1 (en) Data processing device, data distribution processing system, data processing method, and program storage medium
US8315979B2 (en) Node device, information communication system, method for retrieving content data, and computer readable medium
JP5012712B2 (en) Content distributed storage system, total evaluation value management device, management processing program, node device, and total evaluation value management method
JP4521419B2 (en) Node device, forwarding node determination method and program
JP2004127074A (en) File retrieval method in p2p network, terminal, program, and recording medium