Summary of the invention
In order to address the above problem; The invention provides a kind of mediaphone P2P Streaming Media broadcasting method and system; For the stream media value added business realization towards the multimedia visual telephone terminal provides real feasible technical scheme; On the basis of limited investment, can reach application requirements, and obtain comprehensive preferably P2P broadcast behavior.
The main technical schemes that the present invention adopted is:
A kind of mediaphone P2P Streaming Media broadcasting method; Its core is the main broadcast route of setting up from a source of media to some multimedia telephone terminals of application layer multicast tree conduct; Said source of media is the root node of said multicast tree; Part or all of tree node in the said multicast tree is the hypertree node; Said hypertree node is formed partnership with one or more nodes identical with its Intranet; Each node in the said partnership adopts the P2P mode to communicate by letter; The preferential partnership that adds the hypertree node identical of the multimedia telephone terminal of request streaming media service with its Intranet; Or be that the hypertree node makes up new partnership preferentially with the tree node identical with its Intranet; When not existing can be with the tree node of its composition partnership the time, adding said multicast tree again becomes the tree node in the multicast tree.
Each tree node in the said multicast tree periodically sends heartbeat packet to its father node and child node; Each partner periodically sends heartbeat packet to other partners; In proper working order in order to this node or partner to be described, the information that said heartbeat packet is carried comprises telephone number, fuselage ID, program ID, program mandate string, data slice bitmap and bandwidth.
Except that the method for setting up multicast tree; Also comprise the node method of adjustment that said multicast tree is optimized adjustment in the said mediaphone P2P Streaming Media broadcasting method; Include node method of adjustment in tree node method of adjustment and/or the tree, saidly go into the tree node method of adjustment and be:
When the in-tree request is forwarded direct child node to said Streaming Media push server; If the bandwidth performance of said multimedia telephone terminal is better than this child node; Then said multimedia telephone terminal substitutes this child node; Take over its node task, this child node is asked in-tree again or is become the child node of said multimedia telephone terminal;
When the in-tree request is forwarded to certain child node of being chosen by father node; If the bandwidth performance of said multimedia telephone terminal is better than this child node; Then said multimedia telephone terminal substitutes this child node; Take over its node task, this child node is asked in-tree again or is become the child node of said multimedia telephone terminal;
The node method of adjustment is in the said tree:
When the partner of each tree node in the said multicast tree or hypertree node detects or determines the bigger variation of bandwidth; Give its father node with its bandwidth performance data notification or as partner's hypertree node through heartbeat packet; The tree node that receives heartbeat packet obtains its each child node or partner's bandwidth performance data, by formula B
n=α B
N-1Segment value during each child node of+β B statistics or partner's bandwidth; Segment value surpasses this tree node certain value when the bandwidth of its certain node; Perhaps segment value surpasses this tree node certain value during its certain partner's bandwidth; Then consult this node of exchange and its child node, perhaps this tree node and the position of its partner in said multicast tree.
In the above-mentioned formula, B
nSegment value when receiving the bandwidth of n heartbeat, B is the child node from n heartbeat packet, got or partner's bandwidth value, α, β are respectively weight coefficient.
The packet that said multimedia telephone terminal adopts the said multimedia telephone terminal of L2 cache mechanism storage to receive from other tree nodes or partner; The packet of storing in the level cache is unordered; Be used for multimedia telephone terminal and carry out exchanges data with other tree nodes or partner; Said level cache adopts the LRU replacement policy; The minimum packet of access times in the replacement set time; The packet of storing in the said L2 cache is orderly; Be mainly used in local media play, said L2 cache adopts the data turnover mode of first in first out according to the sequential of Streaming Media.
The present invention also provides a multimedia phone based on the above method of P2P streaming media broadcasting P2P streaming multimedia phone broadcasting system for the realization of value-added services such as multimedia broadcasting hardware support and provide the appropriate supporting software, the system comprising: a plurality of multimedia phones terminal for receiving multimedia program, create a media source from a number of multimedia telephone terminals to the application layer multicast tree path as the primary broadcast, the media source is the root node of the multicast tree, the multicast tree, some or all of the tree node as a super tree node, the super-tree nodes with the same network with one or more nodes to form a partnership, a partnership of the nodes communicate using P2P mode, as described in the multimedia telephone terminals multicast tree in a tree node or a partnership in a non-root tree node partners; streaming media push server, as a media source, provided the original streaming media data, maintenance and management of broadcasting path; broadcast media programs ranked servers, attributes for classification according to the telephone user, comprehensive customer airtime each media, audience requirements, generate various multimedia telephone terminals broadcast media row table, and in the communications business exchange server with the assistance distributed to the implementation of the multimedia telephone terminals ; and traffic exchange server, the main push server supporting streaming media and broadcast media program scheduling server for authentication of multimedia telephone terminals and positioning.
Wherein, Said multimedia telephone terminal is provided with the stream media P 2 P broadcasting assembly that matches with above-mentioned mediaphone P2P Streaming Media broadcasting method; Belong to terminal software; Comprise four module: (1) node administration module; Be used for controlling said multimedia telephone terminal and send heartbeat message to connected other nodes of broadcast route; And receive the heartbeat message of other nodes; The view that dynamically concerns node in the maintenance system; Understand the bandwidth ability that respectively concerns node, be optimized adjustment when needing and consult; (2) partner's administration module; Be used for sending heartbeat message to the partner of its place partnership; Receive other partners' heartbeat message; The view of partnership in the maintenance system dynamically, the cooperation relation in establishing partnership, and in time safeguard and the partner between local data buffering situation; Carry out information interaction; For data buffering/administration module provides the link support, understand each partner's bandwidth ability, be optimized adjustment when needing and consult; (3) data buffering/administration module, be used for according to the audio-video interface module and with tree node/partner's interactive information, dynamically carry out exchanges data, and safeguard local data buffering situation with tree node/partner; (4) audio-video interface module is used for obtaining media data from said data buffering/administration module, and through integrated media renderer plays.
Beneficial effect of the present invention:
The present invention comes the identification of multimedia radio phone terminal with telephone number, has solved the terminal authentication problem, for realizing towards a large amount of multimedia visual telephone terminals the multi-media broadcasting service technical support that provides the foundation being provided; Through adopting the Radio Broadcasting Agreements of innovation; When the terminal adds broadcast route; The preferential partnership that adds the hypertree node identical with its Intranet; Or be that the hypertree node makes up new partnership preferentially with the tree node identical with its Intranet; When not existing can be with the tree node of its composition partnership the time, adding said multicast tree again becomes the tree node in the multicast tree.Because between the partner is dynamic peer-to-peer, through the location of the intelligence in the in-tree process, can make full use of the technical advantage that the P2P communication between partner terminal connects, improve whole broadcasting efficiency; Designed the Performance tuning method and the process of multicast tree, made the good more terminal of performance,, improved the overall performance of network router efficiency and broadcast route, alleviated backbone network pressure so that the more data-transformation facility of high-quality to be provided the closer to data source of stream media; On radio phone terminal, adopt the L2 cache technology, the data buffering is carried out high-efficiency management, improved the data distribution performance.
Embodiment
The invention provides a kind of mediaphone P2P Streaming Media broadcasting method; Be a kind of based on fixing multimedia visual telephone terminal; Realize the protocol procedures of P2P Streaming Media broadcasting, its core is how to produce and safeguard that one is the application layer P2P Streaming Media multicast tree of root node with the source of media.
The protocol core that generates said multicast tree is: the application layer multicast tree of foundation from a source of media to some multimedia telephone terminals is as main broadcast route (referring to Fig. 1); Said source of media is the root node of said multicast tree; Part or all of tree node in the said multicast tree is the hypertree node; Said hypertree node is formed partnership with one or more nodes identical with its Intranet; Each node in the said partnership adopts the P2P mode to communicate by letter; The preferential partnership that adds the hypertree node identical of the multimedia telephone terminal of request streaming media service with its Intranet; Or be that the hypertree node makes up new partnership preferentially with the tree node identical with its Intranet; When not existing can be with the tree node of its composition partnership the time, adding said multicast tree again becomes the tree node in the multicast tree.Because partnership is made up of with the one or more nodes identical with its Intranet the hypertree node; And be between the partner dynamic peer-to-peer (depending on the communication service swap server sets up); Promptly there is not fixing set membership; Make up new partnership through preferential with the hypertree node identical with its Intranet; Can make adjacent terminals that streaming media service preferentially is provided each other, fully improve the router efficiency of broadcast route.
The process of setting up of multicast tree is made up of the process that each requesting node adds multicast tree, and the multimedia telephone terminal of described request streaming media service is as requesting node, and the process that adds multicast tree is:
(1) said multimedia telephone terminal with its telephone number as its terminal iidentification; Send the services request bag to the Streaming Media push server, can comprise the content of telephone number, fuselage ID, program ID, authentication information, the whole type of net and upstream and downstream bandwidth and so in the request package;
(2) said Streaming Media push server is transmitted said services request bag to the communication service swap server; Said communication service swap server carries out debarkation authentication to said multimedia telephone terminal, and (outer net IP is identical with partner's inquiry; Intranet IP can make up partnership with the identical terminal of the interior network segment that mask is confirmed); If said multimedia terminal is through login authentication; Terminating communication then; Through then carrying out partner's inquiry; And return to the buddy information bag that one of said Streaming Media push server contains authentication result and buddy information field; Its information content can comprise telephone number; Fuselage ID; Program ID; Authentication result; Buddy information (intranet and extranet IP; Telephone number; Fuselage ID) tabulation; The telephone number information that comprises the partner in the buddy information bag; Also can just comprise partner's telephone number information in the buddy information bag that return for after only inquiring buddy information;
(3) said Streaming Media push server is returned the services request permission bag that contains program mandate string and buddy information to the said multimedia telephone terminal through authentication, wherein can comprise telephone number, fuselage ID, program ID, program mandate string, buddy information (intranet and extranet IP, telephone number, fuselage ID) tabulation;
(4) said multimedia telephone terminal is received services request permission bag; Therefrom take out the buddy information tabulation; If there is not buddy information; Then to said root node request in-tree; And become a tree node of said multicast tree; If buddy information is arranged; Then send the program inquiry bag that contains program mandate string to the partner; Wherein can comprise telephone number; Fuselage ID; Program ID and program mandate string; Inquire that whether it has added multicast tree and whether enough resources are arranged is that said multimedia telephone terminal provides streaming media service; If then identify said multimedia telephone terminal for adding multicast tree; Otherwise, and become a tree node of multicast tree to said root node request in-tree.This step has realized the preferential partnership that adds the hypertree node identical with its Intranet of requesting node, or is that the hypertree node makes up new partnership with the tree node identical with its Intranet preferentially.
Said multimedia telephone terminal to said root node request in-tree and the process that becomes a tree node of said multicast tree is: said multimedia telephone terminal sends the in-tree request package to said Streaming Media push server; Said Streaming Media push server is received the in-tree request package; If enough resources are arranged; Then directly streaming media service is provided to said multimedia telephone terminal; Make said multimedia telephone terminal become an one of which direct child node thus; Otherwise said Streaming Media push server is transmitted to the in-tree request package its a direct child node; If this child node has the partner; Preferentially said in-tree request is transmitted to its partner that enough resources are arranged; Otherwise judging that by this child node whether enough resources oneself are arranged is that said multimedia telephone terminal provides streaming media service, is to be that said multimedia telephone terminal provides streaming media service by this direct child node then; When said direct child node and its partner's resource situation did not all allow streaming media service is provided, other direct child nodes that the request of said multimedia telephone terminal is redirected to said Streaming Media push server carried out the said process of a new round or are transmitted to its direct child node by this direct child node carrying out the said process on next stage child node level.
In above-mentioned in-tree process, judge that whether a node or partner have enough resources is that requesting node provides the foundation of service to be: whether this node has needed nearest data slice and enough up broadbands, if having, then is judged as enough resources.
More than; Promptly accomplished the complete in-tree process of requesting node; Made up multicast tree gradually through this in-tree process; Each tree node in the said multicast tree periodically sends heartbeat packet to its father node and child node; Each partner periodically sends heartbeat packet to other partners; In proper working order in order to this node or partner to be described, the information that said heartbeat packet is carried preferably comprises telephone number, fuselage ID, program ID, program mandate string, data slice bitmap and bandwidth.Each tree node is being safeguarded the father node of oneself and the information of direct child node in the multicast tree, comprises the IP/ port/upstream bandwidth of father node, the IP/ port/downlink bandwidth of child node.
Said multimedia telephone terminal sends triggerings such as the streaming media service request can be broadcast by user's program request, timing row, long-range current play command, has to comprise: (1) user operates on said multimedia telephone terminal, order video; (2) user broadcasts the current streaming media service application order that server is distributed to said multimedia telephone terminal from row and selects; (3) user broadcasts media program row that server is distributed to said multimedia telephone terminal from row and broadcasts the table and customize, and applies for the streaming media playing service according to the customization plan on time.
Because each tree node or partner's performance is different in the multicast tree; Therefore the performance of each section transmission path possibly exist than big-difference in the multicast tree; For the overall performance that makes broadcast route more excellent; The present invention also provides the node method of adjustment that is optimized adjustment to said multicast tree, includes node method of adjustment in tree node method of adjustment and/or the tree.
Saidly go into the tree node method of adjustment and be:
When the in-tree request is forwarded direct child node to said Streaming Media push server; If the bandwidth performance of said multimedia telephone terminal is better than this child node; Then said multimedia telephone terminal substitutes this child node; Take over its node task, this child node is asked in-tree again or is become the child node of said multimedia telephone terminal.
When the in-tree request is forwarded to certain child node of being chosen by father node; If the bandwidth performance of said multimedia telephone terminal is better than this child node; Then said multimedia telephone terminal substitutes this child node; Take over its node task, this child node is asked in-tree again or is become the child node of said multimedia telephone terminal.
It is two kinds of different adjustment modes that said child node is asked in-tree and the child node that becomes said multimedia telephone terminal again; Adopt atomic node to become the adjustment mode of the child node of said multimedia telephone terminal generally speaking, in the time can not taking this mode, adopt again the mode of in-tree.
The node method of adjustment is in the said tree:
When the partner of each tree node in the said multicast tree or hypertree node detects or determines the bigger variation of bandwidth; Give its father node with its bandwidth performance data notification or as partner's hypertree node partner through heartbeat packet; The tree node that receives heartbeat packet obtains its each child node or partner's bandwidth performance data, by formula B
n=α B
N-1Segment value during each child node of+β B statistics or partner's bandwidth; Segment value surpasses this tree node certain value when the bandwidth of its certain node; Perhaps segment value surpasses this tree node certain value during its certain partner's bandwidth; Then consult this tree node of exchange and its child node; Perhaps this tree node and the position of its partner in said multicast tree; More excellent ground, when bandwidth segment value surpass this node 20% the time, switch.
In the above-mentioned formula; Bn is a segment value when receiving the bandwidth of n heartbeat; B is the child node from n heartbeat packet, got or partner's bandwidth value; α, β are respectively weight coefficient; Said weight coefficient passes through computation optimization or rule of thumb data acquisition according to network condition, and is smooth to guarantee transfer of data as much as possible.Usually, can be preferably alpha+beta=1, more preferably, get α=0.9, β=0.1.
Usually; Multimedia telephone terminal is multitask; When A task and Streaming Media broadcasting task is concurrent; If current Streaming Media broadcasting task priority (for example: report the typhoon emergency notice with the mode of Streaming Media broadcasting is higher than the A task; Task priority is very high), Streaming Media broadcasting priority of task has bandwidth and cpu resource; If current Streaming Media broadcasting task priority is lower than A task (for example: when Streaming Media was broadcasted, the user dialed video call), and can predict bandwidth and cpu resource deficiency, multicast tree will be normally left at the terminal this moment.In addition, the terminal also maybe the improper multicast tree that leaves.No matter which kind of mode node is is withdrawed from, and all can have influence on the P2P network and connect.Therefore, we need carry out the node failure recovery after node withdraws from.In native system; Each node is except preserving father node and partner's information; Also preserve the information of the subsequent use father node of oneself simultaneously; Said terminal is after adding multicast tree; To the subsequent use father node of root node application; And the IP address and the port numbers of the subsequent use father node of reservation root node feedback,, father node can replace father node with subsequent use father node easily when leaving.
Said multimedia telephone terminal can adopt normally and leave multicast tree from tree or the improper mode that leaves tree.Preferred a kind ofly normally be: when tree node normally leaves multicast tree from the tree mode; Upwards send and withdraw from message to server; Notify its father node to regain resource; Downwards; Also withdraw from message, and notify its direct child node or partner to recover again to connect to all direct child nodes and/or partner's transmission.
Said improper mode from tree is preferably: each tree node periodically sends heartbeat packet to its father node and presumable direct child node and partner; Illustrate own in proper working order; If certain father node is not received the normal message of its direct child node in some cycles (like 3 heart beat cycles); Think that then its direct child node is own through the improper multicast tree that leaves; This father node will reclaim the resource of this child node of service; If the normal message of hypertree node that certain node or partner do not receive its father node or establish partnership with it in some cycles (like 3 heart beat cycles); The hypertree node of then thinking its father node or establishing partnership with it is own through the improper multicast tree that leaves, and this child node or partner recover to connect again.
Said child node can adopt following any mode to recover again to connect: (1) said child node is applied for in-tree again; (2) said child node is taken out the IP address and the port numbers of its subsequent use father node; Request connects with it becomes its child node; After said subsequent use father node is received this request; Judge whether that enough resources can provide service, if, the work of then taking over former father node; For this child node provides service; This child node is applied for subsequent use father node once more, if not, this child node is applied for in-tree again; Said terminal to the subsequent use father node of root node application, and keeps the IP address and the port numbers of the subsequent use father node of root node feedback after adding multicast tree;
Said partner can adopt following any mode to recover again to connect: (1) said partner applies for in-tree again; (2) select the wherein best alternative former hypertree node of partner of resource situation between each partner in the former partnership through consultation, when the partner in the former partnership had only one, this partner directly substituted former hypertree node.
Owing to have the node in-tree at any time and leave tree; And multicast tree itself is also dynamically adjusted; The partner of tree node in the multicast tree or hypertree node usually changes; The transmission direction of data is unfixing between the partner; Carry out exchanges data according to separately data in buffer situation between the partner, thus need know each other between the partner data cached content.Media data flow can be divided into the segment of identical size, and whether segment exists in buffer area can be used a buffer memory Mapping B M (buffer map) to represent.Understand mutual caching situation through continuous exchange BM between the partner.In concrete the realization; Each segment comprises 1 second data; (Sliding window) represents BM with a sliding window; Size is 120 segments; 120 bits among the just in time corresponding BM; Each bit represents a data pieces disconnected, and the value of bit is that 1 expression has this segment, and 0 expression does not have this fragment.
The dispatching method of data is bigger to the message transmission rate influence; The invention also discloses a kind of new data dispatch algorithm data dispatching between the partner of each tree node or hypertree node, the combination of one or more in the following rule of said data dispatch algorithm use:
(1) sends and reception announcement bag [telephone number through timing (as 2 seconds) between each partner in the partnership of same hypertree node; Fuselage ID; Program ID; Program mandate string; The data slice bitmap; Up remaining bandwidth] regularly obtain and preserve partner's upstream and downstream bandwidth and stream medium data sheet information; Exchange transport stream media data sheet between the partner each other; When the optimum partner of the bandwidth of finding to have the sheet that Updates Information; Select this partner and carry out the pulling process of stream medium data sheet to it; This step is set up gradually and is enlarged super node, circulates a notice of each other between the partner and the propagation stream medium data.
(2) stipulate effective time (Deadline was as 30 seconds) of each packet, promptly each packet must arrive other nodes in effective time after source node produces, otherwise be considered as invalid.Before partner or father node obtain certain packet; The necessity whether node decides said packet to obtain in addition according to the timestamp of current time, said packet and necessary network delay; If said packet surpasses said effective time from producing to the scheduled time that arrives this node, then abandon obtaining said packet.
(3) rare high priority data strategy: in system; If the supplier of certain data slot is few more; The just more difficult requirement of satisfying reproduction time Deadline; Therefore; System is in each data dispatch cycle; Suitably pay the utmost attention to and obtain the less data slot of supplier's number, as utilize weight coefficient to accomplish " suitably ".
When (4) supplier of data slot is a plurality of, can be under the prerequisite of the effective time that guarantees packet, bandwidth or the best supplier of network condition select in system.
(5) the buffered play window slides tactful: system defines a certain size broadcast window in advance; Interim in each data dispatch cycle; Node moves broadcast window according to current speed data stream, when also having the packet of not receiving in the broadcast window, with these data of override requests.
The packet that the said multimedia telephone terminal that relates in the above-mentioned various broadcasting methods of the present invention can preferably adopt the said multimedia telephone terminal of two-level cache mechanism storage to receive from other tree nodes or partner; As shown in Figure 2; Take non-order to receive packet according to scheduling strategy, be kept in the level cache.Level cache adopts LRU (least recently used) replacement policy, the minimum media block bag of access times in asking when replacing fixedly.Level cache is responsible for the transmission and the scheduling of packet in the whole system, is used for multimedia telephone terminal and carries out exchanges data with other tree nodes or partner, and orderly packet is saved in the L2 cache, mainly is responsible for offering local the broadcast.Said data can be introduced into level cache, get into L2 cache through the data turnover mode by the first in first out of Streaming Media sequential again.In each cycle; Tree node/partner can write Bmap (local data buffering situation) in the table; Having write down each fragment in the table in the local situation of preserving of this node, is exactly to pass through the situation of the transmission of this table with mutual perception the other side storage between the node.The purpose of scheduling is the BMap information according to tree node/partner, obtains media data from tree node/partner as soon as possible.Data buffering and management thereof are to realize one of key modules of the present invention, have improved the performance of data distributions.
The present invention also provides the mediaphone P2P Streaming Media broadcast system based on above-mentioned various P2P Streaming Media broadcasting methods, and its hardware components comprises a plurality of multimedia telephone terminals and Streaming Media push server.
Said multimedia telephone terminal is used to receive multimedia programming; The application layer multicast tree of foundation from a source of media to some multimedia telephone terminals is as main broadcast route; Said source of media is the root node of said multicast tree; Part or all of tree node in the said multicast tree is the hypertree node; Said hypertree node is formed partnership with one or more nodes identical with its Intranet; Each node in the said partnership adopts P2P mode to communicate by letter, and said each multimedia telephone terminal is tree node or the partner of a non-hypertree node in the partnership in the multicast tree.Said multimedia telephone terminal preferably adopts following hardware configuration: CPU:DM642; Flash memory: 2GB; (SuSE) Linux OS; Video encoding standard: ITU-H.264, audio coding standard: ITU-G.722/G.723.1, Streaming Media standard: Microsoft Streaming Media/MediaPlayer/Mpeg4; Telephony interface standard: FXS/FXO; Network interface: 10M/100M Ethernet, DHCP, fixing IP, video output: RCA or VGA.
Said Streaming Media push server as source of media, provides original stream medium data; The maintenance and management broadcast route, the preferred hardware configuration that adopts is: more than the CPU frequency 2GHz, internal memory 4GB; (SuSE) Linux OS, network interface 100M/1000M, hard disk 200GB.
In order to realize multimedia broadcasting, said system comprises that also media program row broadcasts server and communication service swap server, as ancillary hardware.Said media program row broadcasts server; Be used for attributive classification according to the telephone subscriber; Broadcast period, audient's requirement of comprehensive each media client; The medium row who generates each multimedia telephone terminal broadcasts table; And under the assistance of communication service swap server, be distributed to each said multimedia telephone terminal and carry out.
Said communication service swap server is the tie of whole multimedia visual telephone service, is mainly used in auxiliary flow media push server and media program row and broadcasts server multimedia telephone terminal is carried out authentication and location.In addition, can also look into the family information of taking, login authentication is carried out at the terminal from the foreground business support system; The timing heartbeat packet of receiving terminal is kept the intranet and extranet path of server and terminal room, and the communication and the business state information at the memory terminal of having jurisdiction over are communicated by letter and professional instant messages is inquired about for each service server and vast terminal provide; Press telephone number sign and locating terminal, analyze and the explanation telephone number, dynamically be mapped to the IP address,, realize the communications intermediary function of exchange for intranet and extranet IP/ port/mask information that the communication party provides the terminal; The transport service event information arrives business statistics/accounting server etc.
Except that above-mentioned hardware; Also be designed with corresponding software to provide support; Preferably on Streaming Media push server and multimedia telephone terminal, (SuSE) Linux OS is installed; On (SuSE) Linux OS; Stream media P 2 P broadcasting assembly with the above-mentioned protocol procedures of realization the present invention of C language development mainly comprises three parts: (1) node administration: the view of being responsible for other node of part in the maintenance system; (2) partner's management: the partnership of being responsible for foundation, maintenance and other node; (3) data dispatch: be responsible for dynamic and other node switching media data.The modular construction relation as shown in Figure 3.
Streaming Media push server end software is mainly accomplished two big functions, and the first is responsible for sending original stream medium data, and it two is to want maintenance and management tree node/buddy information.Be simplified design; Push away based on the BNBT technological development Streaming Media of increasing income and to broadcast server; Server-side system adopts a server software BNBT that increases income (RS BNBT Tracker V1.2) as the basis, and has increased media data buffering/administration module (this module is applied in the client software too).The software architecture that realizes Streaming Media push server of the present invention as shown in Figure 4.
The stream media P 2 P broadcasting assembly of realizing protocol procedures of the present invention on the said multimedia telephone terminal is the emphasis that system realizes; Terminal software comprises four module: (1) node administration module: send heartbeat message to said multimedia telephone terminal connected other nodes in broadcast route; And receive the heartbeat message of other node; The view that dynamically concerns node in the maintenance system; Understand the bandwidth ability that respectively concerns node, be optimized adjustment when needing and consult; (2) partner's administration module: be used for sending heartbeat message to the partner of its place partnership; Receive other partner's heartbeat message; The view of partnership in the maintenance system dynamically; Cooperation relation in establishing partnership; And BMap (local data buffering situation) between maintenance in time and the partner node; Carry out information interaction, for data buffering/administration module provides the link support.Understand each partner's bandwidth ability, be optimized adjustment when needing and consult; (3) data buffering/administration module: be used for according to the audio-video interface module and with tree node/partner's interactive information, dynamically carry out exchanges data, and safeguarding BMap (local data buffering situation) with tree node/partner; (4) audio-video interface module: from buffering/administration module, obtain media data, and through integrated media renderer plays.Realize terminal software framework of the present invention as shown in Figure 5.
The transmission direction of data is fixing between hypertree node and partner and the partner, carries out exchanges data according to data in buffer situation separately between the partner, thus node and partner need know each other data cached content.Media data flow can be divided into the segment of identical size, and whether segment exists in buffer area can be used a buffer memory Mapping B M (buffer map) to represent.Understand mutual caching situation through continuous exchange BM between the partner.In concrete the realization; Each segment comprises 1 second data; (Sliding window) represents BM with a sliding window; Size is 120 segments; 120 bits among the just in time corresponding BM; Each bit represents a data pieces disconnected, and the value of bit is that 1 expression has this segment, and 0 expression does not have this fragment.
The terminal is multimedia telephone terminal described in the literary composition, and all terminals can be called node; The hypertree node belongs to tree node; Its particularity is can form partnership with one or more nodes identical with its Intranet; Each node in the partnership adopts the P2P mode to communicate by letter; Claim the partner mutually, the partner (partner who does not promptly belong to the multicast tree tree node) who does not wherein participate in the multicast tree data flow directly can be described as the partner of non-hypertree node; Relation between the tree node is asymmetrical relation, distinguishes with father node and child node; The flow direction of multi-medium data between tree node can only be from the father node to the child node, and usually, a node has only a father node, and a father node can have a node, also a plurality of child nodes can be arranged.