CN111800672B - Method and device for recording network personal video - Google Patents

Method and device for recording network personal video Download PDF

Info

Publication number
CN111800672B
CN111800672B CN202010508915.9A CN202010508915A CN111800672B CN 111800672 B CN111800672 B CN 111800672B CN 202010508915 A CN202010508915 A CN 202010508915A CN 111800672 B CN111800672 B CN 111800672B
Authority
CN
China
Prior art keywords
npvr
recording
channel
index file
channel time
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
Application number
CN202010508915.9A
Other languages
Chinese (zh)
Other versions
CN111800672A (en
Inventor
阮成华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Fonsview Technologies Co ltd
Fiberhome Telecommunication Technologies Co Ltd
Original Assignee
Wuhan Fonsview Technologies Co ltd
Fiberhome Telecommunication Technologies Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Wuhan Fonsview Technologies Co ltd, Fiberhome Telecommunication Technologies Co Ltd filed Critical Wuhan Fonsview Technologies Co ltd
Priority to CN202010508915.9A priority Critical patent/CN111800672B/en
Publication of CN111800672A publication Critical patent/CN111800672A/en
Application granted granted Critical
Publication of CN111800672B publication Critical patent/CN111800672B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/83Generation or processing of protective or descriptive data associated with content; Content structuring
    • H04N21/845Structuring of content, e.g. decomposing content into time segments
    • H04N21/8456Structuring of content, e.g. decomposing content into time segments by decomposing the content in the time domain, e.g. in time segments
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/21Server components or server architectures
    • H04N21/218Source of audio or video content, e.g. local disk arrays
    • H04N21/2187Live feed
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/231Content storage operation, e.g. caching movies for short term storage, replicating data over plural servers, prioritizing data for deletion
    • H04N21/23113Content storage operation, e.g. caching movies for short term storage, replicating data over plural servers, prioritizing data for deletion involving housekeeping operations for stored content, e.g. prioritizing content for deletion because of storage space restrictions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/232Content retrieval operation locally within server, e.g. reading video streams from disk arrays
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/433Content storage operation, e.g. storage operation in response to a pause request, caching operations
    • H04N21/4334Recording operations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/64Addressing
    • H04N21/6405Multicasting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/64Addressing
    • H04N21/6408Unicasting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/643Communication protocols
    • H04N21/6437Real-time Transport Protocol [RTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/85Assembly of content; Generation of multimedia applications
    • H04N21/858Linking data to content, e.g. by linking an URL to a video object, by creating a hotspot
    • H04N21/8586Linking data to content, e.g. by linking an URL to a video object, by creating a hotspot by using a URL
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/76Television signal recording

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Television Signal Processing For Recording (AREA)

Abstract

The invention relates to the technical field of IPTV and OTT internet multimedia, and provides a method and a device for recording network personal video. The method comprises the steps of receiving a first nPVR recording request, wherein the first nPVR recording request carries a first nPVR program list and a user identifier; inquiring recording information of channel time shifting according to the first nPVR program list; if the channel time shift corresponding to the first nPVR program list is determined according to the recording information, the channel time shift is in a recorded state or a recording state; and acquiring the index information of the first channel time shift, and establishing a mapping relation between the user identification and the index information of the first channel time shift. The nPVR services of all users directly share the live broadcast channel time-shifted recorded program, so that the waste of storage resources caused by the fact that independent space is opened up for each user to store a large number of same programs is avoided.

Description

Method and device for recording network personal video
[ technical field ] A method for producing a semiconductor device
The invention relates to the technical field of IPTV and OTT internet multimedia, in particular to a method and a device for recording network personal video.
[ background of the invention ]
With the advancement of three-network convergence and the rapid development of internet televisions, users have not satisfied the television watching modes of 'one-way transmission' and 'passive reception', and higher requirements are put forward on the individuation and interactivity of television services; for this reason, operators have vigorously developed nPVR (Network Personal Video Recording) value-added interactive services.
The traditional personal video recording service stores the recorded content in a hard disk at the user side, thereby not only improving the cost and price of the set top box and causing loss of part of potential users, but also greatly increasing the complexity of equipment management and maintenance. The Network personal video recording service stores the Content in a CDN (Content Delivery Network) without storing the Content in a user side, reduces the requirement of a set-top box side on a storage space and saves the terminal cost.
However, there are two problems with the network personal video recording service (nPVR):
firstly, the general implementation mode of the nPVR is that after a CDN side receives a recording request of the nPVR of a user side, the program lists requested by the nPVR are respectively recorded and stored in the CDN in the channel program playing process; most of these nPVR users are the episode of the IPTV/OTT users' hot spot episodes of the channels, thus causing a large number of repeated recordings of the same program, consuming the storage space of the CDN.
Second, IPTV/OTT channel time shifts are typically stored for 7 days, and a special column or episode of interest to a user is often half a month or more during a certain channel's broadcast period, and even after the broadcast period, the user wants to watch ordered nPVR programs for a longer period of time. The programs with the expired channel time shift are not stored in the CDN any more, so that the nPVR of the programs with the time shift shared by the channels cannot be watched along with the expired deletion of the programs of the channels; if the channel time shifting program is not cleared and deleted in time, the CDN storage space is quickly exhausted by a large amount of channel time shifting programs, so that the CDN cannot continue to store new programs to affect operation, which is a common limitation problem of the shared channel time shifting scheme.
In view of the above, overcoming the drawbacks of the prior art is an urgent problem in the art.
[ summary of the invention ]
The technical problem to be solved in the invention is that in the prior art, in the process of playing channel programs, program lists requested by the nPVR are respectively recorded and stored in the CDN; resulting in a large number of repeated recordings of the same program, consuming the storage space of the CDN.
The technical problem to be further solved by the present invention is that the programs whose channel time-shift has expired will not be stored in the CDN any more, resulting in that nPVR of the shared channel time-shift program cannot be viewed as the channel programs are deleted with expiration; if the channel time-shifting program is not cleared and deleted in time, the problem that the CDN cannot continuously store new programs to influence operation due to the fact that the storage space of the CDN is quickly exhausted by massive channel time-shifting programs is caused.
The invention adopts the following technical scheme:
in a first aspect, the present invention provides a method for network personal video recording, comprising:
receiving a first nPVR recording request, wherein the first nPVR recording request carries a first nPVR program list and a user identifier;
inquiring recording information of channel time shifting according to the first nPVR program list;
if the channel time shift corresponding to the first nPVR program list is determined according to the recording information, the channel time shift is in a recorded state or a recording state; and acquiring the index information of the channel time shift of the first nPVR program list, and establishing a mapping relation between the user identification and the index information of the channel time shift of the first nPVR program list.
Preferably, the method further comprises:
if the channel time shift corresponding to the first nPVR program list is determined according to the recording information, the channel time shift does not exist or is not in the recording state, the channel time shift of the first nPVR program list is analyzed to be in the range of a channel time shift interval to be stored, index information is established for the first nPVR program list, and after the recording of the channel time shift of the corresponding first nPVR program list is completed, the mapping relation between the user identification and the index information of the channel time shift of the first nPVR program list is established.
Preferably, the channel time-shifted recording process is a relatively independent parallel process with respect to receiving the first nPVR recording request, wherein the channel time-shifted recording process comprises:
acquiring each channel program of a live channel source, and recording each channel program into channel time shift under an HLS protocol according to natural time, wherein the recorded recording information of the channel time shift comprises a primary index file, a secondary index file, an I frame index file and a ts fragment file;
wherein, the first-level index file comprises channel ID information; the second-level index file comprises the relevant information of each ts fragment file in the channel time shift of the first nPVR program list; the I frame index file contains the relevant information of the key frames in the fragments.
Preferably, the acquiring of each channel program of the live channel source and the recording of each channel program as a channel time shift under the HLS protocol according to natural time includes:
HLS slicing is carried out on media streams of a direct broadcast channel source, HLS data streams after HLS slicing are sent to a CDN media control server, and therefore time-shifted recording of each channel is completed on the CDN media control server; the channel data after the HLS slicing processing includes a first-level index file, a second-level index file, an I-frame index file, and ts slice files of the channel.
Preferably, the nPVR management server generates a play URL and returns the play URL to the user side when receiving the user nPVR play request; wherein the generated play URL includes: the CDN media control server comprises an address, a first-level index file name and identification information of a playing content range;
after receiving the playing URL returned by the nPVR management server, the user side sends a video playing request carrying the playing URL to a target CDN media control server, and the target CDN media control server returns the content of a primary index file according to the name of the primary index file in the playing URL; the content of the first-level index file comprises a second-level index file name and an I-frame index file name corresponding to each code rate;
after the user side completes code rate adaptation, a second playing URL is sent to the CDN media control server, so that the CDN media control server forms a secondary index file content and an I frame index file content and returns the secondary index file content and the I frame index file content to the user side;
the user side plays the content of the secondary index file and the content of the I-frame index file; the second playing URL carries identification information of an address of the CDN media control server and a playing content range, and a secondary index file name and an I-frame index file name which are obtained after the code rate adaptation.
Preferably, the CDN media control server adds each segment to a corresponding pointer linked list in a secondary index file of each channel time-shifted, where each linked list node in the pointer linked list stores the position of the first I frame of the segment; a recording pointer and a deleting pointer are also configured corresponding to each pointer linked list;
the first node of the pointer linked list stores the address of the first fragment recorded earliest in channel time shift; the recording pointer always points to a linked list node which stores the latest fragments of the channel time shift in a pointer linked list; the deleting pointer always points to the link table node storing the next fragment in the pointer link table after the last fragment is eliminated in the pointer link table.
Preferably, when the CDN media control server eliminates the ts segment file, the CDN media control server queries the nPVR management server about all channel records of the channel, filters according to the natural time of the channel record and the I-frame keyword to find the current deletion pointer and an expired segment that needs to be eliminated in subsequent segment nodes, and dynamically links the pointer to the segment after elimination.
Preferably, the method further comprises a ts fragmentation file elimination strategy, specifically:
executing a corresponding ts fragment file elimination process when the time length of the ts fragment file exceeds a preset threshold; or the like, or, alternatively,
and when the time length of the ts fragment file exceeds a preset threshold value, executing a corresponding ts fragment file elimination process, and when the ts fragment file meets the condition that the intersection with the index information of each user is empty, executing the corresponding ts fragment file elimination process.
Preferably, the searching heat of the current channel program is regularly acquired, and a preset threshold value of the time length corresponding to the ts slicing file is adjusted according to the searching heat;
the searching heat is divided into at least two stages, and corresponding preset threshold values are added with corresponding specified time lengths corresponding to the searching heat of one stage or multiple stages.
In a second aspect, the present invention also provides an apparatus for network personal video recording, the apparatus comprising:
at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor for performing the method of network personal video recording of the first aspect.
The nPVR services of all users directly share the live broadcast channel time-shifted recorded program, so that the waste of storage resources caused by the fact that independent space is opened up for each user to store a large number of same programs is avoided.
In the preferred scheme of the invention, the nPVR record is established directly by utilizing the primary index and the secondary index of the channel time-shifting program and the I frame index information according to the nPVR program list of the user, and the recording process and the processing mode of the channel time-shifting program are not influenced;
the pointer linked list algorithm provided by the invention supports generation of channel time shifting, eliminates time shifting fragments which are not related to the nPVR record when the time shifting fragments are overdue in HLS time shifting, supports long life cycle management of the nPVR of a user, eliminates the fragments which are not related to the nPVR record at the same time, and releases CDN storage space occupied by time shifting programs.
On the design of innovative combination of shared programs and a pointer linked list algorithm for eliminating outdated fragments, the method and the system can greatly improve the processing efficiency of the nPVR service and the user experience of the nPVR service, and improve the utilization rate of CDN resources.
[ description of the drawings ]
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required to be used in the embodiments of the present invention will be briefly described below. It is obvious that the drawings described below are only some embodiments of the invention, and that for a person skilled in the art, other drawings can be derived from them without inventive effort.
Fig. 1 is a flowchart of a method for network personal video recording according to an embodiment of the present invention;
fig. 2 is a flow chart of another method for network personal video recording according to an embodiment of the present invention;
fig. 3 is a system architecture diagram of a network personal video recording provided by an embodiment of the present invention;
fig. 4 is a schematic diagram of an nPVR record definition format in network personal video recording according to an embodiment of the present invention;
fig. 5 is a schematic diagram illustrating pointer changes in a link table for personal video recording over a network according to an embodiment of the present invention;
fig. 6 is a schematic diagram illustrating a recording process of a network personal video recording according to an embodiment of the present invention;
fig. 7 is a schematic diagram of a playing process in a network personal video recording according to an embodiment of the present invention;
fig. 8 is a schematic diagram illustrating an update query of a network personal video recording according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of an apparatus for network personal video recording according to an embodiment of the present invention.
[ detailed description ] embodiments
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
In the description of the present invention, the terms "inner", "outer", "longitudinal", "lateral", "upper", "lower", "top", "bottom", and the like indicate orientations or positional relationships based on those shown in the drawings, and are for convenience only to describe the present invention without requiring the present invention to be necessarily constructed and operated in a specific orientation, and thus should not be construed as limiting the present invention.
The description of the embodiment of the present invention may relate to technical expressions similar to "a primary index file" and "a primary index file name", where the "a primary index file name" is a name identifier corresponding to the "a primary index file", and the "a primary index file name" may be carried in a specific message field and a record table during a specific implementation process, and the "a primary index file" is usually stored in a certain device main body, and completes processing of the associated content corresponding to the "a primary index file" in cooperation with a corresponding related message carrying the "a primary index file name". In addition, the technical features involved in the embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
Example 1:
embodiment 1 of the present invention provides a method for recording network personal video, and it should be noted that the method of the present invention can be applied to different system architectures, and after the method of the embodiment of the present invention, a specific implementation process will be described by combining the method of the present invention with a system architecture diagram similar to fig. 3, as shown in fig. 1, the method includes:
in step 201, a first nPVR recording request is received, wherein the first nPVR recording request carries a first nPVR playbill and a user identifier.
The user identification can be an account number of the user, an ID identification number of a data card inserted on a similar set-top box, a mobile phone number in a similar smart phone and the like. The corresponding first nPVR playslip may appear as an episode or as a segment of a specific video specifying a start time and an end time.
In step 202, the recording information of the channel time shift is queried according to the first nPVR playlist.
In the mechanism implemented by the present invention, preferably, for a live video, a round of channel time-shifting recording operation is directly performed on a corresponding recording platform; for the recording request initiated by the user side, the method specifically represents that the corresponding recorded channel is time-shifted and generates a mapping relation with an object (such as the episode, the starting time, the ending time and the like) used for calibrating time in the nPVR recording request sent by the corresponding user; the mapping relation is the recording result finished by the corresponding user.
In step 203, if the channel time shift corresponding to the first nPVR program list is determined according to the recording information, the channel time shift is in a recorded state or a recording state; and acquiring the index information of the channel time shift of the first nPVR program list, and establishing a mapping relation between the user identification and the index information of the channel time shift of the first nPVR program list.
In the embodiment of the invention, the nPVR services of all users directly share and use the live channel to time shift the recorded program, thereby avoiding the waste of storage resources caused by opening up an independent space for each user to store a large number of same programs. The invention can greatly improve the processing efficiency of the nPVR service and the user experience of the nPVR service, and improve the utilization rate of CDN resources.
In the specific implementation process, in combination with the embodiment of the present invention, in step 203, the recording information may further draw a conclusion that the channel time shift corresponding to the first nPVR playlist does not exist or is not in the recorded state. This may occur because there are many channel time shifting tasks concurrently generated in the CDN media control server for programs corresponding to different channels, so that when the first nPVR recording request is received, the CDN media control server has not completed generation of a channel time shift for the corresponding first nPVR playlist. Therefore, as a technical solution in a possible implementation scenario considered more fully, as shown in fig. 2, the method further includes step 204.
In step 204, if it is determined that the channel time shift corresponding to the first nPVR playlist does not exist or is not in the recorded state according to the recording information, analyzing that the channel time shift of the first nPVR playlist is within the range of the channel time shift interval to be stored, establishing index information for the first nPVR playlist, and establishing a mapping relationship between the user identifier and the index information of the channel time shift of the first nPVR playlist after completing the recording of the channel time shift of the corresponding first nPVR playlist.
As a specific implementation scenario of the present invention, in addition to receiving the first nPVR recording request, a second nPVR recording request, a third nPVR recording request, and the like may also be received, and the corresponding recording request may be from the same user side or from different user sides, and the following describes a further implementation process of the embodiment of the present invention by taking the reception of the second nPVR recording request corresponding to the second user identifier as an example:
receiving a second nPVR recording request, wherein the second nPVR recording request carries a second nPVR program list and a second user identification; inquiring the recording information of the channel time shift according to the second nPVR program list; if the channel time shift corresponding to the second nPVR program list is determined according to the recording information, the channel time shift is in a recorded state or a recording state; and acquiring the index information of the channel time shift of the second nPVR program list, and establishing a mapping relation between the second user identification and the index information of the channel time shift of the second nPVR program list. In an actual implementation process, the second nPVR playlist may be directed to the same video content as the first nPVR playlist, or may be directed to a different video content. And in the real scene, the corresponding index information is more in mapping relation with a plurality of user identifications.
It should be noted that, in the embodiments of the present invention, the corresponding "first nPVR recording request" and "first nPVR program" are only used for convenience to describe different objects of the same kind, and do not have a meaning of substantially limiting the protection scope.
As a key channel time shift recording in the embodiment of the present invention, the channel time shift recording process is a relatively independent parallel processing process with respect to receiving a first nPVR recording request, and the channel time shift recording process includes: when each channel program of a live channel source is obtained, recording each channel program into channel time shift under an HLS protocol according to natural time, wherein the recorded recording information of the channel time shift comprises a primary index file, a secondary index file, an I frame index file and a ts fragment file;
wherein, the first-level index file contains channel ID information, which can be understood as the index of the channel; the second-level index file contains related information of each ts fragment file in the channel time shift of the first nPVR program list, such as fragment ID, time axis, absolute time, relative time and the like; the I frame index file contains the relevant information of key frames in the fragments, and the I frame is used for supporting special functions such as fast forward, fast backward and the like.
In the implementation process of the embodiment of the present invention, at least two media streams are supported, and then the method process in the network architecture shown in fig. 3 of the present invention will be described in the most typical two media stream formats. Before two implementation manners are specifically set forth, when the above method procedures of the embodiment of the present invention are attached to the network architecture as shown in fig. 3, the corresponding method procedures are expressed as: the nPVR management server receives a first nPVR recording request of a set top box (i.e. one of device manifestations at a user side, which does not exclude other device bodies capable of playing video like a smart phone, a PC, etc.), wherein the first nPVR recording request carries a first nPVR menu and a user identifier. And the nPVR management server inquires the recording information of the channel time shift according to the first nPVR program list. As shown in fig. 4, the nPVR management server according to the embodiment of the present invention establishes an nPVR record for each nPVR recording request, and the description of the data structure of the nPVR record is shown in fig. 4 for details, which is not described herein again. In the corresponding recording, the starting fragment id, the channel time-shift recording state of the primary index file, and the channel time-shift recording state are usually acquired from the CDN media control server by the nPVR management server. Similar to the information recording in fig. 4, when a subsequent user initiates an nPVR play request, the CDN media control server can be quickly located to specify the media content to be played. Wherein, TopindexName is a first-level index file name in channel time shifting, and is inherited from the channel data processed by HLS slice including the first-level index file of the channel in the process of generating the channel time shifting by the CDN media control service. Under a general condition, a secondary index file and an I frame index file are both contained in a primary index file, a user side initiates a play request to a CDN media control server for the first time only to carry a primary index file name, return information is primary index file content, and the secondary index file name and the I frame index file name are analyzed according to the content; the Recordflag field is used to store a channel time shift recording status corresponding to the channel time shift requested by the user side, and corresponds to the "completed recording or recording status" referred to in step 203 in the recording embodiment 1, which is also referred to as a recording status in other places of the embodiments of the present invention. In fig. 4, the meanings of other fields are detailed in the description and comments in the table, which are not repeated herein.
In the embodiment of the present invention, the maintenance of the related recording information may be represented by the nPVR management server completing the query of the corresponding recording information through signaling interaction with the CDN media control server, and certainly, in the implementation process of the present invention, it is not excluded that the corresponding recording information will be synchronously backed up in the nPVR management server, and at this time, the execution action of querying the recording information of the channel time shift may be completed only through the local query of the nPVR management server. If the channel time shift corresponding to the first nPVR program is determined according to the recording information and is in a recorded or recording state, in the architecture shown in fig. 3, the corresponding recording action is specifically completed by the CDN media control server in the figure; and acquiring the index information of the channel time shift of the first nPVR program list, and establishing a mapping relation between the user identification and the index information of the channel time shift of the first nPVR program list. Next, a specific processing procedure when the live broadcast source is a UDP media stream and an HLS media stream respectively will be described with specific reference to the architecture shown in fig. 3.
Situation one,
If the live broadcast channel source is a UDP media stream (also described as a live broadcast mode), the live broadcast control server receives media streams of one or more live broadcast channels from the live broadcast channel source, then forms multicast media broadcast to the network through RTP encapsulation, and the user set-top box receives the RTP encapsulated multicast media broadcast by the live broadcast control server and then plays the multicast media; after receiving RTP encapsulated multicast media broadcasted by a live broadcast control server, the HLS slice server sends the multicast media to the CDN media control server after processing by the HLS slice server; wherein the HLS slice server processing specifically includes:
HLS slicing is carried out on a multicast media stream (namely, a representation form of a media stream of a live channel source) (for example, the minimum duration of the media slicing can be equal to the duration of a GOP), and the HLS slicing server sends HLS data stream after HLS slicing to a CDN media control server so as to finish time-shift recording of each channel on the CDN media control server;
the channel data after HLS slicing includes a first-level index file (a channel main m3u8 file, a main m3u8 file may include descriptions of multiple second-level index files, and the second-level index files are distinguished by code rates to support multi-code rate channels), a second-level index file (a sub m3u8 file, which includes all segments of a code rate of a channel), an I-frame index file, and each ts segment file (which may also be expressed as a ts segment small file).
The first frame of each ts fragmentation file after HLS slicing processing is an I frame; ensuring that the slice can be quickly positioned to the first I frame to be played to each ts slicing file; the time involved in the channel first-level index file, the channel second-level index file, the channel I-frame index file and the channel ts fragment file is natural absolute time, namely the fragment starting position or any I-frame position after slicing is marked by natural time. In a preferred implementation scheme of the present invention, the duration of each ts fragmented file after HLS slicing is not less than 10s, and if the duration is less than 10s, the user side terminal is easy to jump when downloading the ts fragmented file for playing.
The second case,
If the live broadcast channel source is an HLS media stream (which is also described as a unicast mode, and the media stream of the corresponding live broadcast channel source is represented as a unicast media stream at this time), the live broadcast control server receives the media streams of one or more live broadcast channels from the live broadcast channel source and directly transmits the media streams to the HLS slicing server, and the HLS slicing server performs HLS data encapsulation and analysis processing to form a new HLS media data stream; sending HLS media data stream to a CDN media control server so as to finish the time-shifted recording of a channel corresponding to the first nPVR program list on the CDN media control server;
the HLS data encapsulation and parsing process includes generating a primary index file (channel master m3u8 file, master m3u8 may contain descriptions of multiple secondary index files that are differentiated by bitrate to support multi-bitrate channels), a secondary index file (sub m3u8 file that contains all slices of a bitrate of a channel), an I-frame index file, and each ts slice file of a channel.
Analyzing and packaging the ts fragmented files according to the existing continuous fragments in the HLS media stream, wherein the first frame of each packaged ts fragmented file is an I frame; if the HLS source has fragments smaller than 10s, combining the fragments to form fragments larger than or equal to 10 s.
As can be seen from the above, in the HLS slicing result, the case one and the case two are the same, and the difference between the two is more the difference in the type of the data source obtained at the front end.
In the preferred scheme of the invention, the nPVR record is established directly by utilizing the primary index and the secondary index of the channel time-shifting program and the I frame index information according to the nPVR program list of the user, and the recording process and the processing mode of the channel time-shifting program are not influenced.
In comparison, the two cases are the same in the form of the recording file after the slicing is finally completed in the HLS slicing server. The above-mentioned primary index file, secondary index file, I-frame index file, and ts fragmentation file are exemplarily presented and explained by specific exemplary codes as follows:
channel level one index file (main m3u8) example:
#EXTM3U
#EXT-X-STREAM-INF:PROGRAM-ID=1586503666_0000000154,BANDWIDTH=2048000
m3u8 notes: second-level index file with code rate number of 1 (such as 2M code rate) in same channel
Title EXT-X-I-FRAME-STREAM-INF BANDWIDTH 2048000, URI "1 _ iframe.m3u8": i frame index file URI with code rate number of 1 in same channel
M3u8 notes: second-level index file with code rate number of 2 (such as 4M code rate) in same channel
Title EXT-X-I-FRAME-STREAM-INF BANDWIDTH 4096000, URI "1 _ iframe.m3u8": i frame index file URI with code rate number of 2 in same channel
#EXT-X-ENDLIST
Example of a second level index file:
1.m3u8
#EXTM3U
#EXT-X-TARGETDURATION:10
#EXT-X-MEDIA-SEQUENCE:725495
note # EXT-X-PROGRAM-DATE-TIME:2020-04-10T07:27: 46Z: slice start time identified by absolute natural time
#EXTINF:10,2166512
http://172.16.6.105:8114/LIVES/1586503666_0000000154_1_0000000019.ts?FvSeid=622766e0584ac8f2&Fsv_filetype=2&Provider_id=fonsview_hls&Pcontent_id=colombiana&Fsv_CMSID=Fenghuo&Fsv_Sd=10&Fsv_otype=0&User ID=
#EXT-X-PROGRAM-DATE-TIME:2020-04-10T07:27:56Z
#EXTINF:10,2473516
http://172.16.6.105:8114/LIVES/1586503676_0000000154_1_0000000020.ts?FvSeid=622766e0584ac8f2&Fsv_filetype=2&Provider_id=fonsview_hls&Pcontent_id=colombiana&Fsv_CMSID=Fenghuo&Fsv_Sd=10&Fsv_otype=0&User ID=
#EXT-X-PROGRAM-DATE-TIME:2020-04-10T07:28:06Z
#EXTINF:10,2176664
I frame index File example:
#EXTM3U
#EXT-X-VERSION:4
note # EXT-X-I-FRAMES-ONLY: the index file includes only I-frames
#EXT-X-TARGETDURATION:10
#EXTINF:10,
Note # EXT-X-BYTERAGE: 37600@ 1880: resolution ratio
Note # EXT-X-PROGRAM-DATE-TIME:2020-04-10T07:27: 56Z: absolute time
$fragmentid.ts
It should be noted that the above-mentioned "comment" related content is a complete word explanation for the convenience of understanding the code, and does not belong to the content carried by the code itself. Explained further, "172.16.6.105" and "8114" are the IP and port, respectively, of the CDN media server, where the format name of ". ts" is the fragmented file object meaning; wherein "EXT-X-TARGETDURATION: 10" means a duration of 10 s.
In a more complete method presentation scenario, in addition to the generation process of the channel time shift set forth in embodiment 1 and the above-mentioned extension, a specific user request for playing the channel time shift recorded or subscribed by the user is also involved, which is described as an nPVR playing request in this implementation scenario, taking the system architecture shown in fig. 3 as an example, specifically:
when the nPVR management server receives the user nPVR playing request, a playing URL is generated and returned to the user side; wherein the generated play URL includes: the CDN media control server comprises an address, a first-level index file and identification information of a playing content range; the identification information of the playing content range can be the starting absolute natural time of the nPVR and the ending absolute natural time of the nPVR, and the starting absolute natural time of the nPVR and the ending absolute natural time of the nPVR are selected by the user when the playing request is initiated; similarly, the identification information of the playing content range may also be a list of videos; the identification information of the playing content range may also be a specific episode or the like.
After receiving the playing URL returned by the nPVR management server, the user side sends a video playing request carrying the playing URL to a target CDN media control server (the target CDN media control server is not specifically identified in fig. 3, but is actually a CDN media control server pointed to by the playing URL as shown in fig. 3), and the target CDN media control server returns content of a primary index file (only containing a channel code rate ordered by the user) according to the primary index file name in the playing URL; the content of the first-level index file comprises a second-level index file name and an I-frame index file name corresponding to each code rate;
after the user side completes code rate adaptation, a second playing URL is sent to the CDN media control server, so that the CDN media control server forms a secondary index file content and an I frame index file content and returns the secondary index file content and the I frame index file content to the user side;
the user side plays the content of the secondary index file and the content of the I-frame index file; the second playing URL carries identification information of an address of the CDN media control server and a playing content range, and a secondary index file name and an I-frame index file name which are obtained after the code rate adaptation. And the playing URL returned by the nPVR management server and the identification information of the playing content range carried in the second playing URL are the same content object.
In a specific implementation process, after receiving the content of the first-level index file, the user side analyzes the content of the first-level index file, selects a second-level index file name and an I-frame index file name corresponding to a proper code rate according to the bandwidth condition of the user side, and then splices the second-level index file name and the I-frame index file name to obtain a second playing URL, wherein the second playing URL comprises: the method comprises the steps that a CDN media control server address, a secondary index file name, an I frame index file name and identification information of a playing content range are sent to a target CDN media control server, a video playing request carrying a second playing URL is sent to the target CDN media control server, the target CDN media control server finds all fragments and I frames corresponding to the fragments according to the secondary index file name, the I frame index file name and the identification information of the playing content range, then secondary index file content and I frame index file content are formed and returned to a user side, and the user side plays according to the secondary index file content and the I frame index file content.
In fig. 3, the corresponding CDN media control server and the corresponding user-side terminal may be connected in data communication via the internet, but in fig. 3, in order to present the indirection described in the architecture corresponding to the above case one and case two, a network connection structure between the corresponding CDN media control server and the corresponding user-side terminal is not presented.
In the embodiment of the invention, when a live channel is introduced into a CDN media control server, the CDN media control server creates a pointer linked list in a memory for each channel; in the process of recording the time shift of the channel, each fragment in the secondary index file of the channel is added into the pointer linked list of the corresponding channel. When the corresponding channel time shift is generated, the CDN media control server adds each segment to a corresponding pointer linked list in a secondary index file for each channel time shift, where each linked list node in the pointer linked list stores the position of the first I frame of the segment, a front field of each linked list pointer stores a previous segment address that is adjacent to the segment stored by the current linked list pointer in absolute time, and a next field of each linked list pointer stores a next segment address that is adjacent to the segment stored by the current linked list pointer in absolute time (the corresponding front and next fields are the own characteristics of the pointer linked list, and therefore are not labeled and embodied in the related drawings). In a specific implementation, the adjacent last tile address is not necessarily the continuous video content. In the various implementation manners of the present invention, after a mapping relationship of corresponding fragments is established for a user, some fragment combinations that may be relatively dispersed may exist in the overdue deletion process. In addition, for the data of the pointer linked list of each channel in the memory, the CDN media control server may perform persistent storage processing, and the CDN media control server may store the data in a database or a linked list data file. After the CDN media control server is restarted, the channel linked list pointer data can be quickly read out from the database or the data file to the memory.
Furthermore, a recording pointer and a deleting pointer are also configured corresponding to each pointer linked list; as shown in fig. 5, a Head of the pointer linked list points to an empty node labeled with a channel ID, and a first node of the pointer linked list (as shown by a linked list node labeled "1" in fig. 5) stores an address of a first segment recorded earliest in channel time shift; the recording pointer always points to a linked list node which stores the latest fragments of the channel time shift in a pointer linked list; the deleting pointer always points to the link table node storing the next fragment in the pointer link table after the last fragment is eliminated in the pointer link table. In the linked list management manner shown in fig. 5, at the beginning of creating the pointer linked list, the corresponding recording pointer and deleting pointer both point to the pointer Head of the pointer linked list, and once a new fragment address is stored by the linked list pointer, for example, the second pointer linked list in fig. 5 is a schematic diagram storing 1 to 6 linked list nodes, where the recording pointer may be adjusted to the linked list node of the newest fragment (i.e., the linked list node labeled as 6 in the corresponding diagram) in real time. In a specific implementation process, it may also relate to that a ts fragmented file is deleted after expiration, for example, the third pointer linked list in fig. 5 is an effect schematic diagram after recording 4 to n ts fragmented file addresses, and compared with the second pointer linked list, a pointer linked list node numbered from 7 to n for storing a corresponding ts fragmented file address is newly added in the third pointer linked list, and a corresponding pointer linked list node numbered from 1 to 3 is also deleted because the corresponding ts fragmented file is deleted, and the deletion pointer at this time points to a previous node adjacent to the deleted pointer linked list node, that is, the pointer linked list node numbered from 4 shown in the diagram.
In the fourth pointer linked list shown in fig. 5, the delete pointer points to the pointer linked list node whose number is n, and the deletion of the pointer linked list node whose number is less than n is performed, so according to the operation method provided by the embodiment of the present invention, the corresponding delete pointer points to the linked list node whose next segment is stored in the pointer linked list whose last segment is eliminated in the pointer linked list. And the fourth pointer linked list before the pointer node with the number n pointed by the deletion pointer comprises: the pointer linked list node numbered 4, the pointer linked list node numbered 5, the pointer linked list node numbered 7, the pointer linked list node numbered 8 and the pointer linked list node numbered n-10 refer to that a mapping relation is established between the pointer linked list node numbered 4 and the nPVR program list of a certain user, so that the corresponding ts fragmented file is not deleted in the elimination process when the time length existing in the ts fragmented file exceeds a preset threshold value.
Fig. 5 is a schematic diagram of a relationship structure presented in a specific channel time-shift recording process and a corresponding elimination process according to the pointer linked list structure in the embodiment of the present invention. The relative position mapping between the start and end (identified as a _ start and a _ end, B _ start and B _ end, and C _ start and C _ end, respectively, in fig. 5) and the channel time shift is presented in the figure for at least three nPVR record A, nPVR records B and nPVR record C, respectively, as in the table of fig. 4. From the content presented in fig. 5, the nPVR record A, nPVR, record B, and nPVR record C, described above, are more likely to be the mapping generated for different users 'nPVR record requests because there is some intersection between a _ start and a _ end, B _ start and B _ end, and C _ start and C _ end, which is less likely to occur for the same user's nPVR record request.
The time node corresponding to the eliminated fragment is obtained by subtracting the time length of the channel time shift valid period from the current absolute natural time of the system, and is not in the time range of all existing nPVR recording program lists of the channel. This is to take into account the user experience, i.e. the mapping relationship established by the user through the nPVR recording request, i.e. the nPVR recording schedule described above.
When a CDN media control server starts a process to record a channel time-shifting program, creating a chain type double pointer for the channel time-shifting in a memory, wherein 1 pointer is a recording pointer, 1 pointer is a deleting pointer, the pointer head of the pointer chain table points to a null node with a channel ID as a label, then the first node of the pointer chain table points to the address of the first fragment node (namely the ts fragment file) recorded by the earliest nPVR of the channel, and if no nPVR is recorded, the first fragment is the first fragment for starting the recording of the channel time-shifting; the fragment node stores the data information of each fragment, and the fragment can take the natural absolute time of the start of the fragment and the first I frame as a naming mode, so that the subsequent query process is simplified. The recording pointer points to the address of the latest segment of the channel time shift. The delete pointer points to the address of the next fragment after the last obsolete fragment.
When a CDN media control server eliminates (namely, a deleting process) a ts fragment file, all nPVR records of a channel are inquired from an nPVR management server, a deleting pointer of a pointer linked list points to a next fragment of the last eliminated fragment, the current deleting pointer and an expired fragment needing to be eliminated in a subsequent fragment node are found according to natural time and I-frame keyword recorded by the nPVR, the pointer is dynamically linked to the fragments after the eliminated fragments, if a plurality of continuous fragments need to be eliminated, the fragments are directly linked to the position of the next fragment needing to be reserved (the reserved fragments are all the fragments of the nPVR, the fragments of the nPVR indicate that corresponding channel time shift and one or more user IDs establish a mapping relation, namely the channel time shift content which is appointed to be selectively recorded by corresponding users, the corresponding deleting pointer represented in figure 5 exists because of the mapping relation of the nPVR record B, the position of the time shift of the channel pointed to by the corresponding deletion pointer is at least equal to the lowest position B _ start presented in fig. 5, so that the above-described slicing of reserved nPVR can be implemented). And when the pointer node is processed by the deletion pointer of the pointer linked list, the CDN media control server deletes the fragment data corresponding to the deletion node from the file system of the hard disk, and releases the CDN storage space.
The CDN media control server manages the channel time shifting program and automatically eliminates part of fragments when the channel time shifting is overdue. Only the program segments before the time-shift storage duration of the channel (for example, if the system stores 168 hours, the program segments before 168 hours are time-shift expired programs) which are not related to all nPVR records of the channel at the same time can be eliminated. The CDN media control server and the nPVR management server jointly complete elimination of the expired ts fragment files which are not in the npVR recording range, update the primary index file, the secondary index file, the I-frame index file and the ts fragment files of the channel, and establish and update the index files by adopting a dynamic chain pointer algorithm.
The pointer linked list algorithm provided by the invention supports generation of channel time shifting, eliminates time shifting fragments which are not related to the nPVR record when the time shifting fragments are overdue in HLS time shifting, supports long life cycle management of the nPVR of a user, eliminates the fragments which are not related to the nPVR record at the same time, and releases CDN storage space occupied by time shifting programs. The processing efficiency of the nPVR service and the user experience of the nPVR service are greatly improved on the design of innovative combination of the shared program and the pointer linked list algorithm for eliminating the outdated fragments, and the utilization rate of CDN resources is improved.
In combination with the embodiment of the present invention, an extensible implementation scheme is further provided, so that the fragment elimination process can better adapt to environmental requirements, and a default ts fragment file elimination strategy is set in the CDN media control server, where the elimination strategy includes:
the elimination strategy I: executing a corresponding ts fragment file elimination process when the time length of the ts fragment file exceeds a preset threshold; as shown in the above example corresponding to fig. 5, the corresponding elimination process of ts slice files according to time length is more suitable for ts slice files without nPVR playlist mapping relationship, i.e. the elimination strategy two described below.
And (2) elimination strategy II: and when the time length of the ts fragment file exceeds a preset threshold value and the intersection of the ts fragment file and the index information of each user is empty, executing a corresponding ts fragment file elimination process.
The CDN media control server regularly obtains the search heat of the current channel program, and adjusts a preset threshold value of the time length corresponding to the ts fragment file according to the search heat; the searching heat is divided into at least two levels, and corresponding preset threshold values are added with corresponding specified time lengths corresponding to the searching heat of one level or multiple levels. The parameter value of the corresponding designated time length may be set empirically, and is not particularly limited herein.
In combination with the embodiment of the present invention, a preferred implementation scheme is further provided, wherein in the elimination process of the segments included in the channel time shifting, an identifier word that is currently required to be analyzed or not may be set, and a parameter value of the identifier word corresponds to the number of rounds that the elimination analysis can be skipped. The parameter values of the corresponding identifier words correspond to the number of users who establish a mapping relation according to the time shift of the corresponding channel, that is, the larger the number of users who request recording (for the nPVR management server, the recording refers to the time shift of the channel recorded in the CDN media control server and establishes a mapping relation with the corresponding users), the larger the parameter value of the corresponding identifier word is, the more the number of corresponding rounds of skipping fragment elimination is, thereby greatly simplifying the total amount of elimination analysis at each time. The mechanism here is that the more users establish a mapping relationship (recording relationship) for the same segment, the lower the probability that the corresponding segment is eliminated, and in comparison, skipping elimination analysis for the corresponding times becomes a method with higher realizability.
Example 2:
the embodiment of the present invention is based on the method and process set forth in embodiment 1, and combines the system architecture shown in fig. 3 to describe a specific process of the nPVR management server for processing the nPVR recording request of the user. As shown in fig. 6, the following describes a procedure for nPVR recording in detail:
in step 301, the user side (set-top box) initiates an nPVR recording request to an nPVR management server.
In step 302, the nPVR management server accesses the CDN media control server to query the channel time-shifted recording information according to the nPVR manifest after receiving the nPVR recording request.
In step 303, the CDN media control server returns recording information of the time shift of the channel corresponding to the nPVR manifest.
In step 304, after the nPVR management server obtains the recording information of the channel time shift corresponding to the nPVR playbill, if the recording is completed or the recording is in progress, the nPVR management server obtains the index information of the channel time shift (including the primary index file, the secondary index file, the I-frame index file and the ts-segment file of the channel) to establish the index record of the nPVR of the user; if the user requests the nPVR menu to be in the live channel menu range and not recorded, the live channel establishes an nPVR index and generates a corresponding nPVR recording task.
In step 305, the nPVR management server periodically polls the nPVR recording task when the nPVR recording time point is reached.
In step 306, after receiving the nPVR recording task query, the CDN media control server returns the time-shift recording state of the channel and the index information of the time-shift recording in the time slot corresponding to the nPVR playlist.
In step 307, after updating the relevant information, the nPVR recording task is modified to be completed, and the nPVR management server returns the nPVR recording state to the user side (set-top box).
Example 3:
the embodiment of the present invention is based on the method and process set forth in embodiment 1, and combines the system architecture shown in fig. 3 to describe a specific process of the nPVR management server for processing the nPVR recording request of the user. As shown in fig. 7, the user side (set-top box) browses the EPG page, acquires the nPVR record list of the user from the nPVR management server, and can select one of the nPVR records to play, where the specific nPVR playing flow is as follows:
in step 401, the user-side set-top box initiates an nPVR play request to the nPVR management server.
In step 402, after receiving the play request from the user side, the nPVR management server splices the play URL according to the CDN media control server address cdnipaddreds in the nPVR record, the primary index file name TopindexName in the channel time shift, the start time (start) of the nPVR playbill selected by the user, and the end time (end) of the nPVR playbill (i.e., a specific representation example of the identification information of the play content range in embodiment 1).
The manner of splicing the corresponding broadcast URLs can refer to the manner described in embodiment 1, and is not described herein in detail.
In step 403, the nPVR management server returns the user-side play URL. The user side plays the URL, i.e. the content of the first-level index file in embodiment 1 (only including the channel rate ordered by the user); the content of the first-level index file comprises a second-level index file name and an I-frame index file name corresponding to each code rate.
In step 404, the user side directly accesses the CDN media control server to request playing after obtaining the user side play URL. At this time, that is, the second play URL is sent to the CDN media control server in embodiment 1.
In step 405, the CDN media control server receives the user-side play request, and performs scheduling and play control according to the play URL in the request. At this time, the CDN media control server in embodiment 1 forms the content of the secondary index file and the content of the I-frame index file, and returns the content to the user side.
Example 4:
the embodiment of the present invention is based on the method and process set forth in embodiment 1, and combines the system architecture shown in fig. 3 to describe a specific process of the nPVR management server for processing the nPVR recording request of the user. As shown in fig. 8, the method for recording a network personal video according to the embodiment of the present invention can be understood as a specific embodiment and improvement in the implementation scheme proposed in embodiment 1, which is combined with the system architecture of fig. 3, including:
in 501, the CDN media control server records the channel time shift in natural time, and creates an index file for the channel time shift: a primary index file, a secondary index file, an I-frame index file, and a ts fragmentation file.
In 502, the nPVR management server creates a data index file for nPVR recording for each nPVR recording request based on the basic information of the primary index file, the secondary index file, the I-frame index file, and the ts-slice file.
In 503, the nPVR management server sends a channel time-shifted recording status query for the nPVR manifest to the CDN media control server.
In 504, the CDN media control server returns the channel time-shifted recording status of the nPVR manifest.
In 505, after receiving the message, the nPVR management server updates nPVR records according to the channel time-shifting information in the message, including the first-level index file name, the start time Starttime (absolute natural time) of the nPVR playbill, the end time Endtime (absolute natural time) of the nPVR playbill, the channel time-shifting recording state (0-unrecorded, 1-recording, 2-finishing recording), and the like; the nPVR management server establishes an nPVR recording query task, with or without recording.
In 506, the nPVR playlist is being recorded or not recorded, and after the nPVR end time is reached, the nPVR management server will initiate a status query to the CDN media control server according to the nPVR recording query task.
In 507, the nPVR recorded data is updated according to the return message and the recording status is updated to 2-recording is completed, and the nPVR inquiry task status is modified to end.
Example 5:
fig. 9 is a schematic structural diagram of an apparatus for network personal video recording according to an embodiment of the present invention. The apparatus for network personal video recording of the present embodiment includes one or more processors 21 and a memory 22. In fig. 9, one processor 21 is taken as an example. It should be noted that, in the embodiment of the present invention, the method process of embodiment 1 is further assumed to be completed in an integrated device, and the present invention is also a possible implementation manner compared with the architecture shown in fig. 3.
The processor 21 and the memory 22 may be connected by a bus or other means, and fig. 9 illustrates the connection by a bus as an example.
The memory 22, which is a non-volatile computer-readable storage medium, may be used to store non-volatile software programs and non-volatile computer-executable programs, such as the method of network personal video recording in embodiment 1. The processor 21 performs the method of network personal video recording by executing non-volatile software programs and instructions stored in the memory 22.
The memory 22 may include high speed random access memory and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some embodiments, the memory 22 may optionally include memory located remotely from the processor 21, and these remote memories may be connected to the processor 21 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The program instructions/modules are stored in the memory 22 and, when executed by the one or more processors 21, perform the method for network personal video recording of embodiment 1 described above, e.g., perform the steps illustrated in fig. 1 and 2 described above.
It should be noted that, for the information interaction, execution process and other contents between the modules and units in the apparatus and system, the specific contents may refer to the description in the embodiment of the method of the present invention because the same concept is used as the embodiment of the processing method of the present invention, and are not described herein again.
Those of ordinary skill in the art will appreciate that all or part of the steps of the various methods of the embodiments may be implemented by associated hardware as instructed by a program, which may be stored on a computer-readable storage medium, which may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and improvements made within the spirit and principle of the present invention are intended to be included within the scope of the present invention.

Claims (9)

1. A method for network personal video recording, comprising:
receiving a first nPVR recording request, wherein the first nPVR recording request carries a first nPVR program list and a user identifier;
inquiring recording information of channel time shifting according to the first nPVR program list;
if the channel time shift corresponding to the first nPVR program list is determined according to the recording information, the channel time shift is in a recorded state or a recording state; acquiring the index information of the channel time shift of the first nPVR program list, and establishing a mapping relation between the user identification and the index information of the channel time shift of the first nPVR program list;
the CDN media control server adds each fragment into a corresponding pointer linked list in a secondary index file of each channel time shift, wherein the position of a first I frame of the fragment is stored in each linked list node in the pointer linked list; a recording pointer and a deleting pointer are also configured corresponding to each pointer linked list;
the first node of the pointer linked list stores the address of the first fragment recorded earliest in channel time shift; the recording pointer always points to a linked list node which stores the latest fragments of the channel time shift in a pointer linked list; the deleting pointer always points to the link table node storing the next fragment in the pointer link table after the last fragment is eliminated in the pointer link table.
2. The method for network personal video recording according to claim 1, further comprising:
if the channel time shift corresponding to the first nPVR program list is determined according to the recording information, the channel time shift does not exist or is not in the recording state, the channel time shift of the first nPVR program list is analyzed to be in the range of a channel time shift interval to be stored, index information is established for the first nPVR program list, and after the recording of the channel time shift of the corresponding first nPVR program list is completed, the mapping relation between the user identification and the index information of the channel time shift of the first nPVR program list is established.
3. The method for network personal video recording of claim 1, wherein the channel time-shifted recording process is a relatively independent parallel process with respect to receiving the first nPVR recording request, wherein the channel time-shifted recording process comprises:
acquiring each channel program of a live channel source, and recording each channel program into channel time shift under an HLS protocol according to natural time, wherein the recorded recording information of the channel time shift comprises a primary index file, a secondary index file, an I frame index file and a ts fragment file;
wherein, the first-level index file comprises channel ID information; the second-level index file comprises the relevant information of each ts fragment file in the channel time shift of the first nPVR program list; the I frame index file contains the relevant information of the key frames in the fragments.
4. The method for network personal video recording according to claim 3, wherein the acquiring of the programs of each channel of the live channel source and the recording of the programs of each channel as the time shift of the channel under the HLS protocol according to the natural time comprises:
HLS slicing is carried out on media streams of a direct broadcast channel source, HLS data streams after HLS slicing are sent to a CDN media control server, and therefore time-shifted recording of each channel is completed on the CDN media control server; the channel data after the HLS slicing processing includes a first-level index file, a second-level index file, an I-frame index file, and ts slice files of the channel.
5. The method for network personal video recording according to claim 1, wherein the nPVR management server generates a play URL and returns the play URL to the user side when receiving the user nPVR play request; wherein the generated play URL includes: the CDN media control server comprises an address, a first-level index file name and identification information of a playing content range;
after receiving the playing URL returned by the nPVR management server, the user side sends a video playing request carrying the playing URL to a target CDN media control server, and the target CDN media control server returns the content of a primary index file according to the name of the primary index file in the playing URL; the content of the first-level index file comprises a second-level index file name and an I-frame index file name corresponding to each code rate;
after the user side completes code rate adaptation, a second playing URL is sent to the CDN media control server, so that the CDN media control server forms a secondary index file content and an I frame index file content and returns the secondary index file content and the I frame index file content to the user side;
the user side plays the content of the secondary index file and the content of the I-frame index file; the second playing URL carries identification information of an address of the CDN media control server and a playing content range, and a secondary index file name and an I-frame index file name which are obtained after the code rate adaptation.
6. The method of claim 1, wherein the CDN media control server queries the nPVR management server for all channel records of the channel when it eliminates ts segment files, filters out the current deletion pointer and expired segments that need to be eliminated in subsequent segment nodes according to the natural time of channel records and I-frame keywords, and dynamically links the pointer to the segments after elimination.
7. The method for personal video recording over a network of any of claims 1-6, wherein the method further comprises a ts fragmented file elimination strategy, specifically:
executing a corresponding ts fragment file elimination process when the time length of the ts fragment file exceeds a preset threshold; or the like, or, alternatively,
and when the time length of the ts fragment file exceeds a preset threshold value, executing a corresponding ts fragment file elimination process, and when the ts fragment file meets the condition that the intersection with the index information of each user is empty, executing the corresponding ts fragment file elimination process.
8. The method for recording personal videos through the network according to claim 7, wherein the searching heat of the program of the current channel is obtained periodically, and the preset threshold value of the time length corresponding to the existence of the ts slicing file is adjusted according to the searching heat;
the searching heat is divided into at least two stages, and corresponding preset threshold values are added with corresponding specified time lengths corresponding to the searching heat of one stage or multiple stages.
9. An apparatus for network personal video recording, the apparatus comprising:
at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor for performing the method for network personal video recording of any of claims 1-8.
CN202010508915.9A 2020-06-06 2020-06-06 Method and device for recording network personal video Active CN111800672B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010508915.9A CN111800672B (en) 2020-06-06 2020-06-06 Method and device for recording network personal video

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010508915.9A CN111800672B (en) 2020-06-06 2020-06-06 Method and device for recording network personal video

Publications (2)

Publication Number Publication Date
CN111800672A CN111800672A (en) 2020-10-20
CN111800672B true CN111800672B (en) 2022-03-25

Family

ID=72804007

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010508915.9A Active CN111800672B (en) 2020-06-06 2020-06-06 Method and device for recording network personal video

Country Status (1)

Country Link
CN (1) CN111800672B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113225510B (en) * 2021-04-30 2023-04-18 深圳创维-Rgb电子有限公司 Television program recording method, device, equipment and storage medium
CN116132751A (en) * 2022-12-30 2023-05-16 郑州小鸟信息科技有限公司 Method and system for synchronous playback based on web window scene

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103118275B (en) * 2011-11-17 2016-03-30 华为终端有限公司 A kind of method of program recording, terminal and server
CN106534883A (en) * 2015-09-11 2017-03-22 中兴通讯股份有限公司 Video control method and device

Also Published As

Publication number Publication date
CN111800672A (en) 2020-10-20

Similar Documents

Publication Publication Date Title
US8930849B2 (en) Enhanced media content tagging systems and methods
US20170366856A1 (en) Scheduling video content from multiple sources for presentation via a streaming video channel
US8626870B2 (en) Method and apparatus for generating and reproducing adaptive stream based on file format, and recording medium thereof
US8028081B2 (en) System and method for adaptive segment prefetching of streaming media
US9615119B2 (en) Method and apparatus for providing timeshift service in digital broadcasting system and system thereof
CN101188714B (en) Broadcast transmitting apparatus, method of transmitting broadcast data, broadcast receiver and method of receiving broadcast data
US20120278837A1 (en) Presenting related content during a placeshifting session
EP3425921A1 (en) Method and apparatus for transmitting and receiving adaptive streaming mechanism-based content
US8910210B2 (en) Method of processing EPG metadata in network device and the network device for controlling the same
US8505043B2 (en) Method and apparatus for providing metadata of content, and method and apparatus for limiting content usage authority
KR101002070B1 (en) Relation contents receiving apparatus, relation contents providing apparatus and relation contents transmitting system using thereof
JPWO2012096372A1 (en) Content playback apparatus, content playback method, distribution system, content playback program, recording medium, and data structure
EP2891319B1 (en) Electronic media server
CN111800672B (en) Method and device for recording network personal video
US9609376B2 (en) Provision of a personalized media content
EP2767938A1 (en) Fragmenting media content
WO2018079295A1 (en) Information processing device and information processing method
KR20070043372A (en) System for management of real-time filtered broadcasting videos in a home terminal and a method for the same
CN105812831B (en) Network program recording method, device and system and playing method and device
CN102172035A (en) Manufacturing method and system of audio special
US20140341544A1 (en) Creating and managing sub-recordings
US8645999B2 (en) Method of processing EPG metadata in network device and the network device for controlling the same
CN110225370B (en) Timeline control method for personalized presentation of multimedia content
CN108156490A (en) A kind of method, system and storage medium using mobile terminal playback live telecast
US10805674B2 (en) Content aggregation and distribution for real-time and non-real-time production

Legal Events

Date Code Title Description
PB01 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