CN105812443A - P2P system and P2P system business access method - Google Patents

P2P system and P2P system business access method Download PDF

Info

Publication number
CN105812443A
CN105812443A CN201410856897.8A CN201410856897A CN105812443A CN 105812443 A CN105812443 A CN 105812443A CN 201410856897 A CN201410856897 A CN 201410856897A CN 105812443 A CN105812443 A CN 105812443A
Authority
CN
China
Prior art keywords
client
server
rtmfp
message
receiving
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201410856897.8A
Other languages
Chinese (zh)
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 CN201410856897.8A priority Critical patent/CN105812443A/en
Publication of CN105812443A publication Critical patent/CN105812443A/en
Pending legal-status Critical Current

Links

Landscapes

  • Computer And Data Communications (AREA)

Abstract

A P2P system and a P2P system business access method are disclosed. The system comprises a control server, storage servers, RTMFP servers, WebRTC servers and selector servers, wherein the storage servers, the RTMFP servers, the WebRTC servers and the selector servers are respectively connected with the control server; the control server is used for managing information of all servers and controlling the storage servers to which client ends currently registered with the system belong, and all the storage servers can be subjected to automatic balance scheduling; the storage servers are used for storing mapping relations among the client ends, the RTMFP servers and the WebRTC servers; the RTMFP servers are used for receiving RTMFP protocol registration requests sent by the client ends, the WebTRC servers are used for receiving WebRTC protocol registration requests sent by the client ends, and the selector servers are used for selecting optimal WebRTC servers or optimal RTMFP servers for the client ends according to the protocols for which registration requests are sent by the client ends.

Description

A kind of P2P system and business access method
Technical field
The application relates to network communication field, particularly relates to a kind of P2P (Peer-to-Peer, equity) system and business access method.
Background technology
P2P network is the distributed network that one is different from tradition C/S (client/server) pattern.All nodes in P2P network can serve as client, can provide resource as server to other node again.
WebP2P is the P2P technology of a kind of sing on web (WorldWideWeb, WWW), and by this technology, user, without installing client software, can realize P2P by Web browser and connect.
In prior art, current WebP2P technology adopts the real-time media stream protocol (Real-TimeMediaFlowProtocol that Adobe company provides, it is called for short RTMFP), this protocol realization covering Flash (a kind of vector animation make, playout software) client, mobile terminal P2P transmission system, reached higher to share rate.
In addition, along with modern browser and HTML5 (HypertextMarkupLanguage5, HTML 5) development of standard, occur in that the WebRTC (WebReal-TimeCommunication of the primary support of browser, webpage real-time Communication for Power) technology, it is contemplated that this technology will be supported gradually on the browser of main flow comprehensively.This technology can be used to cover the blind area of part RTMFPP2P, for instance, have disabled RTMFP cause to realize the P2P terminal use shared by RTMFP for not supporting Flash or support Flash, it is possible to realize P2P by WebRTC technology and connect.
Above-mentioned WebP2P technology of the prior art all comes with some shortcomings part, for instance, only it is registered in the user on same station server and could realize P2P and connect, what namely there is node can connective, problem that coverage rate is not enough.
Summary of the invention
Technical problems to be solved in this application are, overcome the deficiencies in the prior art, it is provided that a kind of can improve node can the P2P system of connective, coverage rate and business access method.
In order to solve the problems referred to above, the application provides a kind of P2P system, comprises in this system: control server, the storage server being connected respectively with described control server, RTMFP server, WebRTC server and selection server, wherein,
Described control server, for managing the information of each server and controlling the storage server belonging to client being registered in system at present, it is achieved the autobalance of each storage server is dispatched;
Described storage server, for storing described client and the mapping relations of described RTMFP server, described WebRTC server;
Described RTMFP server, for receiving the registration request of the RTMFP agreement that client sends;
Described WebRTC server, for receiving the registration request of the WebRTC agreement that client sends;
Described selection server, the agreement for the registration request according to described client is that described client selects optimum WebRTC server or RTMFP server.
Additionally, described selection server, for when receiving the registration request of the RTMFP agreement that client sends, by described client registers to described RTMFP server;When receiving the registration request of the WebRTC agreement that client sends, by described client registers to described WebRTC server.
Additionally, described control server, it is additionally operable to when described storage server load exceedes setting thresholding, notifies that described RTMFP server and/or described WebRTC server realize programme information and migrate.
Additionally, described storage server, it is additionally operable to the client-side information of all clients of the program data of the storage same program of transmission;
Described client-side information comprises: the Session ID of client.
Additionally, described RTMFP server is additionally operable to, after receiving the client side list inquiry request that source client sends, forward the request to described storage server;
Described storage server is additionally operable to after receiving described RTMFP server transmission client side list inquiry request, generate the destination client list of the client identifier comprising optimal objective client according to the programme information carried in this request, and this list is sent to source client by described RTMFP server.
Additionally, described WebRTC server is additionally operable to, after receiving the client side list inquiry request that source client sends, forward the request to described storage server;
Described storage server is additionally operable to after receiving described WebRTC server transmission client side list inquiry request, generate the destination client list of the client identifier comprising optimal objective client according to the programme information carried in this request, and this list is sent to source client by described WebRTC server.
The present invention also provides for the business access method of a kind of P2P system, and the method includes:
Step A: after receiving the registration request that source client sends, oneth WebP2P protocol server is source client distribution Session ID, the address information of preservation source client, and according to the programme information carried in registration request, the client-side information transmission of source client is stored to the storage server corresponding with this programme information;
Step B: after receiving the P2P connection request that source client sends, the oneth WebP2P protocol server Session ID according to the destination client carried in the programme information of the program of source client transmissions and P2P connection request, from the 2nd WebP2P protocol server that described storage server lookup is registered to the destination client with same program information, and by the address information of the client set up needed for P2P is connected being sent respectively to source client and destination client with the data interaction between described 2nd WebP2P protocol server, so that described source client and destination client carry out P2P connection;
Described client-side information comprises: the Session ID of client, the WebP2P protocol server that client is registered;
Described WebP2P protocol server is: RTMFP server, or WebRTC server.
Additionally, in step A, a WebP2P protocol server obtains the storage server corresponding with described programme information in the following way:
Oneth WebP2P protocol server obtains the storage server corresponding with this programme information according to the programme information carried in described registration request from controlling server lookup.
Additionally, before described step A, also comprise the steps:
Select server after receiving the WebP2P protocol server inquiry request that source client sends, distribute WebP2P protocol server list for source client, and this list is sent to source client.
Additionally, between described step A and step B, also comprise the steps:
After receiving the client side list inquiry request that source client sends, a WebP2P protocol server forwards the request to storage server;
After receiving described client side list inquiry request, storage server generates the destination client list of the client identifier comprising optimal objective client according to the programme information carried in this request, and by a WebP2P protocol server, this list is sent to source client, so that described source client and destination client carry out P2P connection.
In sum, the P2P system of the present invention is by being arranged to the storage server of storage programme information and client-side information corresponding relation, make system is registered in arbitrary WebP2P protocol server (RTMFP server, WebRTC server) on source client inquire, with client identification and the programme information of destination client, the target WebP2P protocol server registered this destination client such as through the WebP2P protocol server of its registration, and then be connected with the P2P between destination client by the foundation of target WebP2P protocol server, what improve node can connective and coverage rate.
Accompanying drawing explanation
Fig. 1 is the structural representation of embodiment of the present invention P2P system;
Fig. 2 is the register method flow chart of embodiment of the present invention RTMFP client;
Fig. 3 is the querying method flow chart of embodiment of the present invention RTMFP client node;
Fig. 4 is the P2P method of attachment flow chart between the RTMFP client (source client and destination client) that the embodiment of the present invention is registered at same RS;
Fig. 5 is embodiment of the present invention P2P method of attachment flow chart between the RTMFP client (source client and destination client) of different RS registrations;
Fig. 6 is the register method flow chart of embodiment of the present invention WebRTC client;
Fig. 7 is the querying method flow chart of embodiment of the present invention WebRTC client node;
Fig. 8 is the P2P method of attachment flow chart between the WebRTC client (source client and destination client) that the embodiment of the present invention is registered at same TS;
Fig. 9 is embodiment of the present invention P2P method of attachment flow chart between the WebRTC client (source client and destination client) of different TS registrations;
Figure 10 is the business access method flow chart of the embodiment of the present invention.
Detailed description of the invention
The P2P system of the present invention supports at least two WebP2P protocol server: RTMFP server and WebRTC server, the P2P system of the present invention is additionally provided with storage server node, for storing the client-side information (client session identifier, the WebP2P protocol server that client is registered) corresponding to each programme information;When client is registered at WebP2P protocol server, client-side information is uploaded to the storage server corresponding with programme information and stores by WebP2P protocol server;When receiving the P2P connection request that client sends, and the destination client of this request is when being registered in another WebP2P protocol server, current WebP2P protocol server obtains the WebP2P protocol server registered destination client from storage server lookup, and is connected by assisting to set up P2P between source client and destination client with the data interaction of WebP2P protocol server.
Fig. 1 is the structural representation of embodiment of the present invention P2P system;As shown in Figure 1, this system comprises: control server (ControlServer, it is called for short CS), storage server (StorageServer is called for short SS), RTMFP server (RTMFPServer, it is called for short RS), WebRTC server (WebRTCServer is called for short TS), select server (Selector is called for short ST).
CS, is unique central control server nodes in system;For information and the programme information of server each in storage system, control the SS belonging to client node being registered in system at present, it is achieved the autobalance of each SS is dispatched;CS adopts TCP (TransferControlProtocol, transmission control protocol) to interact with SS, RS, TS and the ST in system.Additionally, CS is also equipped with following functions characteristic:
The status information of all programs in maintenance system, for instance: the migration deadline etc. of the identifier of standby SS, the last migration time of program, program belonging to the identifier of SS, program belonging to client terminal quantity that program is corresponding, program;
The server state of all SS in maintenance system, for instance: the client terminal quantity of SS, the number of programs of SS, the current presence of SS, the client terminal quantity upper limit of SS, SS Autonomic Migration Framework ratio, the acceptable migration ratio etc. of SS;
When the load of SS exceedes thresholding set in advance, notice RS/TS carries out automatic program information transfer, to ensure the stability of system;
After receiving the RS/TS SS inquiry request message carrying programme information sent, the SS information corresponding with this programme information is included in SS query response message and is sent to RS/TS.
SS, is used for the mapping relations of client and the RS/TS storing transmission (send/receive) same video frequency program;The function updating client state, inquiring client terminal information is provided for RS/TS, and the network capabilities and computing capability according to client calculates the optimum client node list in the same area;SS adopts Transmission Control Protocol to interact with RS and TS in system;Additionally, SS is also equipped with following functions characteristic:
Can there is multiple SS in system, back-level server extends;
Storage transmission (sends/receives) client-side information of all clients of same video frequency program, such as, RS/TS belonging to client, IP (the InternetProtocol of client, Internet protocol) address, ISP (InternetServiceProvider, the ISP) information of client.
RS, is used for providing RTMFP to service, it is achieved the functions such as the RTMFPP2P connection between client registers, optimum P2P client side list inquiry, client;RS adopts RTMFP and client to interact;Additionally, RS is also equipped with following functions characteristic:
Can there is multiple RS in system, adopt udp protocol to carry out data interaction between each RS, back-level server extends;
Support to carry out P2P connection between two client nodes being registered on different RS.
TS, for providing WebSocket (WWW socket) and STUN (SimpleTraversalofUDPoverNATs, the UDP simple traversal of NAT) protocol service, it is achieved the functions such as the WebRTCP2P connection between client registers, optimum P2P client side list inquiry, client;TS adopts WebSocket agreement and Simple Traversal of UDP Through Network Address Translators and client to interact;Additionally, TS is also equipped with following functions characteristic:
Can there is multiple TS in system, adopt udp protocol to interact between each TS, back-level server extends;
Support to carry out P2P connection between two client nodes being registered on different TS.
ST, for providing the RS/TS server node selected for client, provides optimum RS/TS node listing for client;System can exist multiple ST, between each ST, adopt HTTP (HyperTextTransferProtocol, HTML (Hypertext Markup Language)) to interact, between ST and client, adopt HTTP to interact.
In addition, Fig. 1 also comprises multiple clients (Client) that the P2P system with the present invention is connected and the CDN scheduling node (ContentDeliveryNetworkScheduler being connected with client, content distributing network scheduling node, it is called for short CDNS), CDN node (ContentDeliveryNetworkNode is called for short CDNN).
CDNS, for when client asks appointed program, redirecting requests to the CDNN of optimum.
CDNN, for providing program data for client.
Fig. 2 is the register method flow chart of embodiment of the present invention RTMFP client;As in figure 2 it is shown, the method includes:
Step 201:RTMFP client is to selecting server (ST) to send RS inquiry request (QueryRSReq) message, to inquire about the address information of available RS;
Above-mentioned RS inquiry request comprises the programme information of the program (program data of needs transmission) that client wishes to obtain;
Above-mentioned programme information comprises: program stream identifiers (program stream ID).
Step 202: after receiving RS inquiry request message, ST calculates the RS list of optimum according to the programme information carried in RS inquiry request message, and this RS list is included in RS query response message (QueryRSRes) and is sent to client;
Above-mentioned RS list comprises the address information of one or more RS;
The address information of above-mentioned RS includes each RS's: IP address, port numbers etc..
Step 203: client selects a RS from the RS list that inquiry obtains, send RTMFP handshake request (RTMFPShakehandReq) message (login request message can also be called) to corresponding RS, native client client information and programme information are comprised the RS being sent to correspondence within the message;
Above-mentioned client-side information comprises client: IP address, port numbers etc..
Step 204: after receiving RTMFP handshake request message, RS distributes Session ID for this client, and according to whether the programme information inquiry this locality carried in this message preserves the server info of the SS corresponding with this programme information (such as, address information), if it is not, send SS inquiry request message (QuerySSReq) to CS;
Above-mentioned SS inquiry request message comprises the programme information carried in RTMFP handshake request message.
This step is optional step.
Step 205: after receiving SS inquiry request message, CS obtains and the SS address information corresponding to programme information carried in this message, and SS address information is included in SS inquiry response (QuerySSRes) message and is sent to RS;
SS address information comprises SS: IP address, port numbers etc..
This step is optional step.
Step 206: after receiving SS query response message, RS sends renewal client request (UpdateClientReq) message according to the SS address information comprised in this message to corresponding SS;Update in client request message and comprise client-side information and programme information;
In this step, client-side information can also comprise: the Session ID of client, the ISP information of client, the network condition/ability of client, the computing capability etc. of client.
Step 207: after receiving renewal client request message, SS preserves in this locality/updates the client-side information and programme information that carry in this message, and returns renewal client end response (UpdateClientRes) message to RS;
In this step, SS also includes in the client-side information that this locality preserves: the corresponding relation of client and RS.
Step 208: after preserving the address information (IP address or IP address and port numbers) of client, RS sends RTMFP handshake response (RTMFPShakehandRes) message to client, carries the Session ID (session id) that RS is the distribution of this client in this message.
Step 209: client sends RTMFP heartbeat request (RTMFPHeartbeatReq) message to RS, carries client-side information in this message.
Step 210: after receiving RTMFP heartbeat request message, RS judges that the client-side information of this client is (such as, IP address) whether change, if changed, then send to corresponding SS and update client request (UpdateClientReq) message, this message carries client-side information;
This step is optional step.
Step 211: after receiving renewal client request message, SS preserves in this locality/updates the client-side information carried in this message, and returns renewal client end response (UpdateClientRes) message to RS;
This step is optional step.
Step 212:RS sends RTMFP heart beating response (RTMFPHeartbeatReq) message to client.
Hereafter, every interval set in advance (such as, 1 minute), client and RS repeat to send above-mentioned RTMFP heartbeat request/response message, in order to keep the login state of client, and carry out the renewal of client-side information.
So far, RTMFP client completes register flow path.
Fig. 3 is the querying method flow chart of embodiment of the present invention RTMFP client node;As it is shown on figure 3, the method includes:
Step 301: the RS that client (Client) is registered with sends client side list inquiry request (QueryPeersReq) message;
This message comprises programme information, for instance, program stream ID.
Step 302: after receiving client side list inquiry request message, RS forwards that message to the SS that appointed program is corresponding.
Step 303: after receiving client side list inquiry request message, SS calculates the optimum client side list obtaining corresponding to appointed program, and this list is included in client side list inquiry response (QueryPeersRes) message and is sent to RS;
Due in the P2P network system of the present invention, the client-side information of all clients of viewing same program (transmission same program data) is stored in same SS, and therefore SS can calculate, according to the network condition of each client and computing capability, the optimum client side list obtaining appointed program.
Optimum client side list can comprise the session id corresponding to each client.
Step 304: after receiving client side list query response message, RS forwards that message to client.
Fig. 4 is the P2P method of attachment flow chart between the RTMFP client (source client and destination client) that the embodiment of the present invention is registered at same RS;As shown in Figure 4, the method includes:
Step 401: the RS that the client (source client/Initiator) initiating to connect is registered with sends RTMFP and initiates connection request (RTMFPInitiatorHello) message;
This message carries the session id of destination client and the client-side information of source client (session id, IP address, port numbers etc.).
Step 402: after receiving RTMFP initiation connection request message, RS sends RTMFP information according to the session id of the destination client carried in this message to destination client (Target) and forwards (RTMFPForwardMessage) message;
RTMFP information forwards the client-side information comprising the source client carried in initiation connection request in message.
Step 403: while sending RTMFP information forwarding message, RS sends RTMFP to source client and redirects (RTMFPRedirect) message;
Above-mentioned RTMFP redirects the client-side information (session id, IP address, port numbers etc.) comprising destination client in message.
Step 404: source client and destination client, after receiving the RS message sent, send initiation connection request (InitiatorHello) message to the other side respectively and connection response (ResponseHello) message is set up P2P and connected.
After step 405:P2P connection establishment completes, source client (Initiator) and destination client (Target) proceed by the transmission of data.
Fig. 5 is embodiment of the present invention P2P method of attachment flow chart between the RTMFP client (source client and destination client) of different RS registrations;In this flow process, source client register RS as RS-1, destination client register RS as RS-2;As it is shown in figure 5, the method includes:
Step 501: the RS-1 that the client (source client/Initiator) initiating to connect is registered with sends RTMFP and initiates connection request (RTMFPInitiatorHello) message;
This message contains the session id of destination client and the client-side information of source client (session id, IP address, port numbers etc.).
Step 502: after receiving RTMFP initiation connection request message, the program set that RS-1 is currently joined into according to source client, the SS corresponding to this program sends RS inquiry request (QueryRSReq) message, to inquire about the RS that destination client is registered;
Above-mentioned RS inquiry request message comprises the session id of destination client.
Step 503: after receiving RS inquiry request message, SS inquires the server info of the RS-2 that this destination client is registered according to the session id of the destination client carried in this message, and is included in by the server info of RS-2 in RS inquiry response (QueryRSRes) message and is sent to RS-1.
The information such as above-mentioned server info comprises RS-2: IP address, port numbers.
Step 504: after receiving RS query response message, RS-1 uses UDP (UserDatagramProtocol according to the server info of RS-2, UDP) initiation connection request (InitiatorHello) message that source client is sent is packaged, and will carry the information such as the IP address of active client, adopt the initiation connection request message of UDP encapsulation to send to RS-2.
Step 505: after receiving the initiation connection request message of UDP encapsulation, RS-2 sends RTMFP information and forwards (RTMFPForwardMessage) message to destination client, this message is carried the session id of destination client and the client-side information of source client.
Step 506: while sending information forwarding message to destination client, RS-2 sends to RS-1 with redirection (Redirect) message of UDP encapsulation, carries the client-side information (IP address, port numbers etc.) of destination client in this message.
Step 507: after receiving RS-2 redirection (Redirect) message sent, RS-1 sends RTMFP to source client and redirects (RTMFPRedirect) message, this message is carried the client-side information (IP address, port numbers etc.) of destination client.
Step 508: source client and destination client, after receiving the RS message sent, send initiation connection request (InitiatorHello) message to the other side respectively and connection response (ResponseHello) message is set up P2P and connected.
After step 509:P2P connection establishment completes, source client (Initiator) and destination client (Target) proceed by the transmission of data.
Fig. 6 is the register method flow chart of embodiment of the present invention WebRTC client;As shown in Figure 6, the method includes:
Step 601:WebRTC client (Client) is to selecting server (ST) to send TS inquiry request (QueryTSReq) message, to inquire about the address information of available TS;
Above-mentioned TS inquiry request comprises the programme information of the program (program data of needs transmission) that client wishes to obtain;
Above-mentioned programme information comprises: program stream identifiers (program stream ID).
Step 602: after receiving TS inquiry request message, ST calculates the TS list of optimum according to the programme information carried in TS inquiry request message, and is included in TS inquiry response (QueryTSRes) message by this TS list and is sent to client (Client);
Above-mentioned TS list comprises the address information of one or more TS;
The address information of above-mentioned TS includes each TS's: IP address, port numbers etc..
Step 603: client selects a TS from the TS list that inquiry obtains, send WebRTC handshake request (WebRTCShakehandReq) message (login request message can also be called) to corresponding TS, native client client information and programme information are comprised the TS being sent to correspondence within the message;
Above-mentioned client-side information comprises client: IP address, port numbers etc..
Step 604: after receiving WebRTC handshake request message, TS distributes Session ID for this client, and according to whether the programme information inquiry this locality carried in this message preserves the server info of the SS corresponding with this programme information (such as, address information), if it is not, send SS inquiry request (QuerySSReq) message to CS;
Above-mentioned SS inquiry request message comprises the programme information carried in WebRTC handshake request message.
This step is optional step.
Step 605: after receiving SS inquiry request message, CS obtains and the SS address information corresponding to programme information carried in this message, and SS address information is included in SS inquiry response (QuerySSRes) message and is sent to TS;
SS address information comprises SS: IP address, port numbers etc..
This step is optional step.
Step 606: after receiving SS query response message, TS sends renewal client request (UpdateClientReq) message according to the SS address information carried in this message to corresponding SS;Update in client request message and comprise client-side information and programme information;
In this step, client-side information can also comprise: the Session ID of client, the ISP information of client, the network condition/ability of client, the computing capability etc. of client.
Step 607: after receiving renewal client request message, SS preserves in this locality/updates the client-side information and programme information that carry in this message, and returns renewal client end response (UpdateClientRes) message to TS;
In this step, SS also includes in the client-side information that this locality preserves: the corresponding relation of client and TS.
Step 608: after preserving the address information (IP address or IP address and port numbers) of client, TS sends WebRTC handshake response (WebRTCShakehandRes) message to client, carries the Session ID (session id) that TS is the distribution of this client in this message.
Step 609: client sends WebRTC heartbeat request (WebRTCHeartbeatReq) message to TS, carries client-side information in this message.
Step 610: after receiving WebRTC heartbeat request message, TS judges that the client-side information of this client is (such as, IP address) whether change, if changed, then send to corresponding SS and update client request (UpdateClientReq) message;Update in client request message and carry client-side information;
This step is optional step.
Step 611: after receiving renewal client request message, SS preserves in this locality/updates the client-side information carried in this message, and returns renewal client end response (UpdateClientRes) message to TS;
This step is optional step.
Step 612:TS sends WebRTC heart beating response (WebRTCHeartbeatReq) message to client.
Hereafter, repeat to send above-mentioned WebRTC heartbeat request/response message every interval set in advance, client and TS, in order to keep the login state of client, and carry out the renewal of client-side information.
So far, WebRTC client completes register flow path.
Fig. 7 is the querying method flow chart of embodiment of the present invention WebRTC client node;As it is shown in fig. 7, the method includes:
Step 701: the TS that client (Client) is registered with sends client side list inquiry request (QueryPeersReq) message;
This message comprises programme information, for instance, program stream ID.
Step 702: after receiving client side list inquiry request message, this request message is transmitted to the SS that appointed program is corresponding by TS.
Step 703: after receiving client side list inquiry request message, SS calculates the optimum client side list obtaining corresponding to appointed program, and this list is included in client side list inquiry response (QueryPeersRes) message and is sent to TS;
Owing to, in the P2P network system of the present invention, all client-side informations of viewing same program are stored in same SS, therefore SS can calculate, according to the network condition of each client and computing capability, the optimum client side list obtaining appointed program.
Optimum client side list can comprise the session id corresponding to each client.
Step 704:TS forwards that message to client after receiving client side list query response message.
Fig. 8 is the P2P method of attachment flow chart between the WebRTC client (source client and destination client) that the embodiment of the present invention is registered at same TS;As shown in Figure 8, the method includes:
Step 801: source client adopts the TS that Simple Traversal of UDP Through Network Address Translators is registered with to send and initiates connection request (CreateOffer) message, carries the information such as the IP address of internal network of active client, port numbers in this message;
Additionally, initiation connection request message can also carry the information such as the client-side informations such as the session id of source client, and the session id of destination client.
Step 802: after receiving initiation connection request message, TS adopts Simple Traversal of UDP Through Network Address Translators to send to source client and initiates connection response (OfferResponse) message, carries the information such as outer net IP address and port numbers of active client in this message.
Step 803: after receiving initiation connection response message, source client adopts WebSocket agreement to send connection request (ConnectRequest) message to TS, carries active client-side information and target customer's client information in this message;
Wherein, source client-side information comprises source client: outer net IP address, port numbers, session id.
Target customer's client information comprises: the session id of destination client.
Step 804: after receiving connection request message, TS inquires about outer net IP address and the port numbers of destination client according to the session id of the destination client carried in this message, and uses the outer net IP address of destination client and port numbers to forward connection request (ConnectRequest) message to destination client.
Step 805: after receiving connection request message, destination client adopts the TS that is registered with of Simple Traversal of UDP Through Network Address Translators to send and initiates response request (CreateAnswer) message, carries the information such as IP address of internal network and port numbers of destination client in this message.
Step 806: after receiving initiation response request message, TS adopts Simple Traversal of UDP Through Network Address Translators to send to destination client and initiates response (AnswerResponse) message, carries the information such as outer net IP address and port numbers of destination client in this message.
Step 807: after receiving initiation response message, destination client adopts WebSocket agreement to send connection response (ConnectResponse) message to TS;This message carries the client-side information of destination client and the client-side information of source client;
The information such as wherein, the client-side information of destination client comprises destination client: outer net IP address, port numbers, session id;
The client-side information of source client comprises source client: the information such as session id.
Step 808: after receiving connection response message, TS adopts WebSocket agreement to forward this message to source client, carries the information such as outer net IP address and port numbers of destination client in this message.
Step 809: the information such as outer net IP address and port numbers of using both sides between source client and destination client carries out WebRTC and shakes hands the mutual of (WebRTCShakehands) message, carries out bidirectional identity authentication.
Step 810: after handshake information completes alternately, proceeds by the transmission of data between source client and destination client.
Fig. 9 is embodiment of the present invention P2P method of attachment flow chart between the WebRTC client (source client and destination client) of different TS registrations;In order to make flow process describe more simple and clear, Fig. 9 does not distinguish WebSocket agreement and Simple Traversal of UDP Through Network Address Translators message, the processing entities in two kinds of protocol messages and TS has been carried out merging treatment.In this flow process, source client registers is at TS-1, and destination client is registered in TS-2;As it is shown in figure 9, the method includes:
Step 901: the TS-1 that source client is registered with sends and initiates connection request (CreateOffer) message, carries the information such as the IP address of internal network of active client, port numbers in this message;
Additionally, initiation connection request message can also carry the information such as the client-side informations such as the session id of source client, and the session id of destination client.
Step 902: after receiving initiation connection request message, TS-1 sends to source client and initiates connection response (OfferResponse) message, carries the information such as outer net IP address and port numbers of active client in this message.
Step 903: after receiving initiation connection response message, source client sends connection request (ConnectRequest) message to TS-1, carries active client-side information and target customer's client information in this message;
Wherein, source client-side information comprises source client: outer net IP address, port numbers, session id.
Target customer's client information comprises: the session id of destination client.
Step 904: after receiving connection request message, the program set that TS-1 is currently joined into according to source client, the SS corresponding to this program sends TS inquiry request (QueryTSReq) message, to inquire about the TS that destination client is registered;
Above-mentioned TS inquiry request message carries the session id of destination client.
Step 905: after receiving TS inquiry request message, SS inquires the server info of the TS-2 that this destination client is registered according to the session id of the destination client carried in this message, and is included in by the server info of TS-2 in TS inquiry response (QueryTSRes) message and is sent to TS-1.
The information such as above-mentioned server info comprises TS-2: IP address, port numbers.
Step 906: after receiving TS query response message, TS-1 uses the UDP connection request message that source client is sent to be packaged according to the server info of TS-2, and the information such as outer net IP address and the port numbers of active client will be carried, adopt the connection request message of UDP encapsulation to send to TS-2.
Step 906: after receiving the TS-1 connection request message sent, TS-2 obtains the information such as outer net IP address and the port numbers of this destination client according to the session id of the destination client carried in this message, and connection request message is forwarded to destination client.
Step 907: after receiving connection request message, TS-2 that destination client is registered with sends and initiates response request (CreateAnswer) message, carries the information such as IP address of internal network and port numbers of destination client in this message.
Step 908: after receiving initiation response request message, TS-2 sends to destination client and initiates response (AnswerResponse) message, carries the information such as outer net IP address and port numbers of destination client in this message.
Step 909: after receiving initiation response message, destination client sends connection response (ConnectResponse) message to TS-2;This message carries the client-side information of destination client and the client-side information of source client;
The information such as wherein, the client-side information of destination client comprises destination client: outer net IP address, port numbers, session id;
The client-side information of source client comprises source client: the information such as session id.
Step 910: after receiving the connection response message that destination client sends, TS-2 adopts udp protocol that this message is packaged, and the message after encapsulation is forwarded to TS-1.
Step 911: after receiving connection response message, TS-1 forwards this message to source client, the information such as outer net IP address and port numbers of carrying destination client in this message.
Step 912: the information such as outer net IP address and port numbers of using both sides between source client and destination client carries out WebRTC and shakes hands the mutual of (WebRTCShakehands) message, carries out bidirectional identity authentication.
Step 913: after handshake information completes alternately, proceeds by the transmission of data between source client and destination client.
Figure 10 is the business access method flow chart of the embodiment of the present invention, and as shown in Figure 10, the method includes:
Step 1001: after receiving the registration request that source client sends, oneth WebP2P protocol server is source client distribution Session ID, the address information of preservation source client, and according to the programme information carried in registration request, the client-side information transmission of source client is stored to the storage server corresponding with this programme information;
In this step, WebP2P protocol server can be RTMFP server or WebRTC server, and correspondingly, source client is then RTMFP client or WebRTC client.
The concrete register method adopted in this step refers to the description in Fig. 2 (register method of RTMFP client) and Fig. 6 (register method of WebRTC client).
Step 1002: after receiving the P2P connection request that source client sends, the oneth WebP2P protocol server Session ID according to the destination client carried in the programme information of the program of source client transmissions and P2P connection request, from the 2nd WebP2P protocol server that described storage server lookup is registered to the destination client with same program information, and by the address information of the client set up needed for P2P is connected being sent respectively to source client and destination client with the data interaction between described 2nd WebP2P protocol server, so that described source client and destination client carry out P2P connection;
The concrete P2P method of attachment adopted in this step refers to the description in Fig. 5 (the P2P method of attachment between RTMFP client) and Fig. 9 (the P2P method of attachment between WebRTC client).
In addition, in step A, a WebP2P protocol server obtains the storage server corresponding with described programme information in the following way: a WebP2P protocol server obtains the storage server corresponding with this programme information according to the programme information carried in described registration request from controlling server lookup.
Concrete storage server lookup process refers to the description in Fig. 2 (register method of RTMFP client) and Fig. 6 (register method of WebRTC client).
Additionally, before described step A, also comprise the steps:
Select server after receiving the WebP2P protocol server inquiry request that source client sends, distribute WebP2P protocol server list for source client, and this list is sent to source client.
Concrete WebP2P protocol server query script refers to the description in Fig. 2 (register method of RTMFP client) and Fig. 6 (register method of WebRTC client).
Additionally, between described step A and step B, also comprise the steps:
After receiving the client side list inquiry request that source client sends, a WebP2P protocol server forwards the request to storage server;After receiving described client side list inquiry request, storage server generates the destination client list of the client identifier comprising optimal objective client according to the programme information carried in this request, and by a WebP2P protocol server, this list is sent to source client, so that described source client and destination client carry out P2P connection.
Concrete client side list query script refers to the description in Fig. 3 (RTMFP client side list querying method) and Fig. 7 (WebRTC client side list querying method).
Ultimate principle according to the present invention, the above embodiment of the present invention can also have other mapping mode, for instance:
In the above-described embodiments, same client is only registered to a kind of WebP2P protocol server in RS or TS;
In other embodiments of the invention, if client supports multiple WebP2P agreement, then can register to multiple WebP2P protocol servers simultaneously.Such as, support the client Client of RTMFP and WebRTC agreement simultaneouslyRT, it is possible to simultaneously or send different WebP2P protocol server inquiry request messages to ST after first: RS inquiry request message and TS inquiry request message, RS list and TS list can be sent to client Client after receiving corresponding request message by ST respectivelyRT, client ClientRTCan pass through to send respectively RTMFP handshake request message and the message initiated registration on different WebP2P protocol servers of WebRTC handshake request to RS and TS.
Client ClientRTAfter RS and TS succeeds in registration, it is possible to simultaneously with the client Client supporting RTMFPRAnd support the client Client of WebRTC agreementTCarry out P2P connection.And then, support the client Client of different WebP2P agreementRWith client ClientTClient Client can also be passed throughRTCarrying out P2P connection, what further increase client node can connective and coverage rate.
In sum, the P2P system of the present invention is by being arranged to the storage server of storage programme information and client-side information corresponding relation, make system is registered in arbitrary WebP2P protocol server (RTMFP server, WebRTC server) on source client inquire, with client identification and the programme information of destination client, the target WebP2P protocol server registered this destination client such as through the WebP2P protocol server of its registration, and then be connected with the P2P between destination client by the foundation of target WebP2P protocol server, what improve node can connective and coverage rate.

Claims (10)

1. a P2P system, it is characterised in that comprise in this system: control server, the storage server being connected respectively with described control server, RTMFP server, WebRTC server and selection server, wherein,
Described control server, for managing the information of each server and controlling the storage server belonging to client being registered in system at present, it is achieved the autobalance of each storage server is dispatched;
Described storage server, for storing described client and the mapping relations of described RTMFP server, described WebRTC server;
Described RTMFP server, for receiving the registration request of the RTMFP agreement that client sends;
Described WebRTC server, for receiving the registration request of the WebRTC agreement that client sends;
Described selection server, the agreement for the registration request according to described client is that described client selects optimum WebRTC server or RTMFP server.
2. system according to claim 1, it is characterised in that
Described selection server, for when receiving the registration request of the RTMFP agreement that client sends, by described client registers to described RTMFP server;When receiving the registration request of the WebRTC agreement that client sends, by described client registers to described WebRTC server.
3. method according to claim 1, it is characterised in that
Described control server, is additionally operable to when described storage server load exceedes setting thresholding, notifies that described RTMFP server and/or described WebRTC server realize programme information and migrate.
4. system according to claim 1, it is characterised in that
Described storage server, is additionally operable to the client-side information of all clients of the program data of the storage same program of transmission;
Described client-side information comprises: the Session ID of client.
5. system according to claim 1, it is characterised in that
Described RTMFP server is additionally operable to, after receiving the client side list inquiry request that source client sends, forward the request to described storage server;
Described storage server is additionally operable to after receiving described RTMFP server transmission client side list inquiry request, generate the destination client list of the client identifier comprising optimal objective client according to the programme information carried in this request, and this list is sent to source client by described RTMFP server.
6. system according to claim 1, it is characterised in that
Described WebRTC server is additionally operable to, after receiving the client side list inquiry request that source client sends, forward the request to described storage server;
Described storage server is additionally operable to after receiving described WebRTC server transmission client side list inquiry request, generate the destination client list of the client identifier comprising optimal objective client according to the programme information carried in this request, and this list is sent to source client by described WebRTC server.
7. the business access method of a P2P system, it is characterised in that the method includes:
Step A: after receiving the registration request that source client sends, oneth WebP2P protocol server is source client distribution Session ID, the address information of preservation source client, and according to the programme information carried in registration request, the client-side information transmission of source client is stored to the storage server corresponding with this programme information;
Step B: after receiving the P2P connection request that source client sends, the oneth WebP2P protocol server Session ID according to the destination client carried in the programme information of the program of source client transmissions and P2P connection request, from the 2nd WebP2P protocol server that described storage server lookup is registered to the destination client with same program information, and by the address information of the client set up needed for P2P is connected being sent respectively to source client and destination client with the data interaction between described 2nd WebP2P protocol server, so that described source client and destination client carry out P2P connection;
Described client-side information comprises: the Session ID of client, the WebP2P protocol server that client is registered;
Described WebP2P protocol server is: RTMFP server, or WebRTC server.
8. method according to claim 7, it is characterised in that
In step A, a WebP2P protocol server obtains the storage server corresponding with described programme information in the following way:
Oneth WebP2P protocol server obtains the storage server corresponding with this programme information according to the programme information carried in described registration request from controlling server lookup.
9. method according to claim 7, it is characterised in that
Before described step A, also comprise the steps:
Select server after receiving the WebP2P protocol server inquiry request that source client sends, distribute WebP2P protocol server list for source client, and this list is sent to source client.
10. method according to claim 7, it is characterised in that
Between described step A and step B, also comprise the steps:
After receiving the client side list inquiry request that source client sends, a WebP2P protocol server forwards the request to storage server;
After receiving described client side list inquiry request, storage server generates the destination client list of the client identifier comprising optimal objective client according to the programme information carried in this request, and by a WebP2P protocol server, this list is sent to source client, so that described source client and destination client carry out P2P connection.
CN201410856897.8A 2014-12-31 2014-12-31 P2P system and P2P system business access method Pending CN105812443A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410856897.8A CN105812443A (en) 2014-12-31 2014-12-31 P2P system and P2P system business access method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410856897.8A CN105812443A (en) 2014-12-31 2014-12-31 P2P system and P2P system business access method

Publications (1)

Publication Number Publication Date
CN105812443A true CN105812443A (en) 2016-07-27

Family

ID=56465465

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410856897.8A Pending CN105812443A (en) 2014-12-31 2014-12-31 P2P system and P2P system business access method

Country Status (1)

Country Link
CN (1) CN105812443A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106255197A (en) * 2016-08-10 2016-12-21 北京邮电大学 A kind of user access method of distributed soft switchcall server
CN106254562A (en) * 2016-10-14 2016-12-21 北京邮电大学 Route selection method, server and system in WebRTC system
CN108289131A (en) * 2017-12-12 2018-07-17 北京知道未来信息技术有限公司 A method of obtaining subscription client Intranet and public network IP address
CN114090221A (en) * 2022-01-20 2022-02-25 浙江万雾信息科技有限公司 Dual migration method for tasks in edge computing environment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101136911A (en) * 2006-08-31 2008-03-05 腾讯科技(深圳)有限公司 Method to download files using P2P technique and P2P download system
CN101924778A (en) * 2009-06-10 2010-12-22 中国移动通信集团公司 P2P (Point-to-Point) streaming media system, P2P user equipment and streaming media data transmitting method
WO2013126507A1 (en) * 2012-02-21 2013-08-29 Brass Monkey, Inc. Mobile embedded servers systems and methods related thereto
CN103336719A (en) * 2013-06-04 2013-10-02 江苏科技大学 Distribution rendering system and method in P2P mode
CN103701885A (en) * 2013-12-18 2014-04-02 北京奇艺世纪科技有限公司 Method for querying indexes in P2P (peer-to-peer) system, P2P server and P2P server system
CN104219257A (en) * 2013-05-29 2014-12-17 华为终端有限公司 Web real-time communication method, system, server and client

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101136911A (en) * 2006-08-31 2008-03-05 腾讯科技(深圳)有限公司 Method to download files using P2P technique and P2P download system
CN101924778A (en) * 2009-06-10 2010-12-22 中国移动通信集团公司 P2P (Point-to-Point) streaming media system, P2P user equipment and streaming media data transmitting method
WO2013126507A1 (en) * 2012-02-21 2013-08-29 Brass Monkey, Inc. Mobile embedded servers systems and methods related thereto
CN104219257A (en) * 2013-05-29 2014-12-17 华为终端有限公司 Web real-time communication method, system, server and client
CN103336719A (en) * 2013-06-04 2013-10-02 江苏科技大学 Distribution rendering system and method in P2P mode
CN103701885A (en) * 2013-12-18 2014-04-02 北京奇艺世纪科技有限公司 Method for querying indexes in P2P (peer-to-peer) system, P2P server and P2P server system

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106255197A (en) * 2016-08-10 2016-12-21 北京邮电大学 A kind of user access method of distributed soft switchcall server
CN106255197B (en) * 2016-08-10 2019-12-31 北京邮电大学 User access method of distributed soft switching system
CN106254562A (en) * 2016-10-14 2016-12-21 北京邮电大学 Route selection method, server and system in WebRTC system
CN108289131A (en) * 2017-12-12 2018-07-17 北京知道未来信息技术有限公司 A method of obtaining subscription client Intranet and public network IP address
CN114090221A (en) * 2022-01-20 2022-02-25 浙江万雾信息科技有限公司 Dual migration method for tasks in edge computing environment

Similar Documents

Publication Publication Date Title
US11483176B2 (en) Traffic delivery using anycast and end user-based mapping in an overlay network
CN109274634B (en) Multimedia communication method and device, and storage medium
JP7125788B2 (en) System and method for communicating between secure and unsecure devices using proxies
US8112471B2 (en) System and method for website performance optimization and internet traffic processing
JP5739023B2 (en) System and method using a web proxy server to access a device having an assigned network address
CN105282008B (en) Enhance the method and system of media characteristic during real-time Communication for Power Network interactive sessions
CN103581740B (en) A kind of distributed IPTV multi-screens gateway and IPTV multi-screen interaction methods
WO2020093504A1 (en) Method, apparatus, and system for downloading data block of resource file
CN105359490A (en) User authentication in a cloud environment
US8069209B1 (en) Method for activating and deactivating client-side services from a distant server
US9306950B2 (en) Methods, server and proxy agent for dynamically setting up a session between a target resource in a private network and an application on a device
US10951672B2 (en) Multicast overlay network for delivery of real-time video
CN101369959A (en) Network address conversion traversing method supporting point-to-point service
JP2014501978A5 (en) Method and system for multi-connection in a file system session
KR20090115225A (en) A method, system and nodes for p2p content sharing
CN101997759A (en) Service implementation method and service system
KR102132266B1 (en) Secondary node type based control for data streaming
CN105812443A (en) P2P system and P2P system business access method
US10848586B2 (en) Content delivery network (CDN) for uploading, caching and delivering user content
KR101805458B1 (en) Method for supporting websocket and web server and web application server using the same
CN105872044A (en) Streaming media multi-level cache network acceleration system and method based on WebRTC
CN106713819A (en) Data transmission method, device and system for video conference
CN110495155A (en) Method for recommending communication stack
EP3576371A1 (en) Method and system for transmitting streaming media resource
US11048660B2 (en) Acceleration system for facilitating processing of API calls

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20160727

WD01 Invention patent application deemed withdrawn after publication