CN103200272B - Streaming media storage system and storage method - Google Patents
Streaming media storage system and storage method Download PDFInfo
- Publication number
- CN103200272B CN103200272B CN201310134471.7A CN201310134471A CN103200272B CN 103200272 B CN103200272 B CN 103200272B CN 201310134471 A CN201310134471 A CN 201310134471A CN 103200272 B CN103200272 B CN 103200272B
- Authority
- CN
- China
- Prior art keywords
- storage
- server
- files
- streaming media
- media
- 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.)
- Expired - Fee Related
Links
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
本发明涉及一种流媒体存储系统,包括终端设备、中心服务器、缓存服务器和至少两个存储服务器,针对流媒体文件分割后的至少两个子流媒体文件,采用缓存服务器和各个存储服务器分别进行存储,并在中心服务器中建立各流媒体文件对应其子流媒体文件存储信息的映射关系;其中,终端设备根据由中心服务器获得的指定流媒体文件对应其子流媒体文件的存储信息,向缓存服务器和各个存储服务器发送流媒体请求,并得到指定流媒体文件的反馈;同时,本发明还涉及基于该流媒体存储系统的存储方法,通过该系统和方法,不仅能够解决多终端访问时出现的并发问题,而且能够有效提高流媒体文件网络访问速度。
The present invention relates to a streaming media storage system, comprising a terminal device, a central server, a cache server and at least two storage servers, for at least two sub-stream media files after streaming media files are divided, the cache server and each storage server are respectively used for storage , and establish the mapping relationship of each streaming media file corresponding to the storage information of its sub-streaming media files in the central server; wherein, the terminal device sends the cache server to the cache server according to the storage information of the specified streaming media file obtained by the central server Send a streaming media request with each storage server, and get the feedback of the specified streaming media file; meanwhile, the present invention also relates to a storage method based on the streaming media storage system, through this system and method, not only can solve the concurrency that occurs when multiple terminals access problems, and can effectively improve the network access speed of streaming media files.
Description
技术领域 technical field
本发明涉及一种流媒体存储系统及存储方法。 The invention relates to a streaming media storage system and storage method.
背景技术 Background technique
流媒体是指以流的方式在网络中传输音频、视频和多媒体文件的形式;流媒体文件格式是支持采用流式传输及播放的媒体格式。流式传输方式是将视频和音频等多媒体文件经过特殊的压缩方式分成一个个压缩包,由服务器向用户计算机连续、实时传送。在采用流式传输方式的系统中,用户不必像非流式播放那样等到整个文件全部下载完毕后才能看到当中的内容,而是只需要经过几秒钟或几十秒的启动延时即可在用户计算机上利用相应的播放器对压缩的视频或音频等流式媒体文件进行播放,剩余的部分将继续进行下载,直至播放完毕。 Streaming media refers to the form of transmitting audio, video and multimedia files in the network in a streaming manner; the streaming media file format is a media format that supports streaming transmission and playback. The streaming transmission method is to divide multimedia files such as video and audio into compressed packages through a special compression method, and transmit them continuously and in real time from the server to the user's computer. In a streaming system, users don't have to wait until the entire file is downloaded to see the content as in non-streaming playback, but only need a few seconds or tens of seconds of start-up delay. Use the corresponding player on the user's computer to play the compressed video or audio and other streaming media files, and the remaining parts will continue to be downloaded until the playback is completed.
这个过程的一系列相关的包称为“流”,流媒体实际指的是一种新的媒体传送方式,而非一种新的媒体。流媒体技术全面应用后,人们在网上聊天可直接语音输入;如果想彼此看见对方的容貌、表情,只要双方各有一个摄像头就可以了;在网上看到感兴趣的商品,点击以后,讲解员和商品的影像就会跳出来;更有真实感的影像新闻也会出现。 A series of related packages in this process is called "stream". Streaming media actually refers to a new media transmission method, not a new media. After the full application of streaming media technology, people can directly voice input when chatting online; if they want to see each other's appearance and expression, as long as both parties have a camera; Videos of products and products will pop up; more realistic video news will also appear.
与流媒体文件被分成多个文件进行存储的形式相对应,现有技术对流媒体的应用中,技术人员会将分成的多个文件分别存储到多个服务器上,这是因为单一的存储节点,不仅制约了用户并发数,影响着系统的安全性和可靠性,同时造价昂贵,在维护和数据恢复速率方面也存在着较大缺陷,所以将流媒体文件分成多个文件分别存储到多个服务器上,可以有效解决以上问题。但是随着流媒体的广泛应用、以及网络时代不断进步,接入网络中的终端设备变得越来越多,网络的传输速度成为了人们使用网络的重要考虑因素,流媒体的出现以及应用,有效解决了多终端设备的并发问题,但是对于其网络传输而言,依然取决于其所在网络的传输速度,而没有有效的方法对其进行改善。 Corresponding to the form in which streaming media files are divided into multiple files for storage, in the application of streaming media in the prior art, technicians will store the divided multiple files on multiple servers, because a single storage node, It not only restricts the number of concurrent users, but also affects the security and reliability of the system. At the same time, it is expensive, and there are also major defects in maintenance and data recovery speed. Therefore, streaming media files are divided into multiple files and stored in multiple servers. , can effectively solve the above problems. However, with the wide application of streaming media and the continuous progress of the Internet era, more and more terminal devices are connected to the network, and the transmission speed of the network has become an important consideration for people to use the network. The emergence and application of streaming media, It effectively solves the concurrency problem of multi-terminal devices, but for its network transmission, it still depends on the transmission speed of the network where it is located, and there is no effective way to improve it.
发明内容 Contents of the invention
本发明所要解决的技术问题是提供一种不仅能够解决多终端访问时出现的并发问题,而且能够有效提高流媒体文件网络访问速度的流媒体存储系统。 The technical problem to be solved by the present invention is to provide a streaming media storage system that can not only solve the concurrency problem when multiple terminals access, but also effectively improve the network access speed of streaming media files.
与此相应,本发明所要解决的技术问题是提供一种基于本发明设计的流媒体存储系统,不仅解决多终端访问时出现的并发问题,而且能够有效提高对流媒体文件的访问速度的存储方法。 Correspondingly, the technical problem to be solved by the present invention is to provide a streaming media storage system based on the design of the present invention, which not only solves the concurrency problem during multi-terminal access, but also can effectively improve the access speed of streaming media files.
本发明为了解决上述技术问题采用以下技术方案:本发明设计了一种流媒体存储系统,包括终端设备、中心服务器、和至少两个存储服务器;各个所需存储的流媒体文件分别经中心服务器分割成至少两个子流媒体文件,分别存储在各存储服务器中;终端设备向中心服务器发送流媒体请求指令,中心服务器根据各流媒体文件对应其子流媒体文件存储信息的映射关系、以及终端设备的流媒体请求指令,调用指定流媒体文件对应其子流媒体文件的存储信息,反馈给终端设备,终端设备再根据获得的存储信息,向存储信息中指定的各存储服务器发送流媒体请求指令,再由指定的各存储服务器将指定流媒体文件的各个子流媒体文件发送至终端设备;还包括与各存储服务器一并用于分别存储各个子流媒体文件的缓存服务器,终端设备根据由中心服务器获得的存储信息,向存储信息中指定的缓存服务器和各存储服务器发送流媒体请求指令,再由指定的缓存服务器和各存储服务器将指定流媒体文件的子流媒体文件发送至终端设备。 The present invention adopts the following technical solutions in order to solve the above technical problems: the present invention designs a streaming media storage system, including terminal equipment, a central server, and at least two storage servers; each streaming media file to be stored is divided through the central server respectively At least two sub-streaming media files are stored in each storage server respectively; the terminal device sends a streaming media request instruction to the central server, and the central server is based on the mapping relationship of each streaming media file corresponding to the storage information of its sub-streaming media files and the terminal device's The streaming media request command calls the storage information of the specified streaming media file corresponding to its sub-streaming media file, and feeds it back to the terminal device, and the terminal device sends the streaming media request command to each storage server specified in the storage information according to the obtained storage information, and then Each sub-stream media file of the specified stream media file is sent to the terminal device by each designated storage server; it also includes a cache server for storing each sub-stream media file together with each storage server, and the terminal device is based on the data obtained by the central server. To store the information, send a streaming media request instruction to the cache server and each storage server specified in the storage information, and then the specified cache server and each storage server will send the sub-stream media file of the specified streaming media file to the terminal device.
作为本发明的一种优选技术方案:所述缓存服务器和各个存储服务器分别包括与之对应的各个计数模块,分别对其内部子流媒体文件的被调用次数进行计数,并在指定时间间隔将计数结果发送至所述中心服务器。 As a preferred technical solution of the present invention: the cache server and each storage server include respective counting modules corresponding thereto, respectively counting the number of calls of its internal sub-stream media files, and counting The results are sent to the central server.
本发明所述一种流媒体存储系统采用以上技术方案与现有技术相比,具有以下技术效果: Compared with the prior art, a streaming media storage system according to the present invention adopts the above technical solution, and has the following technical effects:
(1)本发明设计的流媒体存储系统在采用多个存储服务器针对流媒体文件划分为多个文件进行分别存储的基础之上,增设缓存服务器能够有效提高终端设备对流媒体文件的读取速度; (1) The streaming media storage system designed by the present invention adopts multiple storage servers to divide the streaming media files into multiple files for separate storage, and adding a cache server can effectively improve the reading speed of the streaming media files by the terminal device;
(2)本发明设计的流媒体存储系统中,针对缓存服务器和各个存储服务器,分别设置与之对应的计数模块,可以方便统计出各流媒体文件的被访问次数,可以在日后有针对性的对存储的流媒体文件进行更新。 (2) In the streaming media storage system designed by the present invention, for the cache server and each storage server, corresponding counting modules are respectively set up, which can conveniently count the number of visits of each streaming media file, and can be targeted in the future Update the stored streaming media files.
与此相应,本发明为了解决上述技术问题采用以下技术方案:本发明还设计了一种流媒体存储系统的存储方法,包括如下步骤: Correspondingly, the present invention adopts the following technical solutions in order to solve the above-mentioned technical problems: the present invention also designs a storage method of a streaming media storage system, comprising the following steps:
步骤1.中心服务器将各个所需存储的流媒体文件分别分割成至少两个子流媒体文件,分别随机存储在各个存储服务器中,并建立各流媒体文件对应其子流媒体文件存储信息的映射关系,存储在中心服务器中; Step 1. The central server divides each streaming media file required to be stored into at least two sub-streaming media files, randomly stores them in each storage server respectively, and establishes the mapping relationship of each streaming media file corresponding to the storage information of its sub-streaming media files , stored in the central server;
步骤2.中心服务器根据各流媒体文件对应其子流媒体文件存储信息的映射关系、以及终端设备的流媒体请求指令,调用指定流媒体文件对应其子流媒体文件的存储信息,反馈给终端设备,终端设备再根据获得的存储信息,向存储信息中指定的各存储服务器发送流媒体请求指令,再由指定的各存储服务器将指定流媒体文件的各个子流媒体文件发送至终端设备; Step 2. The central server calls the storage information corresponding to its sub-stream media files corresponding to the specified stream media files according to the mapping relationship of each streaming media file to its sub-stream media storage information and the streaming media request instruction of the terminal device, and feeds back to the terminal device , the terminal device then sends a streaming media request command to each storage server specified in the storage information according to the obtained storage information, and then the specified storage servers send each sub-stream media file of the specified streaming media file to the terminal device;
所述步骤1中,中心服务器将各个流媒体文件分别分割后的各个子流媒体文件,分别随机存储在缓存服务器和各个存储服务器中; In the step 1, the central server randomly stores each sub-stream media file after each streaming media file is divided into the cache server and each storage server respectively;
所述步骤2中,终端设备根据由中心服务器获得的存储信息,向存储信息中指定的缓存服务器和各存储服务器发送流媒体请求指令,再由指定的缓存服务器和各存储服务器将指定流媒体文件的子流媒体文件发送至终端设备。 In said step 2, the terminal device sends a streaming media request instruction to the cache server and each storage server specified in the storage information according to the storage information obtained by the central server, and then the specified cache server and each storage server will specify the streaming media file The sub-streaming media files of the device are sent to the terminal device.
作为本发明的一种优选技术方案:所述步骤1包括如下步骤: As a preferred technical solution of the present invention: said step 1 comprises the following steps:
步骤a.中心服务器将各个所需存储的流媒体文件分别分割成至少两个子流媒体文件; Step a. The central server divides each streaming media file required to be stored into at least two sub-streaming media files;
步骤b.中心服务器将分别对应于各个所需存储的流媒体文件的各个第一段子流媒体文件存储在缓存服务器中,其余各个子流媒体文件分别随机存储在各个存储服务器中; Step b. the central server stores each first section of sub-stream media files respectively corresponding to the required stored stream media files in the cache server, and all the other sub-stream media files are randomly stored in each storage server respectively;
步骤c.中心服务器根据针对各个子流媒体文件的存储,建立各流媒体文件对应其子流媒体文件存储信息的映射关系,存储在中心服务器中。 Step c. The central server establishes a mapping relationship between each streaming media file corresponding to the storage information of its sub-streaming media files according to the storage of each sub-streaming media file, and stores it in the central server.
作为本发明的一种优选技术方案:所述步骤1之后还包括如下步骤Ⅰ,步骤Ⅰ与步骤2同时进行,步骤Ⅰ如下: As a preferred technical solution of the present invention: after the step 1, the following step I is also included, and the step I and step 2 are carried out simultaneously, and the step I is as follows:
所述缓存服务器和各个存储服务器中的计数模块,分别对其内部子流媒体文件的调用次数进行计数,并在指定时间间隔将计数结果发送至所述中心服务器,中心服务器根据各个子流媒体文件被调用次数的统计结果、以及事先设定的热门流媒体调用次数阀值、冷门流媒体调用次数阀值,确定热门流媒体文件和冷门流媒体文件。 The counting module in the cache server and each storage server counts the number of calls of its internal sub-streaming media files respectively, and sends the counting results to the central server at specified time intervals, and the central server according to each sub-streaming media file The statistical results of the number of calls, as well as the pre-set thresholds of popular streaming media calls and unpopular streaming media calls are used to determine popular streaming media files and unpopular streaming media files.
作为本发明的一种优选技术方案:所述步骤Ⅰ中,针对所述热门流媒体文件还包括如下步骤: As a preferred technical solution of the present invention: in the step 1, the following steps are also included for the popular streaming media files:
所述中心服务器针对热门流媒体文件存储在各个存储服务器上的各个子流媒体文件,随机选取至少一段子流媒体文件,将其复制至缓存服务器中,并更新各流媒体文件对应其子流媒体文件存储信息的映射关系,存储在中心服务器中;同时,将热门流媒体文件整体备份至缓存服务器。 The central server randomly selects at least one section of sub-stream media files stored in each sub-stream media file on each storage server for the popular stream media files, copies it to the cache server, and updates the corresponding sub-stream media files of each stream media file. The mapping relationship of file storage information is stored in the central server; at the same time, the popular streaming media files are backed up to the cache server as a whole.
作为本发明的一种优选技术方案:所述步骤Ⅰ中,针对所述冷门流媒体文件还包括如下步骤: As a preferred technical solution of the present invention: in the step I, the following steps are also included for the unpopular streaming media file:
所述中心服务器针对冷门流媒体文件存储在缓存服务器上的子流媒体文件进行分析判断:若判断存在除第一段子流媒体文件之外的其它子流媒体文件,则随机选取至少一段其它子流媒体文件,将其从缓存服务器中删除,并更新各流媒体文件对应其子流媒体文件存储信息的映射关系,存储在中心服务器中; The central server analyzes and judges the sub-streaming media files stored on the cache server for unpopular streaming media files: if it is judged that there are other sub-streaming media files except the first sub-streaming media file, then randomly select at least one section of other sub-streaming media files. Streaming media files are deleted from the cache server, and the mapping relationship of each streaming media file corresponding to the storage information of its sub-streaming media files is stored in the central server;
若判断不存在除第一段子流媒体文件之外的其它子流媒体文件,则将该第一段子流媒体文件剪切至随机选择的一个存储服务器中,并更新各流媒体文件对应其子流媒体文件存储信息的映射关系,存储在中心服务器中。 If it is judged that there are no other sub-stream media files except the first sub-stream media file, then the first sub-stream media file is cut into a randomly selected storage server, and each stream media file is updated to correspond to its The mapping relationship of sub-stream media file storage information is stored in the central server.
作为本发明的一种优选技术方案:还包括步骤ⅰ,步骤ⅰ在步骤1之前进行或与步骤1、步骤2同时进行,步骤ⅰ如下: As a kind of preferred technical scheme of the present invention: also comprise step i, step i is carried out before step 1 or carries out simultaneously with step 1, step 2, and step i is as follows:
所述各个存储服务器分别在指定时间间隔内对其并发访问情况和存储容量情况进行检测,并将检测结果上传至所述中心服务器,中心服务器根据接收到的检测结果,将各个存储服务器分别划分为有效存储服务器或非有效存储服务器,再根据划分结果对待存储的流媒体文件进行存储。 Each of the storage servers detects its concurrent access and storage capacity within a specified time interval, and uploads the detection results to the central server, and the central server divides each storage server into An effective storage server or an ineffective storage server stores the streaming media files to be stored according to the division result.
作为本发明的一种优选技术方案:如果所述各个存储服务器中的某个服务器在指点时间间隔内未向中心服务器上传其并发访问情况和存储容量情况的检测结果,则中心服务器将其划分为故障存储服务器,并针对故障存储服务器触发容错调度策略,同时,更新各流媒体文件对应其子流媒体文件存储信息的映射关系,存储在中心服务器中。 As a preferred technical solution of the present invention: if a certain server in the storage servers does not upload the detection results of its concurrent access situation and storage capacity situation to the central server within the specified time interval, the central server will divide it into The faulty storage server triggers a fault-tolerant scheduling strategy for the faulty storage server, and at the same time, updates the mapping relationship of each streaming media file corresponding to its sub-streaming media file storage information, and stores it in the central server.
作为本发明的一种优选技术方案:所述容错调度策略包括如下步骤: As a preferred technical solution of the present invention: the fault-tolerant scheduling strategy includes the following steps:
所述中心服务器查找所述缓存服务器中是否存在与所述故障服务器中子流媒体文件对应的备份流媒体文件,若存在,则将备份流媒体文件复制至随机选取的一个有效存储服务器中,并更新各流媒体文件对应其子流媒体文件存储信息的映射关系,存储在中心服务器中。 The central server searches whether there is a backup streaming file corresponding to the sub-streaming media file in the faulty server in the cache server, if it exists, the backup streaming file is copied to an effective storage server selected at random, and Update the mapping relationship of each streaming media file corresponding to the storage information of its sub-streaming media files, and store it in the central server.
本发明所述一种流媒体存储系统的存储方法采用以上技术方案与现有技术相比,具有以下技术效果: Compared with the prior art, the storage method of a streaming media storage system according to the present invention has the following technical effects by adopting the above technical scheme:
(1)本发明设计的流媒体存储系统的存储方法,将各个流媒体文件分别分割后的各个子流媒体文件,分别随机存储在缓存服务器和各个存储服务器中,通过增设缓存服务器能够有效提高流媒体文件的访问速度,改善流媒体文件的网络传输效率; (1) The storage method of the streaming media storage system designed by the present invention divides each streaming media file into each sub-streaming media file, and randomly stores them in the cache server and each storage server respectively. By adding a cache server, the stream can be effectively improved. The access speed of media files improves the network transmission efficiency of streaming media files;
(2)本发明设计的流媒体存储系统的存储方法,在各个流媒体文件分割后的各个子流媒体文件中,将与各个流媒体文件对应的第一段子流媒体文件存储在缓存服务器中,能够有针对性的提高第一段子流媒体文件的访问速度,进而提高终端设备针对流媒体文件整个访问过程的访问速度; (2) The storage method of the streaming media storage system designed by the present invention stores the first section of sub-streaming media files corresponding to each streaming media file in the cache server in each sub-streaming media file after each streaming media file is divided , can increase the access speed of the first sub-streaming media file in a targeted manner, and then improve the access speed of the terminal device for the entire access process of the streaming media file;
(3)本发明设计的流媒体存储系统的存储方法中,针对存储的流媒体文件,通过对其被访问次数的计数,将其划分为热门流媒体文件和冷门流媒体文件,再分别对热门流媒体文件和冷门流媒体文件进行相应的存储更新,不仅能够为终端访问提供内容方面的索引,而且能够对流媒体文件的存储做出合理的规划,提高存储流媒体文件的整体访问效率; (3) In the storage method of the streaming media storage system designed by the present invention, for the stored streaming media files, by counting the number of times they are accessed, they are divided into popular streaming media files and unpopular streaming media files, and then respectively Corresponding storage updates for streaming media files and unpopular streaming media files can not only provide content index for terminal access, but also make reasonable planning for the storage of streaming media files and improve the overall access efficiency of stored streaming media files;
(4)本发明设计的流媒体存储系统的存储方法,针对流媒体文件的存储过程中,在指定时间间隔内,检测各存储服务器的并发访问情况和存储容量情况,将各个存储服务器分别划分为有效存储服务器或非有效存储服务器,可以有效提高流媒体文件的存储效率、以及终端设备对流媒体文件的访问速度; (4) The storage method of the streaming media storage system designed by the present invention, in the storage process of streaming media files, detects the concurrent access and storage capacity of each storage server within a specified time interval, and divides each storage server into Effective storage server or non-effective storage server can effectively improve the storage efficiency of streaming media files and the access speed of terminal devices to streaming media files;
(5)本发明设计的流媒体存储系统的存储方法中,针对故障存储服务器,中心服务器采用了容错调度策略,能够最大程度保证终端设备对流媒体文件的访问。 (5) In the storage method of the streaming media storage system designed by the present invention, the central server adopts a fault-tolerant scheduling strategy for the faulty storage server, which can ensure the terminal device's access to streaming media files to the greatest extent.
附图说明 Description of drawings
图1是本发明设计的流媒体存储系统的结构示意图。 Fig. 1 is a schematic structural diagram of a streaming media storage system designed in the present invention.
具体实施方式 detailed description
下面结合说明书附图对本发明的具体实施方式作进一步详细的说明。 The specific implementation manners of the present invention will be further described in detail below in conjunction with the accompanying drawings.
如图1所示,本发明设计了一种流媒体存储系统,包括终端设备、中心服务器、和至少两个存储服务器;各个所需存储的流媒体文件分别经中心服务器分割成至少两个子流媒体文件,分别存储在各存储服务器中;终端设备向中心服务器发送流媒体请求指令,中心服务器根据各流媒体文件对应其子流媒体文件存储信息的映射关系、以及终端设备的流媒体请求指令,调用指定流媒体文件对应其子流媒体文件的存储信息,反馈给终端设备,终端设备再根据获得的存储信息,向存储信息中指定的各存储服务器发送流媒体请求指令,再由指定的各存储服务器将指定流媒体文件的各个子流媒体文件发送至终端设备;还包括与各存储服务器一并用于分别存储各个子流媒体文件的缓存服务器,终端设备根据由中心服务器获得的存储信息,向存储信息中指定的缓存服务器和各存储服务器发送流媒体请求指令,再由指定的缓存服务器和各存储服务器将指定流媒体文件的子流媒体文件发送至终端设备。 As shown in Figure 1, the present invention has designed a kind of streaming media storage system, comprises terminal equipment, central server, and at least two storage servers; The files are respectively stored in each storage server; the terminal device sends a streaming media request command to the central server, and the central server calls The storage information of the specified streaming media file corresponding to its sub-streaming media file is fed back to the terminal device, and the terminal device sends a streaming media request command to each storage server specified in the storage information according to the obtained storage information, and then the specified storage servers Each sub-stream media file of the specified stream media file is sent to the terminal device; it also includes a cache server for storing each sub-stream media file together with each storage server, and the terminal device sends the storage information to the storage information according to the storage information obtained by the central server The specified cache server and each storage server send a streaming media request instruction, and then the specified cache server and each storage server send the sub-streaming media file of the specified streaming media file to the terminal device.
本发明设计的流媒体存储系统在采用多个存储服务器针对流媒体文件划分为多个文件进行分别存储的基础之上,增设缓存服务器能够有效提高终端设备对流媒体文件的读取速度。 The streaming media storage system designed by the present invention adopts multiple storage servers to divide the streaming media files into multiple files for separate storage, and adding a cache server can effectively improve the reading speed of the streaming media files by the terminal equipment.
作为本发明的一种优选技术方案:所述缓存服务器和各个存储服务器分别包括与之对应的各个计数模块,分别对其内部子流媒体文件的被调用次数进行计数,并在指定时间间隔将计数结果发送至所述中心服务器。 As a preferred technical solution of the present invention: the cache server and each storage server include respective counting modules corresponding thereto, respectively counting the number of calls of its internal sub-stream media files, and counting The results are sent to the central server.
本发明设计的流媒体存储系统中,针对缓存服务器和各个存储服务器,分别设置与之对应的计数模块,可以方便统计出各流媒体文件的被访问次数,可以在日后有针对性的对存储的流媒体文件进行更新。 In the streaming media storage system designed by the present invention, for the cache server and each storage server, corresponding counting modules are respectively set up, which can conveniently count the number of visits of each streaming media file, and can be targeted for storage in the future. Streaming files are updated.
本发明设计的流媒体存储系统在实际的应用过程当中,将待存储的流媒体文件经中心服务器分割成至少两个子流媒体文件,分别存储到缓存服务器和各个存储服务器中,终端设备向中心服务器发出读写流媒体的请求指令,中心服务器接收终端设备发出的流媒体请求指令,并根据各流媒体文件对应其子流媒体文件存储信息的映射关系,调用指定流媒体文件对应其子流媒体文件的存储信息,反馈给终端设备,终端设备再根据获得的存储信息,向存储信息中指定的缓存服务器和各存储服务器发送流媒体请求指令,再由指定的缓存服务器和各存储服务器将指定流媒体文件的子流媒体文件发送至终端设备,进而实现终端设备对流媒体文件的读取,在解决多终端并发问题的同时,有效提高了终端设备对流媒体的访问速度。 In the actual application process of the streaming media storage system designed by the present invention, the streaming media file to be stored is divided into at least two sub-streaming media files through the central server, and stored in the cache server and each storage server respectively, and the terminal equipment sends the central server Send out a request command to read and write streaming media, the central server receives the streaming media request command sent by the terminal device, and calls the specified streaming media file corresponding to its sub-streaming media file according to the mapping relationship between each streaming media file and its sub-streaming media file storage information The storage information is fed back to the terminal device, and the terminal device then sends a streaming media request command to the cache server and each storage server specified in the storage information according to the obtained storage information, and then the specified cache server and each storage server will specify the streaming media The sub-streaming media file of the file is sent to the terminal device, and then the terminal device can read the streaming media file, which effectively improves the access speed of the terminal device to the streaming media while solving the problem of multi-terminal concurrency.
其中,针对流媒体文件的分割存储过程中,属于同一个流媒体文件的多个子流媒体文件采用随机函数思想,确定其的存储信息,并尽可能的将子流媒体文件均匀的分别保存在缓存服务器和各个存储服务器里;在针对流媒体文件进行分割存储的过程中,建立各流媒体文件对应其子流媒体文件存储信息的映射关系,并存储在中心服务器中。这样通过中心服务器对存储的流媒体文件对应其子流媒体文件存储信息的映射关系进行维护,并使终端设备根据获得的存储信息直接与缓存服务器和各存储服务器进行通讯,读取指定流媒体文件。 Among them, in the process of dividing and storing streaming media files, multiple sub-streaming media files belonging to the same streaming media file adopt the idea of random function to determine their storage information, and store the sub-streaming media files in the cache evenly as much as possible In the server and each storage server; in the process of segmenting and storing the streaming media files, the mapping relationship of each streaming media file corresponding to the storage information of its sub-streaming media files is established and stored in the central server. In this way, the central server maintains the mapping relationship between the stored streaming media files and their sub-streaming media file storage information, and enables the terminal device to directly communicate with the cache server and each storage server according to the obtained storage information to read the specified streaming media file .
与此相应,本发明为了解决上述技术问题采用以下技术方案:本发明还设计了一种流媒体存储系统的存储方法,包括如下步骤: Correspondingly, the present invention adopts the following technical solutions in order to solve the above-mentioned technical problems: the present invention also designs a storage method of a streaming media storage system, comprising the following steps:
步骤1.中心服务器将各个所需存储的流媒体文件分别分割成至少两个子流媒体文件,分别随机存储在各个存储服务器中,并建立各流媒体文件对应其子流媒体文件存储信息的映射关系,存储在中心服务器中; Step 1. The central server divides each streaming media file required to be stored into at least two sub-streaming media files, randomly stores them in each storage server respectively, and establishes the mapping relationship of each streaming media file corresponding to the storage information of its sub-streaming media files , stored in the central server;
步骤2.中心服务器根据各流媒体文件对应其子流媒体文件存储信息的映射关系、以及终端设备的流媒体请求指令,调用指定流媒体文件对应其子流媒体文件的存储信息,反馈给终端设备,终端设备再根据获得的存储信息,向存储信息中指定的各存储服务器发送流媒体请求指令,再由指定的各存储服务器将指定流媒体文件的各个子流媒体文件发送至终端设备; Step 2. The central server calls the storage information corresponding to its sub-stream media files corresponding to the specified stream media files according to the mapping relationship of each streaming media file to its sub-stream media storage information and the streaming media request instruction of the terminal device, and feeds back to the terminal device , the terminal device then sends a streaming media request command to each storage server specified in the storage information according to the obtained storage information, and then the specified storage servers send each sub-stream media file of the specified streaming media file to the terminal device;
所述步骤1中,中心服务器将各个流媒体文件分别分割后的各个子流媒体文件,分别随机存储在缓存服务器和各个存储服务器中; In the step 1, the central server randomly stores each sub-stream media file after each streaming media file is divided into the cache server and each storage server respectively;
所述步骤2中,终端设备根据由中心服务器获得的存储信息,向存储信息中指定的缓存服务器和各存储服务器发送流媒体请求指令,再由指定的缓存服务器和各存储服务器将指定流媒体文件的子流媒体文件发送至终端设备。 In said step 2, the terminal device sends a streaming media request instruction to the cache server and each storage server specified in the storage information according to the storage information obtained by the central server, and then the specified cache server and each storage server will specify the streaming media file The sub-streaming media files of the device are sent to the terminal device.
本发明设计的流媒体存储系统的存储方法,将各个流媒体文件分别分割后的各个子流媒体文件,分别随机存储在缓存服务器和各个存储服务器中,通过增设缓存服务器能够有效提高流媒体文件的访问速度,改善流媒体文件的网络传输效率。 In the storage method of the streaming media storage system designed by the present invention, each sub-streaming media file after each streaming media file is divided is randomly stored in the cache server and each storage server respectively, and the storage capacity of the streaming media file can be effectively improved by adding a cache server. Access speed, improve network transmission efficiency of streaming media files.
作为本发明的一种优选技术方案:所述步骤1包括如下步骤: As a preferred technical solution of the present invention: said step 1 comprises the following steps:
步骤a.中心服务器将各个所需存储的流媒体文件分别分割成至少两个子流媒体文件; Step a. The central server divides each streaming media file required to be stored into at least two sub-streaming media files;
步骤b.中心服务器将分别对应于各个所需存储的流媒体文件的各个第一段子流媒体文件存储在缓存服务器中,其余各个子流媒体文件分别随机存储在各个存储服务器中; Step b. the central server stores each first section of sub-stream media files respectively corresponding to the required stored stream media files in the cache server, and all the other sub-stream media files are randomly stored in each storage server respectively;
步骤c.中心服务器根据针对各个子流媒体文件的存储,建立各流媒体文件对应其子流媒体文件存储信息的映射关系,存储在中心服务器中。 Step c. The central server establishes a mapping relationship between each streaming media file corresponding to the storage information of its sub-streaming media files according to the storage of each sub-streaming media file, and stores it in the central server.
本发明设计的流媒体存储系统的存储方法,在各个流媒体文件分割后的各个子流媒体文件中,将与各个流媒体文件对应的第一段子流媒体文件存储在缓存服务器中,能够有针对性的提高第一段子流媒体文件的访问速度,进而提高终端设备针对流媒体文件整个访问过程的访问速度。 In the storage method of the streaming media storage system designed by the present invention, in each sub-streaming media file after each streaming media file is divided, the first paragraph of sub-streaming media files corresponding to each streaming media file is stored in the cache server, which can effectively Improve the access speed of the first sub-streaming media file in a targeted manner, and then improve the access speed of the terminal device for the entire access process of the streaming media file.
作为本发明的一种优选技术方案:所述步骤1之后还包括如下步骤Ⅰ,步骤Ⅰ与步骤2同时进行,步骤Ⅰ如下: As a preferred technical solution of the present invention: after the step 1, the following step I is also included, and the step I and step 2 are carried out simultaneously, and the step I is as follows:
所述缓存服务器和各个存储服务器中的计数模块,分别对其内部子流媒体文件的调用次数进行计数,并在指定时间间隔将计数结果发送至所述中心服务器,中心服务器根据各个子流媒体文件被调用次数的统计结果、以及事先设定的热门流媒体调用次数阀值、冷门流媒体调用次数阀值,确定热门流媒体文件和冷门流媒体文件。 The counting module in the cache server and each storage server counts the number of calls of its internal sub-streaming media files respectively, and sends the counting results to the central server at specified time intervals, and the central server according to each sub-streaming media file The statistical results of the number of calls, as well as the pre-set thresholds of popular streaming media calls and unpopular streaming media calls are used to determine popular streaming media files and unpopular streaming media files.
作为本发明的一种优选技术方案:所述步骤Ⅰ中,针对所述热门流媒体文件还包括如下步骤: As a preferred technical solution of the present invention: in the step 1, the following steps are also included for the popular streaming media files:
所述中心服务器针对热门流媒体文件存储在各个存储服务器上的各个子流媒体文件,随机选取至少一段子流媒体文件,将其复制至缓存服务器中,并更新各流媒体文件对应其子流媒体文件存储信息的映射关系,存储在中心服务器中;同时,将热门流媒体文件整体备份至缓存服务器。 The central server randomly selects at least one section of sub-stream media files stored in each sub-stream media file on each storage server for the popular stream media files, copies it to the cache server, and updates the corresponding sub-stream media files of each stream media file. The mapping relationship of file storage information is stored in the central server; at the same time, the popular streaming media files are backed up to the cache server as a whole.
作为本发明的一种优选技术方案:所述步骤Ⅰ中,针对所述冷门流媒体文件还包括如下步骤: As a preferred technical solution of the present invention: in the step I, the following steps are also included for the unpopular streaming media file:
所述中心服务器针对冷门流媒体文件存储在缓存服务器上的子流媒体文件进行分析判断:若判断存在除第一段子流媒体文件之外的其它子流媒体文件,则随机选取至少一段其它子流媒体文件,将从缓存服务器中删除,并更新各流媒体文件对应其子流媒体文件存储信息的映射关系,存储在中心服务器中; The central server analyzes and judges the sub-streaming media files stored on the cache server for unpopular streaming media files: if it is judged that there are other sub-streaming media files except the first sub-streaming media file, then randomly select at least one section of other sub-streaming media files. Streaming media files will be deleted from the cache server, and the mapping relationship of each streaming media file corresponding to its sub-streaming media storage information will be updated and stored in the central server;
若判断不存在除第一段子流媒体文件之外的其它子流媒体文件,则将该第一段子流媒体文件剪切至随机选择的一个存储服务器中,并更新各流媒体文件对应其子流媒体文件存储信息的映射关系,存储在中心服务器中。 If it is judged that there are no other sub-stream media files except the first sub-stream media file, then the first sub-stream media file is cut into a randomly selected storage server, and each stream media file is updated to correspond to its The mapping relationship of sub-stream media file storage information is stored in the central server.
本发明设计的流媒体存储系统的存储方法中,针对存储的流媒体文件,通过对其被访问次数的计数,将其划分为热门流媒体文件和冷门流媒体文件,再分别对热门流媒体文件和冷门流媒体文件进行相应的存储更新,不仅能够为终端访问提供内容方面的索引,而且能够对流媒体文件的存储做出合理的规划,提高存储流媒体文件的整体访问效率。 In the storage method of the streaming media storage system designed by the present invention, for the streaming media files stored, by counting the number of times it is accessed, it is divided into popular streaming media files and unpopular streaming media files, and then the popular streaming media files are respectively Corresponding storage updates for unpopular streaming media files can not only provide content index for terminal access, but also make reasonable planning for the storage of streaming media files and improve the overall access efficiency of stored streaming media files.
作为本发明的一种优选技术方案:还包括步骤ⅰ,步骤ⅰ在步骤1之前进行或与步骤1、步骤2同时进行,步骤ⅰ如下: As a kind of preferred technical scheme of the present invention: also comprise step i, step i is carried out before step 1 or carries out simultaneously with step 1, step 2, and step i is as follows:
所述各个存储服务器分别在指定时间间隔内对其并发访问情况和存储容量情况进行检测,并将检测结果上传至所述中心服务器,中心服务器根据接收到的检测结果,将各个存储服务器分别划分为有效存储服务器或非有效存储服务器,再根据划分结果对待存储的流媒体文件进行存储,其中,对非有效存储服务器进行清理操作。 Each of the storage servers detects its concurrent access and storage capacity within a specified time interval, and uploads the detection results to the central server, and the central server divides each storage server into The effective storage server or the non-effective storage server stores the streaming media files to be stored according to the division result, wherein the cleaning operation is performed on the non-effective storage server.
本发明设计的流媒体存储系统的存储方法,针对流媒体文件的存储过程中,在指定时间间隔内,检测各存储服务器的并发访问情况和存储容量情况,将各个存储服务器分别划分为有效存储服务器或非有效存储服务器,可以有效提高流媒体文件的存储效率、以及终端设备对流媒体文件的访问速度。 The storage method of the streaming media storage system designed by the present invention, in the storage process of streaming media files, detects the concurrent access and storage capacity of each storage server within a specified time interval, and divides each storage server into effective storage servers Or non-effective storage server, can effectively improve the storage efficiency of streaming media files, and the access speed of terminal equipment to streaming media files.
作为本发明的一种优选技术方案:如果所述各个存储服务器中的某个服务器在指点时间间隔内未向中心服务器上传其并发访问情况和存储容量情况的检测结果,则中心服务器将其划分为故障存储服务器,并针对故障存储服务器触发容错调度策略,同时,更新各流媒体文件对应其子流媒体文件存储信息的映射关系,存储在中心服务器中。 As a preferred technical solution of the present invention: if a certain server in the storage servers does not upload the detection results of its concurrent access situation and storage capacity situation to the central server within the specified time interval, the central server will divide it into The faulty storage server triggers a fault-tolerant scheduling strategy for the faulty storage server, and at the same time, updates the mapping relationship of each streaming media file corresponding to its sub-streaming media file storage information, and stores it in the central server.
本发明设计的流媒体存储系统的存储方法中,针对故障存储服务器,中心服务器采用了容错调度策略,能够最大程度保证终端设备对流媒体文件的访问。 In the storage method of the streaming media storage system designed by the present invention, the central server adopts a fault-tolerant scheduling strategy for the faulty storage server, which can ensure the access of the streaming media files by the terminal equipment to the greatest extent.
作为本发明的一种优选技术方案:所述容错调度策略包括如下步骤: As a preferred technical solution of the present invention: the fault-tolerant scheduling strategy includes the following steps:
所述中心服务器查找所述缓存服务器中是否存在与所述故障服务器中子流媒体文件对应的备份流媒体文件,若存在,则将备份流媒体文件复制至随机选取的一个有效存储服务器中,并更新各流媒体文件对应其子流媒体文件存储信息的映射关系,存储在中心服务器中。 The central server searches whether there is a backup streaming file corresponding to the sub-streaming media file in the faulty server in the cache server, if it exists, the backup streaming file is copied to an effective storage server selected at random, and Update the mapping relationship of each streaming media file corresponding to the storage information of its sub-streaming media files, and store it in the central server.
本发明设计的流媒体存储系统的存储方法在实际的应用过程当中,在针对流媒体文件分割成至少两个子流媒体文件进行存储过程中,将其分别存储在缓存服务器和各个存储服务器当中,其中,中心服务器将分别对应于各个流媒体文件的各个第一段子流媒体文件存储在缓存服务器中,其余各个子流媒体文件分别随机存储在各个存储服务器中,之后,在终端设备对流媒体文件访问的过程中,中心服务器根据各流媒体文件的被访问次数,将各流媒体文件划分为热门流媒体文件和冷门流媒体文件,并针对热门流媒体文件和冷门流媒体文件的存储位置进行优化调整,并更新各流媒体文件对应其子流媒体文件存储信息的映射关系,存储在中心服务器中,具体的优化调整过程如下: In the actual application process of the storage method of the streaming media storage system designed by the present invention, when the streaming media file is divided into at least two sub-streaming media files for storage, they are stored in the cache server and each storage server respectively, wherein , the central server stores each first sub-stream media file respectively corresponding to each stream media file in the cache server, and the remaining sub-stream media files are randomly stored in each storage server respectively, and after that, the terminal device accesses the stream media file During the process, the central server divides each streaming media file into popular streaming media files and unpopular streaming media files according to the access times of each streaming media file, and optimizes and adjusts the storage locations of popular streaming media files and unpopular streaming media files , and update the mapping relationship of each streaming media file corresponding to the storage information of its sub-streaming media files, and store it in the central server. The specific optimization and adjustment process is as follows:
针对所述热门流媒体文件还包括如下步骤: For the popular streaming media files, the following steps are also included:
所述中心服务器针对热门流媒体文件存储在各个存储服务器上的各个子流媒体文件,随机选取至少一段子流媒体文件,将其复制至缓存服务器中,并更新各流媒体文件对应其子流媒体文件存储信息的映射关系,存储在中心服务器中;同时,将热门流媒体文件整体备份至缓存服务器。 The central server randomly selects at least one section of sub-stream media files stored in each sub-stream media file on each storage server for the popular stream media files, copies it to the cache server, and updates the corresponding sub-stream media files of each stream media file. The mapping relationship of file storage information is stored in the central server; at the same time, the popular streaming media files are backed up to the cache server as a whole.
针对所述冷门流媒体文件还包括如下步骤: The following steps are also included for the unpopular streaming media file:
所述中心服务器针对冷门流媒体文件存储在缓存服务器上的子流媒体文件进行分析判断:若判断存在除第一段子流媒体文件之外的其它子流媒体文件,则随机选取至少一段其它子流媒体文件,将其从缓存服务器中删除,并更新各流媒体文件对应其子流媒体文件存储信息的映射关系,存储在中心服务器中;具体实施为,利用随机策略选取若干个属于该冷门流媒体文件的子流媒体文件,具体个数应根据当前缓存服务器中该冷门流媒体文件的子流媒体文件个数来动态制定,如缓存服务器中属于该冷门流媒体文件的子流媒体文件总数的一半(向上取整),但是其中读取次数最多的子流媒体文件保留,即如果选取到剪切的子流媒体文件为缓存服务器中该冷门流媒体文件中,读取次数最多的子流媒体文件,则重新进行选取,完成整个剪切步骤后,由中心服务器对各流媒体文件对应其子流媒体文件存储信息的映射关系进行更新,并存储在中心服务器中。 The central server analyzes and judges the sub-streaming media files stored on the cache server for unpopular streaming media files: if it is judged that there are other sub-streaming media files except the first sub-streaming media file, then randomly select at least one section of other sub-streaming media files. Streaming media files, delete them from the cache server, and update the mapping relationship of each streaming media file corresponding to the storage information of its sub-streaming media files, and store them in the central server; the specific implementation is to use random strategy to select several unpopular streams The specific number of sub-stream media files of a media file should be dynamically formulated according to the number of sub-stream media files of this unpopular stream media file in the current cache server, such as the total number of sub-stream media files belonging to this unpopular stream media file in the cache server Half (rounded up), but the sub-streaming media file with the most read times is reserved, that is, if the selected sub-streaming media file is the sub-streaming media with the most read times among the unpopular streaming media files in the cache server file, then select again, and after completing the whole cutting step, the mapping relationship of each streaming media file corresponding to the storage information of its sub-streaming media files is updated by the central server, and stored in the central server.
若判断不存在除第一段子流媒体文件之外的其它子流媒体文件,则将该第一段子流媒体文件剪切至随机选择的一个存储服务器中,并更新各流媒体文件对应其子流媒体文件存储信息的映射关系,存储在中心服务器中。 If it is judged that there are no other sub-stream media files except the first sub-stream media file, then the first sub-stream media file is cut into a randomly selected storage server, and each stream media file is updated to correspond to its The mapping relationship of sub-stream media file storage information is stored in the central server.
基于以上针对热门流媒体文件和冷门流媒体文件的存储位置的优化调整,可以有效提高终端设备对流媒体文件的访问效率,有效优化了热门流媒体文件的访问速度。 Based on the optimization and adjustment of the storage locations of popular streaming media files and unpopular streaming media files above, the access efficiency of the terminal device to streaming media files can be effectively improved, and the access speed of popular streaming media files can be effectively optimized.
实际应用过程当中,所述各个存储服务器分别在指定时间间隔内对其并发访问情况和存储容量情况进行检测,并将检测结果上传至所述中心服务器,中心服务器根据接收到的检测结果,将各个存储服务器分别划分为有效存储服务器或非有效存储服务器,再根据划分结果对待存储的流媒体文件进行存储,这样在针对待存储流媒体文件进行存储时,能够合理的安排存储位置,有效提高对流媒体文件的存储和访问效率。其中,当某个存储服务器被划分为非有效存储服务器,则该存储服务器将被取消对待存储流媒体文件的存储操作,并同时停止响应终端设备还未对该非有效存储服务器进行的数据读取操作,直至该存储服务器并发访问情况大幅度降低,同时再度拥有合理的剩余存储容量,则重新将该存储服务器划分为有效存储服务器,参与对待存储流媒体文件的存储操作,其中,采取与针对缓存服务器中冷门流媒体文件不同的操作方法,对非有效存储服务器中对应的子流媒体文件进行清理。中心服务器命令该存储服务器触发内部清理调度,基于各个子流媒体文件的调用次数来确定清理名单,然后执行清理操作,同时停止响应终端设备对该存储服务器还未进行的流媒体请求指令,直至该非有效存储服务器重新拥有合理的剩余存储空间,同时该非有效存储节点接受的并发用户数大幅度降低,中心服务器重新定义其为有效存储服务器,并更新各流媒体文件对应其子流媒体文件存储信息的映射关系,存储在中心服务器中;其中清理操作包括根据清理名单,将调用次数低的子流媒体文件删除;或是将调用次数低的子流媒体文件剪切至随机选取的其它有效存储服务器中。 In the actual application process, each storage server detects its concurrent access and storage capacity within a specified time interval, and uploads the detection results to the central server, and the central server sends each The storage servers are divided into effective storage servers or non-effective storage servers, and then store the streaming media files to be stored according to the division results, so that when storing the streaming media files to be stored, the storage locations can be reasonably arranged to effectively improve the efficiency of streaming media. File storage and access efficiency. Among them, when a certain storage server is classified as an ineffective storage server, the storage server will be canceled to store the streaming media files, and at the same time stop responding to the data read by the terminal device that has not been performed on the ineffective storage server Operation, until the concurrent access of the storage server is greatly reduced, and at the same time it has a reasonable remaining storage capacity again, then the storage server will be reclassified as an effective storage server, and participate in the storage operation of the streaming media files to be stored. Different operation methods for unpopular streaming media files in the server, clean up the corresponding sub-streaming media files in the non-effective storage server. The central server orders the storage server to trigger internal cleaning scheduling, determines the cleaning list based on the number of calls of each sub-streaming media file, and then executes the cleaning operation, and stops responding to the streaming media request instruction that the terminal device has not yet performed on the storage server until the The non-effective storage server regains a reasonable remaining storage space, and the number of concurrent users accepted by the non-effective storage node is greatly reduced. The central server redefines it as a valid storage server, and updates each streaming media file to correspond to its sub-streaming media file storage The mapping relationship of information is stored in the central server; the cleaning operation includes deleting the sub-streaming media files with low calling times according to the cleaning list; or cutting the sub-streaming media files with low calling times to other effective storage randomly selected in the server.
在针对故障存储服务器的容错调度策略,能够最大限度的保证终端设备对流媒体文件的成功访问。更进一步,当故障存储服务器在指定时间间隔内再次恢复发送其并发访问情况和存储容量情况的检测结果,中心服务器撤销对其故障存储服务器的划分,其中具体容错调度策略为所述中心服务器查找所述缓存服务器中是否存在与所述故障服务器中子流媒体文件对应的备份流媒体文件,若存在,则将备份流媒体文件复制至随机选取的一个有效存储服务器中,并更新各流媒体文件对应其子流媒体文件存储信息的映射关系,存储在中心服务器中。 The fault-tolerant scheduling strategy for faulty storage servers can ensure the successful access of streaming media files by terminal devices to the greatest extent. Furthermore, when the faulty storage server resumes sending the detection results of its concurrent access and storage capacity within a specified time interval, the central server cancels the division of its faulty storage server. Whether there is a backup streaming file corresponding to the sub-streaming media file in the faulty server in the cache server, if it exists, copy the backup streaming file to an effective storage server selected at random, and update the corresponding The mapping relationship of its sub-stream media file storage information is stored in the central server.
其中,各存储服务器的存储容量情况包括存储最大容量、当前存储容量、剩余存储容量,根据各存储服务器的并发访问情况和存储容量情况,中心服务器将各个存储服务器分别划分为有效存储服务器或非有效存储服务器,再根据划分结果对待存储的流媒体文件进行存储。 Among them, the storage capacity of each storage server includes the maximum storage capacity, current storage capacity, and remaining storage capacity. According to the concurrent access and storage capacity of each storage server, the central server divides each storage server into valid storage servers or ineffective storage servers. The storage server stores the streaming media files to be stored according to the division result.
实际应用过程中,各存储服务器下辖若干IDERAID硬盘,组成RAIDI存储架构,保证单一存储服务器有效的响应多个用户的并发服务。 In the actual application process, each storage server manages several IDERAID hard disks to form a RAIDI storage architecture to ensure that a single storage server can effectively respond to concurrent services of multiple users.
以上针对流媒体存储系统的存储方法中,中心服务器对每次更新的各流媒体文件对应其子流媒体文件存储信息的映射关系进行动态保存维护。基于以上针对流媒体存储系统的存储方法,终端设备对于各流媒体文件的访问依然遵循如下: In the above storage method for the streaming media storage system, the central server dynamically saves and maintains the mapping relationship of each updated streaming media file corresponding to the storage information of its sub-streaming media files. Based on the above storage method for the streaming media storage system, the access of the terminal device to each streaming media file is still as follows:
终端设备根据由中心服务器获得的存储信息,向存储信息中指定的缓存服务器和各存储服务器发送流媒体请求指令,再由指定的缓存服务器和各存储服务器将指定流媒体文件的子流媒体文件发送至终端设备,进而实现终端设备对流媒体文件的读取。 According to the storage information obtained by the central server, the terminal device sends a streaming media request command to the cache server and each storage server specified in the storage information, and then the specified cache server and each storage server send the sub-stream media file of the specified streaming media file to the terminal device, and then realize the reading of the streaming media file by the terminal device.
本发明设计的流媒体存储系统的存储方法中,通过定期对缓存服务器中和各个存储服务器中的各个子流媒体文件进行整体清理、调整,并更新各流媒体文件对应其子流媒体文件存储信息的映射关系,存储在中心服务器中,可以有效提高本流媒体存储系统的存储以及应用效率。 In the storage method of the streaming media storage system designed by the present invention, each sub-streaming media file in the cache server and each storage server is cleaned up and adjusted on a regular basis, and each streaming media file is updated to correspond to its sub-streaming media file storage information The mapping relationship is stored in the central server, which can effectively improve the storage and application efficiency of the streaming media storage system.
综上所述,本发明提供了一种流媒体存储系统及存储方法,引入缓存服务器,同时均衡的把流媒体文件分布式的保存在缓存服务器和各个存储服务器中,并根据各个存储服务器的并发访问情况和存储容量情况确定每一次参与存储过程的存储服务器。同时基于热门流媒体文件和冷门流媒体文件的划分,以及针对热门流媒体文件和冷门流媒体文件存储位置的优化调整,提高了热门流媒体文件的访问速率;不仅如此,同时利用热门流媒体文件在缓存服务器中的备份文件,通过容错调度策略最大程度的保护热门流媒体文件的访问。 In summary, the present invention provides a streaming media storage system and storage method, which introduces a cache server, and at the same time distributes and saves streaming media files in the cache server and each storage server in a balanced manner, and according to the concurrency of each storage server Access conditions and storage capacity conditions determine each storage server participating in the storage process. At the same time, based on the division of popular streaming media files and unpopular streaming media files, as well as the optimization and adjustment of storage locations for popular streaming media files and unpopular streaming media files, the access rate of popular streaming media files is improved; not only that, but also using popular streaming media files The backup files in the cache server protect access to popular streaming media files to the greatest extent through fault-tolerant scheduling strategies.
上面结合附图对本发明的实施方式作了详细说明,但是本发明并不限于上述实施方式,在本领域普通技术人员所具备的知识范围内,还可以在不脱离本发明宗旨的前提下做出各种变化。 The embodiments of the present invention have been described in detail above in conjunction with the accompanying drawings, but the present invention is not limited to the above embodiments, and can also be made without departing from the gist of the present invention within the scope of knowledge possessed by those of ordinary skill in the art. Variations.
Claims (9)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310134471.7A CN103200272B (en) | 2013-04-18 | 2013-04-18 | Streaming media storage system and storage method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310134471.7A CN103200272B (en) | 2013-04-18 | 2013-04-18 | Streaming media storage system and storage method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103200272A CN103200272A (en) | 2013-07-10 |
CN103200272B true CN103200272B (en) | 2016-01-20 |
Family
ID=48722627
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310134471.7A Expired - Fee Related CN103200272B (en) | 2013-04-18 | 2013-04-18 | Streaming media storage system and storage method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103200272B (en) |
Families Citing this family (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP3140994B1 (en) * | 2014-05-06 | 2022-03-16 | TiVo Solutions Inc. | Cloud-based media content management |
CN105450542B (en) * | 2014-08-21 | 2019-08-27 | 联想(北京)有限公司 | A kind of data processing method and the first electronic equipment |
CN107249135B (en) | 2016-05-31 | 2019-01-25 | 杭州海康威视数字技术股份有限公司 | Video data storage systems and its operating method and index server |
CN106572030B (en) * | 2016-11-01 | 2019-12-06 | 佛山科学技术学院 | multipath transmission control method and system in distributed network |
CN106454959B (en) * | 2016-11-01 | 2019-12-06 | 佛山科学技术学院 | Service quality control method of distributed network and server |
CN106533937B (en) * | 2016-11-01 | 2019-08-30 | 佛山科学技术学院 | A multi-path distributed message forwarding method and base station |
CN106528349B (en) * | 2016-12-06 | 2019-03-12 | 郑州云海信息技术有限公司 | A kind of date storage method and device |
CN108419119B (en) * | 2018-02-09 | 2020-10-30 | 北京小米移动软件有限公司 | Cache data clearing method and device |
CN110191143B (en) * | 2018-12-13 | 2022-09-30 | 浙江宇视科技有限公司 | Resource publishing method, device and system |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101141627A (en) * | 2007-10-23 | 2008-03-12 | 深圳市迅雷网络技术有限公司 | System and method for storing streaming media files |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1297438A1 (en) * | 2000-04-28 | 2003-04-02 | Live365, Inc. | System and method for reducing the resources required to deliver streaming media |
-
2013
- 2013-04-18 CN CN201310134471.7A patent/CN103200272B/en not_active Expired - Fee Related
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101141627A (en) * | 2007-10-23 | 2008-03-12 | 深圳市迅雷网络技术有限公司 | System and method for storing streaming media files |
Also Published As
Publication number | Publication date |
---|---|
CN103200272A (en) | 2013-07-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103200272B (en) | Streaming media storage system and storage method | |
CN110069714B (en) | Video recommendation system | |
CN104967861B (en) | Video caching system and method in CDN network | |
US8612668B2 (en) | Storage optimization system based on object size | |
US20190065574A1 (en) | Content delivery network analytics management via edge stage collectors | |
US8745262B2 (en) | Adaptive network content delivery system | |
US8880650B2 (en) | System and method for storing streaming media file | |
US9734507B2 (en) | Method and system for simulating recommendations in a social network for an offline user | |
WO2016061898A1 (en) | Method and system for accessing channel of live broadcast room | |
US10574747B2 (en) | Improving peer-to-peer network performance through coordination of digital content distribution | |
EP2359536A1 (en) | Adaptive network content delivery system | |
CN102665131A (en) | Video buffer method for receiving end of network video service system | |
CN106656593A (en) | Streaming media live broadcast recording redundant hot-standby method and system | |
TW200905473A (en) | Management of internal operations by a storage device | |
CN101068341B (en) | Stream media dispatching system and medium file scheduling method thereof | |
TW201234194A (en) | Data stream management system for accessing mass data | |
US8806051B2 (en) | Multimedia file sharing method and system thereof | |
US20200288183A1 (en) | Live video replay method, replay server and system | |
WO2012106923A1 (en) | Object adjusting method, migration control device, node device and storage system | |
JP2012151849A (en) | System and method of packetizing data stream in p2p based streaming service | |
CN100384252C (en) | A Method for Realizing Video on Demand under Overlay Network Multicast | |
US20200269140A1 (en) | Lockstep client-server architecture | |
CN103049574A (en) | Key value system and key value method for implementation of dynamic duplicates of documents | |
CN102158344A (en) | Parallel multicasting network file system | |
JP2012150532A (en) | Cache device, data management method, program and cache system |
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 | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20160120 |
|
CF01 | Termination of patent right due to non-payment of annual fee |