WO2010069229A1 - P2p系统中中转节点的选择方法及p2p节点 - Google Patents

P2p系统中中转节点的选择方法及p2p节点 Download PDF

Info

Publication number
WO2010069229A1
WO2010069229A1 PCT/CN2009/075319 CN2009075319W WO2010069229A1 WO 2010069229 A1 WO2010069229 A1 WO 2010069229A1 CN 2009075319 W CN2009075319 W CN 2009075319W WO 2010069229 A1 WO2010069229 A1 WO 2010069229A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
neighbor
neighbor table
transit
nodes
Prior art date
Application number
PCT/CN2009/075319
Other languages
English (en)
French (fr)
Inventor
武广柱
Original Assignee
腾讯科技(深圳)有限公司
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 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Publication of WO2010069229A1 publication Critical patent/WO2010069229A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W40/00Communication routing or communication path finding
    • H04W40/02Communication route or path selection, e.g. power-based or shortest path routing
    • H04W40/20Communication route or path selection, e.g. power-based or shortest path routing based on geographic position or location

Definitions

  • the embodiments of the present invention relate to the field of P2P technologies, and in particular, to a method for selecting a transit node in a P2P system and a P2P node.
  • Background of the invention
  • the Peer-To-Peer (Peer-To-Peer) system is a distributed network system. Nodes in the system do not need to transit through the server. They can directly transmit data to each other or perform data transfer through other nodes. They are selected as data relays. The node is called a transit node.
  • the choice of transit node is very important in the P2P system.
  • the performance of the transit node directly affects the data transmission between the source node and the target node, such as the VoIP (voice-over-IP) application in the P2P system, the transit node
  • the delay to the source node and the destination node directly affects the VOIP call effect, so in general, the smaller and more stable nodes that are delayed to the source node and the destination node should be selected as the transit node.
  • IPv4 the IP address is just an artificially divided logical address.
  • the IP address information of the node cannot determine the delay between nodes.
  • the geographic location of a node can be found by IP address, there is no clear relationship between the geographic location of the two nodes and the network delay between them.
  • the method of active detection is used to measure the delay of a large number of candidate nodes and then select a better path, a large number of probe packets will be caused, and the system will be overwhelmed.
  • the absolute value of the IP address difference between nodes is used to determine the delay between nodes. Its representative is Grid Media GridMedia system, in this system, when a node requests a transit node, the delay value is estimated by the absolute value of the difference between the node and the requesting node IP address returned by the tracker Tracker, thereby selecting a node with a small delay. As a transit node. Although this method can make the node have the opportunity to discover and select the nodes in the same subnet or even the same LAN as the transit node, there is no obvious correlation between the IP address and the network delay. Therefore, the method has The effect is open to question.
  • a feature value indicating the location is inserted into the node, and the delay between the nodes is determined by the feature value.
  • the representative is the AnySee system, in which the Landmark logo is used to indicate the location.
  • Landmark is a 56-bit data type value that uses a fixed number of bits to represent the country, network type, province, city, and school.
  • Each node that joins the AnySee system has its own Landmark value, which is generated by the correspondence between geographic location and IP and certain coding rules.
  • the distance between the nodes can be calculated according to the Landmark value through a certain algorithm, and the delay between the nodes is estimated, so that the transit node with less delay is selected.
  • the network coordinate method assumes that each node has a logical coordinate value in the logical topology. By calculating the Euclidean distance of the logical coordinates of the two nodes, the delay between the two nodes can be inferred.
  • the existing typical methods for determining network coordinates include: 1) Global Network Positioning (GNP). The idea of this method is to establish a static coordinate system using more stable servers. Each server has a coordinate in the system. Value; in this way, newly joined nodes can determine their own sitting in the system by measuring the delay of these servers. Standard. 2) The Vivaldi system does not use a fixed coordinate server. When nodes join the system, they randomly select coordinates and continuously adjust their coordinates through mutual detection between nodes, and finally make the system converge. 3) The practical Internet coordinates (PIC) system uses a mixture of the above two detection methods. Although the network coordinates can accurately reflect the delay relationship between nodes, there is no choice of a transit node with a small network coordinate selection delay. Summary of the invention
  • Embodiments of the present invention provide a method for selecting a transit node and a P2P node in a P2P system, so as to select a preferred transit node, and no server support is needed.
  • a method for selecting a transit node in a P2P system includes:
  • the source node calculates the Euclidean distance of each neighbor node in the neighbor table to the source node and the Euclidean distance of the neighbor node to the destination node;
  • the source node sends a route query request to the neighbor node with the smallest sum of the calculated Euclidean distances
  • the node that receives the route query request performs the same operation as the source node; the source node determines the Nth node that receives the route query request as a transit node, where N > 1.
  • a P2P node includes:
  • the neighbor table maintenance module is used to maintain its own neighbor table.
  • the route calculation module is connected to the neighbor table maintenance module, and is configured to calculate an Euclidean distance from each neighbor node to the source node in the neighbor table maintained by the neighbor table maintenance module, and an Euclidean distance from the neighbor node to the destination node. Sum;
  • a route query module connected to the route calculation module, configured to calculate a mode for the route
  • the neighbor node with the smallest sum of Euclidean distances calculated by the block sends a route query request;
  • the transit node determining module is connected to the route query module, and is used to determine the Nth node that receives the route query request as the transit node, where N > 1.
  • the P2P system transit node selection method and the P2P node of the present invention find the Euclidean distance between the nodes in the neighbor table, and use the stepwise approximation query method to find through multiple queries.
  • the Euclidean distance between nodes is calculated by using the network coordinates of the nodes. Since the network coordinates can accurately reflect the real delay between nodes, the more convenient transit node can be selected by the convergence method with better convergence and gradually designed by the present invention, and no special need is needed.
  • the server supports is not limited by the service period processing capability, and has the characteristics of easy expansion, low cost, and good effect. BRIEF DESCRIPTION OF THE DRAWINGS
  • FIG. 1 is a flowchart of a method for selecting a transit node according to an embodiment of the present invention
  • FIG. 2 is a schematic diagram of a spatial coordinate hypersphere according to an embodiment of the present invention.
  • FIG. 3 is a schematic diagram of selection of a transit node according to an embodiment of the present invention.
  • FIG. 4 is a schematic structural diagram of a P2P node according to an embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of a neighbor table maintenance module according to an embodiment of the present invention. Mode for carrying out the invention
  • each node uses a certain policy to maintain a neighbor table; when the source node A needs to select a transit node to the destination node, it searches its neighbor table and sends a query routing request to a certain one it knows. On the best node B, the B node further finds its neighbor The best node C between the A and P in the table, and sends a query route request to C, requires C to continue searching, and after repeating several times, a better node can be found, so that the node can be selected as a transit. node.
  • FIG. 1 is a flowchart of a method for selecting a transit node according to an embodiment of the present invention. As shown in FIG. 1, the process includes the following steps:
  • Step 101 The source node calculates the Euclidean distance from each neighbor node in the neighbor table to the source node and the Euclidean distance to the destination node.
  • Step 102 The source node sends a route query request to the neighbor node with the smallest sum of the calculated Euclidean distances.
  • Step 103 The node that receives the route query request performs the same operation as the source node.
  • Step 104 The source node determines the Nth node that receives the route query request as the transit node.
  • N can be preset to any positive integer greater than 1, ie ⁇ > 1.
  • the network coordinates of the two nodes are usually used.
  • the embodiment does not limit the network coordinate determination scheme. Meanwhile, since the generation of the network coordinates is a mature technology, the specific algorithm steps of the network coordinate generation are omitted here.
  • the method for establishing the neighbor table in the foregoing step 101 is arbitrary, and a certain number of nodes may be randomly selected from all the nodes in the P2P system to join the neighbor table, or may be added to the neighbor table according to a certain rule.
  • the following describes a preferred method for establishing a neighbor table:
  • the delay between nodes can be obtained by calculating the Euclidean distance between the coordinates, so the Euclidean distance between the nodes can be used to represent the delay between nodes. Nodes with large distances indicate a large delay.
  • node A There is a node A, and the establishment of its neighbor table can first coordinate the coordinate space with the A node.
  • the plurality of hyperspheres in the center are divided into multiple layers. From each layer, neighbor nodes that satisfy the Euclidean distance condition of the layer are randomly selected to join the corresponding entries in the neighbor table; and a neighbor table of a multi-layer structure is formed.
  • FIG. 2 is a schematic diagram of a spatial coordinate hypersphere according to an embodiment of the present invention.
  • the coordinates of the A node as its center, other nodes in the system are located on a plurality of hyperspheres or super-sized to the center radius. Between the spheres.
  • Node A randomly selects several nodes that satisfy a certain interval condition and stores them in a neighbor table of a certain layer.
  • the node selection conditions in each layer neighbor table are as follows:
  • A can randomly select several nodes that meet the conditions to join the corresponding entries in its neighbor table. Since the range of delays covered by each layer grows exponentially, this results in a state in which there is more information about nodes near the A node and less information from nodes farther away from the A node. That is to say, each node is very familiar with the situation in its vicinity, and as the Euclidean distance increases, the degree of understanding continues to decrease. This facilitates the convergence of the lookup process.
  • the node may further detect whether the neighbor node in the neighbor table is invalid by periodically sending a heartbeat message, and delete the invalid neighbor node from the neighbor table, thereby ensuring the availability of the neighbor table.
  • the neighbor table information can be exchanged periodically between nodes. Exchange through the neighbor table, Node A can discover some new nodes that were originally unknown, thereby improving the availability of neighbor nodes. Specifically, if the number of neighbor nodes in the neighbor table does not reach the preset threshold, the new node that is not included in the neighbor table included in the neighbor table of the other neighbor node is added to its neighbor table; If the number of neighbor nodes in the table has reached the preset threshold, the root is set arbitrarily. For example, the time when the new node and the original node enter the P2P system is determined, and the node that has entered the system for a long time is reserved to replace the node that has entered the system for a short time.
  • node A When the number of neighboring nodes in a certain layer of the node A is small, for example, the preset threshold is not reached, the node A can actively discover that some qualified nodes join the entry. For example, node A randomly generates a reference node coordinate Prand, where node A is The Euclidean distance d needs to meet the above node selection conditions, such as the condition 2'r ⁇ J ⁇ 2''. Node A sends a search request to the nearest Node B in its neighbor node, and the Node B that receives the search request further sends the search request to Node C, which is closer to P rand in its neighbor list, and B can report A. In the known node, C is closer to P rand , so stop after multiple hops.
  • a search frequency M M > 1 . After reaching M times, stop searching. Specifically, you can use the method of setting TTL lifetime. Number of searches. Node A can finally find some nodes in the vicinity of P rand , so that some suitable nodes can be selected from the nodes that receive the search request to join the neighbor list. Thereby further improving the availability of neighbor tables Sex.
  • FIG. 3 is a schematic diagram of selection of a transit node according to an embodiment of the present invention.
  • the source node is A
  • the destination node is P.
  • node A When node A needs to find a transit node of node P, node A first checks its neighbor list. Neighbor nodes, and calculate the sum of the Euclidean distances of these neighbor nodes to themselves and to P, and finally select the node B with the smallest sum of Euclidean distances.
  • Node A sends a route query request to Node B.
  • Node B After receiving this message, Node B also looks at the nodes in its neighbor table, and calculates the sum of the Euclidean distances of these neighbor nodes to Node A and to Node P, and finally determines the relationship between Node C and Node A and Node P. The sum of Euclidean distances is the smallest.
  • Node B sends a route query request to node C.
  • Node C uses the same calculation method to determine that node D routes the query to node D. If the node that is queried for the third time is set as the transit node in advance, node A can finally determine that node D is the transit node, otherwise the query is continued and the approach is gradually approached.
  • the node that sends the query request each time can notify the source node which node is better by reporting the node that the query to the source node.
  • the node that is queried several times is used as a transit node, which may be determined according to actual needs.
  • FIG. 4 is a schematic structural diagram of a P2P node according to an embodiment of the present invention. As shown in FIG. 4, the node includes:
  • the neighbor table maintenance module 401 is configured to maintain a neighbor table.
  • the route calculation module 402 is connected to the neighbor table maintenance module, and is configured to calculate an Euclidean distance from each neighbor node to the source node in the neighbor table maintained by the neighbor table maintenance module, and an Euclidean distance from the neighbor node to the destination node.
  • the route calculation module 402 specifically calculates the Euclidean distance of each neighbor node to the source node and the Euclidean distance of the neighbor node to the destination node in the neighbor table maintained by the neighbor table maintenance module according to the node coordinates.
  • the transit node determining module 404 is connected to the route query module, and is configured to determine the Nth node that receives the route query request as the transit node. , where N > 1.
  • FIG. 5 is a schematic structural diagram of a neighbor table maintenance module according to an embodiment of the present invention. As shown in FIG. 5, the neighbor table maintenance module includes:
  • the space dividing unit 502 is configured to divide the current network coordinate space into an L layer space centering on the coordinates of the P2P node; wherein L > 1 ;
  • the node selection unit 503 is respectively connected to the spatial division unit, and is configured to select (for example, randomly select or select according to conditions, etc.) the neighbor nodes satisfying the Euclidean distance condition of the layer to join the neighbor table in each layer.
  • the neighboring table constituting an L layer; the storage unit 501 is connected to the node selecting unit 503 for storing the neighbor table.
  • the neighbor table maintenance module 401 may further include:
  • the node maintenance unit is connected to the storage unit, and is configured to detect, by using a heartbeat message, whether the neighbor node in the neighbor table is invalid, and delete the failed neighbor node from the neighbor table.
  • the neighbor table maintenance module 401 may further include or further include an embodiment including the node maintenance unit:
  • the neighbor table maintenance module 401 may further include:
  • a node discovery unit is connected to the storage unit. If the number of neighbor nodes in the neighbor table does not reach a preset threshold, a reference node coordinate is generated (here, a reference node coordinate may be randomly generated), and the neighbor node table is Euclidean distance from the coordinates of the reference node Sending a search request from the nearest neighbor node;
  • the node receiving the search request continues to send a search request to the neighbor node in the neighbor table that is closest to the Euclidean distance of the reference node coordinates;
  • the node discovery unit selects an appropriate node from the node that receives the search request to join its neighbor list; where M > 1.
  • the P2P system transit node selection method and the P2P node of the present invention find a better transit node by calculating the network coordinates and using a stepwise approximation query method. It uses the network coordinates to select the transit node, which can find a better transit node at a lower cost than the prior art.
  • each layer has different fetch conditions, which is conducive to the convergence of the query process. By periodically detecting whether the nodes in the neighbor table are invalid, exchanging neighbor table information between nodes, and actively discovering neighbor nodes by generating random coordinates, the availability of the neighbor table can be effectively improved, and the effect of the transit node query can be improved.

Description

P2P系统中中转节点的选择方法及 P2P节点 技术领域
本发明实施例涉及 P2P技术领域,特别涉及 P2P系统中中转节点的选 择方法及 P2P节点。 发明背景
点对点 P2P ( Peer-To-Peer ) 系统, 是一种分布式网络系统, 系统中 各节点之间不需要通过服务器进行中转, 可以直接互相传输数据或通过 其他节点进行数据中转, 被选择作为数据中转的节点称为中转节点。
中转节点的选择在 P2P系统中是非常重要的, 中转节点的性能直接 影响源节点到目标节点之间的数据传输, 例如 P2P 系统中的网络电话 VoIP ( Voice-over-IP )应用中, 中转节点到源节点和目的节点的延迟直 接影响 VOIP的通话效果, 因此一般来说, 应该选择那些到源节点和目 的节点延迟的和较小的、 较为稳定的节点作为中转节点。 但是, 在 IPv4 中, IP地址只是一个人为划分的逻辑地址, 通过节点的 IP地址信息无 法判断节点之间的延迟大小。虽然通过 IP地址可以查找到某节点所处的 地理位置, 但是, 两节点地理位置同他们之间的网络延迟并不存在一个 明确的关系。 而如果釆用主动探测方式去测量到大量候选节点的延迟进 而选择一条较好路径的方法时,将会导致大量探测报文, 系统不堪重负。
为了解决中转节点的选择问题, 目前也有一些成果, 其中, 有三种 具有代表性的选择中转节点的方法, 具体如下:
一、 IP比对法。
利用节点间 IP地址差的绝对值来判断节点间的延迟大小。其代表是 网格媒体 GridMedia系统 , 在该系统中, 当某节点请求中转节点时 , 通 过追踪器 Tracker返回的该节点与请求节点 IP地址之差的绝对值来推测 延迟大小, 从而选择出延迟较小的节点作为中转节点。 这一方式虽然可 以使得节点有机会发现并选择位于同一子网内甚至是同一局域网内的 节点作为中转节点, 但因 IP 地址和网络延迟之间并不存在明显的相关 性, 因此, 本方法的效果有待商榷。
二、 Landmark方法。
即利用 IP地址与地理位置的对应关系,在节点中插入一个表示位置 的特征值, 通过特征值确定节点间的延迟大小。 其代表是 AnySee系统, 在该系统中, 使用 Landmark标识表示位置, Landmark是一个 56位数 据类型的值, 利用固定几位分别表示国家、 网络类型、 省份、 城市和学 校等信息。 每个加入 AnySee系统的节点都有自己的一个 Landmark值, 它由地理位置与 IP的对应关系和一定的编码规则产生。在寻找中转节点 时, 可根据 Landmark值通过一定的算法计算出节点之间的距离, 推测 节点间的延迟大小, 从而选择出延迟较小的中转节点。 这种方式因需要 建立详细的 Landmark数据库, 数据收集困难; 而且, 这种数据库的精 度较低, 4艮难确定如"中国科技大学"、 "中科院研究生院"、 "清华大学" 三所大学内节点延迟的关系。
三、 网络坐标方法。
网络坐标方法是假设每个节点在逻辑拓朴中都有一个逻辑坐标值, 通过计算两节点的逻辑坐标的欧氏距离可以推测出两节点间的延迟大 小。 现有确定网络坐标的典型方法包括: 1)全球网络定位 GNP(Global Networking Positioning), 这种方法的思想是使用较多的稳定服务器建立 一个静态坐标系统, 每个服务器在系统中都有一个坐标值; 这样, 新加 入的节点可以通过测量到这些服务器的延迟来确定自己在系统中的坐 标。 2 )维瓦迪(Vivaldi )系统不使用固定坐标服务器, 节点加入系统时 随机选择坐标并通过节点间的相互探测来不断调整自身坐标, 最终使系 统收敛。 3 ) 实用英特网坐标 PIC(Practical Internet coordinates)系统使用 了上述两种探测方式的混合。 网络坐标虽然能够较为准确的反应节点间 的延迟关系, 但是, 目前还没有应用网络坐标选择延迟较小的中转节点 的选择方案。 发明内容
本发明实施例提供了 P2P系统中中转节点的选择方法和 P2P节点, 以便选择出较佳的中转节点, 且无需服务器支持。
为达到上述目的, 本发明实施例的技术方案具体是这样实现的: 一种 P2P系统中中转节点的选择方法, 该方法包括:
源节点计算自身邻居表中每一个邻居节点到所述源节点的欧氏距离 以及该邻居节点到目的节点的欧氏距离之和;
源节点向计算出的欧氏距离之和最小的邻居节点发送路由查询请 求;
所述收到路由查询请求的节点执行与所述源节点相同的操作; 源节点将第 N个接收到所述路由查询请求的节点确定为中转节点, 其中 N > 1。
一种 P2P节点, 该节点包括:
邻居表维护模块, 用于维护自身邻居表;
路由计算模块, 与所述邻居表维护模块相连, 用于计算所述邻居表 维护模块所维护的邻居表中每一个邻居节点到源节点的欧氏距离以及 该邻居节点到目的节点的欧氏距离之和;
路由查询模块, 与所述路由计算模块相连, 用于向所述路由计算模 块计算出的欧氏距离之和最小的邻居节点发送路由查询请求; 中转节点确定模块, 与所述路由查询模块相连, 用于将第 N个接收 到路由查询请求的节点确定为中转节点, 其中 N > 1。
由上述的技术方案可见, 本发明的这种 P2P系统中转节点选择方法 和 P2P节点, 通过对邻居表中节点间的欧氏距离的计算, 釆用逐步逼近 的查询方法, 通过多次查询, 找到较好的中转节点。 其中, 在计算节点 之间的欧式距离时是利用节点的网络坐标计算的。 由于网络坐标能够较 为准确的反应出节点间的真实延迟情况, 因此通过本发明所设计的这种 收敛性较好的逐步逼近的查询方式, 可以选择出更加合适的中转节点, 且不需要专用的服务器支持, 不受服务期处理能力限制, 具有易扩展、 成本低、 效果好的特点。 附图简要说明
图 1为本发明实施例的中转节点的选择方法流程图;
图 2为本发明实施例的空间坐标超球面示意图;
图 3为本发明实施例的中转节点选择示意图;
图 4为本发明实施例的 P2P节点结构示意图;
图 5为本发明实施例的邻居表维护模块具体结构示意图。 实施本发明的方式
为使本发明的目的、 技术方案及优点更加清楚明白, 以下参照附图 并举实施例, 对本发明进一步详细说明。
本发明实施例中, 每个节点内使用一定策略维护一个邻居表; 源节 点 A在需要选择到目的节点的中转节点时, 将查找其邻居表, 并发送查 询路由请求到它所知道的某个最佳节点 B上, B节点进一步查找出其邻 居表内 A、 P之间的最佳节点 C, 并发送查询路由请求到 C, 要求 C继 续查找, 重复进行数次后, 即可查找到一个较好节点, 从而可以将该节 点选择为中转节点。
图 1为本发明实施例的中转节点的选择方法流程图, 如图 1所示, 该流程包括以下步骤:
步骤 101 , 源节点计算自身邻居表中每一个邻居节点到源节点的欧 氏距离以及到目的节点的欧氏距离之和。
步骤 102, 源节点向计算出的欧氏距离之和最小的邻居节点发送路 由查询请求。
步骤 103 , 收到路由查询请求的节点执行与上述源节点相同的操作 步骤 104, 源节点将第 N个接收到路由查询请求的节点确定为中转 节点。
其中 N可以预设为任意大于 1的正整数, 即^ > 1。
其中, 在本发明实施例中, 计算两个节点之间比如邻居节点到源节 点的欧式距离时, 通常利用该两个节点的网络坐标执行。 至于如何确定 节点的网络坐标, 本实施例并不限定网络坐标确定方案, 同时, 因为网 络坐标的产生是现有成熟技术, 这里也省略网络坐标产生的具体算法步 骤。
这里, 上述步骤 101中所述邻居表的建立方法任意, 可以从 P2P系 统中的所有节点中随机选择一定数量的节点加入邻居表中, 也可以按照 一定的规则加入邻居表中。 下面介绍一种较佳的邻居表建立方法:
以 P2P系统中的节点通过 Vivaldi网络坐标确定算法获取坐标为例 , 节点间的延迟可以通过计算坐标间的欧氏距离而得出, 因此可以使用节 点间的欧氏距离代表节点间的延迟, 欧氏距离大的节点说明延迟较大。
设有一节点 A, 其邻居表的建立可以首先将坐标空间以 A节点坐标 为中心的多个超球面划分为多层空间, 从每一层中, 随机选择满足该层 欧氏距离条件的邻居节点加入邻居表中相应的表项中; 构成一个多层结 构的邻居表。
图 2为本发明实施例的空间坐标超球面示意图, 如图 2所示, 以 A 节点自身坐标为中心, 系统内其它节点都位于到这一中心半径大小不等 的多个超球面上或超球面间。 其中, 节点 A将随机选取满足某个区间条 件的若干个节点存入某层的邻居表中, 其中, 每层邻居表中的节点选择 条件如下:
当 L=l时,只有一层空间, 即 i=0,则可选择 d满足 0 < ί <∞的节点; 当 1 1时, 若 i=0, 则可选择 d满足 0< ≤2r的节点;
当 L>1时, 若 0<i<L-l , 则可选择 d满足 2 < ≤2i+ 的节点; 当 L>1时, 若 i=L-l , 则可选择 d满足 2i+ < d <∞的节点;
其中, d为在网络坐标系中邻居节点到 A节点的欧氏距离, L表示 空间划分的总层数, L > 1 ; i代表具体层数,取值范围为 0〜L-1 , 其中, 第 i层上的节点到 A的延迟为 2'r; τ为延迟的最小单位, 例如 τ可取值 为 10ms或其它任意值。
在每一层上, A可以随机选择符合条件的若干个节点加入到其邻居 表的相应表项中。 由于每层所覆盖的延迟的范围呈指数关系增长, 这就 形成了离 A节点近的节点的信息多,离 A节点远的节点的信息少的状态。 也就是说, 每个节点都对自己附近的情况非常了解, 而随着欧氏距离的 增大, 了解的程度不断降低。 这有利于查找过程的收敛。
另外, 在建立起邻居表后, 节点还可以进一步通过定期发送心跳消 息探测邻居表中的邻居节点是否失效, 将失效的邻居节点从所述邻居表 中删除, 从而保证邻居表的可用性。
除此以外,节点之间还可以定期交换邻居表信息。通过邻居表交换, 节点 A可发现一些原来未知的新节点, 从而提高邻居节点的可用性。 具 体来说, 若自身邻居表中的邻居节点数目没有达到预设的阈值, 则将其 它邻居节点的邻居表中包含的, 自身邻居表中没有的新节点加入自身的 邻居表中; 若自身邻居表中的邻居节点数目已经达到预设的阈值, 则根 以任意设置, 例如判断新节点与原节点进入 P2P系统的时间, 保留进入 系统时间长的节点来替换掉进入系统时间短的节点。 或者, 计算所述新 节点与自身邻居表内属于同一层中的邻居节点之间的平均延迟, 以及该 层中, 原有邻居节点与同一层中的其它节点之间的平均延迟, 将比新节 点延迟小的原有邻居节点替换为新节点。 例如设邻居表中原节点为 Pl 新节点为 Pn,则可以计算 与其所在层的表项内其它原节点间的平均延 迟,同时也计算新节点 Pn同表项内与其所在层的其它原节点间的平均延 迟, 如果 Ρηι 则用新节点取代节点 这种替换方法可以使邻居表 中的节点尽量均衡的分布在坐标空间中。
当节点 A的某层的表项中的邻居节点较少时, 例如没有达到预设的 阈值, A节点可以主动发现一些符合条件的节点加入该表项内。 例如, 节点 A随机产生一个参考节点坐标 Prand,其中, 节点 A到
Figure imgf000009_0001
的欧氏距 离 d需要符合上述的节点选择条件, 例如 2'r < J≤2'' 这一条件。 节点 A 向其邻居节点内距离 最近的节点 B发送搜索请求,收到这一搜索请 求的节点 B进一步将搜索请求发送给其邻居表内距离 Prand更近的节点 C 上, 同时 B可以报告 A所知道的节点中 C距离 Prand较近, 如此进行多 跳后停止, 例如预设一个搜索次数 M, M > 1 , 达到 M次后, 停止搜索, 具体可以使用设定 TTL生存期的方法限制搜索次数。 节点 A最终可以 发现在 Prand附近的一些节点, 从而可以从收到搜索请求的节点中, 选择 一些合适的节点加入自身邻居表中其中。 从而进一步提高邻居表的可用 性。
最后, 可以举个具体的例子, 说明具体中转节点的确定过程。
图 3为本发明实施例的中转节点选择示意图, 如图 3所示, 源节点 为 A, 目的节点为 P, 当节点 A需要查找到节点 P的中转节点时, 节点 A首先查看自己邻居表中的邻居节点, 并计算这些邻居节点到自身和到 P的欧氏距离之和, 并最终选择出欧氏距离之和最小的节点 B。 节点 A 将路由查询请求发送给节点 B。 节点 B在收到这一消息后, 同样查看自 己邻居表中的节点,并计算这些邻居节点到节点 A和到节点 P的欧氏距 离之和, 并最终确定节点 C到节点 A、 节点 P的欧氏距离之和最小。 节 点 B将路由查询请求发送给节点 C。 节点 C以同样的计算方法, 确定出 节点 D将查询路由给节点 D。如果预先设置将第 3次查询到的节点作为 中转节点,则节点 A此时可以最终确定节点 D为中转节点, 否则继续查 询, 逐步逼近。 其中, 每次发送查询请求的节点可以通过向源节点报告 自己查询到的节点的方式通知源节点哪个节点更佳。 一般来说, 查询次 数越多, 选择出的中转节点越好, 但是查询次数过多也会给网络造成负 担。具体将第几次查询到的节点作为中转节点,可以根据实际需要而定。
图 4为本发明实施例的 P2P节点结构示意图, 如图 4所示, 该节点 包括:
邻居表维护模块 401 , 用于维护自身邻居表;
路由计算模块 402, 与所述邻居表维护模块相连, 用于计算所述邻 居表维护模块维护的邻居表中每一个邻居节点到源节点的欧氏距离以 及该邻居节点到目的节点的欧氏距离之和; 这里, 路由计算模块 402具 体是根据节点坐标计算所述邻居表维护模块维护的邻居表中每一个邻 居节点到源节点的欧氏距离以及邻居节点到目的节点的欧氏距离之和。
路由查询模块 403 , 与所述路由计算模块相连, 用于向路由计算模 块 402计算出的欧氏距离之和最小的邻居节点发送路由查询请求; 中转节点确定模块 404, 与所述路由查询模块相连, 用于将第 N个 接收到路由查询请求的节点确定为中转节点, 其中 N > 1。
图 5为本发明实施例的邻居表维护模块具体结构示意图, 如图 5所 示, 邻居表维护模块包括:
空间划分单元 502, 用于以所述 P2P节点的坐标为中心将当前网络 坐标空间划分为 L层空间; 其中 L > 1 ;
节点选择单元 503 , 与所述空间划分单元分别相连, 用于从每一层 中, 选择(比如随机选择或者按照条件选择等)满足该层欧氏距离条件 的邻居节点加入所述邻居表中相应的表项内; 构成一个 L层的邻居表; 存储单元 501 , 与节点选择单元 503相连, 用于存储邻居表。
另外, 邻居表维护模块 401可以进一步包括:
节点维护单元, 与存储单元相连, 用于通过心跳消息探测邻居表中 的邻居节点是否失效, 将失效的邻居节点从所述邻居表中删除。
或者, 邻居表维护模块 401可以进一步包括或在包括节点维护单元 的实施例基础上进一步包括:
节点交换单元, 与所述存储单元相连, 用于与其它节点之间定期交 换邻居表信息, 若自身邻居表中的邻居节点数目没有达到预设的阈值, 则将其它邻居节点的邻居表中包含的, 且自身邻居表中没有的新节点加 入自身的邻居表中; 若自身邻居表中的邻居节点数目已经达到预设的阈 较佳地, 邻居表维护模块 401还可以进一步包括:
节点发现单元, 与所述存储单元相连, 若自身邻居表中的邻居节点 数目没有达到预设的阈值, 则产生一个参考节点坐标(这里可随机产生 一个参考节点坐标), 并向自身邻居表内与所述参考节点坐标的欧氏距 离最近的邻居节点发送搜索请求;
收到搜索请求的节点继续向自身邻居表内与所述参考节点坐标的欧 氏距离最近的邻居节点发送搜索请求;
达到预设的搜索次数 M次后,所述节点发现单元从收到搜索请求的 节点中, 选择合适的节点加入自身邻居表中; 其中 M > 1。
由上述的实施例可见, 本发明的这种 P2P系统中转节点选择方法和 P2P节点, 通过对网络坐标的计算, 釆用逐步逼近的查询方法, 找到较 好的中转节点。 其利用网络坐标选择中转节点, 相比现有技术来说, 可 以以较小的代价找到更好的中转节点。 另外, 通过维护一个分层的邻居 表, 每一层的取点条件不同, 有利于查询过程的收敛。 通过定期检测邻 居表内的节点是否失效、 节点之间交换邻居表信息, 以及通过生成随机 坐标而主动发现邻居节点的机制, 可以有效提高邻居表的可用性, 提高 中转节点查询的效果。
所应理解的是, 以上所述仅为本发明的较佳实施方式而已, 并不用 于限定本发明的保护范围, 凡在本发明的精神和原则之内, 所做的任何 修改、 等同替换、 改进等, 均应包含在本发明的保护范围之内。

Claims

权利要求书
1、 一种 P2P 系统中中转节点的选择方法, 其特征在于, 该方法包 括:
源节点计算自身邻居表中每一个邻居节点到所述源节点的欧氏距离 以及该邻居节点到目的节点的欧氏距离之和;
源节点向计算出的欧氏距离之和最小的邻居节点发送路由查询请 求;
收到路由查询请求的节点执行与所述源节点相同的操作;
源节点将第 N个接收到所述路由查询请求的节点确定为中转节点, 其中 N>1。
2、 如权利要求 1所述的 P2P系统中中转节点的选择方法, 其特征 在于, 节点的邻居表通过以下步骤建立:
以该节点的坐标为中心将当前网络坐标空间进行划分, 得到 L层空 间; 从每一层中, 选择满足该层欧氏距离条件的邻居节点加入邻居表中 相应的表项中; 构成一个 L层的邻居表, 其中 L>1。
3、 如权利要求 2所述的 P2P系统中中转节点的选择方法, 其特征 在于, 所述 L层中每一层的欧氏距离条件为:
当 L=l时, d满足 0<ί <∞;
当! l JLi=0时, d满足 0< ≤2r;
当 L>1且 0<i<L-l时, d满足 2 < ≤2i+ ;
当 L>1且 i=L-l时 , d满足 2Mr <d<∞ ;
其中 i为层数, 小于等于 L-1; τ为延迟的最小单位, d为在网络坐 标空间中节点自身坐标与邻居节点坐标之间的欧氏距离;
4、 如权利要求 2或 3所述的 P2P系统中中转节点的选择方法, 其 特征在于, 当节点的邻居表建立后, 该节点通过发送心跳消息探测该建 立的邻居表中邻居节点是否失效, 将失效的邻居节点从所述邻居表中删 除。
5、 如权利要求 2或 3所述的 P2P系统中中转节点的选择方法, 其 特征在于, 在节点的邻居表建立后, 各个节点之间交换邻居表信息, 若 自身邻居表中的邻居节点数目没有达到预设的阈值, 则将其它邻居节点 的邻居表中包含的且自身邻居表中没有的新节点加入自身的邻居表中; 若自身邻居表中的邻居节点数目已经达到预设的阈值, 则根据预设 的规则用所述新节点替换自身邻居表中的节点。
6、 如权利要求 5所述的 P2P系统中中转节点的选择方法, 其特征 在于, 所述根据预设的规则用所述新节点替换自身邻居表中的节点包 括:
计算所述新节点与自身邻居表内与该新节点属于同一层中的一邻居 节点之间的平均延迟, 以及该层中原有邻居节点与该邻居节点之间的平 均延迟, 如果利用新节点计算出的平均延迟大于利用该原有邻居节点计 算的平均延迟, 则将该原有邻居节点替换为新节点。
7、 如权利要求 2或 3所述的 P2P系统中中转节点的选择方法, 其 特征在于, 所述邻居表建立后, 若自身邻居表中的邻居节点数目没有达 到预设的阈值, 则产生一个参考节点坐标, 并向自身邻居表内与所述参 考节点坐标的欧氏距离最近的邻居节点发送搜索请求;
收到搜索请求的节点继续向自身邻居表内与所述参考节点坐标的欧 氏距离最近的邻居节点发送搜索请求;
达到预设的搜索次数 M次后,从收到搜索请求的节点中, 选择至少 一个合适的节点加入自身邻居表中, 其中 M > 1。
8、 如权利要求 1所述的 P2P系统中中转节点的选择方法, 其特征 在于, 收到路由查询请求的节点在执行与所述源节点相同的发送路由查 询请求的操作时, 进一步包括: 向所述源节点发送报告, 所述报告中携 带了自身计算出的欧氏距离之和最小的邻居节点的信息;
所述源节点将第 Ν个接收到路由查询请求的节点确定为中转节点包 括:
将第 N-1次接收到的报告携带的邻居节点的信息对应的节点确定为 中转节点。
9、 一种 Ρ2Ρ节点, 其特征在于, 该节点包括:
邻居表维护模块, 用于维护自身邻居表;
路由计算模块, 与所述邻居表维护模块相连, 用于计算所述邻居表 维护模块维护的邻居表中每一个邻居节点到所述源节点的欧氏距离以 及该邻居节点到目的节点的欧氏距离之和;
路由查询模块, 与所述路由计算模块相连, 用于向所述路由计算模 块计算出的欧氏距离之和最小的邻居节点发送路由查询请求;
中转节点确定模块, 与所述路由查询模块相连, 用于将第 Ν个接收 到路由查询请求的节点确定为中转节点, 其中 Ν > 1。
10、 如权利要求 9所述的 Ρ2Ρ节点, 其特征在于, 所述邻居表维护 模块包括:
空间划分单元, 用于以所述 Ρ2Ρ节点的坐标为中心将当前网络坐标 空间划分为 L层空间; 其中 L > 1 ;
节点选择单元, 与所述空间划分单元相连, 用于从每一层中, 选择 满足该层欧氏距离条件的邻居节点加入所述邻居表中相应的表项内; 构 成一个 L层的邻居表;
存储单元, 与所述节点选择单元相连, 用于存储所述邻居表。
11、 如权利要求 10所述的 P2P节点, 其特征在于, 所述邻居表维 护模块进一步包括: 节点维护单元, 和 /或节点交换单元; 所述节点维护单元, 与所述存储单元相连, 用于通过心跳消息探测 邻居表中的邻居节点是否失效, 将失效的邻居节点从所述邻居表中删 除。
所述节点交换单元, 与所述存储单元相连, 用于与其它节点之间定 期交换邻居表信息, 若自身邻居表中的邻居节点数目没有达到预设的阈 值, 则将其它邻居节点的邻居表中包含的, 且自身邻居表中没有的新节 点加入自身的邻居表中; 若自身邻居表中的邻居节点数目已经达到预设
12、 如权利要求 9所述的 P2P节点, 其特征在于, 所述邻居表维护 模块进一步包括:
节点发现单元, 与所述存储单元相连, 若自身邻居表中的邻居节点 数目没有达到预设的阈值, 则产生一个参考节点坐标, 并向自身邻居表 内与所述参考节点坐标的欧氏距离最近的邻居节点发送搜索请求; 收到搜索请求的节点继续向自身邻居表内与所述参考节点坐标的欧 氏距离最近的邻居节点发送搜索请求;
达到预设的搜索次数 M次后,所述节点发现单元从收到搜索请求的 节点中, 选择合适的节点加入自身邻居表中; 其中 M > 1。
PCT/CN2009/075319 2008-12-18 2009-12-04 P2p系统中中转节点的选择方法及p2p节点 WO2010069229A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN200810186506.0 2008-12-18
CN2008101865060A CN101437045B (zh) 2008-12-18 2008-12-18 P2p系统中中转节点的选择方法及p2p节点

Publications (1)

Publication Number Publication Date
WO2010069229A1 true WO2010069229A1 (zh) 2010-06-24

Family

ID=40711264

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2009/075319 WO2010069229A1 (zh) 2008-12-18 2009-12-04 P2p系统中中转节点的选择方法及p2p节点

Country Status (2)

Country Link
CN (1) CN101437045B (zh)
WO (1) WO2010069229A1 (zh)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2451126A4 (en) * 2009-06-29 2015-01-21 Nec China Co Ltd SERVER, METHOD AND SYSTEM FOR COMMUNICATING INFORMATION FROM P2P NETWORK N UDS
CN109753510A (zh) * 2019-01-11 2019-05-14 深圳市网心科技有限公司 一种目标数据的获取方法、系统、电子设备及存储介质
CN114422422A (zh) * 2022-04-01 2022-04-29 广东省通信产业服务有限公司 基于节点信息的数据传输方法、装置及系统
CN114513400A (zh) * 2021-12-30 2022-05-17 上海川源信息科技有限公司 一种日志聚合系统及一种提高日志聚合系统可用性的方法
CN116418600A (zh) * 2023-06-09 2023-07-11 安徽华云安科技有限公司 节点安全运维方法、装置、设备以及存储介质

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101437045B (zh) * 2008-12-18 2012-04-25 腾讯科技(深圳)有限公司 P2p系统中中转节点的选择方法及p2p节点
CN102064992B (zh) * 2009-11-13 2012-11-28 中兴通讯股份有限公司 一种中继节点、中继节点的分布式网络及其组网方法
CN102014115B (zh) * 2010-07-09 2013-07-10 北京哈工大计算机网络与信息安全技术研究中心 网关节点匿名化的方法、设备和系统
CN102571856B (zh) * 2010-12-17 2015-04-22 中国移动通信集团公司 一种中转节点的选择方法、设备和系统
CN104272707B (zh) * 2012-04-27 2018-04-06 交互数字专利控股公司 支持邻近发现过程的方法和装置
TWI626855B (zh) 2012-04-27 2018-06-11 內數位專利控股公司 最佳化鄰近資料路徑設置方法及裝置
CN103491181B (zh) * 2013-09-29 2016-08-10 石家庄铁道大学 一种对等网络中节点间的信息流特征的分析方法

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1602077A (zh) * 2003-05-05 2005-03-30 三星电子株式会社 无线个人区域网中建立最佳路由的路由选择系统及其方法
CN1764146A (zh) * 2004-10-21 2006-04-26 华为技术有限公司 一种最优路由的选择方法
CN101023632A (zh) * 2004-03-17 2007-08-22 皇家飞利浦电子股份有限公司 在主/从网络和ad hoc网络中通过窃听消息完成传输时间测量
CN101437045A (zh) * 2008-12-18 2009-05-20 腾讯科技(深圳)有限公司 P2p系统中中转节点的选择方法及p2p节点

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1602077A (zh) * 2003-05-05 2005-03-30 三星电子株式会社 无线个人区域网中建立最佳路由的路由选择系统及其方法
CN101023632A (zh) * 2004-03-17 2007-08-22 皇家飞利浦电子股份有限公司 在主/从网络和ad hoc网络中通过窃听消息完成传输时间测量
CN1764146A (zh) * 2004-10-21 2006-04-26 华为技术有限公司 一种最优路由的选择方法
CN101437045A (zh) * 2008-12-18 2009-05-20 腾讯科技(深圳)有限公司 P2p系统中中转节点的选择方法及p2p节点

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2451126A4 (en) * 2009-06-29 2015-01-21 Nec China Co Ltd SERVER, METHOD AND SYSTEM FOR COMMUNICATING INFORMATION FROM P2P NETWORK N UDS
CN109753510A (zh) * 2019-01-11 2019-05-14 深圳市网心科技有限公司 一种目标数据的获取方法、系统、电子设备及存储介质
CN114513400A (zh) * 2021-12-30 2022-05-17 上海川源信息科技有限公司 一种日志聚合系统及一种提高日志聚合系统可用性的方法
CN114422422A (zh) * 2022-04-01 2022-04-29 广东省通信产业服务有限公司 基于节点信息的数据传输方法、装置及系统
CN114422422B (zh) * 2022-04-01 2022-07-08 广东省通信产业服务有限公司 基于节点信息的数据传输方法、装置及系统
CN116418600A (zh) * 2023-06-09 2023-07-11 安徽华云安科技有限公司 节点安全运维方法、装置、设备以及存储介质
CN116418600B (zh) * 2023-06-09 2023-08-15 安徽华云安科技有限公司 节点安全运维方法、装置、设备以及存储介质

Also Published As

Publication number Publication date
CN101437045B (zh) 2012-04-25
CN101437045A (zh) 2009-05-20

Similar Documents

Publication Publication Date Title
WO2010069229A1 (zh) P2p系统中中转节点的选择方法及p2p节点
Lehman et al. An experimental investigation of hyperbolic routing with a smart forwarding plane in NDN
Mauve et al. A survey on position-based routing in mobile ad hoc networks
US8675672B1 (en) Hierarchical cluster tree overlay network
CN101860474B (zh) 基于对等网络的资源信息处理方法及对等网络
US8732298B2 (en) Method and apparatus for maintaining routing information
KR101337461B1 (ko) 명칭 주소 맵핑 시스템, 데이터 전송 방법 및 명칭 주소 맵핑 유지 방법
Zhao et al. Hop ID: A virtual coordinate based routing for sparse mobile ad hoc networks
EP2560321B1 (en) Ethernet multicast method and device
WO2009071008A1 (fr) Procédé, équipement et système de mise à jour d&#39;une table de routage après une défaillance de nœud dans un réseau peer-to-peer
CN110474843B (zh) 基于路由跳数的ip定位方法
US20170005877A1 (en) Data object and networking node locators
CN104753797A (zh) 一种基于选择性缓存的内容中心网络动态路由方法
WO2009100637A1 (zh) 一种建立路由的方法和装置
Ayaida et al. A comparison of reactive, grid and hierarchical location-based services for vanets
Farha et al. Peer-to-Peer mobility management for all-IP networks
Wirtz et al. DHT-based localized service discovery in wireless mesh networks
Liu et al. Resource discovery in mobile ad hoc networks
Moustakas et al. Alleviating the topology mismatch problem in distributed overlay networks: A survey
Shah et al. Context-aware routing for peer-to-peer network on MANETs
Liu et al. A novel framework for QoS-aware resource discovery in mobile ad hoc networks
Zeinalipour-Yazti et al. Structuring topologically aware overlay networks using domain names
Zhang et al. A distributed topology-aware overlays construction algorithm
Kiah et al. Unicast position-based routing protocols for ad-hoc networks
JP5287500B2 (ja) ノード装置およびノード装置用プログラム

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 09832911

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 4554/CHENP/2011

Country of ref document: IN

122 Ep: pct application non-entry in european phase

Ref document number: 09832911

Country of ref document: EP

Kind code of ref document: A1