Background technology
Streaming Media is a kind of widely popular IP network transmission technology, sequentially transmit in real time and play the continuous data stream of content of multimedia such as audio/video on the internet, stream media technology comprises fields such as stream medium data collection, audio/video encoding and decoding, storage, transmission, broadcast.
Traditional VOD system generally all is the pattern that adopts C/S to combine with B/S on transmission mode, wherein uses webpage issue film profile information with the B/S pattern, carries out the real time flow medium transfer of data with C/S model.When the user clicks program request appointment film, be redirected the streaming media server (supporting a kind of agreement among the HTTP/FTP/RTSP/MMS) that is connected to appointment by the flow equalization system.Each client only is connected with server, does not have transfer of data (referring to Fig. 1) each other.
The less relatively and traffic carrying capacity of number of users not situation under, the existing stream media service system of realizing based on the C/S framework is a kind of relatively simple for structure, network system easy to use and effective.But along with Streaming Media user's quick growth, under the situation that network environment becomes increasingly complex, the shortcoming of this system architecture and implementation pattern also manifests day by day:
1, because the transmission capacity of streaming media server is big, real-time and QOS require very high, and under certain hardware dropped into, the online concurrent program request number of being supported was limited.A general station server can only support about 300 people, and this hardware cost for the operator that has numerous online users is too high.Because it is be centralized single-point program request, also high especially for the bandwidth requirement of the hardware of vod server and network.Therefore, provide the streaming media server of service and bandwidth must follow number of users to increase and increase, this is for operator, huge investment beyond doubt.
2, concentrate the streaming media server group who is provided with all bring great pressure will for central machine room, network egress and backbone network, may produce performance bottleneck, cause QOS to descend.
3, the centralized VOD system of tradition causes Single Point of Faliure easily, and cause the user to put the sowing time picture stop and pause, even the program request failure.Though can avoid the unit fault by the mode that increases server, the picture pause that brings for bigger network bandwidth fluctuation still can't solve.
4, for the film of hot topic,, be easy to occur the full situation of vod server because the number of the same file of program request simultaneously is many.Though hardware investment is huge, the service ability of system is limited all the time.Particularly under some special situations, as the real-time relay of sports tournament, theatrical performances, silver screen hits etc., it is full to be easy to occur streaming media server, is difficult to satisfy the order request of the intensive burst of user.
5, Ang Gui server, bandwidth and content delivering system (CDN) cause the streaming media service cost high, because of the expense of watching flow-medium performance a bit also is difficult to reduce.Can cause like this with BT is that the network piracy of representative is popular rapidly, hindered to a great extent streaming media service further develop and flourishing.
Summary of the invention
Just at the situation of above-mentioned deficiency in the prior art, it is technical that the present invention is based upon P2P with the transmission of demand stream media system, construct that storage, computing, message directly transmit and ability such as file security transmission by the direct exchange on the equity point, solve the deficiency of legacy clients/server mode, make full use of the bandwidth and the operational capability of every client computer.In the P2P computing, every computer all is a client computer, also is server, and directly exchange message is shared processor active task jointly.A reciprocity point can start various requests, also can respond the request that other equity points are sent.The ability that directly exchanges by server does not free P2P user from the compute mode that relies on central server.Based on streaming media on demand in the multicast communication of P2P, certain point (even server) is out of order, and also can not influence user's play quality.
Simultaneously, because each client computer can share the audio/video file of oneself, so just greatly enriched the resource of community.In this new VOD system the inside, the user of not all program request goes downloading and playing from server, on the contrary, only has the only a few user need be connected to server and goes to download.Each some broadcasting user can receive data from one or more users (comprising server) simultaneously, keeps part or all paid-in data in this locality, offers user's program request afterwards.The minimum piece of data copy that only need spread out of of server just can be given countless user's program requests.
In order to achieve the above object, the invention provides a kind of implementation method based on technical distributed flow media VOD system of P2P and request program thereof, its technical scheme comprises content disposal subsystem, content revealing subsystem, logon server subsystem, authentication and accounting subsystem, data statistics subsystem, P2P CDN network subsystem, DST PLAYER subsystem.Wherein:
1, content disposal subsystem realizes typing, layout and the issuing function to media file, make it to become can be accessed content.Content disposal subsystem is operated in the Web mode, by resources making group information such as film file, substance film brief introduction, film placard picture, film director, performer is carried out typing and classification.When the complete and substance film of this film data of checking is correct, can be published in Web webpage representation subsystem and the P2P CDN network and goes.After issue finished, domestic consumer can download/this film of program request by Web or by search in the client software.During the media file typing, film name, performer, director, film profile etc. are carried out keyword participle warehouse-in, so that improve user search speed greatly.
2, the content revealing subsystem is divided into foreground and backstage two parts.The foreground is to represent to users' interfaces, needs the contents processing navigation function.The backstage is the function that provides to management of webpage person, main administration page template.Background management system provides automatic content update method, only need carry out Classification Management to content on the backstage, and all contents increase, delete, adjust and all can directly reflect on the user side page.Simultaneously, can regularly change easily by the special management system in backstage as required space of a whole page style.Representing except that classifying, support up-to-date film, the forms of expression such as program request this week ranking list, special topic by film.
3, logon server subsystem is realized system load balancing, user's registration, user log-in authentication, user search, subscriber data access, user good friend management, communication transfer, mobile phone news in brief, file-sharing/functions such as search.The logon server subsystem is made up of one group of server, has very strong autgmentability, interoperability and stability, can be deployed to the real network environment fast, neatly.Along with online user's increase, can dynamically increase logon server and improve service ability.In order to alleviate load of server, all adopt udp protocols to communicate by letter between client and the logon server.By application program the packet of being received and dispatched is controlled, comprised packet confirmation of receipt, overtime re-transmission, repeat to abandon, according to functions such as sequence number orderings.
4, the authentication and accounting subsystem is the core important document of system business operation, it is finished the authentication of user capture service, refuses illegal content service request, the charge information of access authorization, generation content service etc. is provided for validated user, prevent from resource usurped the safety of maintenance service system from system level.Certificate server (Authentication AppServer) support is verified usemame/password with the Web standard mode, also can use the client software login authentication simultaneously.Accounting server (FeeAppServer) is supported multiple monthly payment rate and single-point multiple rate mode such as deduct fees, support cost is withheld, to same film, can be different at dissimilar monthly payment users and single-point user's the situation of deducting fees, support charging report form statistics, analysis, generation etc.
5, report needed statistics by client (Peer) and Resource Server (Seeder) to data statistics server (StatisticsAppServer), comprise that each Peer/Seeder's uploads traffic statistics, film click data statistics, regularly program request film number statistics, current inquiry, the graphical display that what seeds data such as (online and not online) are arranged of certain file.
6, in fact the mass data of user's download/program request file is transmitted in P2P CDN network subsystem.The content intelligent routing function that P2P CDN network subsystem is had can be directed to user's content requests the access node of the best in the wide area broadband network, the user can be served fast, realizes distributed, the intelligent load balancing of the whole network.User's visit is directed to the nearest access node from the user.Help the service quality of operator's raising to the end user.Content intelligence route can be directed to user's content requests the access node of the best according to one group of guiding strategy (as geographic area, content type, offered load situation etc.) of setting.P2P CDN network subsystem has powerful firewall-penetrating ability, support the user between the different Intranets directly to use the UDP interconnection, make that the successful rail of link reaches more than 90% between ordinary node, make the uplink traffic maximization of domestic consumer, the edge content server of operator and the uplink traffic of center valut minimize.
7, media player subsystem is an independently player software, does not rely on any other player, even operating system is not installed Windows Media Player and Real Player, this player also can normally move.The same with other player, common function is provided, as: forward/backward, suspending/resuming, stop/beginning, maximize/full frame/recover, front and back drag, volume controls, quiet control, the demonstration of buffering progress, download progress demonstration etc.This player can be supported program request most of at present popular media formats file and coded format file, comprising: RealMedia (" .rm ", " .rmvb ", " .ra ", " .ram "); WindowMedia (" .avi ", " .wmv ", " .wma ", " .asf ", " .asx ", " .wav "); MpegMedia (" .mp3 ", " .mpg ", " .mpeg ", " .dat "); Ogg (" .ogg ", " .ogm "); Other (" .mid ") etc. combines closely with the P2P transport layer, by the high data slice of emergency priority control P2P transport layer those grades of prioritised transmission of data slice.Can also can use Windows Media Player or Real Player as player as required, between carry out transfer of data by normal stream media protocol (HTTP/FTP/RTSP/MMS) or by the player add-on file is installed.
In the described system, content disposal subsystem is carried out centralized management to film information and content, for the CP of third party content supplier provides the uploading films function, the film of the CP of third party content supplier is through behind the auditing flow, can provide crossover tool to the file that does not meet reference format or code check by the film group that issues, finally enter the center valut, according to the loading condition of each fringe node content server, manually or automatically be pushed to kind of mid-side node content server or domestic consumer place then by P2P CDN network subsystem.
In the described system, the client that domestic consumer uses is the user of P2P distributed flow media service, is again service providers simultaneously.Stream medium data that client was play in this locality storage or that come by P2P CND active push, it can set up point-to-point link with other domestic consumer, edge content server or center valut, each other the data of clearing house need.
In the described system, the stream medium data of the local storage of domestic consumer needs to encrypt, and to the data of film by size or timestamp be that unit carries out burst and handles, the recipient will carry out verification to each sheet data in the transmission course, during the verification failure, preferentially select other node to transmit this sheet data again.When the stream medium data of the local storage of read-write, set up most recently used data slice buffer area at internal memory, reduce read-write number of times to hard disk.Simultaneously, Cache, the batch of managing reading and writing of files by upper level applications write with data slice and read in advance, and solution is read file at random and caused the remarkable problem that reduces of system's free memory also to improve application program capacity greatly.
In the described system,, be the multiple spot demand mode, be i.e. during film of program request, can set up data with a plurality of nodes (comprising domestic consumer, edge content server, center valut) simultaneously and link based on the technical distributed flow media VOD system of P2P.Between P2P transport layer and DST PLAYER, there are file read-write management level, it regards a film file as a distributed file, the film file carries out burst by a certain size or timestamp, each sheet has a lot of copies in numerous other nodes, can drive the P2P transport layer by the progress of current movie and read needed data slice.
The invention provides a kind of implementation method, comprise the following steps: based on the technical distributed flow media VOD system of P2P mid point broadcasting flow-medium program
(1) program of selection broadcast, client software is installed, and login: the user checks the information of film on Web, selects certain film of broadcast; Webpage detects subscriber set whether client software has been installed, prompting user installation when not installing, and it is on-line automatic or manually download and install client software that the user can be chosen in webpage; Client software moves automatically, and read Web browser Cookie and obtain the film chained address (URL) that the user clicked last time, comprise hash value (film unique identification), film size, film title, film channel, film rate mode of substance film etc., client determines according to the charging way of film whether this user has authority to watch this film;
(2) dispatch and return the line node tabulation: client is tabulated to the current line node that has all or part of data of this film of logon server subsystem inquiry by the hash value (film unique identification) of this film, the logon server subsystem is according to one group of control strategy that pre-defines, return a collection of qualified line node list information, comprise the information such as network type, IP address, port numbers of node at least;
(3) setting up multiple spot link and realization plays: client is according to one group of control strategy that pre-defines, select the preferential node of part to set up point-to-point link, and open player automatically, and drive the P2P transport layer by player and read required data slice, realize the stream medium data buffering, play in real time;
Wherein, domestic consumer's client is held concurrently simultaneously and is stream medium data supplier and consumer, and the user also accepts the link of other domestic consumer, and the data slice of this film is provided for other domestic consumer when playing this film;
In addition, the user is letting slip while carrying in the journey, can regularly carry out intelligent control to flow, does not use as far as possible or reduces flow from edge content server and center valut, makes the P2P flow maximization between the domestic consumer.
In the implementation method of described program request flow-medium performance, client links and follows following strategy when other node and logon server subsystem return the line node tabulation:
(1) node type is preferential: the link order is not the highest with domestic consumer's node priority, the edge content server node is second priority, center valut server node priority is minimum, can reduce central machine room flow so greatly from carrier server group place, the service ability of system is automatic expansion with user's increase, under the same band condition, the more user of comparable conventional flow media system service;
(2) ISP operator is preferential: judge broadband network provider (as telecommunications, Netcom, Tie Tong etc.) under it according to IP address, preferential link and the line node that oneself is identical ISP operator, flow to optimize network traffics, can reduce the flow between the different I SP backbone network;
(3) region is preferential: judge according to IP address and region under it preferentially select the line node of same region or same Intranet that service is provided, can improve transmission speed and service quality;
(4) stability is preferential: domestic consumer's node historical data is assessed, and as assessment factor, the preferential line node of stability more than certain health degree of selecting links with line duration, network uplink speed, OS Type, system load etc.;
(5) buffer memory Cache is preferential: the preferential line node link of selecting the present while in the program request same film, so that improve client internal memory Cache read-write hit rate, reduce the read-write number of times of hard disk, while can reduce the number that links with seed (promptly having this film total data sheet) node, improves the system service ability.
In the described system, the quantity of all kinds of servers of each subsystem is to be configured according to service needed, with the expansion and the variation of adaptive system service ability; Set up having or not of the data slice of notifying the other side oneself between each node of link in real time, and regularly exchange the line node list information in the P2P mode mutually, help to improve greatly the real-time of line node tabulation like this, reduce the burden of logon server subsystem.
Embodiment
Below by embodiment, and in conjunction with the accompanying drawings, technical scheme of the present invention is described in further detail.
Embodiment: referring to Fig. 2, the present invention is a kind of based on the technical distributed flow media VOD system of P2P, the maximum characteristics of this system are that utilization P2P technology joins client in the stream media service system, and possesses powerful firewall-penetrating technology between the client, its intelligent flow controlling mechanism can significantly reduce the pressure of operator content server and center valut, improves the response speed and the service quality of system.
In the system of the present invention, the quantity of all kinds of servers of each subsystem is to be configured according to service needed, with the expansion and the variation of adaptive system service ability.But, in fact when the Streaming Media user rolls up, can provide the client of uplink traffic service also to roll up, even do not increase under the situation of edge content server thereupon, the system service ability still can automatically be expanded, and is enough to satisfy the streaming media service demand of the intensive burst of user.
Native system adopts and makes the P2P technology carry out effective the combination with the B/S technology, and the user can come the file of program request appointment by the URL on the webpage clicking, like this to meeting the use habit of domestic consumer.
System has adopted equally loaded (comprising the equilibrium of logon server subsystem load, the equilibrium of content management server subsystem load, P2P client load balancing), thereby any station server goes wrong, system still can normally move, really reach the carrier-class requirement, and make things convenient for the realization system smoothly to expand.
The logon server subsystem: the equal server of working load (Dispatch Server) arrives each logon server with user's logging request mean allocation.Because load-balanced server and logon server all use the communication of UDP mode, can handle a large amount of concurrent logging request.
The content management server subsystem: each content server and center valut server can be provided with maximum and upload the maximum link number of link number, singular link maximum speed (or by film code check size), single film file, total flow restriction etc. of uploading.When counting above maximum link, Peer can and link other Peer or Resource Server from a disconnection.
P2P client: maximum can be set upload link number, program request maximum link number when downloading, total downloading flow restriction, total flow restriction etc. of uploading.Preferentially use the uplink traffic of other Peer simultaneously, effectively reduce the pressure of Resource Server.
P2P communication data safety:, prevent hacker's malicious attack for the detecting server with load-balanced server, logon server, registrar, share service device, search server, NAT, link and set up negotiate service device etc. and communicate by letter and all packet is carried out encryption of P2P client.
Film data fail safe: because multiple spot (being that multichain connects) transmission data are used in the P2P program request, download, preserve film data,, also be difficult to accomplish from technology itself so be difficult to use similar StreamBox and Flash etc. to grab the stream instrument.Can effectively ensure the intellectual property of film like this, prevent illegal propagation.Based on same consideration, also encrypt for the ephemeral data that keeps at local hard drive, and regularly cleaning.
Fig. 3 has described and the present invention is based in the technical distributed flow media VOD system of P2P, and CP is described below the flow process of contents of media files management: 1. CP opens Content Management and uploads client-side program and login; 2. CP selects film file and the film relevent information that will issue, as brief introduction, placard picture etc.; 3. confirm and begin to upload, simultaneously information such as film and picture are saved in the center valut; 4. upload finish after, film is changed to the authorization state for the treatment of, notify substance film audit group to examine simultaneously; 5. the group that examines is masked as state to be released with this film status after substance film audit is passed through, and notice film issue group.Afterwards referring to film issue flow process.
Fig. 4 has described the present invention is based in the technical distributed flow media VOD system of P2P, and film issue group is described below the flow process of media file issue: 1. film issue group member logins the film delivery system, and selects the film of state to be released; 2. the film that does not meet reference format, code check is changed, made it conformance with standard form, code check; 3. according to the disk space and the offered load of current each Resource Server, choosing is issued by the adequate resources server; 4. Resource Server uses FTP link center valut, downloads this film to local disk; 5. after film is downloaded and finished, this document is calculated hash value by the seeder service routine; 6. after the film hash value calculates and finishes, share to the P2P network automatically, report new shared file name and corresponding hash value to APP Server simultaneously.
Fig. 5 has described and the present invention is based in the technical distributed flow media VOD system of P2P, and P2P player online upgrading flow process is described below: 1. make player move online ROMPaq; 2. the player player process and the data-transfer process that stop to move; 3. the needed configuration file of download and upgrade from the online upgrading server; 4. analyze upgrading configuration; 5. download the required file of this upgrading; 6. after download finishes, rerun the player program automatically.Afterwards referring to P2P network entry flow process.
Fig. 6 has described and the present invention is based in the technical distributed flow media VOD system of P2P, and P2P network entry flow process is described below: 1. the user opens the P2P player, detects this locality and whether has account number, and it's not true registers a new digit automatically; 2. use effective account number to sign in to load-balanced server (Dispatch Server); Whether need upgrading, do not need upgrading just to sign in to logon server (Logon Server) if 3. detecting the P2P player; 4. after successfully logining, maintenance links with logon server.
Fig. 7 has described and the present invention is based in the technical distributed flow media VOD system of P2P, the user uses the flow process of P2P nexus broadcasting flow-medium program, be described below: 1. the user opens the IE browser, Input Online program request network address, and detect whether need the Website login authentication; 2. the webpage that the user asked dynamically generates the film tabulation according to the operated database data of APPServer; 3. the user clicks the film of thinking program request; 4. automated system operation P2P player; 5. the user logins the P2P network; 6. the network based film hash value of wanting program request of P2P is tabulated to all Peer of Logon Server and this film of P2P network requests search current shared; 7. remove to connect each Peer according to the Peer tabulation of returning; 8. after each Peer links successfully, begin to transmit film data stream; 9. after data buffering was finished, player began to play the film of user institute program request.
At last, should be pointed out that above embodiment only is the more representational example of the present invention.Obviously, technical scheme of the present invention is not limited to the foregoing description, and many distortion can also be arranged.All distortion that those of ordinary skill in the art can directly derive or associate from content disclosed by the invention all should be thought protection scope of the present invention.