[go: up one dir, main page]

CN101047580A - Method for setting point-to-point data channel - Google Patents

Method for setting point-to-point data channel Download PDF

Info

Publication number
CN101047580A
CN101047580A CN 200610066522 CN200610066522A CN101047580A CN 101047580 A CN101047580 A CN 101047580A CN 200610066522 CN200610066522 CN 200610066522 CN 200610066522 A CN200610066522 A CN 200610066522A CN 101047580 A CN101047580 A CN 101047580A
Authority
CN
China
Prior art keywords
node
packet
data channel
section point
transit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN 200610066522
Other languages
Chinese (zh)
Other versions
CN100505662C (en
Inventor
朱冶
吴波
何法江
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN 200610066522 priority Critical patent/CN100505662C/en
Publication of CN101047580A publication Critical patent/CN101047580A/en
Application granted granted Critical
Publication of CN100505662C publication Critical patent/CN100505662C/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

A method for setting up point to point data channel includes sending data packet to the second node and the first relay node simultaneously by the first node and sending network information of the first relay node to super-node of the second node, judging whether data packet of the second node and/or the first relay node is received at preset time or not by the first node and setting up data channel according to received data packet if any data packet from the second node and/or the first relay node is received.

Description

Create the method for Point-to-Point Data passage
Technical field
The present invention relates to technical field of the computer network, particularly a kind of method of creating the Point-to-Point Data passage.
Background technology
Point-to-point (Peer-to-Peer, P2P) network is a kind of distributed network, the node in the P2P network (Peer) be the supplier of resource also be the beneficiary of resource, the resource of all nodes is all shared in this network the inside.Most typical is that P2P downloads, and certain node is in other node file in download in P2P downloads, and the file that it is shared is also downloaded by other node.
Network based its topological structure of P2P can be divided into 4 kinds of forms: centralization topological structure, full distributed destructuring topological structure, all distributed structure topological structure and half distributed topology.Introduce half distribution topology related to the present invention below.
Referring to Fig. 1, in half distributed topology, some are selected as super node (SuperPeer) at higher nodes of aspect performance such as processing, storage, bandwidth, under each super node, hang the ordinary node of some, super node is also being stored the information of other part of nodes in the system, and super node is responsible for handling or transmit the request of the Peer that hangs under it.Half distributed topology also is a hierarchy type structure, constitute one between the super node and transmit layer at a high speed, and super node constitutes some levels with the ordinary node of being responsible for.
In order to realize multiple application, need between corresponding Peer, create data channel.Shown in Figure 2 is the process of creating data channel in the prior art between two Peer.With reference to Fig. 2, in this P2P network, the super node of PeerA is SuperPeerA, the super node of PeerB is SuperPeerB, give server and PeerC among Fig. 2, wherein preserve the super node information and the transit node information of each node in the server, PeerC is the transit node of PeerA.
As shown in Figure 2, creating PeerA in the prior art comprises the steps: to the process of the data channel of PeerB
Step 101, PeerA sends the request of searching PeerB to SuperPeerA.
Step 102, SuperPeerA is transmitted to Server with this search request.
Step 103, Server returns to SuperPeerA according to this search request with the network information of PeerB and super node SuperPeerB thereof.
Step 104, SuperPeerA returns to PeerA with the result that Server returns.
Step 105, PeerA receives after the network information of PeerB and SuperPeerB, sends packet according to the network information of PeerB to PeerB, attempts creating direct-connected data channel with PeerB.If PeerB receives the packet of PeerA, can send packet to PeerA, to determine to create direct-connected data channel.
If PeerA receives the packet that PeerB returns within the predetermined time, then represent direct-connected success, promptly create the passage success, process ends; If do not receive the packet that PeerB returns in the given time, then represent direct-connected failure, execution in step 106.
Step 106, PeerA sends the transfer Peer request of obtaining to SuperPeerA.
Step 107, SuperPeerA is transmitted to Server with this request.
Step 108, Server returns to SuperPeerA according to this request with the network information of transfer PeerC.
Step 109, SuperPeerA returns to PeerA with the result that Server returns.
Step 110 after PeerA receives the network information of transfer PeerC, sends packet according to the network information of PeerC to PeerC, attempts connecting PeerC, simultaneously the network information of PeerC is sent to the super node SuperPeerB of PeerB.
Step 111, SuperPeerB is transmitted to PeerB with the network information of PeerC.
Step 112, PeerB receives after the network information of PeerC, sends packet according to the network information of PeerC to PeerC, attempts connecting PeerC.After if PeerC receives the packet of PeerA and PeerB, send packet can for PeerA and PeerB, to determine to create the interim data passage by PeerC.
At last, if PeerA has received the packet that PeerC sends in the given time, represent that then PeerA and PeerB can set up the interim data passage by PeerC, promptly the data channel between PeerA and the PeerB is created successfully; Otherwise, show that PeerA and PeerB create the failure of interim data passage by PeerC, promptly create the data channel failure between PeerA and the PeerB.
In the superincumbent flow process, step 101 to step 104 is a Network Search information link, and step 105 is for creating direct-connected data channel link, step 106 to step 109 for obtaining transfer Peer link, step 110 to step 112 is establishment interim data passage link.
From prior art as can be seen, above-mentioned each link is serial, if each link needs 10 seconds, and the process need cost of then whole establishment data channel 40 seconds.This occasion of having relatively high expectations for real-time is inapplicable, even can use in the less demanding occasion of some real-times, but has also wasted the time.
Summary of the invention
In view of this, the present invention proposes a kind of method of the P2P of establishment data channel, in order to shorten the time of creating data channel.
According to above-mentioned purpose, the invention provides a kind of method of the P2P of establishment data channel, this method may further comprise the steps:
According to above-mentioned purpose, the invention provides a kind of method of the P2P of establishment data channel, this method may further comprise the steps: the A. first node sends packet to the Section Point and first transit node simultaneously, and the network information of first transit node is sent to the super node of Section Point; B. first node judges whether to receive the packet of the Section Point and/or first transit node in the given time, if receive from least one packet in the Section Point and first transit node, then creates data channel according to the packet of being received.
Further comprise before the steps A: the A1. first node sends and searches the super node of the request of Section Point to first node, and the super node of first node is transmitted to server with this search request; A2. the server network information of returning the super node of Section Point and Section Point is given the super node of first node, and the super node of first node returns to first node with the described network information.
Further comprise that the super node of first node by first node obtains the step of one or more transit nodes to server before the steps A, described one or more transit nodes comprise described first transit node at least.
Further comprise after the steps A:, then send packet to first node if Section Point receives the packet of first node.
Further comprise after the steps A: the super node of Section Point is transmitted to Section Point with the network information of first transit node, and Section Point sends packet according to the network information of first transit node to first transit node; If first transit node receives the packet of first node and Section Point, then send packet to first node and Section Point respectively.
The step of creating data channel according to the packet received described in the step B comprises: if receive from the packet of Section Point with from the packet of first transit node, determine that then the data channel of one of them packet correspondence is deleted another data channel for the final data channel of creating; If only receive, determine that then the data channel of the packet correspondence received is the final data channel of creating from one of them packet of Section Point and first transit node.
The step that the data channel of definite one of them packet correspondence described in the step B is deleted another data channel for the final data channel of creating is: determine that deletion is through the interim data passage of first transit node from the data channel of direct-connected data channel for finally creating of the packet correspondence of Section Point.
Step B further comprises: if do not receive packet from the Section Point or first transit node, then create the data channel failure.
From such scheme, as can be seen, owing to attempt to create direct-connected data channel and interim data passage in the present invention simultaneously, promptly create direct-connected data channel and the interim data passage walks abreast, can reduce the time of whole flow process like this.And under the situation that direct-connected data channel and interim data passage are all successfully created, delete unnecessary passage and after creating the passage success, carry out, also do not take the establishment channel time.Further, also looked ahead before the creating passage link of transfer Peer of the present invention does not take creation-time yet.Supposing Network Search information link, the direct-connected data channel link of establishment, establishment interim data passage link and obtaining transfer Peer link needs 10 seconds respectively, then according to the solution of the present invention, whole flow process only needs 20 seconds, compare with 40 seconds of prior art, shortened greatly and created the time of passage, thereby gone for the occasion that various real-times are had relatively high expectations.
Description of drawings
Fig. 1 is the schematic diagram of P2P network half distributed topology.
Fig. 2 is a schematic flow sheet of creating data channel in the prior art.
Fig. 3 is the schematic flow sheet of first embodiment of the invention.
Fig. 4 is the schematic flow sheet of second embodiment of the invention.
Embodiment
For making the purpose, technical solutions and advantages of the present invention clearer, the present invention is described in more detail by the following examples.
The present invention is with the different of prior art, the present invention will obtain transfer Peer etc. and finish in advance before creating data channel, and in creating the data channel process, attempt creating direct-connected data channel and interim data passage simultaneously, if successfully creating, the both select wherein a kind of to be the last data channel of creating, if a kind of success then with its data channel of creating as success.Shortened the time that in creating the P2P data channel, is spent so greatly.
Fig. 3 is the schematic flow sheet of first embodiment of the invention.Referring to Fig. 3, network configuration in the first embodiment of the invention is same as the prior art, in this network, comprise super node SuperPeerA, PeerB and the super node SuperPeerB of PeerB and the transfer PeerC of PeerA of Server, PeerA and PeerA.Preserve the super node information and the transit node information of each node among the Server.
With reference to Fig. 3, first embodiment of the invention may further comprise the steps:
Before creating data channel, PeerA obtains transfer Peer by SuperPeerA from Server in advance.Process is as follows: PeerA sends the transfer Peer request of obtaining to SuperPeerA; SuperPeerA is transmitted to Server with this request; Server returns to SuperPeerA according to this request of obtaining with the network information of transfer PeerC; SuperPeerA returns to PeerA with the result that Server returns.Preferably, PeerA can obtain transfer Peer the free time, perhaps can obtain transfer Peer termly.Certainly, can also in PeerA, preserve the network information of transfer Peer in advance by other method.
In the process of the data channel of creating PeerA and PeerB, carry out following steps:
Step 201, PeerA sends the request of searching PeerB to SuperPeerA.
Step 202, SuperPeerA is transmitted to Server with this search request.
Step 203, Server returns to SuperPeerA according to this search request with the network information of PeerB and super node SuperPeerB thereof.
Step 204, SuperPeerA returns to PeerA with the result that Server returns.
Step 205, PeerA receives after the network information of PeerB and SuperPeerB, sends packet according to the network information of PeerB to PeerB, attempts creating direct-connected data channel with PeerB.If PeerB receives the packet of PeerA, can send packet to PeerA, to determine to create direct-connected data channel.
Meanwhile, PeerA sends packet according to the network information of the transfer PeerC that obtains in advance to PeerC, attempts connecting PeerC.PeerA also sends to the network information of PeerC the super node SuperPeerB of PeerB simultaneously.
Step 206, SuperPeerB is transmitted to PeerB with the network information of PeerC.
Step 207, PeerB receives after the network information of PeerC, sends packet according to the network information of PeerC to PeerC, attempts connecting PeerC.After if PeerC receives the packet of PeerA and PeerB, send packet can for PeerA and PeerB, to determine and to create the interim data passage by PeerC.
At last, PeerA judges whether receive the packet that PeerB and/or PeerC return in the given time, do not receive the packet that PeerC returns if receive the packet that PeerB returns within the predetermined time, then expression can be created direct-connected data channel and cannot create the interim data passage, with the data channel of direct-connected data channel as last success establishment; Do not receive the packet that PeerB returns if receive the packet that PeerC returns within the predetermined time, then expression can be created the interim data passage and cannot create direct-connected data channel, with the data channel of interim data passage as last success establishment; Also receive the packet that PeerC returns if receive the packet that PeerB returns within the predetermined time, then expression can be created direct-connected data channel and also can create the interim data passage, PeerA can select wherein any one data channel of creating as last success, and delete unnecessary data channel, preferably select direct-connected data channel and delete the interim data passage; Do not receive the packet that PeerC sends if both received the packet that PeerB returns within the predetermined time yet, then expression is created direct-connected data channel failure and is created the interim data passage and also fail, and does not promptly successfully create the data channel of PeerA and PeerB.
When creating any two data between nodes passages, method of the present invention can be used, for example when creating data channel between PeerA and the transfer PeerC or the data channel between establishment PeerB and the transfer PeerC, also method of the present invention can be used.
In the second embodiment of the present invention, further describe the flow process of creating data channel between PeerB and the transfer PeerC and set forth method of the present invention by reference Fig. 4.Fig. 4 compares with Fig. 3, has further provided the super node SuperPeerC of PeerC and the transit node PeerD of PeerB.
As shown in Figure 4, the second embodiment of the present invention comprises:
Before creating data channel, PeerB obtains transfer Peer by SuperPeerB from Server in advance.Process is as follows: PeerB sends the transfer Peer request of obtaining to SuperPeerB; SuperPeerB is transmitted to Server with this request; Server returns to SuperPeerB according to this request of obtaining with the network information of transfer PeerD; SuperPeerB returns to PeerB with the result that Server returns.Preferably, PeerB can obtain transfer Peer the free time, perhaps can obtain transfer Peer termly.Certainly, can also in PeerB, preserve the network information of transfer Peer in advance by other method.
In the process of the data channel of creating PeerB and PeerC, carry out following steps:
Step 301, PeerB sends the request of searching PeerC to SuperPeerB.
Step 302, SuperPeerB is transmitted to Server with this search request.
Step 303, Server returns to SuperPeerB according to this search request with the network information of PeerC and super node SuperPeerC thereof.
Step 304, SuperPeerB returns to PeerB with the result that Server returns.
Step 305, PeerB receives after the network information of PeerC and SuperPeerC, sends packet according to the network information of PeerC to PeerC, attempts creating direct-connected data channel with PeerC.If PeerC receives the packet of PeerB, can send packet to PeerB, to determine to create direct-connected data channel.
Meanwhile, PeerB sends packet according to the network information of the transfer PeerD that obtains in advance to PeerD, attempts connecting PeerD.PeerB also sends to the network information of PeerD the super node SuperPeerC of PeerC simultaneously.
Step 306, SuperPeerC is transmitted to PeerC with the network information of PeerD.
Step 307, PeerC receives after the network information of PeerD, sends packet according to the network information of PeerD to PeerD, attempts connecting PeerD.After if PeerD receives the packet of PeerB and PeerC, send packet can for PeerB and PeerC, to determine and to create the interim data passage by PeerD.
At last, PeerB judges whether receive the packet that PeerC and/or PeerD return in the given time, if PeerB receives the packet that PeerC returns within the predetermined time and does not receive the packet that PeerD returns, then expression can be created direct-connected data channel and cannot create the interim data passage, with the data channel of direct-connected data channel as last success establishment; Do not receive the packet that PeerC returns if receive the packet that PeerD returns within the predetermined time, then expression can be created the interim data passage and cannot create direct-connected data channel, with the data channel of interim data passage as last success establishment; Also receive the packet that PeerD returns if receive the packet that PeerC returns within the predetermined time, then expression can be created direct-connected data channel and also can create the interim data passage, PeerB can select wherein any one data channel of creating as last success, and delete unnecessary data channel, preferably select direct-connected data channel and delete the interim data passage; Do not receive the packet that PeerD sends if both received the packet that PeerC returns within the predetermined time yet, then expression is created direct-connected data channel failure and is created the interim data passage and also fail, and does not promptly successfully create the data channel of PeerB and PeerC.
The above only is preferred embodiment of the present invention, and is in order to restriction the present invention, within the spirit and principles in the present invention not all, any modification of being done, is equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (8)

1, a kind of method of creating point-to-point P2P data channel is characterized in that, this method may further comprise the steps:
A. first node sends packet to the Section Point and first transit node simultaneously, and the network information of first transit node is sent to the super node of Section Point;
B. first node judges whether to receive the packet of the Section Point and/or first transit node in the given time, if receive from least one packet in the Section Point and first transit node, then creates data channel according to the packet of being received.
2, method according to claim 1 is characterized in that, further comprises before the steps A:
A1. first node sends and searches the super node of the request of Section Point to first node, and the super node of first node is transmitted to server with this search request;
A2. the server network information of returning the super node of Section Point and Section Point is given the super node of first node, and the super node of first node returns to first node with the described network information.
3, method according to claim 1, it is characterized in that, further comprise that the super node of first node by first node obtains the step of one or more transit nodes to server before the steps A, described one or more transit nodes comprise described first transit node at least.
4, method according to claim 1 is characterized in that, further comprises after the steps A:
If Section Point receives the packet of first node, then send packet to first node.
5, according to claim 1 or 4 described methods, it is characterized in that, further comprise after the steps A:
The super node of Section Point is transmitted to Section Point with the network information of first transit node, and Section Point sends packet according to the network information of first transit node to first transit node;
If first transit node receives the packet of first node and Section Point, then send packet to first node and Section Point respectively.
6, method according to claim 1 is characterized in that, the step according to the packet establishment data channel of being received described in the step B comprises:
If receive from the packet of Section Point with from the packet of first transit node, determine that then the data channel of one of them packet correspondence is deleted another data channel for the final data channel of creating; If only receive, determine that then the data channel of the packet correspondence received is the final data channel of creating from one of them packet of Section Point and first transit node.
7, method according to claim 6, it is characterized in that, the step that the data channel of definite one of them packet correspondence described in the step B is deleted another data channel for the final data channel of creating is: determine that deletion is through the interim data passage of first transit node from the data channel of direct-connected data channel for finally creating of the packet correspondence of Section Point.
8, according to claim 1,6 or 7 described methods, it is characterized in that step B further comprises:
If do not receive packet, then create the data channel failure from the Section Point or first transit node.
CN 200610066522 2006-03-28 2006-03-28 Method for setting point-to-point data channel Active CN100505662C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 200610066522 CN100505662C (en) 2006-03-28 2006-03-28 Method for setting point-to-point data channel

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 200610066522 CN100505662C (en) 2006-03-28 2006-03-28 Method for setting point-to-point data channel

Publications (2)

Publication Number Publication Date
CN101047580A true CN101047580A (en) 2007-10-03
CN100505662C CN100505662C (en) 2009-06-24

Family

ID=38771826

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200610066522 Active CN100505662C (en) 2006-03-28 2006-03-28 Method for setting point-to-point data channel

Country Status (1)

Country Link
CN (1) CN100505662C (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101252518B (en) * 2008-03-18 2010-08-18 腾讯科技(深圳)有限公司 System and method for choosing transfer node in peer-to-peer network
CN101282302B (en) * 2008-05-29 2012-05-02 腾讯科技(深圳)有限公司 Data transfer method, system, client and server
CN101515944B (en) * 2008-02-22 2013-08-28 华为技术有限公司 Method, system and device for P2P service access
CN103812947A (en) * 2014-02-28 2014-05-21 深圳市创梦天地科技有限公司 Data interaction system and method
CN103929378A (en) * 2013-01-15 2014-07-16 腾讯科技(深圳)有限公司 Method and system for allocating communication link for transmitting cross-domain data and method and system for transmitting cross-domain data
CN104518983A (en) * 2013-09-30 2015-04-15 张永杰 Method and device for communication among multiple devices
CN105897476A (en) * 2016-04-11 2016-08-24 四川九洲电器集团有限责任公司 Method and device for building transmission channel
CN113630472A (en) * 2021-09-13 2021-11-09 东软集团股份有限公司 Method, device, electronic device and medium for avoiding channel waste between network nodes
WO2024027272A1 (en) * 2022-08-03 2024-02-08 腾讯科技(深圳)有限公司 Multimedia resource transmission method and apparatus, electronic device, and storage medium

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101515944B (en) * 2008-02-22 2013-08-28 华为技术有限公司 Method, system and device for P2P service access
CN101252518B (en) * 2008-03-18 2010-08-18 腾讯科技(深圳)有限公司 System and method for choosing transfer node in peer-to-peer network
CN101282302B (en) * 2008-05-29 2012-05-02 腾讯科技(深圳)有限公司 Data transfer method, system, client and server
CN103929378B (en) * 2013-01-15 2018-01-05 腾讯科技(深圳)有限公司 The communication link distribution of cross-domain data transmission and cross-domain data transmission method and system
CN103929378A (en) * 2013-01-15 2014-07-16 腾讯科技(深圳)有限公司 Method and system for allocating communication link for transmitting cross-domain data and method and system for transmitting cross-domain data
CN104518983A (en) * 2013-09-30 2015-04-15 张永杰 Method and device for communication among multiple devices
CN104518983B (en) * 2013-09-30 2018-08-03 张永杰 A kind of communication means and device of more equipment rooms
CN103812947A (en) * 2014-02-28 2014-05-21 深圳市创梦天地科技有限公司 Data interaction system and method
CN103812947B (en) * 2014-02-28 2017-03-15 深圳市创梦天地科技有限公司 Data interaction system and method
CN105897476A (en) * 2016-04-11 2016-08-24 四川九洲电器集团有限责任公司 Method and device for building transmission channel
CN105897476B (en) * 2016-04-11 2019-02-26 四川九洲电器集团有限责任公司 A kind of method and device creating transmission channel
CN113630472A (en) * 2021-09-13 2021-11-09 东软集团股份有限公司 Method, device, electronic device and medium for avoiding channel waste between network nodes
WO2024027272A1 (en) * 2022-08-03 2024-02-08 腾讯科技(深圳)有限公司 Multimedia resource transmission method and apparatus, electronic device, and storage medium

Also Published As

Publication number Publication date
CN100505662C (en) 2009-06-24

Similar Documents

Publication Publication Date Title
CN101047580A (en) Method for setting point-to-point data channel
CN1969525A (en) Communication server, method and systems, for reducing transportation volumes over communication networks
CN101079709A (en) Single-node-to-multi-node concurrent download system and method
CN101047550A (en) Block structure of P2P network and its network set method
CN101035131A (en) Protocol recognition method and device
CN103067521B (en) Node in a kind of distributed reptile cluster and system
CN101030919A (en) Method for converting duplexing interface board address realtime network address
CN101145929A (en) A P2P streaming media on-demand system for IPV6 environment
CN1949776A (en) 4 over 6 tunnel packing and depacking method for extending boundary gateway protocol
CN101272404A (en) A Link Selection Method in Data Scheduling of P2P Video Live Broadcasting System
CN1912875A (en) Method of file distributing and searching and its system
CN101047696A (en) Network flow media data playing method and system
CN101039250A (en) Image sharing system and method
CN101043345A (en) Point-to-point technique based picture sharing system and method
CN101465796B (en) P2P system metadata collection and distribution method, device and system thereof
CN1293493C (en) Computer group file service system and its input output treatment method
CN1291566C (en) Digital medium delivering method based on IP network
CN101039275A (en) Path calculation unit networking and information obtaining method and communication system and related equipment
CN1152516C (en) Method for finding out IP network node
CN1881898A (en) Non-structured P2P copy consistency maintaining method based on node locus label
CN1929453A (en) Method and device for recomposing fragmented data
CN1852108A (en) Multi-spot downloading method
CN1674538A (en) Network storing system based on local network and its method for reading and writing data
CN1798147A (en) Method for matching uniform resource locator
CN101060462A (en) A data recovery method, device, storage server and DHCP server

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant