A kind of device and method of realizing to the drop-down media resource of terminal equipment
Technical field
The present invention relates to the multi-media communication field, relate in particular to a kind of device and method of realizing to the drop-down media resource of terminal equipment.
Background technology
CDN (Content Delivery Network, content distributing network) equipment provides the Media Resource Server to user's program request and direct broadcast service, and the user comes request program or selects direct broadcast band through terminal equipment (for example STB (STB)).After CDN equipment receives user's program request or live request; Will be converted into Media Stream to user's program request or live media resource with the form of RTP (real time transport protocol) packet and send to terminal equipment, terminal equipment receives and will directly send to behind the Media Stream on the interface that the user watches.
To watching the user of programme televised live at that time, can select direct broadcast time-shift professional, be recorded in the programme content of current broadcast on the CDN equipment, wait user program request is watched.When being illustrated in figure 1 as in the prior art terminal equipment request program and CDN equipment interaction flow.Because the memory capacity of CDN equipment is limited, can regularly do burin-in process to the time shift program of recording, and it is deleted from CDN equipment, like this, makes some users still watch the program of seeing less than oneself wanting.In addition, when hanging with a large amount of program requests or live user on the CDN equipment, will inevitably increase the weight of the bearing load of CDN equipment, influence the quality of image that the user watches program.
Summary of the invention
The technical problem that the present invention will solve provides a kind of device and method of realizing to the drop-down media resource of terminal equipment, has solved because of the recorded program content is aging, is deleted from hard disk by CDN equipment, makes the user can't watch the problem of programme televised live.
In order to address the above problem; The invention provides a kind of method that realizes to the drop-down media resource of terminal equipment; Comprise: terminal equipment sends query requests to content distributing network (CDN) equipment, after said CDN equipment is received query requests, returns the response message of successful inquiring to said terminal equipment; Terminal equipment sends FTP (FTP) request to CDN equipment after receiving said response message, receives that the CDN equipment of FTP request is pulled down to said terminal equipment with media resource.
Further; Said terminal equipment carries the parameter that expresses support for the FTP memory function when CDN equipment sends query messages; After said CDN equipment is received query messages; Wherein carried the parameter that expresses support for the FTP memory function if parse; Then when said terminal equipment returns the response message of successful inquiring, carry this CDN equipment of expression and support the parameter of the drop-down media resource of mode of FTP, and IP address, port information, user name and the password of the program place File Transfer Protocol module of said terminal equipment inquiry.
Further; After said terminal equipment is received response message; Parse said CDN equipment and support the drop-down media resource of mode of FTP and IP address, port information, user name and the password of File Transfer Protocol module; Send the FTP request to the corresponding File Transfer Protocol module of said IP address and port afterwards, carry user name and password, CDN equipment receives that FTP request back judges whether said user name and password be correct; If correct, if incorrect message of then sending user name or password mistake to said terminal equipment then through the media resource of File Transfer Protocol to the drop-down said File Transfer Protocol module stores of said terminal equipment.
Further, said terminal equipment also is stored to memory device with the media resource that receives;
Said memory device is positioned at terminal equipment inside or is independent of terminal equipment.
The present invention also provides a kind of device of realizing to the drop-down media resource of terminal equipment, comprises terminal equipment and content distributing network (CDN) equipment;
Said terminal equipment is used for sending query requests to CDN equipment; And after receiving the response message of successful inquiring, send FTP (FTP) request to CDN equipment;
After said CDN equipment is used to receive said query requests, return the response message of successful inquiring to said terminal equipment; And receive that FTP asks the media resource of back to the drop-down request of said terminal equipment.
Further, said CDN equipment comprises signaling flow forwarding module, signaling flow processing module, one or more File Transfer Protocol module;
Said terminal equipment carries the parameter that expresses support for the FTP memory function when sending query requests;
Said signaling flow forwarding module is used for the query requests that receives is forwarded to the signaling flow processing module, also is used for the response message of the successful inquiring that receives is forwarded to terminal equipment;
Whether the inquiry program existed after said signaling flow processing module was used to receive query requests; If there is the response message that then sends successful inquiring to the signaling flow forwarding module; Wherein carry this CDN equipment of expression and support the parameter of the drop-down media resource of mode of FTP, and IP address, port information, the username and password of storing the File Transfer Protocol module of corresponding program.
Further, said CDN equipment also comprises the Media Stream processing module;
After said terminal equipment also is used to receive the response message of successful inquiring, parse the drop-down media resource of mode that said CDN equipment is supported FTP, and IP address, port information, the username and password of storing the File Transfer Protocol module of corresponding program; Said FTP request is to send to said IP address and the corresponding File Transfer Protocol module of port, wherein carries username and password;
After said File Transfer Protocol module is used to receive said FTP request; Carry out the checking of user name and password; Also be used for checking and send the drop-down message of FTP through the back to the Media Stream processing module, checking is not through then returning the message of user name or password mistake to said terminal equipment;
Said Media Stream processing module is used to receive after the drop-down message of FTP through File Transfer Protocol the media resource of said File Transfer Protocol module stores is pulled down to said terminal equipment.
Further; Said signaling flow processing module also is used for when inquiring program when existing; File Transfer Protocol module to the said program of storage is sent the link setup request, after receiving the link establishment message of successful that the File Transfer Protocol module is returned, sends the response message of successful inquiring to terminal equipment;
Said File Transfer Protocol module is used to also receive that said link setup request backward signalling flows the processing module return link and sets up message of successful.
Further, said device also comprises memory device, is used to preserve the media resource of reception;
Said terminal equipment also is used for the media resource that receives is stored to said memory device;
Said memory device is positioned at terminal equipment inside or is independent of terminal equipment.
In sum; Adopt technical scheme of the present invention; On the basis that meets RTSP (real-time streaming protocol) communication standard; Can fully take into account the demand of different customer groups, realize CDN equipment, and be stored in this media resource on local hard drive or the peripheral memory to the drop-down required media resource of watching of terminal equipment to program request and programme televised live.The user can watch this media resource at any time.And media resource that can be local according to the demand unified management of oneself is edited media resource, deletion and arrangement.In addition, owing to adopt the drop-down media resource of FTP (File Transfer Protocol, FTP) to terminal equipment, and be stored in the local storage, reduced bearing load to CDN equipment.
Description of drawings
Fig. 1 is prior terminal and CDN equipment interaction flow;
Fig. 2 is apparatus of the present invention structural representations;
Fig. 3 is the flow chart of the inventive method.
Embodiment
The present invention is based on RTSP signaling and File Transfer Protocol; The apparatus and method of a kind of CDN of realization equipment to terminal PUSH (drop-down) media resource are provided; Between terminal and CDN equipment, adopt in the RTSP signalling interactive process; Be provided with through the RTSP signaling parameter, with the media resource on the CDN equipment through File Transfer Protocol PUSH to terminal equipment, with PUSH to media resource leave on terminal equipment hard disk or the peripheral memory.The user can be at local playing media file.
Present embodiment provides a kind of device of realizing to the drop-down media resource of terminal equipment, and is as shown in Figure 2, comprising: terminal equipment, CDN equipment and memory device;
Terminal equipment is used for sending DESCRIBE (query requests) to CDN equipment, wherein carries the x-FTP parameter, and terminal equipment IP address and port information; X-FTP parametric representation terminal equipment is supported the memory function of local FTP; After terminal equipment also is used to receive the response message of successful inquiring, sends the FTP request to IP address that receives and the corresponding File Transfer Protocol module of port, and after receiving media resource it is stored to memory device.
CDN equipment comprises signaling flow forwarding module, signaling flow processing module, one or more File Transfer Protocol module and Media Stream processing module;
The signaling flow forwarding module is used for behind the DESCRIBE of receiving terminal apparatus this forwards to signaling flow processing module, and the response message of successful inquiring of receiving or inquiry failure is forwarded to terminal equipment;
The signaling flow processing module; Preserve terminal equipment IP address and port information after being used to receive DESCRIBE; And whether the inquiry program exists (i.e. the FTP module whether inquiry has the storage respective program); If exist then and send link setup request (being link detecting message), carried terminal IP address of equipment to the File Transfer Protocol module of correspondence; After also being used to receive the link establishment message of successful that the File Transfer Protocol module sends; Send the response message of successful inquiring to the signaling flow forwarding module; Wherein carry x-KeepFtpAlive parameter (the mode PUSH media resource of expression CDN equipment support through FTP is to terminal equipment), and IP address, port information, the username and password of storing the File Transfer Protocol module of respective program; If do not exist corresponding program then to send the response message of inquiry failure to the signaling flow forwarding module; Each File Transfer Protocol module of same CDN equipment can shared identical username and password.
The File Transfer Protocol module is used to receive that link setup request backward signalling flows the processing module return link and sets up message of successful; After also being used to receive the FTP request that terminal equipment sends; Carry out the checking of user name and password; Also be used for checking and send the drop-down message of FTP to the Media Stream processing module through the back; The IP address and the port information of carried terminal equipment be not if checking is through then returning the message of user name or password mistake to terminal equipment.
The Media Stream processing module, be used to receive the drop-down message of FTP after, through the media resource of File Transfer Protocol to the corresponding drop-down File Transfer Protocol module stores of terminal equipment of IP address and port;
Memory device is used to preserve the media resource of reception; Memory device can be positioned at terminal equipment, also can be to be positioned at outside the terminal equipment.
In addition; Terminal equipment to PUSH to the in addition unified management of the media resource of terminal equipment; Through terminal equipment PUSH is managed to local media resource as follows, as: deletion, compile a media resource file to a plurality of media resources; Sequencing according to the PUSH time sorts to media resource, is assembled into a plurality of media resources in the unified file.
The present invention provides a kind of method that realizes to the drop-down media resource of terminal equipment, and is as shown in Figure 3, may further comprise the steps:
Step 301: terminal equipment sends DESCRIBE message to CDN equipment; The content of inquiry request program; And carry custom parameter " x-FTP " and represent that terminal equipment supports the memory function of local FTP, and in query requests the IP address and the port information of carried terminal equipment signaling.
After step 302:CDN equipment is received the DESCRIBE message of sending from terminal equipment; Parse and carried parameter " x-FTP " in the message; Resolve and preserve terminal equipment IP address and port information; And whether have corresponding program according to the DESCRIBE information query, if there is then execution in step 303, otherwise execution in step 309;
Step 303:CDN equipment sends the response message of successful inquiring to terminal equipment; Wherein carry custom parameter " x-KeepFtpAlive "; The mode PUSH media resource that expression CDN equipment can pass through FTP is to terminal equipment; And carry the IP address of the File Transfer Protocol module of the corresponding program of storage in the CDN equipment, port information, username and password; The File Transfer Protocol module of storing corresponding program can be one or more.
Step 304: after terminal equipment is received the response message of successful inquiring, parse and carried parameter " x-KeepFtpAlive " in the response message, and parse IP address, port information and the username and password of the File Transfer Protocol module of carrying.
Step 305: terminal equipment sends the FTP request to IP address and the corresponding File Transfer Protocol module of port, and carries user name and password;
If terminal equipment is received IP address, port information, the username and password of a plurality of File Transfer Protocol modules, then send a plurality of FTP requests, user name and password are all carried in each request.
Step 306:CDN equipment judges whether user name and password that terminal equipment is sent be correct, if correct execution in step 307 then, otherwise execution in step 310;
Step 307:CDN equipment is through the media resource of File Transfer Protocol to the drop-down File Transfer Protocol module stores of terminal equipment;
Step 308: terminal equipment is stored to memory device with the media resource that receives, and this memory device can be positioned at terminal equipment inside, like the local hard drive of terminal equipment, also can be independent of terminal equipment, like the memory of peripheral hardware;
Afterwards, the user can be chosen in the local media resource of preserving of playing as required at any time.
Step 309:CDN equipment sends the response message of inquiry failure to terminal equipment.
Step 310:CDN equipment sends the message of user name or password mistake to terminal equipment.
Terminal equipment can also be managed to the media resource on local hard drive or the peripheral memory PUSH; As can delete; A plurality of media resources are compiled a media resource file; Sequencing according to the PUSH time sorts to media resource, and a plurality of media resources are assembled into a medium operation of unified file.
Based on RTSP signaling and File Transfer Protocol, realize from the technical scheme of CDN equipment to terminal equipment PUSH media resource, solved because of the recorded program content aging; Deleted from hard disk by CDN equipment; Make the user can't watch programme televised live, and, the media file storage of PUSH to the terminal equipment on local hard drive or peripheral memory; Solved the user and want just can program request watch at what media resource of program request constantly program; The programme that has changed on the CDN equipment that original user can only provide through terminal equipment comes program request to watch the pattern of program, in addition, because media resource is stored on the local storage; Can suitably reduce bearing load, the image quality of the media resource that helps guaranteeing that the user watches to CDN equipment.