CN105812831B - Network program recording method, device and system and playing method and device - Google Patents
Network program recording method, device and system and playing method and device Download PDFInfo
- Publication number
- CN105812831B CN105812831B CN201410856558.XA CN201410856558A CN105812831B CN 105812831 B CN105812831 B CN 105812831B CN 201410856558 A CN201410856558 A CN 201410856558A CN 105812831 B CN105812831 B CN 105812831B
- Authority
- CN
- China
- Prior art keywords
- file
- recording
- cdn
- channel
- request message
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/231—Content storage operation, e.g. caching movies for short term storage, replicating data over plural servers, prioritizing data for deletion
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/232—Content retrieval operation locally within server, e.g. reading video streams from disk arrays
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/239—Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Databases & Information Systems (AREA)
- Television Signal Processing For Recording (AREA)
Abstract
The invention provides a method, a device and a system for recording network programs and a method and a device for playing recorded programs, wherein the method comprises the following steps: the CDN channel server downloads a fragmented TS file of a program to a channel source station; the CDN channel server receives a recording request message sent by a user terminal, wherein the recording request message comprises start-stop time information of a recorded program; and the CDN channel server determines the TS files needing to be recorded in the downloaded TS files according to the recording request message and generates corresponding index files. By the invention, the user terminal can record the network program in any time slot without being limited by the program list appointed by the system.
Description
Technical Field
The present invention relates to the technical field of CDN (Content Delivery Network), and in particular, to a method, an apparatus, and a system for recording a Network program, and a method and an apparatus for playing a recorded program.
Background
The increase of network bandwidth and the development of 3G/4G wireless communication technology provide the possibility for developing value-added service services based on media contents on a telecommunication network. The CDN system is further widely used as a system for caching videos, audios, pictures, and web pages in a network. In the development of multimedia services in telecommunication networks, such as IPTV network television and OTT TV (video service of open internet), CDN systems also play an increasingly important role.
Currently, Live channel services compared with mainstream in OTT TVs are based On HLS (Http Live Streaming, protocol for real-time Streaming), and services such as TVOD (True Video On Demand, program recording), NPVR (network personal Video Recorder), and the like also need to be developed based On HLS;
at present, in the conventional personal recording process in the IPTV and OTT TV, a program is successfully recorded through a normal program list on a channel, a user operates on a set-top box to archive the recorded program as a personal recorded program, the CDN stores the recorded program separately, and only one copy of the personal recording of different users for the same program is stored on the CDN. In the related art, customized personal recording of network programs cannot be achieved without sacrificing a portion of the storage space.
Disclosure of Invention
In order to solve the problem of realizing customized recording of network programs on the premise of not losing a large amount of storage space, the invention provides a method, a device and a system for recording network programs and a method and a device for playing recorded programs, so as to at least solve the problems.
According to an aspect of the present invention, there is provided a method for recording a network program, including: a CDN channel server of a content delivery network downloads a fragment TS file of a program to a channel source station; the CDN channel server receives a recording request message sent by a user terminal, wherein the recording request message comprises start-stop time information of a recorded program; and the CDN channel server determines the TS files needing to be recorded in the downloaded TS files according to the recording request message and generates corresponding index files.
Optionally, the downloading, by the CDN channel server, the fragmented TS file to the channel source station includes: and downloading an index file of a program to the channel source station, and downloading a corresponding TS file according to the index file.
Optionally, after the CDN channel server downloads the segment TS file of the program to the channel source station, the method includes: and storing the TS file in a Distributed File System (DFS).
Optionally, the index file is an M3U8 file.
Optionally, after the CDN channel server downloads the segment TS file of the program to the channel source station, the method further includes: and the CDN channel server deletes the non-recorded TS file according to a recording deletion request message sent by the user terminal.
Optionally, after the CDN channel server downloads the segment TS file of the program to the channel source station, the method further includes: and the CDN channel server deletes the TS file which exceeds a preset time period and is not recorded.
According to another aspect of the present invention, there is provided a network program recording apparatus, disposed on a CDN channel server, including: the downloading module is used for downloading the fragment TS file of the program to the channel source station; a receiving recording request module, configured to receive a recording request message sent by a user terminal, where the recording request message includes start-stop time information of a recorded program; and the index generation module is used for determining the TS files needing to be recorded in the downloaded TS files according to the recording request message and generating corresponding index files.
Optionally, the recording module includes: the first downloading unit is used for downloading the index file of the program to the channel source station; and the second downloading unit is used for downloading the corresponding TS file according to the index file.
Optionally, the apparatus further comprises: and the storage module is used for storing the TS file in a Distributed File System (DFS).
Optionally, the index file is an M3U8 file.
Optionally, the apparatus further comprises: and the first deleting module is used for deleting the TS file which is not recorded according to the recording deleting request message sent by the user terminal.
Optionally, the apparatus further comprises: and the second deleting module is used for deleting the TS file which exceeds the preset time period and is not recorded.
According to still another aspect of the present invention, there is provided a method for playing a recorded program, including: a CDN user server receives a play request message sent by a user terminal, wherein the play request message comprises start-stop time information of a recorded program; the CDN user server acquires a corresponding index file according to the playing request message and sends the index file to the user terminal; the CDN user server receives a request for obtaining the TS file sent by the user terminal, wherein the TS file corresponds to the index file; and the CDN user server reads the corresponding TS file according to the TS file acquisition request and sends the corresponding TS file to the user terminal.
Optionally, the obtaining, by the CDN user server, a corresponding index file according to the play request message includes: the CDN user server inquires corresponding index file storage path information according to the playing request message and informs the user terminal; the CDN user server receives the index file request information sent by the user terminal, wherein the index file is determined by the terminal according to the storage path information; and acquiring the index file according to the index file request information.
Optionally, the index file is an M3U8 file.
According to another aspect of the present invention, there is provided a playing device for recording a program, which is disposed on a CDN user server, and includes: a receiving playing request module, configured to receive a playing request message sent by a user terminal, where the playing request message includes start-stop time information of a recorded program requested to be played; the index acquisition module is used for acquiring a corresponding index file according to the playing request message and sending the index file to the user terminal; a third receiving module, configured to receive a TS file acquisition request sent by the user terminal, where the TS file corresponds to the index file; and the reading module is used for reading the corresponding TS file according to the TS file acquisition request and sending the corresponding TS file to the user terminal.
Optionally, the index obtaining module includes: the query unit is used for querying the corresponding index file storage path information according to the playing request message and notifying the user terminal; a receiving index request unit, configured to receive the index file request information sent by the user terminal, where the index file is determined by the terminal according to the storage path information; and the acquisition unit is used for acquiring the index file according to the index file request information.
Optionally, the index file is an M3U8 file.
According to still another aspect of the present invention, there is provided a recording system of a network program, including:
CDN CHANNEL server CHANNEL, comprising: the downloading module is used for downloading the fragment TS file of the program to the channel source station; a receiving recording request module, configured to receive a recording request message sent by a user terminal, where the recording request message includes start-stop time information of a recorded program; an index generation module, configured to determine, according to the recording request message, a TS file to be recorded in the downloaded TS file, and generate a corresponding index file;
and the distributed file system DFS is used for storing the TS file.
Optionally, the system further comprises: and the CDN management platform IAM is used for forwarding the recording request message sent by the user terminal to the CDN channel server.
Optionally, the CDN management platform IAM is further configured to notify the user terminal of process state information.
By the invention, the CDN channel server downloads the fragmented TS file of the program to the channel source station; a CDN channel server receives a recording request message sent by a user terminal, wherein the recording request message comprises start-stop time information of a recorded program; and the CDN channel server determines the TS files needing to be recorded in the downloaded TS files according to the recording request message and generates corresponding index files. Therefore, the user terminal can record the network program in any time slot without being limited by the program list specified by the system.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a flowchart of a network program recording method according to an embodiment of the present invention;
FIG. 2 is a flow chart of a CDN channel server downloading TS files according to an embodiment of the present invention;
fig. 3 is a flowchart of a network program recording application according to an embodiment of the present invention;
fig. 4 is a flowchart of a network program recording process according to an embodiment of the present invention;
FIG. 5 is a TS file rollback flow diagram according to an embodiment of the present invention;
FIG. 6 is a flow diagram of NPVR deletion in accordance with an embodiment of the present invention;
fig. 7 is a block diagram of a network program recording apparatus according to an embodiment of the present invention;
FIG. 8 is a block diagram of a network program storage device according to an embodiment of the present invention;
fig. 9 is a flowchart of a method for playing a recorded program according to an embodiment of the present invention;
fig. 10 is a flowchart of a recorded program playing method according to an embodiment of the present invention;
fig. 11 is a first block diagram of a recorded program playing apparatus according to an embodiment of the present invention;
fig. 12 is a block diagram of a second apparatus for playing back recorded programs according to an embodiment of the present invention;
fig. 13 is a schematic structural diagram of a network program recording system according to an embodiment of the present invention.
Detailed Description
The invention will be described in detail hereinafter with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
An embodiment of the present invention provides a method for recording a network program, and fig. 1 is a flowchart of a method for recording a network program according to an embodiment of the present invention, and as shown in fig. 1, the method includes:
s102, a CDN channel server downloads a fragmented TS file of a program to a channel source station;
s104, a CDN channel server receives a recording request message sent by a user terminal, wherein the recording request message comprises start-stop time information of a recorded program;
and S106, the CDN channel server determines the TS files needing to be recorded in the downloaded TS files according to the recording request message, and generates corresponding index files.
According to the embodiment of the invention, the CDN channel server downloads the fragmented TS file of the program to the channel source station; a CDN channel server receives a recording request message sent by a user terminal, wherein the recording request message comprises start-stop time information of a recorded program; and the CDN channel server determines the TS files needing to be recorded in the downloaded TS files according to the recording request message and generates corresponding index files. Therefore, the user terminal can record the network program in any time slot without being limited by the program list specified by the system.
In an embodiment of the present invention, a CDN channel server downloads a fragmented TS file to a channel source station, including: downloading an index file of a program to a channel source station; and downloading the corresponding TS file according to the index file. The index file in this embodiment is an M3U8 file. Fig. 2 is a flowchart of a CDN channel server downloading a TS file according to an embodiment of the present invention, and as shown in fig. 2, the method includes:
s202, the CDN Management platform (IAM, Identity and Access Management, i.e. Identity identification and Access Management in this embodiment) initiates a CHANNEL creation request to the CDN CHANNEL server (CHANNEL).
S204, the CDN CHANNEL server (CHANNEL) responds to the CHANNEL creation request, and notifies the IAM of receiving the CHANNEL creation task.
S206, CHANNEL performs the process of creating CHANNELs locally, adding CHANNEL data area, and processing the preparation of CHANNEL download files.
S208, after the CHANNEL creation task is completed, a CHANNEL record is inserted into the DataBase (DB, DataBase), and the CHANNEL status is in operation.
S210, CHANNEL reports CHANNEL creation success information to IAM.
The IAM responds to CHANNEL with the receipt of the create success message S212.
S214, after the local CHANNEL is successfully created, CHANNEL downloads the index M3U8 file and the TS fragment file to the CHANNEL source station, wherein CHANNEL first downloads the M3U8 file, and then downloads the TS file according to the index information in the M3U8 file.
Since the CHANNEL is a live stream, after the CHANNEL is created successfully, CHANNEL requests the CHANNEL source station for the M3U8 File and the TS File to be stored locally at regular time according to the HLS protocol, or may be stored in a Distributed File System (DFS).
In an embodiment of the present invention, the recording request message sent by the user terminal includes start and end time information of the recorded program, and also includes channel ID (Identity) information and user ID information. Fig. 3 is a flowchart of a network program recording application according to an embodiment of the present invention, and as shown in fig. 3, the flowchart includes the following steps:
s302, the STB (Set Top Box, i.e. the user terminal) sends an NPVR recording application to the IAM, where the application message mainly includes the start time, end time, channel ID, and user ID of the NPVR.
And S304, the IAM returns a response of receiving the NPVR recording application after receiving the STB request.
And S306, the IAM performs NPVR function authentication on the user, and executes the subsequent process after the authentication is successful.
S308, the IAM issues an NPVR request to a CDN CHANNEL server CHANNEL, and the application message contains the starting time, the ending time, the user ID and the NPVR program ID information of the NPVR.
And S310, after the CHANNEL receives the NPVR application, a response is returned to indicate that the application is received.
S312, the CHANNEL inquires whether the current record exists in the NPVR task table or not from the database, if so, the current record is not inserted, and if not, the application record is inserted into the NPVR task table. Marking the state of the NPVR task as pending.
S314, CHANNEL reports the NPVR application to IAM that the NPVR application has been successfully accepted.
And S316, the IAM shows the received NPVR application to the user and records the received NPVR application.
In an embodiment of the present invention, the CDN CHANNEL server CHANNEL periodically queries the NPVR table in the database, and starts processing the NPVR task when finding the NPVR task to be processed. Before processing the task, the conditions of the NPVR task starting time and the NPVR task ending time are not distinguished, and the task before the channel recording TS rollback time can be processed. Fig. 4 is a flowchart of a network program recording process according to an embodiment of the present invention, and as shown in fig. 4, the process includes the following steps:
s402, the CHANNEL queries the NPVR recording task table at regular time. The recording completion time and start time are mainly queried.
And S404, the CHANNEL judges whether the current time finishes recording the CHANNEL TS in the NPVR time slot according to the end time of the NPVR task. If the recording is not finished, the recording is not processed. If the recording is completed, the step S406 is started.
S406, the CHANNEL TS is recorded completely, time slot information can be extracted from the TS file, CHANNEL determines which TS files need to be recorded according to the starting time and the ending time of NPVR, and an M3U8 file corresponding to the TS files need to be recorded is generated.
S408, after the M3U8 file is successfully generated, updating the task state in the NPVR task table of the database to be completed, and recording the name and the storage path of the M3U8 file in the database.
S410, the CHANNEL reports the NPVR successful recording to the IAM.
S412, the IAM shows to the user that the NPVR recording is completed.
In one embodiment of the present invention, the deletion process is performed as long as the TS file that is not used by the NPVR and exceeds the channel recording time. Fig. 5 is a flow chart of the TS file rollback according to an embodiment of the present invention, as shown in fig. 5, the flow chart includes:
CHANNEL determines the maximum recording time when creating a CHANNEL, and within the maximum time, the CHANNEL records a complete fragmented TS file. When processing NPVR task, as long as it is satisfied that the CHANNEL is recording TS file and the time reaches the end time of NPVR task, CHANNEL can process and generate corresponding M3U8 file, and insert the TS file list information used by NPVR into NPVR _ TS table of database, and also record TS file in "NPVR records TS file table", and the repeated TS file record is not repeatedly inserted into database.
And (4) rolling back the progress of the recorded file by CHANNEL, regularly inquiring 'NPVR recorded TS file table' in the database, judging the TS files which do not exist in the table and exceed the recording time, and deleting the TS files.
In one embodiment of the present invention, CHANNEL deletes the non-recorded TS file according to the delete record request message sent by the user terminal. Fig. 6 is a flow chart of NPVR deletion according to an embodiment of the present invention, as shown in fig. 6, the flow chart includes:
the deletion request message of the NPVR is sent from the STB to the IAM, and then sent from the IAM to the CDN CHANNEL server CHANNEL, where the request message also includes the start time, end time, CHANNEL ID, and user ID of the NPVR.
And the CHANNEL inquires time slot information of other NPVRs according to the time slot of the NPVR, finds out a non-repeated time slot TS list and deletes the time slot TS list in the NPVR _ TS list.
An embodiment of the present invention further provides a device for recording a network program, which is disposed on a CDN channel server, and fig. 7 is a first structural block diagram of a network program recording device according to an embodiment of the present invention, as shown in fig. 7, the device includes:
a downloading module 702, configured to download a segment TS file of a program to a channel source station;
a receiving recording request module 704, configured to receive a recording request message sent by a user terminal, where the recording request message includes start and end time information of a recorded program;
and an index generation module 706, configured to determine, according to the recording request message, a TS file to be recorded in the downloaded TS files, and generate a corresponding index file.
Through the embodiment of the invention, the downloading module 702 downloads the fragmented TS file of the program to the channel source station; the receiving recording request module 704 receives a recording request message sent by a user terminal, wherein the recording request message includes start and end time information of a recorded program; the index generation module 706 determines a TS file to be recorded from the downloaded TS files according to the recording request message, and generates a corresponding index file. Therefore, the user terminal can record the network program in any time slot without being limited by the program list specified by the system.
Fig. 8 is a block diagram of a second structure of a network program recording device according to an embodiment of the present invention, and in an embodiment of the present invention, as shown in fig. 8, the recording module 802 further includes: a first downloading unit 8002, configured to download an index file M3U8 of a program to a channel source station; and a second download unit 8004, configured to download the corresponding TS file according to the index file M3U 8.
In one embodiment of the present invention, as shown in fig. 8, the apparatus further comprises: and a storage module 808, configured to store the TS file in the distributed file system DFS.
In one embodiment of the present invention, as shown in fig. 8, the apparatus further comprises: the first deleting module 810 is configured to delete an unrecorded TS file according to a record deletion request message sent by a user terminal. The apparatus may further include: and a second deleting module 812, configured to delete the TS file that exceeds the preset time period and is not recorded at regular time. Of course, the two deletion modules may exist simultaneously or may be separately arranged in the device.
The embodiment of the invention also provides a playing method of the recorded program, and after the NPVR recording is successful, the user can access the terminal and play the program. Fig. 9 is a flowchart of a first method for playing a recorded program according to an embodiment of the present invention, as shown in fig. 9, the method includes the following steps:
s902, a CDN user server receives a play request message sent by a user terminal, wherein the play request message comprises start-stop time information of a recorded program;
s904, the CDN user server obtains the corresponding index file according to the playing request message and sends the index file to the user terminal;
s906, the CDN user server receives a request for obtaining the TS file sent by the user terminal, wherein the TS file corresponds to the index file;
and S908, the CDN user server reads the corresponding TS file according to the TS file acquisition request and sends the TS file to the user terminal.
According to the embodiment of the invention, a CDN user server receives a play request message sent by a user terminal, wherein the play request message comprises start-stop time information of a recorded program; the CDN user server acquires a corresponding index file according to the playing request message and sends the index file to the user terminal; s906, the CDN user server receives a request for obtaining the TS file sent by the user terminal, wherein the TS file corresponds to the index file; and S908, the CDN user server reads the corresponding TS file according to the TS file acquisition request and sends the TS file to the user terminal. The user terminal can record and play the network program in any time slot without being limited by the program list appointed by the system.
In one embodiment of the method, a user requests an NPVR to play through an HTTP message, and a flow message of the user initiating the playing of the NPVR includes a start time, an end time, and channel ID information of the NPVR. Fig. 10 is a flowchart of a second method for playing a recorded program according to an embodiment of the present invention, as shown in fig. 2, the method includes the following steps:
s1002, a user terminal (STB) initiates an HTTP request NPVR to play, wherein the HTTP request comprises key information NPVR start time, end time, channel ID and user ID.
S1004, after receiving the request, the CDN user server (IAS) queries the path information of the M3U8 file in the NPVR table of the database DB according to the program start time, end time, and channel ID.
S1006, the IAS returns a redirect message to the STB that includes the URL of the next request by the STB to the M3U8 file.
S1008, the STB again requests IAS according to the URL of the M3U8 file.
S1010, the IAS acquires the M3U8 file from the distributed file system DFS according to the path of the M3U8 file.
S1012, the IAS returns the M3U8 file to the STB.
S1014, according to HLS protocol, the M3U8 file contains all TS lists required by the STB for the next request. And the STB continuously requests the IAS to acquire a corresponding fragment TS file according to the URL list of the TS.
And S1016, reading the TS file from the DFS by the IAS every time the IAS receives the message that the STB requests the TS file.
And S1018. every time the IAS receives the message that the STB requests the TS file, the IAS returns the read TS file to the STB. This process repeats until the STB requests completion of all TS files.
An embodiment of the present invention further provides a playback device for recording a program, which is disposed on a CDN user server, where fig. 11 is a first structural block diagram of the playback device for recording a program according to the embodiment of the present invention, and as shown in fig. 11, the playback device includes:
a receiving playing request module 1102, configured to receive a playing request message sent by a user terminal, where the playing request message includes start-stop time information of a recorded program requested to be played; an index obtaining module 1104, configured to obtain a corresponding index file according to the play request message, and send the index file to the user terminal; a third receiving module 1106, configured to receive a TS file acquisition request sent by a user terminal, where the TS file corresponds to the index file; the reading module 1108 is configured to read a corresponding TS file according to the TS file obtaining request and send the TS file to the user terminal.
Through the embodiment of the present invention, the play request receiving module 1102 receives a play request message sent by a user terminal, wherein the play request message includes start-stop time information of a requested play recording program; the index acquisition module 1104 acquires a corresponding index file according to the play request message and sends the index file to the user terminal; a third receiving module 1106 receives a request for obtaining a TS file sent by a user terminal, where the TS file corresponds to the index file; the reading module 1108 reads the corresponding TS file according to the TS file obtaining request and sends the TS file to the user terminal. The user terminal can record and play the network program in any time slot without being limited by the program list appointed by the system.
Fig. 12 is a block diagram of a second structure of a recorded program playing apparatus according to an embodiment of the present invention, and in an embodiment of the present invention, as shown in fig. 12, the index obtaining module 1204 further includes:
a querying unit 12002, configured to query, according to the play request message, storage path information of a corresponding index file (i.e., M3U8 file), and notify the user terminal; a receive index request unit 12004, configured to receive index file request information sent by a user terminal, where the index file is determined by the terminal according to its storage path information; an obtaining unit 12006, configured to obtain the index file according to the index file request information.
An embodiment of the present invention further provides a system for recording a network program, fig. 13 is a schematic structural diagram of a system for recording a network program according to an embodiment of the present invention, and as shown in fig. 13, the system is a part of a CDN system and includes:
CDN CHANNEL server CHANNEL, comprising: the downloading module is used for downloading the fragment TS file of the program to the channel source station; a receiving recording request module, configured to receive a recording request message sent by a user terminal, where the recording request message includes start-stop time information of a recorded program; an index generation module, configured to determine, according to the recording request message, a TS file to be recorded in the downloaded TS file, and generate a corresponding index file;
and the distributed file system DFS is used for storing the TS file.
The CDN system of the system comprises:
the terminal STB is connected with an interface (A interface) of an IAM (Internet access module) of the CDN management platform, and the interface (A interface) is used for receiving a request message sent by the STB by the IAM and displaying the message after the recording is successful;
an interface (B interface) between the IAM and a CDN CHANNEL server CHANNEL, which is used for the IAM to issue a request to the CHANNEL, mainly a CHANNEL creation request and an NPVR recording request, wherein the CHANNEL is positioned in a CDN node, and the IAM can simultaneously manage a plurality of CDN nodes;
the STB interfaces (C interface) with the user management server IAS for the user to access the CDN through the STB and play the recorded program.
Through the embodiment of the invention, CHANNEL downloads the fragmented TS file of the program to the CHANNEL source station; the DFS stores the downloaded TS file; CHANNEL receives a recording request message with recorded program start-stop time information sent by a user terminal; according to the recording request message, CHANNEL determines the TS file to be recorded in the downloaded TS file, and generates a corresponding index file. Therefore, the user terminal can record the network program in any time slot without being limited by the program list specified by the system.
Optionally, the system may further include: the CDN management platform IAM may send CHANNEL creation information to CHANNEL, receive and process a recording application sent by the user terminal, and forward the recording application to CHANNEL.
Optionally, the IAM may also notify the user terminal of various process status information, such as a message that CHANNEL creation is successful, a message that an NPVR application has been accepted, a message that NPVR recording is successful, and the like.
Of course, the network program recording system in the embodiment of the present invention further includes a database, which is a general database in the prior art, and is used to store data in the network program recording process, such as storing an NPVR task table, a CHANNEL record created by CHANNEL, a name and storage path information of an M3U8 file, an NPVR _ TS table, and the like.
It should be noted that NPVR in the present invention is a personal customized recording, and the time period is set by the end user. In the aspect of storage space occupation, the smaller the TS file is taken as the minimum storage unit, the more accurate the storage is, but the more the TS file is divided, the more the file is, the more the file can be divided according to the actual situation, and the current common division of HLS is one TS fragment playing 10 seconds of video. Different individuals record, the CDN system only generates corresponding m3u8 files, and the TS files are only stored, so that the storage space occupation is effectively saved, and the user experience is improved. Compared with personal recording in the traditional IPTV, the method has the advantages that the NPVR storage is more accurate due to the media file fragment storage mode, and the method is a great advantage. In a conventional IPTV system, there are three NPVR personal recordings as shown, and the minimum unit stored in the system is a program, so the system needs to store at least three complete programs to meet the NPVR requirements. On the basis of the storage of the fragments, if three NPVR personal recordings are also used, the starting time of the personal recording 1 and the ending time of the personal recording 3 can be accurately reached, the storage space occupation is effectively saved, and the method is a great advantage.
Finally, those skilled in the art will appreciate that the various modules or steps of the invention described above can be implemented using a general purpose computing device, that they can be centralized on a single computing device or distributed across a network of computing devices, and that they can alternatively be implemented using program code executable by a computing device, such that the steps shown and described can be performed by a computing device stored in a memory device and, in some cases, performed in an order different than that described herein, or separately fabricated into individual integrated circuit modules, or fabricated into a single integrated circuit module from a plurality of modules or steps. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims (21)
1. A method for recording a network program, comprising:
a CDN channel server of a content delivery network downloads a fragment TS file of a program to a channel source station;
the CDN channel server receives a recording request message sent by a user terminal, wherein the recording request message comprises start-stop time information, a channel ID and a user ID of a recorded program; the CDN management platform authenticates the user based on the channel ID and the user ID and then sends the recording request message to a CDN channel server;
the CDN channel server determines a TS file to be recorded in the downloaded TS files according to the recording request message and generates a corresponding index file;
the step that the CDN channel server determines the TS files needing to be recorded in the downloaded TS files according to the recording request message and generates corresponding index files comprises the following steps:
the CDN channel server inserts the current recording task contained in the recording request message into a personal recording task table; the CDN channel server inquires a personal recording task list to be processed at regular time, judges whether the current time finishes recording in the personal recording time period according to the ending time of the current recording task, determines a TS file to be recorded according to the starting and ending time information of a recording program if the current time finishes recording in the personal recording time period, generates an index file corresponding to the TS file to be recorded, and updates the task state of the current recording task in the personal recording task list to be finished after the index file is successfully generated.
2. The method of claim 1, wherein the CDN channel server downloads the fragmented TS file to the channel source station, comprising:
downloading an index file of a program to the channel source station;
and downloading the corresponding TS file according to the index file.
3. The method of claim 2, wherein after the CDN channel server downloads the fragmented TS file of the program to the channel source station, the method comprises:
and storing the TS file in a Distributed File System (DFS).
4. The method of claim 3, wherein the index file is an M3U8 file.
5. The method as claimed in any one of claims 1 to 4, wherein after the CDN channel server downloads the fragmented TS file of the program to the channel source station, the method further comprises:
and the CDN channel server deletes the non-recorded TS file according to a recording deletion request message sent by the user terminal.
6. The method of claim 5, wherein after the CDN channel server downloads the segmented TS file of the program to the channel source station, further comprising:
and the CDN channel server deletes the TS file which exceeds a preset time period and is not recorded.
7. A recording device of network program is arranged on a CDN channel server, and is characterized by comprising:
the downloading module is used for downloading the fragment TS file of the program to the channel source station;
a receiving recording request module, configured to receive a recording request message sent by a user terminal, where the recording request message includes start-stop time information of a recorded program, a channel ID, and a user ID; the CDN management platform authenticates the user based on the channel ID and the user ID and then sends the recording request message to a CDN channel server;
an index generation module, configured to determine, according to the recording request message, a TS file to be recorded in the downloaded TS file, and generate a corresponding index file;
the index generation module is also used for inserting the current recording task contained in the recording request message into a personal recording task table; and inquiring a to-be-processed personal recording task list at regular time, judging whether the current time finishes recording in the personal recording time period according to the ending time of the current recording task, if so, determining a TS file to be recorded according to the starting and ending time information of the recorded program, generating an index file corresponding to the TS file to be recorded, and updating the task state of the current recording task in the personal recording task list to be finished after the index file is successfully generated.
8. The apparatus of claim 7, wherein the recording module comprises:
the first downloading unit is used for downloading the index file of the program to the channel source station;
and the second downloading unit is used for downloading the corresponding TS file according to the index file.
9. The apparatus of claim 8, further comprising:
and the storage module is used for storing the TS file in a Distributed File System (DFS).
10. The apparatus of claim 9, wherein the index file is an M3U8 file.
11. The apparatus of any one of claims 7 to 10, further comprising:
and the first deleting module is used for deleting the TS file which is not recorded according to the recording deleting request message sent by the user terminal.
12. The apparatus of claim 11, further comprising:
and the second deleting module is used for deleting the TS file which exceeds the preset time period and is not recorded.
13. A method for playing a recorded program, comprising:
a CDN user server receives a play request message sent by a user terminal, wherein the play request message comprises start-stop time information, a channel ID and a user ID of a recorded program;
the CDN user server acquires a corresponding index file according to the start-stop time information, the channel ID and the user ID in the playing request message and sends the index file to the user terminal;
the CDN user server receives a request for obtaining the TS file sent by the user terminal, wherein the TS file corresponds to the index file; according to the HLS protocol, the index file contains all TS lists required by the next request of the user terminal, and the user terminal continuously sends TS file requests to the CDN user server according to the TS lists so as to obtain corresponding fragment TS files;
and the CDN user server reads the corresponding TS file according to the TS file acquisition request and sends the corresponding TS file to the user terminal.
14. The method of claim 13, wherein the obtaining, by the CDN user server, the corresponding index file according to the play request message includes:
the CDN user server inquires corresponding index file storage path information according to the playing request message and informs the user terminal;
the CDN user server receives the index file request information sent by the user terminal, wherein the index file is determined by the terminal according to the storage path information; and acquiring the index file according to the index file request information.
15. The method of claim 14, wherein the index file is an M3U8 file.
16. The utility model provides a play device of recording program, sets up on CDN user server, its characterized in that includes:
a receiving playing request module, configured to receive a playing request message sent by a user terminal, where the playing request message includes start-stop time information, a channel ID, and a user ID of a recorded program requested to be played;
the acquisition index module is used for acquiring a corresponding index file according to the start-stop time information, the channel ID and the user ID in the playing request message and sending the index file to the user terminal;
a third receiving module, configured to receive a TS file acquisition request sent by the user terminal, where the TS file corresponds to the index file; according to the HLS protocol, the index file contains all TS lists required by the next request of the user terminal, and the user terminal continuously sends TS file requests to the CDN user server according to the TS lists so as to obtain corresponding fragment TS files;
and the reading module is used for reading the corresponding TS file according to the TS file acquisition request and sending the corresponding TS file to the user terminal.
17. The method of claim 16, wherein the obtaining an index module comprises:
the query unit is used for querying the corresponding index file storage path information according to the playing request message and notifying the user terminal;
a receiving index request unit, configured to receive the index file request information sent by the user terminal, where the index file is determined by the terminal according to the storage path information;
and the acquisition unit is used for acquiring the index file according to the index file request information.
18. The apparatus of claim 17, wherein the index file is an M3U8 file.
19. A system for recording network programs, comprising:
CDN CHANNEL server CHANNEL, comprising: the downloading module is used for downloading the fragment TS file of the program to the channel source station; a receiving recording request module, configured to receive a recording request message sent by a user terminal, where the recording request message includes start-stop time information of a recorded program, a channel ID, and a user ID; an index generation module, configured to determine, according to the recording request message, a TS file to be recorded in the downloaded TS file, and generate a corresponding index file; the index generation module is also used for inserting the current recording task contained in the recording request message into a personal recording task table; inquiring a personal recording task list at regular time, judging whether the recording of the current time in the personal recording time period is finished according to the ending time of the current recording task, if so, determining a TS file to be recorded according to the starting and ending time information of the recorded program, generating an index file corresponding to the TS file to be recorded, and updating the task state of the current recording task in the personal recording task list to be finished after the index file is successfully generated; and the recording request message is sent to the CDN channel server after the CDN management platform authenticates the user based on the channel ID and the user ID.
And the distributed file system DFS is used for storing the TS file.
20. The system of claim 19, further comprising:
and the CDN management platform IAM is used for forwarding the recording request message sent by the user terminal to the CDN channel server.
21. The system of claim 20, wherein the CDN management platform IAM is further configured to notify the user terminal of process status information.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410856558.XA CN105812831B (en) | 2014-12-31 | 2014-12-31 | Network program recording method, device and system and playing method and device |
PCT/CN2015/087942 WO2016107197A1 (en) | 2014-12-31 | 2015-08-24 | Network program recording method, device and system, and recorded-program playing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410856558.XA CN105812831B (en) | 2014-12-31 | 2014-12-31 | Network program recording method, device and system and playing method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105812831A CN105812831A (en) | 2016-07-27 |
CN105812831B true CN105812831B (en) | 2020-06-09 |
Family
ID=56284131
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410856558.XA Active CN105812831B (en) | 2014-12-31 | 2014-12-31 | Network program recording method, device and system and playing method and device |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN105812831B (en) |
WO (1) | WO2016107197A1 (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108271039B (en) * | 2016-12-30 | 2021-11-12 | 中兴通讯股份有限公司 | File sending method and device |
CN108513162A (en) * | 2017-02-23 | 2018-09-07 | 中兴通讯股份有限公司 | Caching, playback method and the system reviewed is broadcast live |
CN107547517B (en) * | 2017-07-25 | 2020-04-17 | 高斯贝尔数码科技股份有限公司 | Audio and video program recording method, network equipment and computer device |
CN111641851A (en) * | 2020-05-13 | 2020-09-08 | 深圳创维-Rgb电子有限公司 | PVR recording method, system and storage medium for video platform equipment |
CN113300875B (en) * | 2021-02-10 | 2024-09-20 | 阿里巴巴集团控股有限公司 | Method, server, system and storage medium for checking back source data |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP2537117A1 (en) * | 2010-02-17 | 2012-12-26 | Verimatrix, Inc. | Systems and methods for securing content delivered using a playlist |
CN102883187A (en) * | 2012-09-17 | 2013-01-16 | 华为技术有限公司 | Time-shift program service method, equipment and system |
CN104079983A (en) * | 2014-06-26 | 2014-10-01 | 江苏省邮电规划设计院有限责任公司 | System and method for HLS program recording and service |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101370126B (en) * | 2008-09-24 | 2012-02-08 | 中兴通讯股份有限公司 | Broadcast control method and system for monitoring video |
US9043484B2 (en) * | 2010-04-02 | 2015-05-26 | Disney Enterprises, Inc. | Streaming playback and dynamic ad insertion |
US8843596B2 (en) * | 2011-11-30 | 2014-09-23 | Adobe Systems Incorporated | Conversion between streaming media communication protocols |
CN103763637A (en) * | 2014-01-21 | 2014-04-30 | 北京云视睿博传媒科技有限公司 | Stream media broadcasting method and system |
CN103813185B (en) * | 2014-01-26 | 2019-01-25 | 中兴通讯股份有限公司 | A kind of method that segment programs are quickly distributed, server and client |
CN103796035B (en) * | 2014-01-27 | 2019-11-05 | 南京中兴软件有限责任公司 | A kind of method, server and client device handling segment programs |
-
2014
- 2014-12-31 CN CN201410856558.XA patent/CN105812831B/en active Active
-
2015
- 2015-08-24 WO PCT/CN2015/087942 patent/WO2016107197A1/en active Application Filing
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP2537117A1 (en) * | 2010-02-17 | 2012-12-26 | Verimatrix, Inc. | Systems and methods for securing content delivered using a playlist |
CN102883187A (en) * | 2012-09-17 | 2013-01-16 | 华为技术有限公司 | Time-shift program service method, equipment and system |
CN104079983A (en) * | 2014-06-26 | 2014-10-01 | 江苏省邮电规划设计院有限责任公司 | System and method for HLS program recording and service |
Also Published As
Publication number | Publication date |
---|---|
WO2016107197A1 (en) | 2016-07-07 |
CN105812831A (en) | 2016-07-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11350139B2 (en) | Video live broadcast method and apparatus | |
CN102547478B (en) | Triggered slice on-demand system and method of streaming media based on CDN (Content Distribution Network) | |
CN105812831B (en) | Network program recording method, device and system and playing method and device | |
US9356985B2 (en) | Streaming video to cellular phones | |
US20110219386A1 (en) | Method and apparatus for generating bookmark information | |
WO2018153237A1 (en) | Caching method and system for replaying live broadcast, and playing method and system | |
CN103813185B (en) | A kind of method that segment programs are quickly distributed, server and client | |
CN112383790B (en) | Live broadcast screen recording method and device, electronic equipment and storage medium | |
CN104202655A (en) | Method and device of downloading audio and video files | |
US9877065B2 (en) | System and method for synching portable media player content with storage space optimization | |
WO2011018051A1 (en) | Method, device and system for processing network personal video recording | |
EP3780642A1 (en) | Streaming media data processing method and streaming media processing server | |
CN109936751A (en) | Video recording method, device, equipment, computer readable storage medium and system | |
WO2017041663A1 (en) | Video control method and device | |
CN101202882A (en) | Method, system for transmitting medium resource and set-top box | |
CN111800672B (en) | Method and device for recording network personal video | |
KR101950997B1 (en) | Method for managing contents with contents tag and apparatus thereof | |
KR20070105628A (en) | Method for exchanging contents between heterogeneous system and contents management system for performing the method | |
CN111225248B (en) | On-demand content management method and content distribution network on-demand server | |
WO2017080152A1 (en) | Data synchronization method and device | |
JP2016213709A (en) | Moving image reproduction system, client device, server device, and program | |
KR100687416B1 (en) | Multimedia contents providing system and method using reproduction section information on the contents | |
CN102202231B (en) | The processing method of time shifting channel and device | |
JP4285015B2 (en) | Network broadcasting system, content distribution method, and program providing apparatus | |
TW201937938A (en) | Decoder, decoding method, and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |