A kind of virtual overlay tree based on P2PSIP, subscription tree and medium are broadcast the method for tree
Technical field
The present invention relates to internet video topology optimization and video and broadcast optimisation technique, be specifically related to a kind of virtual overlay tree, subscription tree and medium and broadcast the method for tree based on P2PSIP.
Background technology
It is a lot of year that the research of Internet video has developed, and commercial applied technology is the IP multicast now, but it has some limitation, mainly is that network and the all-router that the IP multicast can only be applied to same operator must be supported the IP multicast.Other video broadcasting technology mainly contain simple P2P, add CDN with P2P, yet, these technology still face many bottlenecks that are difficult to go beyond and obstacle, as the delay of terminal use when the receiver, video, delay at receiver, video between the different user poor (thereby can not synchronously), delay when converted channel, what more and more allow operator's concern is the caused waste to the Internet bandwidth of prior art, in addition, enabling of every next new technology, operator needs to drop on infrastructure in advance very big.
The present invention mainly solves and improves following problem:
1, video is broadcast needed a large amount of unnecessary backbone network super node;
2, operator's required investment on infrastructure before service is provided;
3, video is broadcast the waste to backbone bandwidth;
4, the time-delay during video is transmitted and duplicated.
Summary of the invention
In view of this, the present invention is devoted to provide a kind of virtual overlay tree based on P2PSIP, subscription tree and medium to broadcast the method for tree.
Above-mentioned purpose of the present invention is achieved by the following technical solutions:
It is one group of set that moves the IP node of same P2P algorithm that P2P covers; The P2P resource distribution covers so that share in P2P, and each P2P resource obtains unique resource identification number by a hash algorithm; The P2P node number is the label that is used to identify the P2P node and is used for the P2P algorithm, and resource identification number and P2P node number are formed the P2P routing table by the P2P algorithm; Use a resource identification number to go to inquire about the P2P routing table as keyword on any P2P node, will obtain consistent result: certain specific P2P node keeps this resource.
P2PSIP is based on the distributed SIP agreement of P2P, the P2PSIP equity is super P2P node, the P2PSIP client does not have routing table, but the P2PSIP client can obtain the identifier of a resource by a hash algorithm, sends route requests to the P2PSIP equity then.
A kind of virtual overlay tree based on P2PS IP, subscription tree and medium are broadcast the method for tree, comprising:
A1) according to the distribution situation of video user in the Internet, set up the video overlay tree, each node of tree is that a P2PSIP covers, father node covers to be responsible for duplicating medium to its child node covering, root node covers and is called the control covering, is responsible for cluster conversation control, and leaf node covers to be called and inserts covering, be responsible for duplicating medium to the terminal use, other minor matters points cover to be called to distribute and cover;
B1) each being inserted covering installs and the proportional P2PSIP media site of number of users nearby, the P2PSIP media site is a media gateway of supporting the P2PSIP equity, distributing covering is the merging that its all child nodes cover, and does not need other media site, thereby is virtual covering;
C1) under same father node, general child node covers the zone corresponding to certain user density, be the covering that defaults but often need to set a child node, the user who covers to every other loose zone under same father node that defaults directly provides service, thereby the covering that defaults is that an access covers;
D1) overlay tree can be that single P2PSIP covers at first, and overlay tree is divided into multi-level overlay tree gradually according to the growth of number of users and regional user density, and video operator can the member system form guarantee stable user base;
E1) after each video frequency program covers authentication approval through control, PUBLISH broadcasts to overlay tree by sip message, insert covering video frequency program is installed in certain P2PSIP media site (being called the program carrier) as the P2P resource, video frequency program inserts evenly to divide in the covering at each and is loaded on each media site as a result;
F1) medium are subscribed to tree watches same video frequency program jointly with the optimum way connection user, the user subscribes to start and subscribes to tree achievement process, and contributing covers to inserting from the leaf terminal use, arrives the upper strata virtual assigned again and covers, arrive top layer control at last and cover, the root of subscribing to tree is called the control website;
When g1) program is prepared to play, control covers notice and subscribes to tree, program was watched in call request after the user was notified, and customer call is connected to form medium and broadcasts tree, and Media Stream will be broadcast the tree tree root from medium and transmit or copy to the access covering step by step again to the terminal use;
H1) because the upper strata covering is virtual covering, some intermediate node from medium broadcasting tree tree root to leaf may belong to same media site, thereby the series between these dummy nodes is duplicated and is transmitted in logic, can be optimized for copy-once and forwarding in realization.
Further comprise after the described steps d 1:
A2) covering level differentiation: default that to cover contained user too many so that when beginning to waste backbone bandwidth when, this defaults to cover and is considered to overload, should be broken up, at this moment calculate the zone of user density maximum, set up an access covering arranged side by side and go to serve this zone, it is the original brotgher of node that defaults and cover that this new access covers, original default to cover continue as defaulting coverings, but the scope of serving is little;
B2) cover vertically differentiation: non-ly default that to cover contained user too many so that when beginning to waste backbone bandwidth, this covering is considered to overload, should be broken up when one; At this moment set up a new virtual covering and inherit father's contact of the covering of overload, then the subcovering of this virtual covering is reduced in the covering of overload, and be set at the covering that defaults, again according to a2) this new defaulting is covered carry out the level differentiation;
Further comprise after the described step f1, g1 and h1:
A 3) user is the P2PSIP client, the user uses sip message SUBSCRIBE to go subscription programs, program shows as SIP URI in SUBSCRIBE message Request Header, this message is delivered to the P2PSIP media site (be called and insert website) of being responsible for this P2PSIP client;
B3) insert website by P2P routing inquiry program carrier, transmit SUBSCRIBE message then to this program carrier, postpone for reducing, inserting website can entrust the program carrier to duplicate or transmit Media Stream directly to the terminal use at first, but when number of users overload program carrier, the program carrier can be returned the access website to the task of directly duplicating or being transmitted to the terminal use;
C3) after the program carrier was received SUBSCRIBE, the inquiry father node covered whether the program carrier is arranged, if do not have, set the program carrier that oneself covers for father node, was installed in father node as the P2P resource then and covered; If have, transmit SUBSCRIBE to father node program carrier;
D3) repeat b3) and c3) process receive SUBSCRIBE up to control station; The control website may be transmitted SUBSCRIBE to program provider, or notifies this group subscription by other modes;
E3) each media site is received SUBSCRIBE, if this program is not subscribed to tree, sets up this tree, then the media site that sends this SUBSCRIBE or P2PSIP client increase to one this subscribe in the tree child node of oneself;
F3) in a single day program provider is ready to program, notice control website, and the control website is to the subscription tree broadcast NOTIFY of this program, and program shows as SIP URI in NOTIFY Request Header;
G3) after the user receives NOTIFY, if program is watched in decision, the user inserts website transmission INVITE call request to subscribing to tree, and program shows as SIP URI in INVITE Request and To Header, and INVITE is subscribing to the tree forwarded upstream until the control website;
H3) the control website uses UA pattern back-to-back, the control station point gathers the all-calls request and sends single I NVITE to program provider, control website and program provider set up calls out, and control website and each user set up calling, and user's calling is connected to form medium and broadcasts tree;
I3) behind the call setup, program provider broadcasts tree to medium and sends program media stream, and program media stream is broadcast the descending forwarding of tree or duplicated to each user along medium;
J3) the control website control of carry out chargeing, control website may be because of the not enough session connections that stop unique user of expense, thereby medium are broadcast to set and stopped to duplicate and transmit Media Stream to this user.
Described step b3) further comprise afterwards:
A4) the program carrier in insert covering can use back-to-back the UA pattern to control and duplicate and transmit overload;
B4) when certain program duplicate and transmit overload program carrier, the program carrier uses sip message NOTIFY notice all media site in same access covers;
C4) the program carrier uses sip message REINVITE to go to revise and the session of watching the user of program;
D4) when the access website is accepted INVITE and REINVITE, if the not overload of program carrier inserts the information that website transmits SDP between program carrier and the user, so that the program carrier directly duplicates or transmit Media Stream to the terminal use;
E4) if the overload of program carrier inserts the information that website is revised SDP between program carrier and the user, insert website to this, insert website and duplicate or transmit Media Stream again to the terminal use so that the program carrier duplicates or transmit medium;
The present invention has following technique effect:
1, by using the virtual covering of invention and the covering that defaults, saves a large amount of unnecessary backbone network super nodes;
2, invent the covering that defaults, the differentiation of covering level and cover vertical differentiation by using, give operator's investment on the saving infrastructure before service is provided;
3, by using the multi-level virtual assigned of invention to cover, reduce waste greatly to backbone bandwidth;
4,, reduced the time-delay during video is transmitted and duplicated significantly by using virtual covering and inserting the optimization that covers calling control.
Description of drawings
Fig. 1 is based on the virtual overlay tree schematic diagram of the level of P2PSIP among the present invention;
Fig. 2 is for utilizing the optimization overlay tree schematic diagram of covering to the overlay tree among Fig. 1 that default among the present invention: substituted 6 regional accesses with 2 coverings that default and covered;
Demonstrated video net of Fig. 3 to Fig. 5 increases the process of upgrading because of the user;
The production process of tree is announced and subscribed to Fig. 6 and Fig. 7 program of having demonstrated;
Fig. 8 to Figure 10 medium of having demonstrated are broadcast the production process of tree;
The escalation process of video net
Below in conjunction with Fig. 3 to Fig. 5 the video net because of increasing the process of upgrading, the user is elaborated.
As shown in Figure 3, Beijing insert to cover overload, wherein with the Dongcheng District for the closeest.Because this is a non-covering that defaults, and need vertically break up.
As shown in Figure 4, set up a new virtual covering (covering is distributed in Beijing) and inherit the father's contact (control covers) that inserts covering in Beijing, Beijing access is covered reduce to the subcovering that Beijing distribution covers then, and be set at the covering that defaults.Now problem is converted into this new defaulting and covers overload, so the following executive level of wanting breaks up.
As shown in Figure 5, the user density maximum of Dongcheng District, set up an access arranged side by side and cover the user that (Dongcheng District is inserted and covered) goes to serve the Dongcheng District, the Dongcheng District is inserted and covered is the original brotgher of node that defaults and cover, original defaulting covers continuation as defaulting covering, but the scope of service is little, no longer is whole Beijing;
Medium are broadcast the achievement process
Below in conjunction with Fig. 6 to Figure 10 production process and the program of subscribing to tree are announced that the overall process that the user subscribes to the medium broadcasting is elaborated.
Overlay tree
As shown in Figure 6, overlay tree is made up of following covering.
Dongcheng insert to cover: three media site: A23, B23 and C23; U231, U232 and U233 are the P2PSIP client users of this covering, and by the P2PSIP agreement, U231 distributes to B23, and U232 distributes to A23, and U233 distributes to C23.
The west city insert to cover: three media site: A22, B22 and C22; U221, U222 and U223 are the P2PSIP client users of this covering, and by the P2PSIP agreement, U221 distributes to B22, and U222 distributes to A22, and U223 distributes to C22.
Beijing covering that defaults: three media site: A21, B21 and C21; U211 and U212 are the P2PSIP client users of this covering, and by the P2PSIP agreement, U211 distributes to B21, and U212 distributes to C21.
Covering defaults: three media site: A1, B1 and C1; U11, U12, U13 and U14 are the P2PSIP client users of this covering, and by the P2PSIP agreement, U11 distributes to B1, and U12 distributes to A1, and U13 distributes to C1, and U14 distributes to C1.
Covering is distributed in Beijing: this is three and inserts the merging that covers (covering that Dongcheng is inserted and covered, the west city access covers and Beijing defaults), so it comprises following media site: A21, B21, C21, A22, B22, C22, A23, B23 and C23.
Control covers: this is two coverings merging of (covering and the covering that defaults are distributed in Beijing), so it comprises following media site: A1, B1, C1, A21, B21, C21, A22, B22, C22, A23, B23 and C23.
Location program process
As shown in Figure 6, (its URI form can be expressed as video frequency program " the excellent seat of telling over the radio of network prestige P2P "
Lorentp2pcast@lorentnetworks.com) through behind the control covering authentication approval, PUBLISH broadcasts to overlay tree by sip message, each inserts to cover video frequency program is installed in certain P2PSIP media site (being the program carrier) as the P2P resource, all red media site are program carriers among Fig. 6, that is: A1 is the program carrier that defaults and cover, A21 is the program carrier that Beijing defaults and covers, and A22 is that the program carrier that covers is inserted in the west city, and A23 is that the program carrier that covers is inserted in Dongcheng.
User's subscription procedure
As shown in Figure 7, the user sends SUBSCRIBE message successively according to the order of label 1 to 10 and inserts website to each.
1, user U221 uses sip message SUBSCRIBE to go subscription programs, and program " the excellent seat of telling over the radio of network prestige P2P " shows as SIP URI sip in SUBSCRIBE message Request Header:
Lorentp2pcast@lorentnetworks.comThis message is delivered to and is inserted website B22; Insert website B22 and obtain program carrier A 22, transmit SUBSCRIBE message then to A22 by the P2P routing inquiry; After program carrier A 22 was received SUBSCRIBE, the inquiry father node covered (covering is distributed in Beijing), finds not have the program carrier, distributed the program carrier that covers so set A22 oneself for Beijing, was installed in Beijing distribution as the P2P resource then and covered; Inquiry control covers again, finds not have the program carrier, so set the program carrier that A22 oneself covers for control, is installed in control as the P2P resource then and covers; Control covers again to network prestige network technology company of program provider subscription programs " the excellent seat of telling over the radio of network prestige P2P ".
2, user U231 sends SUBSCRIBE to inserting website B23; Insert website B23 and obtain program carrier A 23, transmit SUBSCRIBE message then to A23 by the P2P routing inquiry; After program carrier A 23 was received SUBSCRIBE, the inquiry father node covered (covering is distributed in Beijing), found existing program carrier A 22, gave A22 so transmit SUBSCRIBE message; A22 is in subscribing to tree, so need not continue to transmit SUBSCRIBE;
3, user U13 sends SUBSCRIBE to inserting website C1, inserts website C1 and obtains program carrier A 1 by the P2P routing inquiry, transmits SUBSCRIBE message then to A1; After program carrier A 1 was received SUBSCRIBE, the inquiry father node covered (control covers), found existing program carrier A 22, gave A22 so transmit SUBSCRIBE message;
4, user U211 sends SUBSCRIBE to inserting website B21; Insert website B21 and obtain program carrier A 21, transmit SUBSCRIBE message then to A21 by the P2P routing inquiry; After program carrier A 21 was received SUBSCRIBE, the inquiry father node covered (covering is distributed in Beijing), found existing program carrier A 22, gave A22 so transmit SUBSCRIBE message; A22 is in subscribing to tree, so need not continue to transmit SUBSCRIBE;
5, user U223 sends SUBSCRIBE to inserting website C22; Insert website C22 and obtain program carrier A 22, transmit SUBSCRIBE message then to A22 by the P2P routing inquiry; A22 is in subscribing to tree, so need not continue to transmit SUBSCRIBE;
6, user U232 sends SUBSCRIBE to inserting website A23, and A23 is the program carrier, in subscribing to tree, so need not continue to transmit SUBSCRIBE;
7, user U233 sends SUBSCRIBE to inserting website C23; Insert website C23 and obtain program carrier A 23, transmit SUBSCRIBE message then to A23 by the P2P routing inquiry; A23 is in subscribing to tree, so need not continue to transmit SUBSCRIBE;
8, user U11 sends SUBSCRIBE to inserting website B1; Insert website B1 and obtain program carrier A 1, transmit SUBSCRIBE message then to A1 by the P2P routing inquiry; A1 is in subscribing to tree, so need not continue to transmit SUBSCRIBE;
9, user U14 sends SUBSCRIBE to inserting website C1, and C1 is in subscribing to tree, so need not continue to transmit SUBSCRIBE;
10, user U12 sends SUBSCRIBE to inserting website A1, and A1 is the program carrier, in subscribing to tree, so need not continue to transmit SUBSCRIBE;
Like this, one is program
Lorentp2pcast@lorentnetworks.comThe subscription tree of service forms, as shown in Figure 7.
Program carrier overload condition
As shown in Figure 8, in the covering that defaults, A1 finds to have many consumers and think that oneself may overload, so send NOTIFY to B1 and C1, tells program
Lorentp2pcast@lorentnetworks.comOverload in this covers.
Insert in the covering in Dongcheng, A22 finds that he bears the program carrier that father's contact covers, and need duplicate and transmit medium and insert the covering and the covering that defaults to other, so send NOTIFY to B22 and C22, tells program
Lorentp2pcast@ Lorentnetworks.comOverload in this covers.
Medium are broadcast tree achievement process
As shown in Figure 8, when program provider broadcasts sip message NOTIFY to subscribing to tree, notify program
Lorentp2pcast@lorentnetworks.comBe ready to, the user begins call request and watches program.This section is an example with U221, U231, U13 and U211, and the demonstration user is to subscribing to the calling procedure that tree sends.
1, U221 sends the INVITE call request to inserting website B22, B22 learns 22 overload of program carrier A, with IP address of oneself and the SDP among the port replacing INVITE, transmits INVITE again and gives A22, later like this medium will be duplicated to B22 by A22, and B22 duplicates to U221 again; Distribute the program carrier that covers and control covering because A22 also is father node Beijing, need not transmit INVITE again, A22 and U221 set up session connection;
2, U231 sends the INVITE call request to inserting website B23, and B23 learns not overload of program carrier A 21, does not revise the SDP among the INVITE and transmits INVITE and give A23, and later like this medium will directly be duplicated to U231 by A23; A23 transmits INVITE to the A22 in the distribution covering of Beijing, because A22 also is the program carrier that father node control covers, need not transmit INVITE again, and A22 and U231 set up session connection;
3, U13 sends the INVITE call request to inserting website C1, and C1 learns 1 overload of program carrier A, with IP address of oneself and the SDP among the port replacing INVITE, transmits INVITE again and gives A1, and later like this medium will be duplicated to C1 by A1, and C1 duplicates to U13 again; A1 transmits INVITE to the A22 in the father node control covering, and A22 and U13 set up session connection;
4, U211 sends the INVITE call request to inserting website B21, and B21 learns not overload of program carrier A 21, does not revise the SDP among the INVITE and transmits INVITE and give A21, and later like this medium will directly be duplicated to U211 by A21; A21 transmits INVITE to the A22 in the distribution covering of Beijing, because A22 also is the program carrier that father node control covers, need not transmit INVITE again, and A22 and U211 set up session connection;
Like this, control website A22 and each user set up calling; On the other hand, control website A22 gathers the all-calls request and sends single INVITE to program provider, and control website A22 and program provider set up calls out.
Fig. 8 is that the medium that produce on the basis of the subscription tree in Fig. 7 are broadcast tree, and Fig. 9 is that the medium that remove cover framework are broadcast the tree logical schematic.
Because the A22 that cover in control, covering is distributed in Beijing and Dongcheng is inserted in covering belongs to same media site, thereby the series between these dummy nodes A22 is duplicated and is transmitted in logic, can be optimized for copy-once and forwarding in realization, like this, we obtain entity node of all A22 simmer down tos the medium broadcasting tree among Figure 10.