CN102291458A - Method for peer-to-peer (p2p) server framework - Google Patents

Method for peer-to-peer (p2p) server framework Download PDF

Info

Publication number
CN102291458A
CN102291458A CN2011102307063A CN201110230706A CN102291458A CN 102291458 A CN102291458 A CN 102291458A CN 2011102307063 A CN2011102307063 A CN 2011102307063A CN 201110230706 A CN201110230706 A CN 201110230706A CN 102291458 A CN102291458 A CN 102291458A
Authority
CN
China
Prior art keywords
tracker
server
peer
master
channel
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
CN2011102307063A
Other languages
Chinese (zh)
Other versions
CN102291458B (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.)
LeTV Information Technology Beijing Co Ltd
Original Assignee
LeTV Information Technology Beijing 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 LeTV Information Technology Beijing Co Ltd filed Critical LeTV Information Technology Beijing Co Ltd
Priority to CN201110230706.3A priority Critical patent/CN102291458B/en
Publication of CN102291458A publication Critical patent/CN102291458A/en
Application granted granted Critical
Publication of CN102291458B publication Critical patent/CN102291458B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a method for a peer-to-peer (p2p) server framework with infinite horizontal expansion. The method comprises the following steps of: erecting a tracker server as a central tracker; performing two reconstructions on a firstly-built server framework along with the increase of the number of terminal peer; and respectively introducing a team speak (TS) server and a Master. By the method, the p2p server framework can be dynamically adjusted according to the number of terminals, and an effect that the p2p server framework can be infinitely and horizontally expanded is achieved at low cost.

Description

A kind of p2p server architecture method
Technical field
The present invention relates to a kind of p2p server architecture method, belong to a plurality of crossing domains such as computer network, Streaming Media, Video processing.
Background technology
P2P(Peer-to-Peer) " point-to-point " technology is otherwise known as, it makes full use of client's upstream bandwidth, in descending taking, also take upstream bandwidth, for other users provide resource, realize the acceleration and the expansion of network, participant's computing capability and bandwidth in the dependency network, rather than a dependence all accumulates on less several station servers.The p2p technology has been removed the thought of central server, at utmost utilizes available bandwidth to transmit to reach data at a high speed.
In the prior art, comprise a plurality of terminal node peer in the p2p system, represent client node, major function is that video playback (live, program request) and data are downloaded.Also there is a class tracker server in the p2p system, is mainly used in position, the resource information of record peer, relevant database, the related protocol forwarding capability that provides peer inquiry, resource query and NAT to pass through simultaneously are provided in internal memory.Be similar to directory service.And the TS server, its major function provides the selection of peer to tracker.Utilize the section server that video flowing is cut into slices simultaneously in the p2p system, generate small video file (only live broadcast system use) one by one, the support of section server is cut into slices to MMS, RTSP, RTMP protocol streams.
Above-mentioned NAT passes through a FAQs that relates in the TCP/IP network, i.e. the problem that connects between the main frame in being in the privately owned TCP/IP network that has used NAT device.It comprises the several frequently seen mode of passing through: NAT/ALG mode, MIDCOM mode, STUN mode, TURN mode or the like.
Whether server possesses the horizontal extension ability is to weigh the important indicator of a cover system.Especially true for extensive, ultra-large p2p operation system.Yet using at present the most extensively, the p2p system adopts based on the CDN(content distributing network) the network acceleration scheme.The horizontal extension ability of its server is very limited, and is a problem of existing p2p systems face.
Summary of the invention
In order to solve the problems of the technologies described above, the invention provides a kind of p2p server architecture method, can be understood as a kind of improvement to existing flow medium live system framework.
Comprise the tracker server in the above-mentioned p2p service architecture, tracker selects server (TS server), Master, and above-mentioned may further comprise the steps:
Step 1, set up a tracker server as central tracker, all terminal peer communicate by letter with described central tracker; The quantity of the central tracker real-time judge terminal peer of described central authorities, when the quantity of terminal peer is increased to threshold value N1 platform, execution in step two;
Step 2, many tracker servers of startup, each tracker server is set up TCP with tracker selection server and is connected, and the IP address registration of inciting somebody to action is separately selected on the server at tracker, and regularly report node load to count to tracker to select server, tracker selects server to set up and safeguard database about tracker in internal memory.
More fully in the execution mode, described tracker selects the quantity of server real-time judge terminal peer for another, when the quantity of terminal peer is increased to threshold value N2 platform, and execution in step three;
Step 3, startup Master, described Master is used to safeguard the information about the tracker server; Start all tracker servers, all tracker servers are set up TCP with Master and are connected, and the IP address of oneself is registered on Master, and regularly report node load to count to Master;
Start all tracker and select server, all tracker selection servers are set up TCP with Master and are connected, and regularly sending the tracker request to Master, Master receives that the IP, node load distribution of information of each tracker that will preserve after the request are to the TS that files a request.
Further, in the above-mentioned steps two, terminal peer selects server domain name to send to dns server fixing tracker by DNS Protocol, request analysis tracker selects the IP address of server, dns server passes through intelligently parsing, select tracker to select server and give terminal peer with its IP address loopback, every selecteed probability of TS is equal to, so thereby reached the load balancing of tracker selection server cluster.
In an optional execution mode, in the above-mentioned steps three, terminal peer selects server ip address to select server to send message to tracker by known tracker, applies for an available tracker server; Tracker select node load that server will get access to from Master at most but the IP address loopback that does not surpass a tracker of the load upper limit give and send the peer of request.
According to of the present invention one preferred embodiment, in the above-mentioned steps one, each terminal peer registers all channel channel that self nodal information, this locality have by specifying message format on central tracker, nodal information is defined as following four-tuple:
<unique identifier, WAN side IP, WAN side slogan, current time stab 〉,
The channel information definition is following five-tuple:
The gateway address of node under the information that is defined node under type, rank value, the channel of node in Intranet, the channel under the<unique identifier MD5 value, channel 〉.
Further, in described step 1, the communication process of terminal peer and tracker server is:
Terminal peer reports oneself nodal information, tracker server to set up in internal memory and the Maintenance Point database of information to the tracker server;
Terminal peer reports tracker with the information that self has all channel of entity video data, and tracker sets up and safeguard the channel database of information equally in internal memory;
When peer plays certain channel, T just sends resource request message to the tracker server at set intervals, tracker is according to the MD5 of channel, and inquiry has other peer of same channel in database, and their nodal information is fed back to the peer that files a request.
Description of drawings
Fig. 1 be in the technical scheme of the present invention to p2p service architecture method the first time framework method schematic diagram;
Fig. 2 be in the technical scheme of the present invention to p2p service architecture method the first time framework method sequential chart;
Fig. 3 is to the schematic diagram of the first reconstruct structure method of p2p service architecture method in the technical scheme of the present invention;
Fig. 4 is to the sequential chart of the first reconstruct structure method of p2p service architecture method in the technical scheme of the present invention;
Fig. 5 be in the technical scheme of the present invention to p2p service architecture method the second time reconstructing method schematic diagram;
Fig. 6 be in the technical scheme of the present invention to p2p service architecture method the second time reconstructing method sequential chart.
Embodiment
In order to set forth aim of the present invention better, illustrate in greater detail technical scheme provided by the invention below in conjunction with embodiment.
The invention provides a kind of p2p service architecture method of wireless horizontal extension, described method comprises:
Step 1, referring to accompanying drawing 1, at first only set up a tracker server as central tracker server, all terminal peer all with this central tracker server communication (referring to accompanying drawing X, the tracker of these central authorities is the tracker+TS+Master among the figure X), report nodal information, report resource information, resource bid is all by UDP, and communicate by letter by NAT Server built-in among TCP and the tracker.
In the above-mentioned steps one, each peer registers all channels (channel) that self nodal information, this locality have by specifying message format on central tracker, and nodal information is defined as following four-tuple;
<unique identifier, WAN side IP, WAN side slogan, current time stab 〉
The channel information definition is following five-tuple:
Under<unique identifier MD5 the value, channel node in Intranet be defined type (Leader[refers to possesses public network ip or first enters the node of p2p system a LAN] or Follower[in same LAN, non-first enters the node of p2p system, is referred to as Follower]), the gateway address of node under the information, channel of node under the rank value, channel
In conjunction with the accompanying drawings 2, further describe the communication process of terminal peer and tracker:
Tracker at first starts, and when each terminal peer starts, reports own nodal information to tracker, and tracker sets up also Maintenance Point database of information in internal memory;
Terminal peer reports tracker with the information that self has all channel of entity video data, and tracker sets up and safeguard the channel database of information equally in internal memory;
When terminal peer plays certain channel, T sends resource request message to tracker at set intervals, and tracker is according to the MD5 of channel, inquiry has the other-end peer of same channel in database, and their nodal information is fed back to the terminal peer that files a request;
Begin to set up p2p between terminal peer and the terminal peer and be connected, undertaken after TCP NAT passes through by the NAT Server among the tracker, the Point-to-Point Data that can carry out each other transmits.
The quantity of the tracker of central authorities real-time judge terminal peer, increase along with peer, the tracker of (referring to accompanying drawing X, the preferred value of N1 is 100,000) separate unit central authorities can not satisfy the demand when the quantity of terminal peer is increased to threshold value N1 platform, and the conference initiating failure is crossed in load.
Therefore need carry out step 2, in step 2, carry out the reconfiguration system first time, introduce the notion of tracker cluster, and newly add a tracker selector equipment (being called TS), as shown in Figure 3.
Detailed operation flow process with reference to accompanying drawing 4 description of step two:
TS at first starts;
Each tracker starts, and sets up TCP with TS and is connected, the IP address of oneself is registered on TS, and timing reports node load to count to TS, and TS sets up and safeguard database about tracker in internal memory;
Each peer sends request message by known TS IP address to TS, applies for an available tracker server.TS with registered node load at most but the IP address loopback that does not surpass a tracker of the load upper limit give and send the peer of request;
Peer and the tracker that learns from TS communicate, and reciprocal process is constant.
But the generation of kind of situation is arranged: back-end system is if having only separate unit TS, in case the TS fault or the machine of delaying will cause the paralysis of p2p system because peer can't obtain the address of tracker, can't with the point-to-point transmission data of other peer.
At this, the present invention further proposes step 3, in the step 3 kind system is carried out the reconstruct second time.Need to carry out the expansion of TS in this step, introduce the notion of TS cluster, all store the also information of all tracker of Dynamic Maintenance on each TS, peer is no longer by concrete IP address, but sending the tracker request message to TS by domain name, dns server is mapped to domain name the IP of a certain TS at random by intelligently parsing, any TS is equal to by the probability that peer selects, and has also just reached the load balancing of TS for peer.
If directly carry out the TS expansion on original framework, then arbitrary tracker will keep TCP to be connected with all TS, supposes to have N platform tracker, and whenever newly-increased TS will increase the N bar and connect, and this is worthless.Therefore the strategy that adopts is: newly-increased Master equipment, tracker no longer reports but the Master that alters course reports to TS, safeguard database among the Master about tracker, each TS initiates TCP to Master and connects, and regularly send request to Master, obtain all current tracker information.Like this, newly-increased TS has only increased a TS and has been connected with the TCP of Master.System architecture after the reconstruct for the second time as shown in Figure 5.
6 carry out the more detailed workflow of reconstruct for the second time and describe in conjunction with the accompanying drawings at this.
Master at first starts;
Each tracker starts, and sets up TCP with Master and is connected, the IP address of oneself is registered on Master, and timing reports node load to count to Master;
Each TS starts, and sets up TCP with Master and is connected, and regularly sends the tracker request to Master, Master receive each tracker that will preserve after the request<IP, node load〉gather and be distributed to the TS that files a request;
Each peer sends to dns server by DNS Protocol with fixing TS domain name, the IP address of request analysis TS, dns server are selected a TS and are given peer with its IP address loopback by intelligently parsing, every selecteed probability of TS is equal to, so reached the load balancing of TS cluster;
Peer sends message by known TS IP address to TS, applies for an available tracker server.The node load that TS will get access to from Master at most but the IP address loopback that does not surpass a tracker of the load upper limit give and send the peer of request;
Peer and the tracker that obtains communicate, and reciprocal process is constant.
The method fullest that the present invention proposes utilize mature technique, simplified system greatly, coupling is low as far as possible between the subsystem, reduce as far as possible system is relied on, pursuit entire system optimum, but not single-point optimum, thus reached the infinitely effect of horizontal extension of p2p server architecture.
Method and system of the present invention is not limited to the embodiment described in the embodiment, and those skilled in the art's technical scheme according to the present invention draws other execution mode, belongs to technological innovation scope of the present invention equally.

Claims (10)

1. a p2p service architecture method comprises the tracker server in the described p2p service architecture, and tracker selects server (TS server), and master server Master is characterized in that, may further comprise the steps:
Step 1, set up a tracker server as central tracker, all terminal peer communicate by letter with described central tracker.
2. the method for claim 1 is characterized in that: the quantity of described central tracker real-time judge terminal peer, and when the quantity of terminal peer is increased to threshold value N1 platform, execution in step two;
Step 2, many tracker servers of startup, each tracker server is set up TCP with tracker selection server and is connected, and the IP address registration of inciting somebody to action is separately selected on the server at tracker, and regularly report node load to count to tracker to select server, tracker selects server to set up and safeguard database about tracker in internal memory.
3. method as claimed in claim 2 is characterized in that:
Described tracker selects the quantity of server real-time judge terminal peer, when the quantity of terminal peer is increased to threshold value N2 platform, and execution in step three;
Step 3, startup Master, described Master is used to safeguard the information about the tracker server; Start all tracker servers, all tracker servers are set up TCP with Master and are connected, and the IP address of oneself is registered on Master, and regularly report node load to count to Master;
Start all tracker and select server, all tracker selection servers are set up TCP with Master and are connected, and regularly sending the tracker request to Master, Master receives that the IP, node load distribution of information of each tracker that will preserve after the request are to the tracker selection server of filing a request.
4. method as claimed in claim 2 is characterized in that:
In the above-mentioned steps two, terminal peer selects server domain name to send to dns server fixing tracker by DNS Protocol, request analysis tracker selects the IP address of server, dns server passes through intelligently parsing, select a tracker selection server and give terminal peer its IP address loopback, every selecteed probability of TS is equal to, thereby has reached the load balancing of tracker selection server cluster.
5. method as claimed in claim 3 is characterized in that:
In the above-mentioned steps three, terminal peer selects server ip address to select server to send message to tracker by known tracker, applies for an available tracker server; Tracker select node load that server will get access to from Master at most but the IP address loopback that does not surpass a tracker of the load upper limit give and send the peer of request.
6. the method for claim 1 is characterized in that:
In the above-mentioned steps one, each terminal peer registers self nodal information by specifying message format on central tracker, and nodal information is defined as following four-tuple:
<unique identifier, WAN side IP, WAN side slogan, current time stab 〉.
7. method as claimed in claim 6 is characterized in that:
Each terminal peer registers on central tracker by all channel channel that specify message format further this locality to be had, and the channel information definition is following five-tuple:
The gateway address of node under the information that is defined node under type, rank value, the channel of node in Intranet, the channel under the<unique identifier MD5 value, channel 〉.
8. method as claimed in claim 5 is characterized in that:
In described step 1, the communication process of terminal peer and tracker server is:
Terminal peer reports oneself nodal information, tracker server to set up in internal memory and the Maintenance Point database of information to the tracker server;
Terminal peer reports tracker with the information that self has all channel of entity video data, and tracker sets up and safeguard the channel database of information equally in internal memory.
9. method as claimed in claim 8 is characterized in that:
When peer plays certain channel, T just sends resource request message to the tracker server at set intervals, tracker is according to the MD5 of channel, and inquiry has other peer of same channel in database, and their nodal information is fed back to the peer that files a request.
10. method as claimed in claim 5 is characterized in that: described N1 is 100,000, and described N2 is 1,000,000.
CN201110230706.3A 2011-08-12 2011-08-12 Method for peer-to-peer (p2p) server framework Expired - Fee Related CN102291458B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110230706.3A CN102291458B (en) 2011-08-12 2011-08-12 Method for peer-to-peer (p2p) server framework

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110230706.3A CN102291458B (en) 2011-08-12 2011-08-12 Method for peer-to-peer (p2p) server framework

Publications (2)

Publication Number Publication Date
CN102291458A true CN102291458A (en) 2011-12-21
CN102291458B CN102291458B (en) 2014-06-18

Family

ID=45337559

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110230706.3A Expired - Fee Related CN102291458B (en) 2011-08-12 2011-08-12 Method for peer-to-peer (p2p) server framework

Country Status (1)

Country Link
CN (1) CN102291458B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103561013A (en) * 2013-10-29 2014-02-05 联想中望系统服务有限公司 Streaming media data distributing system
CN106331090A (en) * 2016-08-23 2017-01-11 国家电网公司 IPv6 trusted network-based reconfigurability implementation method
CN106936796A (en) * 2015-12-30 2017-07-07 华耀(中国)科技有限公司 A kind of server load balancing method and apparatus based on SNI
CN108322496A (en) * 2017-01-17 2018-07-24 北京京东尚科信息技术有限公司 Image file distribution method and system, computer readable storage medium, electronic equipment
CN115022657A (en) * 2022-05-30 2022-09-06 上海哔哩哔哩科技有限公司 Scheduling method and device of live broadcast server

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5483535A (en) * 1995-01-17 1996-01-09 Zeta Music Partners Communications network interface, and adapter and method therefor
CN101098271A (en) * 2006-06-29 2008-01-02 腾讯科技(深圳)有限公司 Expandable P2P flow media system
CN101714987A (en) * 2009-11-16 2010-05-26 中国电信股份有限公司 P2P playing method and system
CN101046806B (en) * 2006-03-30 2010-07-21 腾讯科技(深圳)有限公司 Search engine system and method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5483535A (en) * 1995-01-17 1996-01-09 Zeta Music Partners Communications network interface, and adapter and method therefor
CN101046806B (en) * 2006-03-30 2010-07-21 腾讯科技(深圳)有限公司 Search engine system and method
CN101098271A (en) * 2006-06-29 2008-01-02 腾讯科技(深圳)有限公司 Expandable P2P flow media system
CN101714987A (en) * 2009-11-16 2010-05-26 中国电信股份有限公司 P2P playing method and system

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103561013A (en) * 2013-10-29 2014-02-05 联想中望系统服务有限公司 Streaming media data distributing system
CN103561013B (en) * 2013-10-29 2016-07-13 越亮传奇科技股份有限公司 The data distribution systems of Streaming Media
CN106936796A (en) * 2015-12-30 2017-07-07 华耀(中国)科技有限公司 A kind of server load balancing method and apparatus based on SNI
CN106331090A (en) * 2016-08-23 2017-01-11 国家电网公司 IPv6 trusted network-based reconfigurability implementation method
CN108322496A (en) * 2017-01-17 2018-07-24 北京京东尚科信息技术有限公司 Image file distribution method and system, computer readable storage medium, electronic equipment
CN115022657A (en) * 2022-05-30 2022-09-06 上海哔哩哔哩科技有限公司 Scheduling method and device of live broadcast server
CN115022657B (en) * 2022-05-30 2023-12-26 上海哔哩哔哩科技有限公司 Scheduling method and device of live broadcast server

Also Published As

Publication number Publication date
CN102291458B (en) 2014-06-18

Similar Documents

Publication Publication Date Title
Zhang et al. Unreeling Xunlei Kankan: Understanding hybrid CDN-P2P video-on-demand streaming
US10171523B2 (en) Multi-tier push service control architecture for large scale conference over ICN
CN102231762B (en) Peer-to-peer (p2p) server architecture capable of being unlimitedly and horizontally expanded
CN101282281B (en) Medium distributing system and apparatus as well as flow medium play method
Guo et al. P2Cast: peer-to-peer patching scheme for VoD service
CN102404378B (en) Streaming media distribution and transmission network system
Haßlinger et al. Content delivery and caching from a network provider’s perspective
US9432408B2 (en) Signalling gateway, method, computer program and computer program product for communication between HTTP and SIP
CN102231761A (en) Peer-to-Peer (P2P) data interaction method
CN110012300A (en) Net cast method and device
CN101355468B (en) Method for publishing P2P stream medium information
CN102291458B (en) Method for peer-to-peer (p2p) server framework
Lederer et al. Towards peer-assisted dynamic adaptive streaming over HTTP
EP2744168B1 (en) System, method and live streaming optimizer server for live content distribution optimization over a content delivery network
CN103139656A (en) Method of managing cluster type dynamic network distribution trees of video live broadcast distribution network
CN101662508B (en) Method for data transmission based on point-to-point protocol, device and system thereof
US10601910B2 (en) Method for broadcasting a piece of content in an it network
CN107959704B (en) Data processing method and home gateway
Wu et al. Redesigning multi-channel P2P live video systems with View-Upload Decoupling
CN102387062A (en) Method for improving transmission rate of peer-to-peer (p2p) node in crossing network by dynamic bridging contact
CN101286928B (en) Method for realizing P2P stream media system based on bandwidth guaranty technique
Meskovic et al. Content delivery architectures for live video streaming: hybrid cdn-p2p as the best option
RU2465638C1 (en) Method of distributing multimedia information by peer-to-peer decentralised network deployment and decentralised network for realising said method
Mathieu et al. A topology-aware P2P video streaming system
Gazdar et al. Toward a full peer to peer MPEG-DASH compliant streaming system

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
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20140618

Termination date: 20170812