[go: up one dir, main page]

CN102136289A - Methods, devices and systems for storing and reading media contents - Google Patents

Methods, devices and systems for storing and reading media contents Download PDF

Info

Publication number
CN102136289A
CN102136289A CN 201010615967 CN201010615967A CN102136289A CN 102136289 A CN102136289 A CN 102136289A CN 201010615967 CN201010615967 CN 201010615967 CN 201010615967 A CN201010615967 A CN 201010615967A CN 102136289 A CN102136289 A CN 102136289A
Authority
CN
China
Prior art keywords
storage
burst
rewind down
file
rewind
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.)
Granted
Application number
CN 201010615967
Other languages
Chinese (zh)
Other versions
CN102136289B (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.)
Beijing Zhigu Tech Co Ltd
Original Assignee
Huawei 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN 201010615967 priority Critical patent/CN102136289B/en
Publication of CN102136289A publication Critical patent/CN102136289A/en
Priority to PCT/CN2011/084712 priority patent/WO2012089096A1/en
Application granted granted Critical
Publication of CN102136289B publication Critical patent/CN102136289B/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/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/4333Processing operations in response to a pause request

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本发明实施例公开了一种媒体内容的存储方法、读取方法、装置和系统,其中方法的实现包括:接收直播时移业务的媒体内容;生成所述媒体内容的快退文件,为所述快退文件分配存储分片,将快退文件存储到存储分片;若所述存储分片写满后还有正在生成的快退文件,则继续为所述快退文件分配存储分片,将未存储的快退文件存储到新分配的存储分片;直到快退文件全部存储完毕。通过分片来存储无法预知大小的快退文件,不必为无法预知大小的快退文件预先分配大的存储空间,这样减少了预占用的系统存储空间,实现存储空间的分配与存储的需求的匹配。

The embodiment of the present invention discloses a media content storage method, reading method, device and system, wherein the implementation of the method includes: receiving the media content of the live broadcast time-shift service; generating a rewind file of the media content for the Allocate storage slices for fast rewind files, and store the fast rewind files in the storage slices; if there are rewind files being generated after the storage slices are full, continue to allocate storage slices for the fast rewind files, and Unstored rewind files are stored in newly allocated storage slices; until all rewind files are stored. Store fast rewind files of unpredictable size through fragmentation, without pre-allocating a large storage space for fast rewind files of unpredictable size, which reduces the pre-occupied system storage space and realizes the matching of storage space allocation and storage requirements .

Description

一种媒体内容的存储方法、读取方法、装置和系统A storage method, reading method, device and system for media content

技术领域technical field

本发明涉及存储技术领域,特别涉及一种媒体内容的存储方法、读取方法、装置和系统。The present invention relates to the field of storage technology, in particular to a storage method, reading method, device and system for media content.

背景技术Background technique

在存储技术领域通常都会用到数据存储的方法以及存储装置,例如在视频点播(Video On Demand,VOD)中实现时移所需要生成的直播快退文件的存储就是众多存储需求中的一种。In the field of storage technology, data storage methods and storage devices are usually used. For example, the storage of live rewind files that need to be generated for time shifting in Video On Demand (VOD) is one of the many storage requirements.

随着时移电视在直播电视中的普及,用户可以通过实时频道直播的时移,每个人都可以看到与别人不一样的电视,改变了人们同一时间,看同一电视的传统,全面实现真正的个性化。时移就是指对直播电视的快进、快退、暂停操作,用户通过遥控器,可以对实况直播频道进行暂停,如同使用数字多功能光盘(Digital Versatile Disc,DVD)般的X2、X4、X6、X8的快进、快退操作。With the popularization of time-shifted TV in live TV, users can use the time-shifted live broadcast of the real-time channel, and everyone can watch TV different from others, changing the tradition of people watching the same TV at the same time, and fully realizing the true personalization. Time shift refers to the fast forward, rewind, and pause operations of live TV. Users can pause the live broadcast channel through the remote control, just like X2, X4, and X6 using Digital Versatile Disc (DVD). , Fast forward and rewind operation of X8.

时移系统中,为了支持时移快退,需要实时生成辅助的快退文件。In the time-shifting system, in order to support time-shifting and rewinding, it is necessary to generate auxiliary rewinding files in real time.

内容传输网络的发展,内容存储采用分级方式存储。数据分级存储,是指数据客体存放在不同级别的存储设备(磁盘、磁盘阵列、光盘库、磁带库)中,通过分级存储治理软件实现数据客体在存储设备之间的自动迁移。数据迁移的规则是可以人为控制的,通常是根据数据的访问频率、保留时间、容量、性能要求等因素确定的最佳存储策略。在分级数据存储结构中,磁带库等成本较低的存储资源用来存放访问频率较低的信息,而磁盘或磁盘阵列等成本高、速度快的设备,用来存储经常访问的重要信息。VOD内容和录制的直播内容存放在中心存储节点;在这种存储方式下,中心存储会给每个静态或者录制的直播内容建立一个索引文件(index file),用于记录原始文件、快退文件、快进文件的文件信息和媒体数据的位置信息。With the development of content transmission network, content storage is stored in a hierarchical manner. Hierarchical data storage means that data objects are stored in different levels of storage devices (disk, disk array, optical library, tape library), and the automatic migration of data objects between storage devices is realized through hierarchical storage management software. The rules of data migration can be controlled manually, and are usually the best storage strategy determined according to factors such as data access frequency, retention time, capacity, and performance requirements. In the hierarchical data storage structure, low-cost storage resources such as tape libraries are used to store information that is accessed less frequently, while high-cost and fast devices such as disks or disk arrays are used to store important information that is frequently accessed. VOD content and recorded live content are stored in the central storage node; in this storage mode, the central storage will create an index file (index file) for each static or recorded live content to record the original file and rewind the file , file information of the fast-forward file and location information of the media data.

在直播录制内容的生成过程中,原始内容,快进快退内容,索引文件三者同时生成,并且,随着直播的进展,录制的内容不断增长,快退文件,快进文件,索引文件都需要动态的进行更新。边缘流化服务器通过引用动态更新的索引文件,实现对直播录制内容的定位;During the generation of live recording content, the original content, fast forward and rewind content, and index files are generated at the same time, and, as the live broadcast progresses, the recorded content continues to grow, and the fast rewind file, fast forward file, and index file are all It needs to be updated dynamically. The edge streaming server locates the live recording content by referring to the dynamically updated index file;

一般情况下,流化服务器对文件的流化都是按照字节顺序流化,要实现倒退的播放效果,要求先生成的内容放置在文件存储空间的后端。在设定直播录制内容生成时,通常会设置直播录制内容的持续时间,系统按照直播录制内容的持续时间*文件比特率来设定快退文件的大小。对于文件系统,确定文件结束位置(也可以是结束时间)后,就意味着确定了文件大小;这时候,如果直播录制的时间预估不足,比如篮球或者网球这种可能采用加时方式来确定胜负的比赛,如果比赛时间预估太小,按照预估的时间来确定快退文件大小,当比赛延长时,会导致延长的直播内容无法写入快退文件。为了规避该问题,通常需要重新生成一个文件,并拷贝原先的快退数据;这样导致了几个问题:1、大量的数据拷贝导致了系统的额外开销;2、重新生成的文件破坏了索引文件对相关文件的索引关系,会导致快退文件点播失败。In general, the streaming server streams files in byte order. To achieve a backwards playback effect, it is required that the generated content be placed at the back end of the file storage space. When setting the generation of live recording content, the duration of the live recording content is usually set, and the system sets the size of the rewind file according to the duration of the live recording content*file bit rate. For the file system, after determining the end position (or end time) of the file, it means that the file size has been determined; at this time, if the live recording time is not estimated enough, such as basketball or tennis, it may be determined by adding time For the winning or losing game, if the game time estimate is too short, the rewind file size will be determined according to the estimated time. When the game is extended, the extended live content will not be written into the rewind file. In order to avoid this problem, it is usually necessary to regenerate a file and copy the original rewind data; this leads to several problems: 1. A large amount of data copying leads to additional system overhead; 2. The regenerated file destroys the index file The index relationship to related files will cause the fast rewind file on-demand to fail.

按照直播录制内容时间设定固定大小的文件,如果VOD内容提前结束,则浪费了存储空间;如果VOD内容的时间延长,则会导致后续的内容无法生成快退数据;这样的问题普遍存在于需要预先分配存储空间而需要存储的文件大小又不能在分配前确定的情况之下,造成分配的存储空间与存储的需求无法匹配的问题。Set a fixed-size file according to the live recording content time. If the VOD content ends early, the storage space will be wasted; if the VOD content is prolonged, the subsequent content will not be able to generate rewind data; such problems generally exist in the needs The storage space is pre-allocated and the size of the files to be stored cannot be determined before the allocation, resulting in the problem that the allocated storage space cannot match the storage requirements.

发明内容Contents of the invention

本发明实施例要解决的技术问题是提供一种媒体内容的存储方法、读取方法、装置和系统,实现存储空间的分配与存储的需求的匹配。The technical problem to be solved by the embodiments of the present invention is to provide a storage method, reading method, device and system for media content, so as to realize the matching of storage space allocation and storage requirements.

为解决上述技术问题,本发明所提供的媒体内容的存储方法实施例可以通过以下技术方案实现:In order to solve the above-mentioned technical problems, the embodiment of the method for storing media content provided by the present invention can be realized through the following technical solutions:

接收直播时移业务的媒体内容;Receive the media content of the live broadcast time-shifting service;

生成所述媒体内容的快退文件,为所述快退文件分配存储分片,将快退文件存储到存储分片;若所述存储分片写满后还有正在生成的快退文件,则继续为所述快退文件分配存储分片,将未存储的快退文件存储到新分配的存储分片;直到快退文件全部存储完毕。Generate the fast rewind file of the media content, allocate storage slices for the fast rewind file, and store the fast rewind file to the storage slice; if there is still a fast rewind file being generated after the storage slice is full, then Continue to allocate storage slices for the rewind files, and store unstored rewind files in newly allocated storage slices until all rewind files are stored.

一种媒体内容的读取方法,包括:A method for reading media content, comprising:

接收媒体内容请求消息,所述媒体内容请求消息包含所要读取的快退文件的外部索引和内容范围;Receiving a media content request message, the media content request message includes an external index and a content range of the rewind file to be read;

根据所述快退文件的外部索引和内容范围确定用于存储所述快退文件的存储分片;determining a storage segment for storing the rewind file according to the external index and the content range of the rewind file;

从所述存储分片中读取所述快退文件并发送。Read the rewind file from the storage slice and send it.

一种媒体内容的存储装置,包括:A storage device for media content, comprising:

文件接收单元,用于接收直播时移业务的媒体内容;The file receiving unit is used to receive the media content of the live broadcast time-shift service;

文件生成单元,用于生成所述媒体内容的快退文件;A file generating unit, configured to generate a rewind file of the media content;

判断单元,用于判断是否还有正在生成的快退文件;A judging unit, configured to judge whether there is a rewind file being generated;

存储控制单元,用于为所述快退文件分配存储分片,将快退文件存储到存储分片;若所述存储分片写满后还有正在生成的快退文件,则继续为所述快退文件分配存储分片,将未存储的快退文件存储到新分配的存储分片;直到快退文件全部存储完毕。The storage control unit is used to allocate storage slices for the fast rewind file, and store the fast rewind file in the storage slice; if there is still a fast rewind file being generated after the storage slice is full, continue to create the fast rewind file for the fast rewind file. Rewind files are assigned storage shards, and unstored rewind files are stored in newly allocated storage shards until all rewind files are stored.

一种媒体内容的读取装置,包括:A device for reading media content, comprising:

请求接收单元,用于接收媒体内容请求消息,所述媒体内容请求消息包含所要读取的快退文件的外部索引和内容范围;The request receiving unit is used to receive the media content request message, and the media content request message includes the external index and the content range of the rewind file to be read;

检索单元,用于根据所述快退文件的外部索引和内容范围确定用于存储所述快退文件的存储分片;A retrieval unit, configured to determine a storage segment for storing the rewind file according to the external index and content range of the rewind file;

发送单元,用于发送从所述存储分片中读取所述快退文件。A sending unit, configured to send and read the rewind file from the storage slice.

一种媒体内容的存储系统,包括:存储装置和读取装置,其特征在于:存储装置为本发明实施例提供的任意一项的媒体内容的存储装置,读取装置为本发明实施例提供的媒体内容的读取装置。A storage system for media content, comprising: a storage device and a reading device, characterized in that the storage device is any one of the media content storage devices provided by the embodiments of the present invention, and the reading device is provided by the embodiments of the present invention A reading device for media content.

上述技术方案具有如下有益效果:通过分片来存储无法预知大小的快退文件,不必为无法预知大小的快退文件预先分配大的存储空间,这样减少了预占用的系统存储空间,实现存储空间的分配与存储的需求的匹配。The above-mentioned technical solution has the following beneficial effects: the fast rewind file of unpredictable size is stored by fragmentation, and there is no need to pre-allocate a large storage space for the fast rewind file of unpredictable size, which reduces the pre-occupied system storage space and realizes storage space. The allocation of resources matches the storage requirements.

附图说明Description of drawings

为了更清楚地说明本发明实施例的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the accompanying drawings that need to be used in the description of the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For Those of ordinary skill in the art can also obtain other drawings based on these drawings without any creative effort.

图1为本发明实施例方法流程示意图;Fig. 1 is a schematic flow chart of the method of the embodiment of the present invention;

图2为本发明实施例方法流程示意图;Fig. 2 is a schematic flow chart of the method of the embodiment of the present invention;

图3为本发明实施例存储文件结构示意图;FIG. 3 is a schematic diagram of a storage file structure according to an embodiment of the present invention;

图4为本发明实施例装置结构示意图;Fig. 4 is the schematic diagram of the device structure of the embodiment of the present invention;

图5为本发明实施例装置结构示意图;Fig. 5 is a schematic diagram of the device structure of the embodiment of the present invention;

图6为本发明实施例装置结构示意图;Fig. 6 is a schematic structural diagram of a device according to an embodiment of the present invention;

图7为本发明实施例装置结构示意图;Fig. 7 is a schematic diagram of the device structure of the embodiment of the present invention;

图8为本发明实施例装置结构示意图;Fig. 8 is a schematic structural diagram of the device of the embodiment of the present invention;

图9为本发明实施例系统结构示意图。Fig. 9 is a schematic diagram of the system structure of the embodiment of the present invention.

具体实施方式Detailed ways

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.

一种媒体内容的存储方法,如图1所示,包括:A storage method for media content, as shown in Figure 1, comprising:

101:接收直播时移业务的媒体内容;生成上述媒体内容的快退文件;101: Receive the media content of the live time-shifting service; generate a rewind file of the above media content;

这里的直播时移业务的媒体内容可能是一次性连续接收的,也可能是断断续续的接收的,对于直播时移业务的媒体内容如何接收的本申请文件不予限定。Here, the media content of the live broadcast time-shift service may be received continuously at one time or intermittently, and this application document does not limit how to receive the media content of the live broadcast time-shift service.

102:为上述快退文件分配存储分片,将快退文件存储到存储分片;若上述存储分片写满后还有正在生成的快退文件,则继续为上述快退文件分配存储分片,将未存储的快退文件存储到新分配的存储分片;直到快退文件全部存储完毕。102: Allocate storage shards for the above fast rewind files, and store the fast rewind files in the storage shards; if there are rewind files being generated after the above storage shards are full, continue to allocate storage shards for the above fast rewind files , store the unstored rewind files in the newly allocated storage slice; until all the rewind files are stored.

进一步地,应用于直播快退文件的存储过程中,上述快退文件存储到存储分片的存储顺序为从存储分片的后端向前端依次写入。Further, in the process of storing live rewind files, the order in which the above rewind files are stored in the storage segments is written sequentially from the back end of the storage segment to the front end.

上述实施例,通过分片来存储无法预知大小的快退文件,不必为无法预知大小的快退文件预先分配大的存储空间,这样减少了预占用的系统存储空间,实现存储空间的分配与存储的需求的匹配。In the above-mentioned embodiment, the fast rewind file of unpredictable size is stored by fragmentation, and it is not necessary to pre-allocate a large storage space for the fast rewind file of unpredictable size, which reduces the pre-occupied system storage space and realizes the allocation and storage of storage space matching of needs.

存储分片的大小可以都是一样大的,也可以按照预定的规则来设置各次分配的存储分片的大小,对此本发明实施例不予限定,例如可以固定大小,也可以大小递减的形式分配存储分片。另外为了方便以后的快退文件的检索还可以:The size of the storage slices can all be the same size, or the size of the allocated storage slices can be set according to predetermined rules, which is not limited in this embodiment of the present invention, for example, the size can be fixed or the size can be decreased form to allocate storage slices. In addition, in order to facilitate the retrieval of rewind files in the future, you can also:

为存储分片分配标识ID,该ID用于表示该存储分片的位置信息,即存储分片的路径信息。为了明确表示出不同快退文件的存储分片,还可以为存储分片的标识增加快退文件的外部索引名称的前缀,例如将存储分片命名为快退文件的外部索引名称+ID。An identification ID is assigned to the storage slice, and the ID is used to represent the location information of the storage slice, that is, the path information of the storage slice. In order to clearly indicate the storage fragments of different rewind files, a prefix of the external index name of the rewind file can also be added to the identifier of the storage fragment, for example, the storage fragment is named as the external index name+ID of the rewind file.

另外,还需要建立分片索引;上述分片索引用以表示上述存储分片所存储的快退文件的内容范围与上述存储分片的标识之间的映射关系,具体地,快退文件的内容范围以字节范围表示。In addition, it is also necessary to establish a fragment index; the above fragment index is used to represent the mapping relationship between the content range of the rewind file stored in the above storage fragment and the identifier of the above storage fragment, specifically, the content of the rewind file Ranges are expressed as byte ranges.

对应媒体内容的存储方法本发明实施例还提供了一种媒体内容的读取方法,如图2所示,包括:The method for storing corresponding media content The embodiment of the present invention also provides a method for reading media content, as shown in FIG. 2 , including:

201:接收媒体内容请求消息,上述媒体内容请求消息包含所要读取的快退文件的外部索引和内容范围;201: Receive a media content request message, the above media content request message includes the external index and content range of the rewind file to be read;

202:根据上述快退文件的外部索引和内容范围确定用于存储上述快退文件的存储分片;202: Determine the storage slice for storing the above-mentioned fast-rewind file according to the external index and content range of the above-mentioned fast-rewind file;

根据上述快退文件的外部索引和内容范围确定用于存储上述快退文件的存储分片包括:根据上述快退文件的外部索引和内容范围查询分片索引,确定上述存储分片的标识,其中,上述存储分片的标识用于表示上述存储分片的位置信息;根据上述存储分片的标识确定上述存储分片。Determining the storage segment for storing the above-mentioned fast-rewind file according to the external index and content range of the above-mentioned fast-rewind file includes: querying the segment index according to the external index and content range of the above-mentioned fast-rewind file, and determining the identification of the above-mentioned storage segment, wherein , the identifier of the storage segment is used to represent the location information of the storage segment; the storage segment is determined according to the identifier of the storage segment.

203:从上述存储分片中读取上述快退文件并发送。这里发送的内容的发送目的地可能是媒体内容请求消息的发送方,也可能是媒体内容请求消息的发送方和媒体内容的读取方的第三方设备,对此本发明实施例不予限定。203: Read the aforementioned rewind file from the aforementioned storage slice and send it. The destination of the content sent here may be the sender of the media content request message, or a third-party device of the sender of the media content request message and the reader of the media content, which is not limited in this embodiment of the present invention.

以下将以直播快退文件的生成和读取为例,以系统的方式对上述实施例进行进一步的说明。The following will take the generation and reading of a live rewind file as an example to further describe the above embodiment in a systematic manner.

直播录制内容生成时,快退文件按照分片的方式生成并存储,每个分片写满后,生成下一个分片,直到快退文件的数据全部存储完毕。每个分片可以按照某种规则设定,一种规则是按照固定大小的方式设定;如存储文件的示意图3所示,重叠的方形图案表示了四个分片301:快退内容(斜体方格部分)从快退文件尾部向快退文件头写入;直播录制内容,快进内容和快退内容生成的同时,其媒体内容的索引信息也同步到索引文件(index file)中,例如:每个视频或者音频采样在文件中的索引信息会同步到Index文件中,并且随着直播的演进,索引信息不断增加。在分片规则中,还包含设定分片的命名规则;分片文件按照命名规则命名。一种简单的实现方式是:每个分片分配一个ID,ID和分片在文件中的位置相关。例如,为第一个分片分配为0,第二个分片分配为1,快退文件对外部的索引为ABCD,则分片的名称为ABCD_0,ABCD_1。When the live recording content is generated, the rewind file is generated and stored in segments. After each segment is full, the next segment is generated until all the data in the rewind file is stored. Each slice can be set according to certain rules, one rule is set according to a fixed size; as shown in the schematic diagram 3 of the storage file, the overlapping square pattern represents four slices 301: rewind content (italics grid part) is written from the end of the rewind file to the head of the rewind file; when the live recording content, fast forward content and rewind content are generated, the index information of the media content is also synchronized to the index file (index file), for example : The index information of each video or audio sample in the file will be synchronized to the Index file, and as the live broadcast evolves, the index information will continue to increase. In the sharding rules, it also includes the naming rules for setting shards; the shard files are named according to the naming rules. A simple implementation method is: each fragment is assigned an ID, and the ID is related to the position of the fragment in the file. For example, assign 0 to the first fragment, assign 1 to the second fragment, and rewind the external index of the file to ABCD, then the name of the fragment is ABCD_0, ABCD_1.

快退文件分片存储及分发的设备可以包含:用户的请求处理逻辑,分片内容定位逻辑,快退文件生成器,以及内容发送逻辑。如图4所示:The device for segmented storage and distribution of rewind files may include: user request processing logic, segment content locating logic, rewind file generator, and content sending logic. As shown in Figure 4:

401:存储服务器接收到外部用户的请求快退文件;401: The storage server receives a request from an external user to rewind the file;

402:系统首先执行分片内容定位逻辑;402: The system first executes the fragment content positioning logic;

403:经过分片内容定位逻辑,得到分片的ID和字节访问;其中分片的ID对应分片文件的存储路径和文件名。403: After segment content location logic, the ID and byte access of the segment are obtained; the ID of the segment corresponds to the storage path and file name of the segment file.

404:内容发送的模块根据分片ID和字节范围从快速分片生成器(可以对应图3中的存储设备)中获取快退内容,然后向用户发送用户所需要的快退内容。404: The content sending module obtains rewind content from the fast fragment generator (which may correspond to the storage device in Figure 3) according to the fragment ID and byte range, and then sends the rewind content required by the user to the user.

在本实施例中,中心存储在处理直播录制内容时,可以按照实际直播节目的长短生成快退文件,节省系统存储空间;可以适应直播录制内容的时间变长或者变短,生成合适的快退文件;针对快退文件,可以随着时间增长而增长,减少了预占用系统存储空间。In this embodiment, when the central storage is processing live recording content, it can generate rewind files according to the length of the actual live program, saving system storage space; it can adapt to the longer or shorter time of live recording content, and generate appropriate rewind files Files; for fast rewind files, they can grow with time, reducing the pre-occupied system storage space.

一种媒体内容的存储装置,如图5所示,包括:A storage device for media content, as shown in Figure 5, comprising:

文件接收单元501,用于接收直播时移业务的媒体内容;The file receiving unit 501 is used to receive the media content of the live broadcast time-shift service;

文件生成单元502,用于生成上述媒体内容的快退文件;A file generation unit 502, configured to generate a rewind file of the above-mentioned media content;

判断单元503,用于判断是否还有正在生成的快退文件;Judging unit 503, configured to judge whether there is a fast rewind file being generated;

存储控制单元504,用于为上述快退文件分配存储分片,将快退文件存储到存储分片;若上述存储分片写满后还有正在生成的快退文件,则继续为上述快退文件分配存储分片,将未存储的快退文件存储到新分配的存储分片;直到接收的快退文件全部存储完毕。The storage control unit 504 is configured to allocate a storage segment for the above-mentioned fast rewind file, and store the fast rewind file in the storage segment; File allocation storage shards, and store unstored rewind files in newly allocated storage shards; until all received rewind files are stored.

更具体地,上述存储控制单元504,用于分配存储分片包括:按照预先制定的规则分配固定大小或者大小递减的存储分片。More specifically, the above-mentioned storage control unit 504 being configured to allocate storage slices includes: allocating fixed-size or decreasing-size storage slices according to predetermined rules.

如图6所示,上述装置,还包括:As shown in Figure 6, the above-mentioned device also includes:

编号单元601,用于为上述存储分片分配标识,上述标识用于表示上述存储分片的位置信息。The numbering unit 601 is configured to assign an identifier to the above-mentioned storage slice, and the above-mentioned identifier is used to represent the location information of the above-mentioned storage slice.

如图7所示,上述装置,还包括:As shown in Figure 7, the above-mentioned device also includes:

索引建立单元701,用于建立分片索引,上述分片索引用以表示上述存储分片所存储的快退文件的内容范围与上述存储分片的标识之间的映射关系。The index establishment unit 701 is configured to establish a slice index, where the slice index is used to represent a mapping relationship between the content range of the rewind file stored in the storage slice and the identifier of the storage slice.

更具体地,上述存储控制单元504,用于将快退文件存储到存储分片包括:用于将快退文件存储到存储的存储顺序为从存储分片的后端向前端依次写入。More specifically, the above-mentioned storage control unit 504, being used to store the rewind file in the storage segment includes: storing the rewind file in the storage sequence is sequentially written from the back end of the storage segment to the front end.

一种媒体内容的读取装置,如图8所示,包括:A device for reading media content, as shown in Figure 8, comprising:

请求接收单元801,用于接收媒体内容请求消息,上述媒体内容请求消息包含所要读取的快退文件的外部索引和内容范围;The request receiving unit 801 is configured to receive a media content request message, where the media content request message includes the external index and content range of the rewind file to be read;

检索单元802,用于根据上述快退文件的外部索引和内容范围确定用于存储上述快退文件的存储分片;A retrieval unit 802, configured to determine a storage segment for storing the above-mentioned fast-rewind file according to the external index and content range of the above-mentioned fast-rewind file;

发送单元803,用于发送从上述存储分片中读取上述快退文件。The sending unit 803 is configured to send the fast rewind file read from the storage slice.

更具体地,上述检索单元802,用于根据上述快退文件的外部索引和内容范围查询分片索引,确定上述存储分片的标识,其中,上述存储分片的标识用于表示上述存储分片的位置信息;根据上述存储分片的标识确定上述存储分片。More specifically, the retrieval unit 802 is configured to query the fragmentation index according to the external index and content range of the rewind file, and determine the identifier of the storage fragment, wherein the identifier of the storage fragment is used to indicate that the storage fragment The location information of the above-mentioned storage fragment is determined according to the identification of the above-mentioned storage fragment.

一种媒体内容的存储系统,如图9所示,包括:存储装置901和读取装置902,其中存储装置901为本发明实施例任意一项提供的媒体内容的存储装置,读取装置902本发明实施例任意一项提供的媒体内容的读取装置。A storage system for media content, as shown in FIG. 9 , includes: a storage device 901 and a reading device 902, wherein the storage device 901 is a storage device for media content provided by any one of the embodiments of the present invention, and the reading device 902 is the A device for reading media content provided by any one of the embodiments of the invention.

上述实施例,通过分片来存储无法预知大小的快退文件,不必为无法预知大小的快退文件预先分配大的存储空间,这样减少了预占用的系统存储空间,实现存储空间的分配与存储的需求的匹配。In the above-mentioned embodiment, the fast rewind file of unpredictable size is stored by fragmentation, and it is not necessary to pre-allocate a large storage space for the fast rewind file of unpredictable size, which reduces the pre-occupied system storage space and realizes the allocation and storage of storage space matching of needs.

本领域普通技术人员可以理解实现上述实施例方法中的全部或部分步骤是可以通过程序来指令相关的硬件完成,上述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。Those of ordinary skill in the art can understand that all or part of the steps in the method of the above-mentioned embodiments can be completed by instructing related hardware through a program, and the above-mentioned program can be stored in a computer-readable storage medium, the above-mentioned storage medium It can be read-only memory, disk or CD-ROM, etc.

以上对本发明实施例所提供的一种媒体内容的存储方法、读取方法、装置和系统进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上,本说明书内容不应理解为对本发明的限制。A storage method, reading method, device, and system for media content provided by the embodiments of the present invention have been described in detail above. In this paper, specific examples are used to illustrate the principle and implementation of the present invention. The above embodiments The explanation is only used to help understand the method of the present invention and its core idea; meanwhile, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation and scope of application. In summary, this The content of the description should not be construed as limiting the present invention.

Claims (16)

1. the storage means of a media content is characterized in that, comprising:
Receive the media content of direct broadcast time-shift business;
Generating the rewind down file of described media content, is described rewind down file allocation storage burst, and the rewind down file storage is arrived described storage burst; If described storage burst is write the rewind down file that full back is generating in addition, then continue as described rewind down file allocation storage burst, the rewind down file storage of not storing is arrived newly assigned storage burst; Finish up to the whole storages of rewind down file.
2. according to the described method of claim 1, it is characterized in that described memory allocated is distributed and comprised:
According to regular allocation fixed size that pre-establishes or the big or small storage burst that successively decreases.
3. according to the described method of claim 1, it is characterized in that, also comprise: be described storage burst allocation identification, described sign is used to represent the positional information of described storage burst.
4. according to the described method of claim 3, it is characterized in that, also comprise: the prefix that increases the outside index name of described rewind down file for the sign of described storage burst.
5. according to the described method of claim 3, it is characterized in that, also comprise:
Set up the burst index, described burst index is in order to the mapping relations between the sign of the context of representing the rewind down file that described storage burst is stored and described storage burst.
6. according to any described method of claim 1 to 5, it is characterized in that described rewind down file storage writes for the rear end forward end from the storage burst successively to the storage order of storage burst.
7. the read method of a media content is characterized in that, comprising:
The receiving media content request message, described media content request message comprises the outside index and the context of the rewind down file that will read;
The storage burst that is identified for storing described rewind down file according to the outside index and the context of described rewind down file;
Reading described rewind down file cocurrent from described storage burst send.
8. according to the described method of claim 7, it is characterized in that the storage burst that is identified for storing described rewind down file according to the outside index of described rewind down file and context comprises:
According to the outside index and the context inquiry burst index of described rewind down file, determine the sign of described storage burst, wherein, the sign of described storage burst is used to represent the positional information of described storage burst;
Determine described storage burst according to the sign of described storage burst.
9. the memory storage of a media content is characterized in that, comprising:
The file receiving element is used to receive the media content of direct broadcast time-shift business;
File generating unit is used to generate the rewind down file of described media content;
Judging unit is used to judge whether the rewind down file that is generating in addition;
Storage control unit is used to described rewind down file allocation storage burst, and the rewind down file storage is arrived the storage burst; If described storage burst is write the rewind down file that full back is generating in addition, then continue as described rewind down file allocation storage burst, the rewind down file storage of not storing is arrived newly assigned storage burst; Finish up to the whole storages of rewind down file.
10. according to the described method of claim 9, it is characterized in that described storage control unit is used for the memory allocated burst and comprises: according to regular allocation fixed size that pre-establishes or the big or small storage burst that successively decreases.
11. according to the described device of claim 9, it is characterized in that, also comprise:
Numbered cell is used to described storage burst allocation identification, and described sign is used to represent the positional information of described storage burst.
12. according to the described device of claim 11, it is characterized in that, also comprise:
The unit set up in index, is used to set up the burst index, and described burst index is in order to the mapping relations between the sign of the context of representing the rewind down file that described storage burst is stored and described storage burst.
13., it is characterized in that described storage control unit is used for the rewind down file storage is comprised to the storage burst according to any described device of claim 9 to 12:
Be used for the storage order of rewind down file storage to storage write successively for the rear end forward end from the storage burst.
14. the reading device of a media content is characterized in that, comprising:
The request receiving element is used for the receiving media content request message, and described media content request message comprises the outside index and the context of the rewind down file that will read;
Retrieval unit is used for the storage burst that outside index and context according to described rewind down file are identified for storing described rewind down file;
Transmitting element is used for sending and reads described rewind down file from described storage burst.
15. according to the described device of claim 14, it is characterized in that, described retrieval unit, be used for outside index and context inquiry burst index according to described rewind down file, determine the sign of described storage burst, wherein, the sign of described storage burst is used to represent the positional information of described storage burst; Determine described storage burst according to the sign of described storage burst.
16. the storage system of a media content, comprise: memory storage and reading device, it is characterized in that: memory storage is the memory storage of any one media content of claim 9 to 13, and reading device is the reading device of the media content of claim 14 or 15.
CN 201010615967 2010-12-30 2010-12-30 Methods, devices and systems for storing and reading media contents Active CN102136289B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN 201010615967 CN102136289B (en) 2010-12-30 2010-12-30 Methods, devices and systems for storing and reading media contents
PCT/CN2011/084712 WO2012089096A1 (en) 2010-12-30 2011-12-27 Storage method and reading method of media contents, and device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201010615967 CN102136289B (en) 2010-12-30 2010-12-30 Methods, devices and systems for storing and reading media contents

Publications (2)

Publication Number Publication Date
CN102136289A true CN102136289A (en) 2011-07-27
CN102136289B CN102136289B (en) 2013-03-13

Family

ID=44296047

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201010615967 Active CN102136289B (en) 2010-12-30 2010-12-30 Methods, devices and systems for storing and reading media contents

Country Status (2)

Country Link
CN (1) CN102136289B (en)
WO (1) WO2012089096A1 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012089096A1 (en) * 2010-12-30 2012-07-05 华为技术有限公司 Storage method and reading method of media contents, and device and system
CN102687149A (en) * 2012-02-13 2012-09-19 华为技术有限公司 Media storage system and method
CN102708107A (en) * 2011-12-13 2012-10-03 北京安天电子设备有限公司 Method and system for storing appended files
CN103108029A (en) * 2012-12-13 2013-05-15 中国科学院深圳先进技术研究院 Data access method of video-on-demand (vod) system
CN103152377A (en) * 2012-12-13 2013-06-12 中国科学院深圳先进技术研究院 Data access method capable of facing file transfer protocol (ftp) service
CN104796741A (en) * 2015-04-15 2015-07-22 姚世明 Network layering and resource fragmenting media-sharing method and device
CN108763479A (en) * 2018-05-29 2018-11-06 宁波三星医疗电气股份有限公司 File management method based on terminal document system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1321395A (en) * 1998-10-05 2001-11-07 松下技术股份有限公司 Algorithm for fast forward and fast rewind of MPEG streams
CN1679326A (en) * 2002-09-05 2005-10-05 汤姆森特许公司 A method and system for memory PVR functions in a broadcast environment
CN1705365A (en) * 2004-05-27 2005-12-07 扬智科技股份有限公司 Audio and video signal fast forward playback method
CN101021846A (en) * 2006-02-14 2007-08-22 乐金电子(中国)研究开发中心有限公司 Method for storing indefinite frame length structural data stream
CN101106637A (en) * 2006-07-13 2008-01-16 中兴通讯股份有限公司 Method for playing media files on external storage device through set-top box

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100518301C (en) * 2001-12-12 2009-07-22 皇家飞利浦电子股份有限公司 Method and apparatus for controlling playback of an interactive television application
EP1676441A1 (en) * 2003-10-22 2006-07-05 Video Networks IP Holdings Limited Non-linear interactive video navigation
JP2008523681A (en) * 2004-12-09 2008-07-03 コーニンクレッカ フィリップス エレクトロニクス エヌ ヴィ Program playback method and apparatus
CN101102465A (en) * 2006-07-03 2008-01-09 长江计算机(集团)公司 A Time Shifting System Applied to Digital TV Broadcasting
US7924456B1 (en) * 2007-01-12 2011-04-12 Broadbus Technologies, Inc. Data distribution and buffering
CN102136289B (en) * 2010-12-30 2013-03-13 华为技术有限公司 Methods, devices and systems for storing and reading media contents

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1321395A (en) * 1998-10-05 2001-11-07 松下技术股份有限公司 Algorithm for fast forward and fast rewind of MPEG streams
CN1679326A (en) * 2002-09-05 2005-10-05 汤姆森特许公司 A method and system for memory PVR functions in a broadcast environment
CN1705365A (en) * 2004-05-27 2005-12-07 扬智科技股份有限公司 Audio and video signal fast forward playback method
CN101021846A (en) * 2006-02-14 2007-08-22 乐金电子(中国)研究开发中心有限公司 Method for storing indefinite frame length structural data stream
CN101106637A (en) * 2006-07-13 2008-01-16 中兴通讯股份有限公司 Method for playing media files on external storage device through set-top box

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012089096A1 (en) * 2010-12-30 2012-07-05 华为技术有限公司 Storage method and reading method of media contents, and device and system
CN102708107A (en) * 2011-12-13 2012-10-03 北京安天电子设备有限公司 Method and system for storing appended files
CN102687149A (en) * 2012-02-13 2012-09-19 华为技术有限公司 Media storage system and method
CN103108029A (en) * 2012-12-13 2013-05-15 中国科学院深圳先进技术研究院 Data access method of video-on-demand (vod) system
CN103152377A (en) * 2012-12-13 2013-06-12 中国科学院深圳先进技术研究院 Data access method capable of facing file transfer protocol (ftp) service
CN103152377B (en) * 2012-12-13 2016-05-11 中国科学院深圳先进技术研究院 A kind of data access method towards ftp service
CN103108029B (en) * 2012-12-13 2016-06-29 中国科学院深圳先进技术研究院 The data access method of vod system
CN104796741A (en) * 2015-04-15 2015-07-22 姚世明 Network layering and resource fragmenting media-sharing method and device
CN104796741B (en) * 2015-04-15 2018-03-16 姚世明 A kind of media sharing square law device of network hierarchy and resource burst
CN108763479A (en) * 2018-05-29 2018-11-06 宁波三星医疗电气股份有限公司 File management method based on terminal document system

Also Published As

Publication number Publication date
WO2012089096A1 (en) 2012-07-05
CN102136289B (en) 2013-03-13

Similar Documents

Publication Publication Date Title
CN102136289A (en) Methods, devices and systems for storing and reading media contents
KR102274466B1 (en) Video streaming method using real time caching technique and system thereof
JP2008243367A (en) Method and device for recording broadcast data
CN100440171C (en) A method for file organization and management of audio-video recording and playback devices in an embedded environment
US7966351B2 (en) Fast and efficient method for deleting very large files from a filesystem
CN101420603A (en) Method for implementing media distribution, positioning by segmented memory and stream media system thereof
CN103369351A (en) Streaming media fast-forward and fast-backward processing method, video server and system
CN112637616B (en) An object storage method, system and server
US10782888B2 (en) Method and device for improving file system write bandwidth through hard disk track management
US7924456B1 (en) Data distribution and buffering
CN101425310B (en) Method to reserve index storage space during audio video interleaved recording
WO2014153931A1 (en) File storage method and device, access client and metadata server system
US7660837B2 (en) Method for automatically managing disk fragmentation
JP2005339262A (en) File system and control method thereof
CN101330594A (en) Storage method of peer-to-peer network video-on-demand media and its media-on-demand system
CN100418071C (en) Method for establishing a media file system
CN1491387B (en) Device and method for managing access to storage medium
CN101341749B (en) Dispensing apparatus and reproducing apparatus
KR101012187B1 (en) Method for seamless real-time separation and connection of data streams
CN100424778C (en) Method and apparatus for recording multimedia digital data
CN104980680B (en) A kind of method of video data access
KR101741487B1 (en) Apparatus and method for time shift buffering function in digital broadcast system
US20070019511A1 (en) Recording apparatus, recording methods, reading apparatus reading methods and programs
CN118921501A (en) Live content processing method, device, equipment and storage medium
CN113254685A (en) System, method and apparatus for managing segmented media content

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
ASS Succession or assignment of patent right

Owner name: BEIJING WEIBEN INTELLECTUAL PROPERTY MANAGEMENT CO

Free format text: FORMER OWNER: HUAWEI TECHNOLOGY CO., LTD.

Effective date: 20141120

C41 Transfer of patent application or patent right or utility model
COR Change of bibliographic data

Free format text: CORRECT: ADDRESS; FROM: 518129 SHENZHEN, GUANGDONG PROVINCE TO: 100080 HAIDIAN, BEIJING

TR01 Transfer of patent right

Effective date of registration: 20141120

Address after: 100080 room 401A, building 27, 1 Xin Lu, Haidian District, Beijing

Patentee after: Beijing Weiben Intellectual Property Management Co. Ltd.

Address before: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen

Patentee before: Huawei Technologies Co., Ltd.

ASS Succession or assignment of patent right

Owner name: BEIJING Z-GOOD TECHNOLOGY SERVICE CO., LTD.

Free format text: FORMER OWNER: BEIJING WEIBEN INTELLECTUAL PROPERTY MANAGEMENT CO., LTD.

Effective date: 20141218

C41 Transfer of patent application or patent right or utility model
COR Change of bibliographic data

Free format text: CORRECT: ADDRESS; FROM: 100080 HAIDIAN, BEIJING TO: 100085 HAIDIAN, BEIJING

TR01 Transfer of patent right

Effective date of registration: 20141218

Address after: 100085 Beijing city Haidian District No. 33 Xiaoying Road 1 1F06 room

Patentee after: BEIJING ZHIGU TECHNOLOGY SERVICES CO., LTD.

Address before: 100080 room 401A, building 27, 1 Xin Lu, Haidian District, Beijing

Patentee before: Beijing Weiben Intellectual Property Management Co. Ltd.