[go: up one dir, main page]

CN108810565A - Storage, the method, apparatus of scheduled media resource and distributed memory system - Google Patents

Storage, the method, apparatus of scheduled media resource and distributed memory system Download PDF

Info

Publication number
CN108810565A
CN108810565A CN201710296636.9A CN201710296636A CN108810565A CN 108810565 A CN108810565 A CN 108810565A CN 201710296636 A CN201710296636 A CN 201710296636A CN 108810565 A CN108810565 A CN 108810565A
Authority
CN
China
Prior art keywords
media resource
server
media
slicing files
storage
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.)
Pending
Application number
CN201710296636.9A
Other languages
Chinese (zh)
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.)
Huawei Technologies 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 CN201710296636.9A priority Critical patent/CN108810565A/en
Publication of CN108810565A publication Critical patent/CN108810565A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/231Content storage operation, e.g. caching movies for short term storage, replicating data over plural servers, prioritizing data for deletion
    • H04N21/23103Content storage operation, e.g. caching movies for short term storage, replicating data over plural servers, prioritizing data for deletion using load balancing strategies, e.g. by placing or distributing content on different disks, different memories or different servers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/643Communication protocols
    • H04N21/64322IP
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/83Generation or processing of protective or descriptive data associated with content; Content structuring
    • H04N21/845Structuring of content, e.g. decomposing content into time segments
    • H04N21/8456Structuring of content, e.g. decomposing content into time segments by decomposing the content in the time domain, e.g. in time segments
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/85Assembly of content; Generation of multimedia applications
    • H04N21/858Linking data to content, e.g. by linking an URL to a video object, by creating a hotspot
    • H04N21/8586Linking data to content, e.g. by linking an URL to a video object, by creating a hotspot by using a URL

Landscapes

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

Abstract

一种存储、调度媒体资源的方法、装置及分布式存储系统,媒体资源写入服务器获取媒体资源分片文件,其中,所述媒体资源分片文件是媒体资源能够播放的最小播放单元;所述媒体资源写入服务器以媒体资源分片文件为单位,将所述获取的媒体资源分片文件存储至所述存储服务器,其中,存储至存储服务器中的各媒体资源分片文件组成媒体资源。分布式存储系统中的第一服务器,获取用户终端发送的媒体资源分片文件播放请求;所述第一服务器以媒体资源分片文件为单位,从所述分布式存储系统的存储服务器处获取所述媒体资源分片文件播放请求所请求的媒体资源分片文件,并向所述用户终端反馈获取的媒体资源分片文件,以提高分布式存储系统中的整体性能。

A method, device, and distributed storage system for storing and scheduling media resources, wherein a media resource is written to a server to obtain a media resource fragment file, wherein the media resource fragment file is the smallest playback unit that a media resource can play; the The media resource writing server stores the acquired media resource fragment files in the storage server in units of media resource fragment files, wherein each media resource fragment file stored in the storage server constitutes a media resource. The first server in the distributed storage system obtains the media resource fragment file playback request sent by the user terminal; the first server obtains the media resource fragment file from the storage server of the distributed storage system in units of The media resource fragment file is requested to play the requested media resource fragment file, and the obtained media resource fragment file is fed back to the user terminal, so as to improve the overall performance of the distributed storage system.

Description

存储、调度媒体资源的方法、装置及分布式存储系统Method and device for storing and scheduling media resources, and distributed storage system

技术领域technical field

本申请涉及视频技术领域,尤其涉及一种存储、调度媒体资源的方法、装置及分布式存储系统。The present application relates to the field of video technology, and in particular to a method, device and distributed storage system for storing and scheduling media resources.

背景技术Background technique

随着视频技术的发展,对媒体资源传输过程中的各环节都提出了更高的要求,例如对媒体资源的存储以及播放要求的性能越来越高。With the development of video technology, higher requirements are put forward for all links in the media resource transmission process, such as higher and higher performance requirements for media resource storage and playback.

目前,进行媒体资源存储的主要存储方式包括本地存储方式以及分布式存储方式。其中,采用本地存储方式进行媒体资源存储时,本地存储系统会按照负载均衡原则、空间均衡等原则选择用于保存媒体资源的流媒体服务器,并记录媒体资源保存关系,所述媒体资源保存关系中记录有媒体资源与存储服务器地址之间的对应关系,例如记录的媒体资源保存关系可以是媒体资源1保存在存储服务器1,媒体资源2保存在存储服务器2。用户终端请求进行媒体资源播放时,发送媒体资源播放请求,该媒体资源播放请求首先发送到调度服务器,调度服务器能够获取到本地存储系统保存的媒体资源保存关系,调度服务器根据媒体资源保存关系,将用户终端发送的媒体资源播放请求重定向到保存媒体资源的流媒体服务器,再由具体的流媒体服务器将媒体资源按协议发送给用户终端。在本地存储方式下,当用户终端使用超文本传输协议(Hyper Text Transfer Protocol,HTTP)动态自适应流媒体(Dynamic Adaptive Streaming over HTTP,DASH)、HTTP流媒体直播(HTTP LiveStreaming,HLS)等自适应比特速率(Adaptive Bit Rate,ABR)协议时,存储媒体资源的流媒体服务器给用户返回的分片索引文件中,各分片的统一资源定位符(Uniform ResourceLocator,URL)的域名或网际互联协议(Internet Protocol,IP)地址都是该存储媒体资源的流媒体服务器,保证后续用户终端针对每个分片发起的媒体资源播放请求都会被路由到该存储媒体资源的流媒体服务器,使得媒体资源播放请求只能调度到保存媒体资源的流媒体服务器。当某个媒体资源的访问热度突然变得很高时,保存该媒体资源的流媒体服务器将成为瓶颈。Currently, the main storage methods for storing media resources include local storage and distributed storage. Among them, when using the local storage method to store media resources, the local storage system will select the streaming media server for storing media resources according to the principles of load balancing and space balancing, and record the storage relationship of media resources. The corresponding relationship between the media resource and the address of the storage server is recorded. For example, the recorded storage relationship of the media resource may be that the media resource 1 is stored in the storage server 1 and the media resource 2 is stored in the storage server 2 . When the user terminal requests to play a media resource, it sends a media resource play request. The media resource play request is first sent to the scheduling server. The scheduling server can obtain the storage relationship of the media resource stored in the local storage system. The scheduling server stores the relationship according to the media resource. The media resource playback request sent by the user terminal is redirected to the streaming media server storing the media resource, and then the specific streaming media server sends the media resource to the user terminal according to the protocol. In the local storage mode, when the user terminal uses hypertext transfer protocol (Hyper Text Transfer Protocol, HTTP) dynamic adaptive streaming media (Dynamic Adaptive Streaming over HTTP, DASH), HTTP streaming media live streaming (HTTP LiveStreaming, HLS) and other adaptive In Adaptive Bit Rate (ABR) protocol, in the segment index file returned to the user by the streaming media server storing media resources, the domain name or Internet protocol ( Internet Protocol (IP) addresses are all streaming media servers that store media resources, ensuring that the media resource playback requests initiated by subsequent user terminals for each segment will be routed to the streaming media servers that store media resources, so that media resource playback requests It can only be dispatched to streaming media servers that store media resources. When the access popularity of a certain media resource suddenly becomes very high, the streaming media server storing the media resource will become a bottleneck.

采用分布式存储方式进行媒体资源存储时,分布式存储系统中的媒体资源写入服务器并不是将媒体资源存储在某个或多个特定的流媒体服务器上,而是根据存储条带大小,将媒体资源拆分为多个Stripe,并使用多副本或差错码机制,将媒体资源分别保存到不同的存储服务器上。分布式存储系统中的元数据服务器记录媒体资源在分布式存储系统上的保存路径信息。当用户终端请求播放媒体资源时,流媒体服务器向分布式存储系统发起媒体资源播放请求。分布式存储系统会分配一个存储服务器响应流媒体服务器发送媒体资源播放请求,分布式存储系统分配的该存储服务器查询元数据服务器保存的媒体资源的保存路径信息,并通过分布式存储系统的内部网间互联协议(Internet Protocol,IP)网络从分布式存储系统的其他存储服务器上获取用户终端请求的、但未存储在该存储服务器上的媒体资源,并通过分布式存储系统的外部IP网络将用户终端请求的媒体资源全部内容返回给流媒体服务器。When the distributed storage method is used for media resource storage, the media resources in the distributed storage system are written to the server not to store the media resources on one or more specific streaming media servers, but to store the media resources according to the size of the storage stripe Media resources are split into multiple Stripes, and multiple copies or error code mechanisms are used to store media resources on different storage servers. The metadata server in the distributed storage system records the storage path information of the media resource on the distributed storage system. When a user terminal requests to play a media resource, the streaming media server initiates a media resource play request to the distributed storage system. The distributed storage system will assign a storage server to respond to the media resource playback request sent by the streaming media server. The storage server assigned by the distributed storage system will query the storage path information of the media resources saved by the metadata server, and pass the intranet of the distributed storage system The Internet Protocol (IP) network obtains the media resources requested by the user terminal but not stored on the storage server from other storage servers in the distributed storage system, and sends the user's media resources through the external IP network of the distributed storage system. All content of the media resource requested by the terminal is returned to the streaming media server.

分布式存储的统一访问、数据分散保存(Stripe级)的特点,为其带来了通用性好,使用简单,系统负载均衡的优点,但由于需要在分布式存储系统各存储服务器之间搬运媒体资源,对网络带宽要求高,使得分布式存储系统整体性能降低。The characteristics of distributed storage's unified access and data distributed storage (Stripe level) bring it the advantages of good versatility, simple use, and system load balance. However, due to the need to move media between storage servers in the distributed storage system Resources require high network bandwidth, which degrades the overall performance of the distributed storage system.

发明内容Contents of the invention

本申请实施例提供一种存储、调度媒体资源的方法、装置及分布式存储系统,以提高分布式存储系统中的整体性能。Embodiments of the present application provide a method and device for storing and scheduling media resources, and a distributed storage system, so as to improve the overall performance of the distributed storage system.

第一方面,提供一种存储媒体资源的方法,媒体资源写入服务器以媒体资源能够播放的最小播放单元为单位,将媒体资源存储至存储服务器,以使用户终端在请求获取分布式存储系统中保存的某一媒体资源的最小播放单元时,分布式存储系统可直接从存储该最小播放单元的存储服务器处调度该最小播放单元并反馈给用户终端,而无需分布式存储系统各存储服务器之间搬运媒体资源,可以降低对分布式存储系统内部IP网络带宽要求,有助于提高分布式存储系统的整体性能。In the first aspect, a method for storing media resources is provided. The media resource writing server stores the media resources to the storage server in the unit of the smallest playback unit that the media resources can play, so that the user terminal can request to obtain the distributed storage system. When saving the minimum playback unit of a certain media resource, the distributed storage system can directly schedule the minimum playback unit from the storage server that stores the minimum playback unit and feed it back to the user terminal without the need Moving media resources can reduce the requirements for the internal IP network bandwidth of the distributed storage system and help improve the overall performance of the distributed storage system.

其中,对于同一媒体资源,播放码流不一致,最小播放单元也不一致。媒体资源能够播放的最小播放单元可以理解为是对媒体资源在时间上划分的媒体资源分片文件,该媒体资源分片文件依据媒体资源的不同业务播放协议具有不同的大小。Among them, for the same media resource, the playback code stream is inconsistent, and the minimum playback unit is also inconsistent. The smallest playback unit that can be played by a media resource can be understood as a media resource segment file that divides the media resource in time, and the media resource segment file has different sizes according to different service playback protocols of the media resource.

一种可能的实施方式中,媒体资源写入服务器获取媒体资源分片文件,并将获取的媒体资源分片文件,以媒体资源分片文件为单位存储至存储服务器,各存储服务器上存储的媒体资源分片文件组成媒体资源。In a possible implementation manner, the media resource writing server obtains the media resource fragment file, and stores the obtained media resource fragment file to the storage server in units of the media resource fragment file, and the media stored on each storage server Resource slice files make up media resources.

又一种可能的实施方式中,媒体资源中通常包括多个媒体资源分片文件,可将连续Y个媒体资源分片文件作为一个分片文件存储单元,并以所述分片文件存储单元为单位,将媒体资源存储至存储服务器中。In yet another possible implementation manner, the media resource usually includes a plurality of media resource fragment files, and Y consecutive media resource fragment files can be used as a fragment file storage unit, and the fragment file storage unit can be used as The unit stores the media resources in the storage server.

其中,媒体资源写入服务器将每一分片文件存储单元存储至存储服务器时,可根据不同的可靠性策略进行不同的冗余处理。所述冗余处理可包括对包括Y个媒体资源分片文件的分片文件存储单元进行多副本冗余、差错码冗余以及无冗余的处理。Wherein, when the media resource writing server stores each fragmented file storage unit in the storage server, different redundancy processing may be performed according to different reliability policies. The redundancy processing may include performing multi-copy redundancy, error code redundancy and no redundancy processing on the segment file storage unit including Y media resource segment files.

又一种可能的实施方式中,媒体资源写入服务器可在将媒体资源分片文件存储至存储服务器之后,将媒体资源分片文件分布信息保存至分布式存储系统的元数据服务器,其中,所述媒体资源分片文件分布信息用于指示媒体资源分片文件、与存储所述媒体资源分片文件的存储服务器之间的对应关系,以使得后续用户终端需要从分布式存储系统中调用媒体资源分片文件时,调度服务器可查询元数据服务器中保存的媒体资源分布信息生成用户终端访问分布式存储系统的分片URL,通过该分片URL指示用户终端获取媒体资源分片文件的地址。In yet another possible implementation manner, the media resource writing server may save the distribution information of the media resource fragment file to the metadata server of the distributed storage system after storing the media resource fragment file in the storage server, wherein, the The distribution information of the media resource fragment file is used to indicate the corresponding relationship between the media resource fragment file and the storage server storing the media resource fragment file, so that the subsequent user terminal needs to call the media resource from the distributed storage system When segmenting files, the scheduling server can query the media resource distribution information stored in the metadata server to generate a segment URL for the user terminal to access the distributed storage system, and instruct the user terminal to obtain the address of the media resource segment file through the segment URL.

其中,媒体资源写入服务器若对包括Y个媒体资源分片文件的分片文件存储单元进行不同的冗余处理,则需要将冗余处理后的分片文件存储单元的分布信息保存至元数据服务器。其中,若对媒体资源分片文件进行多副本冗余处理,则需要将分片文件存储单元的多副本分布信息保存至元数据服务器。若对媒体资源分片文件进行差错码冗余处理,则需要将M+N个分片文件存储单元的分布信息保存至元数据服务器。Wherein, if the media resource writing server performs different redundant processing on the segmented file storage units including Y media resource segmented files, it is necessary to save the distribution information of the redundantly processed segmented file storage units to the metadata server. Wherein, if multi-copy redundancy processing is performed on the media resource fragment file, it is necessary to save the multi-copy distribution information of the fragment file storage unit to the metadata server. If error code redundancy processing is performed on media resource fragment files, the distribution information of M+N fragment file storage units needs to be saved to the metadata server.

第二方面,提供一种调度媒体资源的方法,在该方法中,用户终端向第一服务器发送媒体资源播放请求,第一服务器以媒体资源分片文件为单位,从所述分布式存储系统的存储服务器处获取所述媒体资源分片文件播放请求所请求的媒体资源分片文件,向用户终端反馈获取的媒体资源分片文件。In the second aspect, a method for scheduling media resources is provided. In this method, a user terminal sends a media resource play request to a first server, and the first server uses a media resource fragment file as a unit to obtain a media resource from the distributed storage system. The storage server obtains the media resource fragment file requested by the media resource fragment file play request, and feeds back the acquired media resource fragment file to the user terminal.

一种可能的实施方式中,所述第一服务器为存储服务器,该存储服务器获取到的用户终端发送的媒体资源分片文件播放请求是用户终端依据分片URL发送的。在该分片URL中包括的存储服务器地址对应的存储服务器是响应用户终端发送的该媒体资源分片文件播放请求的存储服务器,也是存储所述媒体资源分片文件播放请求所请求的媒体资源分片文件的存储服务器。In a possible implementation manner, the first server is a storage server, and the media resource segment file playback request sent by the user terminal acquired by the storage server is sent by the user terminal according to the segment URL. The storage server corresponding to the storage server address included in the fragment URL is a storage server that responds to the media resource fragment file play request sent by the user terminal, and is also the media resource fragment requested for storing the media resource fragment file play request. Storage server for slice files.

其中,分片URL采用如下方式生成:调度服务器查询元数据服务器中存储的所述媒体资源播放请求所请求的媒体资源的媒体资源分片文件的分布信息,并依据媒体资源分片文件分布信息生成二级索引文件,生成的该二级索引文件中所述媒体资源播放请求所请求的媒体资源的每个媒体资源分片文件都具有与其对应的分片URL,该分片URL中包括分布式存储系统中存储对应媒体资源分片文件的存储服务器地址。Wherein, the segment URL is generated in the following manner: the scheduling server inquires the distribution information of the media resource segment file of the media resource requested by the media resource playback request stored in the metadata server, and generates according to the distribution information of the media resource segment file Secondary index file, each media resource segment file of the media resource requested by the media resource play request in the generated secondary index file has a segment URL corresponding to it, and the segment URL includes distributed storage The address of the storage server that stores the corresponding media resource segment files in the system.

用户终端获取到调度服务器发送的分片URL后,可根据各媒体资源分片文件的分片URL,向分片URL指示的存储服务器地址对应的存储服务器发送媒体资源分片文件播放请求,存储服务器获取到该媒体资源分片文件播放请求后可直接从本地读取对应的媒体资源分片文件并反馈给用户终端,无需使用内部网络从其它存储服务器处获取媒体资源,并且也无需再反馈给流媒体服务器等其它第三方服务器,可以提高分布式存储系统的性能。After the user terminal obtains the segment URL sent by the scheduling server, it can send a media resource segment file play request to the storage server corresponding to the storage server address indicated by the segment URL according to the segment URL of each media resource segment file, and the storage server After obtaining the playback request of the media resource fragment file, the corresponding media resource fragment file can be directly read locally and fed back to the user terminal, without using the internal network to obtain media resources from other storage servers, and there is no need to feed back to the streamer Other third-party servers such as media servers can improve the performance of the distributed storage system.

其中,分布式存储系统若采用了冗余处理方式对媒体资源分片文件进行存储,则在确定分片URL中包括的存储服务器地址时,可根据不同的冗余处理策略采用不同的处理方式。若采用多副本冗余处理方式,则需要根据负载均衡原则为不同的媒体资源分片文件选择合适的存储服务器提供媒体资源分片文件,并在生成对应的分片URL时包括该选择的存储服务器的地址。若采用差错码冗余处理方式,则选择该存储服务器提供媒体资源分片文件,生成分片URL时包括的存储服务器地址即为该提供媒体资源分片文件的存储服务器地址。若采用无冗余处理方式,选择该存储服务器提供媒体资源分片文件,生成分片URL时包括的存储服务器地址即为该提供媒体资源分片文件的存储服务器地址。Wherein, if the distributed storage system adopts a redundant processing method to store media resource fragment files, different processing methods may be adopted according to different redundant processing strategies when determining the address of the storage server included in the fragment URL. If the multi-copy redundancy processing method is used, it is necessary to select an appropriate storage server for different media resource fragment files according to the load balancing principle to provide the media resource fragment files, and include the selected storage server when generating the corresponding fragment URL the address of. If the error code redundancy processing method is adopted, the storage server is selected to provide the media resource fragment file, and the storage server address included when generating the fragment URL is the address of the storage server providing the media resource fragment file. If the non-redundant processing method is adopted, the storage server is selected to provide the media resource fragment file, and the storage server address included in generating the fragment URL is the address of the storage server providing the media resource fragment file.

其中,第一服务器在从存储服务器处,以媒体资源分片文件为单位获取媒体资源分片文件的过程中,若存储服务器故障或者存储服务器中某块硬盘故障,可利用冗余处理方式提供的可靠性恢复出丢失的内容。Wherein, when the first server obtains the media resource fragment file from the storage server in units of media resource fragment files, if the storage server fails or a hard disk in the storage server fails, the redundant processing method can be used to provide Reliability recovers lost content.

另一种可能的实施方式中,所述第一服务器可以是流媒体服务器。用户终端发送媒体资源播放请求,调度服务器获取到用户终端发送的媒体资源播放请求,并将该媒体资源播放请求调度到流媒体服务器上,由流媒体服务器查询元数据服务器中的媒体资源的分布信息并生成各媒体资源分片文件的分片URL,分片URL中的地址均为流媒体服务器,用户终端发送媒体资源分片播放请求后,该媒体资源分片播放请求被路由至流媒体服务器,流媒体服务器从元数据服务器查询该媒体资源分片播放请求所请求的媒体资源分片文件所在的存储服务器,并从该存储服务器处获取媒体资源分片文件并反馈给用户终端。采用流媒体服务器实现存储服务器中媒体资源分片文件的调度,可在一定程度上避免使用内部网络从其它存储服务器处获取媒体资源提高分布式存储系统性能,并且流媒体服务器生成的分片URL中并不包括存储各媒体资源分片文件的存储服务器的地址,故可减少对用户终端暴露存储服务器地址,一定程度上提高了安全性,可适用于一些安全性、隔离线要求较高的场景。In another possible implementation manner, the first server may be a streaming media server. The user terminal sends a media resource play request, and the scheduling server obtains the media resource play request sent by the user terminal, and dispatches the media resource play request to the streaming media server, and the streaming media server queries the distribution information of the media resource in the metadata server And generate the segment URL of each media resource segment file, the address in the segment URL is the streaming media server, after the user terminal sends the media resource segment playback request, the media resource segment playback request is routed to the streaming media server, The streaming media server inquires from the metadata server the storage server where the media resource segment file requested by the media resource segment play request is located, obtains the media resource segment file from the storage server and feeds it back to the user terminal. Using the streaming media server to realize the scheduling of media resource fragment files in the storage server can avoid using the internal network to obtain media resources from other storage servers to improve the performance of the distributed storage system to a certain extent, and in the fragment URL generated by the streaming media server It does not include the address of the storage server that stores the fragmented files of each media resource, so it can reduce the exposure of the storage server address to the user terminal, improve security to a certain extent, and is applicable to some scenarios with high security and isolation requirements.

第三方面,提供一种存储媒体资源的装置,该存储媒体资源的装置具有实现上述方法设计中媒体资源写入服务器的功能,所述功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。所述硬件或软件包括一个或多个与上述功能相对应的模块。所述模块可以是软件和/或硬件。In the third aspect, a device for storing media resources is provided. The device for storing media resources has the function of writing the media resources into the server in the design of the above method. The function can be realized by hardware, or by executing corresponding software on the hardware. . The hardware or software includes one or more modules corresponding to the above functions. The modules may be software and/or hardware.

一种可能的设计中,存储媒体资源的装置包括获取单元和处理单元,获取单元和处理单元的功能可以和各方法步骤相对应,在此不予赘述。In a possible design, the device for storing media resources includes an acquisition unit and a processing unit, and the functions of the acquisition unit and the processing unit may correspond to the steps of each method, which will not be repeated here.

第四方面,提供一种调度媒体资源的装置,该调度媒体资源的装置具有实现上述方法设计中第一服务器的功能,所述功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。所述硬件或软件包括一个或多个与上述功能相对应的模块。所述模块可以是软件和/或硬件。In a fourth aspect, a device for scheduling media resources is provided. The device for scheduling media resources has the function of realizing the first server in the above method design, and the function can be realized by hardware or by executing corresponding software on the hardware. The hardware or software includes one or more modules corresponding to the above functions. The modules may be software and/or hardware.

一种可能的设计中,存储媒体资源的装置包括获取单元和发送单元,获取单元和发送单元的功能可以和各方法步骤相对应,在此不予赘述。In a possible design, the device for storing media resources includes an acquisition unit and a sending unit, and the functions of the acquisition unit and the sending unit may correspond to the steps of each method, and details will not be described here.

第五方面,提供一种媒体资源写入服务器,该媒体资源写入服务器包括输入输出接口、处理器和存储器。其中,输入输出接口、处理器以及所述存储器之间可以通过总线系统相连。该存储器用于存储程序,所述处理器用于执行所述存储器中的程序,从而执行第一方面或第一方面的任意可能的设计中的媒体资源写入服务器执行的方法。According to a fifth aspect, a media resource writing server is provided, and the media resource writing server includes an input and output interface, a processor, and a memory. Wherein, the input and output interface, the processor and the memory may be connected through a bus system. The memory is used to store programs, and the processor is used to execute the programs in the memory, so as to execute the method performed by the media resource writing server in the first aspect or any possible design of the first aspect.

第六方面,本申请提供了一种第一服务器,所述第一服务器包括:输入接口、输出接口、处理器和存储器。其中,输入接口、输出接口、处理器以及所述存储器之间可以通过总线系统相连。该存储器用于存储程序,所述处理器用于执行所述存储器中的程序,从而执行第二方面或第二面的任意可能的设计中的第一服务器执行的方法。In a sixth aspect, the present application provides a first server, where the first server includes: an input interface, an output interface, a processor, and a memory. Wherein, the input interface, the output interface, the processor and the memory may be connected through a bus system. The memory is used to store programs, and the processor is used to execute the programs in the memory, so as to execute the method performed by the first server in the second aspect or any possible design of the second aspect.

其中,所述第一服务器可以为分布式存储系统中的存储服务器,也可以为分布式存储系统中独立于存储服务器的流媒体服务器。Wherein, the first server may be a storage server in the distributed storage system, or may be a streaming media server independent of the storage server in the distributed storage system.

第七方面,本申请实施例提供了一种分布式存储系统,该分布式存储系统包括第五方面所述的媒体资源写入服务器和第六方面所述的第一服务器,还可包括元数据服务器和调度服务器中的一个或多个。In the seventh aspect, the embodiment of the present application provides a distributed storage system, the distributed storage system includes the media resource writing server described in the fifth aspect and the first server described in the sixth aspect, and may also include metadata One or more of server and scheduling server.

第八方面,本申请提实施例供了一种计算机可读存储介质或者计算机程序产品,用于存储计算机程序,该计算机程序用于执行第一方面、第一方面任意可能的设计、第二方面或第二方面任意可能的设计中的方法。In an eighth aspect, the present application provides an embodiment of a computer-readable storage medium or a computer program product for storing a computer program, and the computer program is used to implement the first aspect, any possible design of the first aspect, and any possible design of the second aspect. Or a method in any possible design of the second aspect.

本申请实施例提供的存储、调度媒体资源的方法、装置及分布式存储系统,媒体资源写入服务器以媒体资源能够播放的最小播放单元为单位,将媒体资源存储至存储服务器,以使用户终端在请求获取分布式存储系统中保存的某一媒体资源的最小播放单元时,分布式存储系统可直接从存储该最小播放单元的存储服务器处调度该最小播放单元并反馈给用户终端,而无需分布式存储系统各存储服务器之间搬运媒体资源,可以降低对分布式存储系统内部IP网络带宽要求,有助于提高分布式存储系统的整体性能。In the method, device, and distributed storage system for storing and scheduling media resources provided by the embodiments of the present application, the media resource writing server stores the media resources in the storage server in units of the smallest playing unit that the media resources can play, so that the user terminal When requesting to obtain the minimum playback unit of a certain media resource stored in the distributed storage system, the distributed storage system can directly schedule the minimum playback unit from the storage server storing the minimum playback unit and feed it back to the user terminal without distributing Moving media resources between storage servers in the distributed storage system can reduce the requirements for the internal IP network bandwidth of the distributed storage system and help improve the overall performance of the distributed storage system.

附图说明Description of drawings

图1为本申请实施例提供的存储、播放媒体资源的方法可应用的分布式存储系统架构示意图;FIG. 1 is a schematic diagram of a distributed storage system architecture applicable to the method for storing and playing media resources provided by the embodiment of the present application;

图2为本申请实施例提供的存储媒体资源的方法实施流程图;Fig. 2 is the implementation flowchart of the method for storing media resources provided by the embodiment of the present application;

图3为本申请实施例提供的媒体资源写入服务器以分片文件存储单元为单位将媒体资源存储至存储服务器的实施过程示意图;Fig. 3 is a schematic diagram of the implementation process of the media resource writing server provided by the embodiment of the present application storing the media resource to the storage server in units of fragmented file storage units;

图4为本申请实施例提供的存储媒体资源的又一实施流程图;FIG. 4 is another implementation flowchart of storing media resources provided by the embodiment of the present application;

图5为本申请实施例提供的通过存储服务器直接响应用户终端发送的媒体资源分片播放请求的实施过程示意图;FIG. 5 is a schematic diagram of an implementation process of directly responding to a media resource fragment playback request sent by a user terminal through a storage server provided by an embodiment of the present application;

图6为本申请实施例提供的通过流媒体服务器调度存储服务器上的媒体资源分片文件的实施过程示意图;FIG. 6 is a schematic diagram of the implementation process of scheduling media resource fragment files on the storage server through the streaming media server provided by the embodiment of the present application;

图7为本申请实施例提供的调度用户终端请求的播放媒体资源分片文件的一种实施流程图;Fig. 7 is a kind of implementation flowchart of scheduling the playback media resource segment file requested by the user terminal provided by the embodiment of the present application;

图8为本申请实施例提供的存储服务器故障场景下恢复媒体资源分片文件的过程示意图;FIG. 8 is a schematic diagram of the process of restoring media resource fragment files in the storage server failure scenario provided by the embodiment of the present application;

图9为本申请实施例提供的存储媒体资源的装置结构示意图;FIG. 9 is a schematic structural diagram of a device for storing media resources provided by an embodiment of the present application;

图10为本申请实施例提供的媒体资源写入服务器的结构示意图;FIG. 10 is a schematic structural diagram of a media resource writing server provided by an embodiment of the present application;

图11为本申请实施例提供的调度媒体资源的装置结构示意图;FIG. 11 is a schematic structural diagram of an apparatus for scheduling media resources provided by an embodiment of the present application;

图12为本申请实施例提供的第一服务器结构示意图。FIG. 12 is a schematic structural diagram of the first server provided by the embodiment of the present application.

具体实施方式Detailed ways

下面将结合附图,对本申请实施例中的技术方案进行描述。The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings.

本申请实施例提供的存储、播放媒体资源的方法可应用于图1所示的分布式存储系统,参阅图1所示,该分布式存储系统主要包括媒体资源写入服务器、存储服务器以及元数据服务器。其中,媒体资源写入服务器主要用于获取待存储至分布式存储系统中的媒体资源,并通过流媒体服务器或者第三方工具将获取到的媒体资源存储至存储服务器中。存储服务器主要用于保存媒体资源。分布式存储系统中可包括多个存储服务器,多个存储服务器之间通过分布式存储系统内部IP网络进行交互。元数据服务器用于保存媒体资源分布信息,所述媒体资源分布信息用于表征媒体资源在分布式存储系统中的保存路径(具体保存到的存储服务器)信息。调度服务器可查询元数据服务器中保存的媒体资源分布信息生成用户终端访问分布式存储系统的访问统一资源定位符(Uniform Resource Locator,URL)。用户终端可利用调度服务器分配的访问统一资源定位符(Uniform ResourceLocator,URL),通过分布式存储系统外部的IP网络向分布式存储系统发送媒体播放请求,并从分布式存储系统中获取媒体资源,进行媒体资源的播放。The method for storing and playing media resources provided by the embodiment of the present application can be applied to the distributed storage system shown in Figure 1. Referring to Figure 1, the distributed storage system mainly includes a media resource writing server, a storage server, and metadata server. Wherein, the media resource writing server is mainly used to obtain media resources to be stored in the distributed storage system, and store the obtained media resources in the storage server through the streaming media server or a third-party tool. The storage server is mainly used to store media resources. The distributed storage system may include multiple storage servers, and the multiple storage servers interact through the internal IP network of the distributed storage system. The metadata server is used to save the media resource distribution information, and the media resource distribution information is used to represent the saving path (specifically the storage server to which the media resource is saved) information in the distributed storage system. The scheduling server may query the media resource distribution information stored in the metadata server to generate an access Uniform Resource Locator (Uniform Resource Locator, URL) for the user terminal to access the distributed storage system. The user terminal can use the Uniform Resource Locator (Uniform Resource Locator, URL) allocated by the scheduling server to send a media playback request to the distributed storage system through the IP network outside the distributed storage system, and obtain media resources from the distributed storage system. Play media resources.

目前,用户终端进行媒体资源播放时,一般是以媒体资源能够播放的最小播放单元为单位进行播放的,故用户终端向分布式存储系统请求获取媒体资源时,也是以最小播放单元为单位向分布式存储系统请求的。然而,若按照现有根据存储条带大小,将媒体资源拆分为多个Stripe,并使用多副本或差错码机制,将媒体资源分别保存到不同的存储服务器上的分布式存储方法,会使一个最小播放单元被拆分为多个Stripe并保存到不同的存储服务器上,分布式存储系统需要将保存到不同存储服务器上的一个最小播放单元的多个Stripe进行搬运得到该最小播放单元并反馈给用户终端,这可能会造成分布式存储系统整体性能的降低。At present, when user terminals play media resources, they usually play in units of the smallest playback unit that can be played by media resources. Therefore, when user terminals request media resources from the distributed storage system, they are also distributed in units of the smallest playback unit. requested by the storage system. However, if according to the existing distributed storage method of splitting media resources into multiple Stripes according to the size of the storage stripe, and using multiple copies or an error code mechanism to store the media resources on different storage servers, the A minimum playback unit is split into multiple Stripes and stored on different storage servers. The distributed storage system needs to transport multiple Stripes of a minimum playback unit stored on different storage servers to obtain the minimum playback unit and give feedback For the user terminal, this may cause a decrease in the overall performance of the distributed storage system.

本申请实施例中,为提高分布式存储系统的整体性能,提供一种存储媒体资源的方法,在该方法中,媒体资源写入服务器以媒体资源能够播放的最小播放单元为单位,将媒体资源存储至存储服务器,以使用户终端在请求获取分布式存储系统中保存的某一媒体资源的最小播放单元时,分布式存储系统可直接从存储该最小播放单元的存储服务器处调度该最小播放单元并反馈给用户终端,而无需分布式存储系统各存储服务器之间搬运媒体资源,可以降低对分布式存储系统内部IP网络带宽要求,有助于提高分布式存储系统的整体性能。In the embodiment of the present application, in order to improve the overall performance of the distributed storage system, a method for storing media resources is provided. In this method, the media resource is written to the server and the media resource is written in the unit of the smallest playback unit that the media resource can play. Stored in the storage server, so that when the user terminal requests to obtain the minimum playback unit of a certain media resource stored in the distributed storage system, the distributed storage system can directly schedule the minimum playback unit from the storage server that stores the minimum playback unit And feed back to the user terminal without moving media resources among the storage servers of the distributed storage system, which can reduce the internal IP network bandwidth requirements of the distributed storage system and help improve the overall performance of the distributed storage system.

需要说明的是,本申请实施例中媒体资源能够播放的最小播放单元可以理解为是对媒体资源在时间上划分的媒体资源分片文件,该媒体资源分片文件依据媒体资源的不同业务播放协议具有不同的大小,例如,采用ABR播放机制下的HSL协议时,一个媒体资源分片文件通常为10秒,而采用ABR播放机制下的DASH协议时,一个媒体资源分片文件通常为2秒。本申请实施例以下为描述方便,将该最小播放单元称为媒体资源分片文件,当然在不同播放机制下该最小播放单元的名称可能不同,本申请实施例不作限定。对于同一媒体资源,播放码流不一致,最小播放单元也不一致。It should be noted that the smallest playback unit that can be played by media resources in the embodiment of the present application can be understood as a media resource fragment file that divides media resources in time, and the media resource fragment files are based on different service playback protocols of media resources. They have different sizes. For example, when using the HSL protocol under the ABR playback mechanism, a media resource segment file is usually 10 seconds, and when using the DASH protocol under the ABR playback mechanism, a media resource segment file is usually 2 seconds. In the following embodiments of the present application, for the convenience of description, the minimum playback unit is referred to as a media resource fragment file. Of course, the name of the minimum playback unit may be different under different playback mechanisms, which is not limited in the embodiment of the present application. For the same media resource, the playback code stream is inconsistent, and the smallest playback unit is also inconsistent.

本申请实施例以下结合实际应用对本申请涉及的存储、播放媒体资源的方法进行说明。The embodiments of the present application hereinafter describe the method for storing and playing media resources involved in the present application in combination with practical applications.

图2所示为本申请提供的存储媒体资源的方法实施流程图,参阅图2所示,包括:Figure 2 is a flow chart of the implementation of the method for storing media resources provided by the present application, referring to Figure 2, including:

S101:媒体资源写入服务器获取媒体资源分片文件。S101: The media resource writing server obtains the media resource fragment file.

本申请实施例中,媒体资源写入服务器可按流方式获取到携带有媒体资源URL的媒体资源,然后解析该媒体资源中包括的媒体资源URL,并使用标准的OTT(Over The Top)播放协议获取到媒体资源的媒体资源分片文件。其中,媒体资源中除包括有媒体资源分片文件,还可包括媒体资源的一级索引、二级索引文件以及字幕文件等其它媒体资源信息中的一种或多种。其中,一级索引文件、二级索引文件以及字幕文件等其它媒体资源信息可采用通用的分布式存储方式进行存储,本申请实施例不做限定,以下仅对媒体资源分片文件的存储方式进行说明。In the embodiment of this application, the media resource writing server can obtain the media resource carrying the media resource URL in a streaming manner, then parse the media resource URL included in the media resource, and use the standard OTT (Over The Top) playback protocol Get the media resource fragment file of the media resource. Wherein, in addition to the media resource segment file, the media resource may also include one or more of the media resource primary index, secondary index file, subtitle file and other media resource information. Among them, other media resource information such as primary index files, secondary index files, and subtitle files can be stored in a general distributed storage method, which is not limited in the embodiment of this application, and only the storage method of media resource fragment files is described below. illustrate.

其中,本申请实施例并不限定媒体资源写入服务器采用诸如OTT播放协议获取媒体资源分片文件,例如还可采用文本传输协议(File Transfer Protocol,FTP)等其它协议获取媒体资源分片文件。Wherein, the embodiment of the present application does not limit the media resource writing server to use such as OTT playback protocol to obtain media resource fragment files, for example, other protocols such as Text Transfer Protocol (File Transfer Protocol, FTP) can also be used to obtain media resource fragment files.

本申请实施例中,可设置专用的媒体资源流式写入接口,在需要进行以媒体资源分片文件为单位进行分布式存储的情况下,通过该媒体资源写入接口触发媒体资源写入服务器获取媒体资源分片文件,并进行媒体资源分片文件的存储。当然本申请实施例中也可根据用户访问热度,将某一热度的媒体资源直接使用媒体资源URL获取到该媒体资源,并解析得到该媒体资源的媒体资源分片文件,无需设置上述专用的媒体资源流式写入接口。In the embodiment of the present application, a dedicated media resource streaming writing interface can be set, and in the case of distributed storage in units of media resource fragment files, the media resource writing server can be triggered through the media resource writing interface Acquire media resource fragment files, and store the media resource fragment files. Of course, in this embodiment of the application, according to the user's access popularity, a certain popular media resource can be obtained directly by using the media resource URL, and the media resource fragment file of the media resource can be obtained by parsing, without setting the above-mentioned dedicated media Resource streaming write interface.

S102:所述媒体资源写入服务器将获取的媒体资源分片文件,以媒体资源分片文件为单位存储至存储服务器。S102: The media resource writing server stores the acquired media resource segment files in units of media resource segment files to the storage server.

本申请实施例中,媒体资源写入服务器以媒体资源分片文件为单位存储至存储服务器中,是指存储有媒体资源的存储服务器中包括一个或多个完整的媒体资源分片文件,各存储服务器上存储的媒体资源分片文件组成媒体资源。In this embodiment of the application, the media resource writing server stores media resource fragment files in the storage server in units of media resource fragment files, which means that the storage server storing media resources includes one or more complete media resource fragment files, and each storage The media resource fragment files stored on the server form the media resource.

其中,由于对于同一媒体资源,播放码流不一致,最小播放单元也不一致,故本申请实施例中各存储服务器上存储的各媒体资源分片文件大小也可不一致。当然,若对于同一播放码流,则各存储服务器上存储的各媒体资源分片文件大小也可能一致。Wherein, for the same media resource, the playback code stream is inconsistent, and the minimum playback unit is also inconsistent, so the size of each media resource fragment file stored on each storage server in the embodiment of the present application may also be inconsistent. Of course, for the same playback code stream, the sizes of the fragmented files of the media resources stored on the storage servers may also be the same.

其中,媒体资源中通常包括多个媒体资源分片文件,本申请实施例一种可能的实施方式中,可将连续Y个媒体资源分片文件作为一个分片文件存储单元,并以所述分片文件存储单元为单位,将媒体资源存储至存储服务器中。其中,Y为正整数,Y的具体取值不作限定,可根据系统配置与媒体资源的特征进行设置,可设置为1、2、3或N,N为正整数。例如,若媒体资源为视频文件,一个视频文件中通常包括多个不同分辨率的视频分片文件,本申请实施例中可将同一分辨率的连续Y个视频分片文件作为一个分片文件存储单元,并以所述分片文件存储单元为单位,将媒体资源存储至存储服务器中。其中,针对不同的分辨率可设置不同的Y值,例如,分辨率为240P的视频分片文件,可设置Y值为16,而分辨率为720P的视频分片文件,可设置Y值为4,对于分辨率为4K的视频分片文件,可设置Y值为2。Wherein, a media resource usually includes a plurality of media resource fragment files. In a possible implementation manner of the embodiment of the present application, Y continuous media resource fragment files may be used as a fragment file storage unit, and the fragment The piece file storage unit is used as a unit, and the media resources are stored in the storage server. Wherein, Y is a positive integer, and the specific value of Y is not limited, and can be set according to system configuration and characteristics of media resources, and can be set to 1, 2, 3 or N, where N is a positive integer. For example, if the media resource is a video file, a video file usually includes a plurality of video fragment files with different resolutions. In the embodiment of the present application, Y continuous video fragment files with the same resolution can be stored as a fragment file. unit, and store the media resource in the storage server by taking the fragmented file storage unit as a unit. Among them, different Y values can be set for different resolutions. For example, for a video fragment file with a resolution of 240P, the Y value can be set to 16, and for a video fragment file with a resolution of 720P, the Y value can be set to 4 , for video fragment files with a resolution of 4K, the Y value can be set to 2.

图3所示为本申请实施例提供的媒体资源写入服务器以分片文件存储单元为单位将媒体资源存储至存储服务器的实施过程示意图,参阅图3所示,包括:Figure 3 is a schematic diagram of the implementation process of the media resource writing server provided by the embodiment of the present application and storing the media resource to the storage server in units of fragmented file storage units, referring to Figure 3, including:

S201:媒体资源写入服务器获取媒体资源分片文件,并将Y个连续媒体资源分片文件组成为一个分片文件存储单元。S201: The media resource writing server acquires a media resource fragment file, and forms Y consecutive media resource fragment files into a fragment file storage unit.

S202:媒体资源写入服务器将该包括Y个连续媒体资源分片文件的分片文件存储单元存储至存储服务器。S202: The media resource writing server stores the segment file storage unit including Y continuous media resource segment files to the storage server.

本申请实施例中,媒体资源写入服务器将每一分片文件存储单元存储至存储服务器时,可根据不同的可靠性策略进行不同的冗余处理。例如,可对包括Y个媒体资源分片文件的分片文件存储单元进行多副本冗余、差错码冗余以及无冗余的处理。In the embodiment of the present application, when the media resource writing server stores each fragmented file storage unit in the storage server, different redundancy processing may be performed according to different reliability policies. For example, multi-copy redundancy, error code redundancy and no redundancy processing may be performed on a segment file storage unit including Y media resource segment files.

采用多副本冗余方式进行存储处理时,媒体资源写入服务器可将包括Y个媒体资源分片文件的分片文件存储单元复制N份,N为正整数,并将该N份分片文件存储单元存储到不同的存储服务器上,例如图3所示,N取值为3,采用三副本冗余方式,可分别在存储服务器1、存储服务器2和存储服务器3中分别保存一份包括Y个媒体资源分片文件的分片文件存储单元。When using multi-copy redundancy for storage processing, the media resource writing server can copy N copies of the fragment file storage unit including Y media resource fragment files, where N is a positive integer, and store the N fragment files Units are stored on different storage servers. For example, as shown in Figure 3, the value of N is 3, and the three-copy redundancy method is adopted. A copy including Y The fragment file storage unit of the media resource fragment file.

采用差错码冗余方式进行存储处理时,媒体资源写入服务器可等待收到N个连续的分片文件存储单元后,使用差错码算法计算出M个冗余单元,并将N和M分别写到N+M个不同的存储服务器上。其中,N和M都为正整数。例如,图3中将分片文件存储单元M1存储至存储服务器1上,将分片文件存储单元M2存储至存储服务器2上,将分片文件存储单元M3存储至存储服务器3上。When the error code redundancy method is used for storage processing, the media resource writing server can wait for receiving N consecutive fragmented file storage units, use the error code algorithm to calculate M redundant units, and write N and M respectively to N+M different storage servers. Wherein, both N and M are positive integers. For example, in FIG. 3 , the segment file storage unit M1 is stored on the storage server 1 , the segment file storage unit M2 is stored on the storage server 2 , and the segment file storage unit M3 is stored on the storage server 3 .

采用无冗余方式进行存储处理时,媒体资源写入服务器可将包括Y个媒体资源分片文件的分片文件存储单元存储至某一个存储服务器上,例如图3中,将分片文件存储单元存储至存储服务器2上。其中,媒体资源写入服务器可基于负载均衡原则,选择负载较低的一个存储服务器存储分片文件存储单元。When storage processing is performed in a non-redundant manner, the media resource writing server can store the fragmented file storage unit comprising Y media resource fragmented files on a certain storage server, for example, in FIG. 3, the fragmented file storage unit Stored on storage server 2. Wherein, the media resource writing server may select a storage server with a lower load to store the fragmented file storage unit based on the principle of load balancing.

S203:继续获取媒体资源分片文件,并按照S202涉及的存储方式,针对每一分片文件存储单元可选择上述涉及的任一种冗余处理方式进行冗余处理,并存储至存储服务器,直至将媒体资源的全部媒体资源分片文件都存储至分布式存储系统的存储服务器上。S203: Continue to acquire media resource fragment files, and according to the storage method involved in S202, for each fragment file storage unit, any one of the above-mentioned redundant processing methods can be selected for redundant processing, and stored in the storage server, until All the media resource segment files of the media resource are stored on the storage server of the distributed storage system.

本申请实施例中,分布式存储系统按照上述方式将媒体资源以媒体资源分片文件(媒体资源能够播放的最小播放单元)存储至存储服务器后,分布式存储系统可直接从存储服务器处以媒体资源分片文件为单位调度媒体资源分片文件并反馈给用户终端,而无需在分布式存储系统各存储服务器之间搬运媒体资源组成媒体资源分片文件再反馈给用户终端,可以降低对分布式存储系统内部IP网络带宽要求,有助于提高分布式存储系统的整体性能。本申请实施例为方便后续用户终端从分布式存储系统中调用媒体资源分片文件,媒体资源写入服务器可在将媒体资源分片文件存储至存储服务器之后,将媒体资源分片文件分布信息保存至分布式存储系统的元数据服务器,其中,所述媒体资源分片文件分布信息用于指示媒体资源分片文件、与存储所述媒体资源分片文件的存储服务器之间的对应关系。后续用户终端需要从分布式存储系统中调用媒体资源分片文件时,调度服务器可查询元数据服务器中保存的媒体资源分布信息生成用户终端访问分布式存储系统的分片URL,通过该分片URL指示用户终端获取媒体资源分片文件的地址。In the embodiment of the present application, after the distributed storage system stores the media resource in the storage server as a media resource fragment file (the smallest playback unit that can be played by the media resource) according to the above method, the distributed storage system can directly obtain the media resource from the storage server. Fragment files are used as a unit to schedule media resource fragment files and feed them back to user terminals, without the need to move media resources between storage servers in the distributed storage system to form media resource fragment files and then feed them back to user terminals, which can reduce the impact on distributed storage. The internal IP network bandwidth requirements of the system help to improve the overall performance of the distributed storage system. In the embodiment of the present application, in order to facilitate subsequent user terminals to call media resource fragment files from the distributed storage system, the media resource writing server may save the distribution information of the media resource fragment files after storing the media resource fragment files to the storage server To the metadata server of the distributed storage system, wherein the distribution information of the media resource fragment file is used to indicate the corresponding relationship between the media resource fragment file and the storage server storing the media resource fragment file. Subsequent user terminals need to call media resource fragment files from the distributed storage system, the scheduling server can query the media resource distribution information stored in the metadata server to generate a fragment URL for the user terminal to access the distributed storage system, through the fragment URL Instruct the user terminal to obtain the address of the media resource segment file.

其中,媒体资源写入服务器将媒体资源分片文件分布信息保存至分布式存储系统的元数据服务器的实施步骤可在图2所示的方法基础上执行,也可在图3所示的方法基础上执行,本申请实施例以下以在图3所示的方法基础上执行为例进行说明。Wherein, the implementation steps of the media resource writing server saving the distribution information of the media resource fragment files to the metadata server of the distributed storage system can be performed on the basis of the method shown in FIG. 2, or can be performed on the basis of the method shown in FIG. Execution on the basis of the method shown in FIG. 3 will be described in the following embodiments of the present application as an example.

图4所示为本申请实施例提供的存储媒体资源的又一实施流程图,图4中S301、S302和S304,与图3中的S201、S202和S203的执行步骤相同,在此不再赘述,以下仅就不同之处进行说明。Figure 4 shows another implementation flowchart of the storage media resources provided by the embodiment of the present application, S301, S302 and S304 in Figure 4 are the same as the execution steps of S201, S202 and S203 in Figure 3, and will not be repeated here , and only the differences are described below.

S303:媒体资源写入服务器将媒体资源分片文件分布信息保存至分布式存储系统的元数据服务器。S303: The media resource writing server saves the distribution information of the media resource segment files to the metadata server of the distributed storage system.

本申请实施例中媒体资源写入服务器对包括Y个媒体资源分片文件的分片文件存储单元进行不同的冗余处理时,则需要将冗余处理后的分片文件存储单元的分布信息保存至元数据服务器。例如,若对媒体资源分片文件进行多副本冗余处理,则需要将分片文件存储单元的多副本分布信息保存至元数据服务器。若对媒体资源分片文件进行差错码冗余处理,则需要将M+N个分片文件存储单元的分布信息保存至元数据服务器。In the embodiment of the present application, when the media resource writing server performs different redundant processing on the fragment file storage units including Y media resource fragment files, it is necessary to save the distribution information of the redundantly processed fragment file storage units to the metadata server. For example, if multi-copy redundancy processing is performed on a media resource fragment file, the multi-copy distribution information of the fragment file storage unit needs to be saved to the metadata server. If error code redundancy processing is performed on media resource fragment files, the distribution information of M+N fragment file storage units needs to be saved to the metadata server.

本申请实施例以下将对分布式存储系统从存储服务器处以媒体资源分片文件为单位调度媒体资源分片文件并反馈给用户终端的实施过程进行说明。In the embodiment of the present application, the implementation process in which the distributed storage system schedules the media resource fragment files from the storage server in units of media resource fragment files and feeds them back to the user terminal will be described below.

本申请实施例中为实现从分布式存储系统中调度媒体资源分片文件,可设置调度服务器,通过该调度服务器响应用户终端发送的媒体资源播放请求并根据元数据服务器保存的媒体资源分布信息实现对存储服务器中保存的媒体资源的调度。In the embodiment of the present application, in order to realize the scheduling of media resource fragmented files from the distributed storage system, a scheduling server can be set up, through which the scheduling server responds to the media resource playback request sent by the user terminal and implements according to the media resource distribution information stored in the metadata server Scheduling of media resources stored in the storage server.

本申请的一种可能的实施方式中,用户终端发送媒体资源播放请求,调度服务器获取到用户终端发送的媒体资源播放请求,查询元数据服务器上存储的该媒体资源播放请求所请求的媒体资源的一级索引信息并生成以及索引文件反馈给用户终端,该媒体资源的一级索引文件中记录有流媒体的比特率,用户终端可解析接收到的一级索引文件,根据终端类型以及网络带宽选择适用播放所述媒体资源播放请求所请求的媒体资源的比特率,并向调度服务器发送生成二级索引文件的请求,该请求生成的二级索引文件对应于用户终端发送的媒体资源播放请求所请求的媒体资源。调度服务器查询元数据服务器中存储的所述媒体资源播放请求所请求的媒体资源的媒体资源分片文件的分布信息,并依据媒体资源分片文件分布信息生成二级索引文件,生成的该二级索引文件中所述媒体资源播放请求所请求的媒体资源的每个媒体资源分片文件都具有与其对应的分片URL,该分片URL中包括分布式存储系统中存储对应媒体资源分片文件的存储服务器地址。故用户终端可根据各媒体资源分片文件的分片URL,向分片URL指示的存储服务器地址对应的存储服务器发送媒体资源分片文件播放请求,存储服务器获取到该媒体资源分片文件播放请求后可直接从本地读取对应的媒体资源分片文件并反馈给用户终端,无需使用内部网络从其它存储服务器处获取媒体资源,并且也无需再反馈给流媒体服务器等其它第三方服务器,可以提高分布式存储系统的性能。通过存储服务器直接响应用户终端发送的媒体资源分片播放请求的实施过程示意图如图5所示。In a possible implementation of the present application, the user terminal sends a media resource play request, and the scheduling server obtains the media resource play request sent by the user terminal, and queries the media resource requested by the media resource play request stored on the metadata server. The first-level index information is generated and the index file is fed back to the user terminal. The bit rate of the streaming media is recorded in the first-level index file of the media resource. The user terminal can analyze the received first-level index file, and select according to the terminal type and network bandwidth. Applying the bit rate of the media resource requested by the media resource playback request, and sending a request to the scheduling server to generate a secondary index file, the secondary index file generated by the request corresponds to the media resource playback request sent by the user terminal. media resources. The scheduling server inquires the distribution information of the media resource fragment file of the media resource requested by the media resource play request stored in the metadata server, and generates a secondary index file according to the distribution information of the media resource fragment file, and the generated secondary index file Each media resource fragment file of the media resource requested by the media resource playback request in the index file has a fragment URL corresponding to it, and the fragment URL includes the URL of the corresponding media resource fragment file stored in the distributed storage system. Storage server address. Therefore, the user terminal can send a media resource fragment file play request to the storage server corresponding to the storage server address indicated by the fragment URL according to the fragment URL of each media resource fragment file, and the storage server obtains the media resource fragment file play request Afterwards, the corresponding media resource segment files can be directly read locally and fed back to the user terminal, without using the internal network to obtain media resources from other storage servers, and without feeding back to other third-party servers such as streaming media servers, which can improve Performance of distributed storage systems. Fig. 5 is a schematic diagram of an implementation process of directly responding to a media resource fragment playback request sent by a user terminal through a storage server.

本申请的另一种可能的实施方式中,还可设置独立于存储服务器的流媒体服务器,用户终端发送媒体资源播放请求,调度服务器获取到用户终端发送的媒体资源播放请求,并将该媒体资源播放请求调度到流媒体服务器上,由流媒体服务器查询元数据服务器中的媒体资源的分布信息并获取媒体资源的分布信息,生成一级索引文件和二级索引文件并反馈给用户终端,流媒体服务器生成并反馈给用户终端的二级索引文件中各媒体资源分片文件的分片URL的地址均为流媒体服务器,用户终端发送媒体资源分片播放请求后,该媒体资源分片播放请求被路由至流媒体服务器,流媒体服务器从元数据服务器查询该媒体资源分片播放请求所请求的媒体资源分片文件所在的存储服务器,并从该存储服务器处获取媒体资源分片文件并反馈给用户终端。采用流媒体服务器实现存储服务器中媒体资源分片文件的调度,可在一定程度上避免使用内部网络从其它存储服务器处获取媒体资源提高分布式存储系统性能,并且流媒体服务器生成的分片URL中并不包括存储各媒体资源分片文件的存储服务器的地址,故可减少对用户终端暴露存储服务器地址,一定程度上提高了安全性,可适用于一些安全性、隔离线要求较高的场景。通过流媒体服务器调度存储服务器上的媒体资源分片文件的实施过程示意图可参阅图6所示。In another possible implementation of the present application, a streaming media server independent of the storage server may also be set up, the user terminal sends a media resource play request, and the scheduling server obtains the media resource play request sent by the user terminal, and sends the media resource The playback request is dispatched to the streaming media server, and the streaming media server queries the distribution information of the media resources in the metadata server and obtains the distribution information of the media resources, generates the first-level index file and the second-level index file and feeds them back to the user terminal. The addresses of the segment URLs of each media resource segment file in the secondary index file generated by the server and fed back to the user terminal are streaming media servers. After the user terminal sends a media resource segment playback request, the media resource segment playback request is accepted Routing to the streaming media server, the streaming media server queries from the metadata server the storage server where the media resource fragment file requested by the media resource fragment playback request is located, and obtains the media resource fragment file from the storage server and feeds it back to the user terminal. Using the streaming media server to realize the scheduling of media resource fragment files in the storage server can avoid using the internal network to obtain media resources from other storage servers to improve the performance of the distributed storage system to a certain extent, and in the fragment URL generated by the streaming media server It does not include the address of the storage server that stores the fragmented files of each media resource, so it can reduce the exposure of the storage server address to the user terminal, improve security to a certain extent, and is applicable to some scenarios with high security and isolation requirements. Refer to FIG. 6 for a schematic diagram of an implementation process of scheduling media resource fragment files on the storage server through the streaming media server.

需要说明的是,上述有关存储服务器或者流媒体服务器获取媒体资源分片文件播放请求的过程中涉及的生成一级索引文件和二级索引文件的过程,仅是进行示意性说明,并不引以为限,例如为了减轻调度服务器的压力,调度服务器可将用户终端发送的媒体资源播放请重定向到存储服务器,由存储服务器生成一级索引文件和二级索引文件。再例如,还可设置专用于生成索引文件的索引服务器,调度服务器获取到用户终端发送的媒体资源播放请求后,将媒体资源播放请求重定向到索引服务器,由该索引服务器生成一级索引文件和二级索引文件。It should be noted that the process of generating primary index files and secondary index files involved in the process of the storage server or the streaming media server obtaining the playback request of the media resource fragment file is only a schematic illustration and does not refer to it. To limit, for example, in order to reduce the pressure on the scheduling server, the scheduling server can redirect the media resource playback request sent by the user terminal to the storage server, and the storage server will generate the first-level index file and the second-level index file. For another example, an index server dedicated to generating index files can also be set up. After the scheduling server obtains the media resource play request sent by the user terminal, it redirects the media resource play request to the index server, and the index server generates the first-level index file and Secondary index file.

本申请实施例中无论是由存储服务器直接响应用户终端发送的媒体资源分片文件播放请求并调度媒体资源分片文件,还是有流媒体服务器响应用户终端发送的媒体资源分片文件播放请求并调度媒体资源分片文件,都是以媒体资源分片文件为单位,从所述分布式存储系统的存储服务器处获取所述媒体资源分片文件播放请求所请求的媒体资源分片文件,并向所述用户终端反馈获取的媒体资源分片文件,能够在一定程度上提高分布式存储系统的整体性能。In this embodiment of the application, no matter whether the storage server directly responds to the media resource segment file playback request sent by the user terminal and schedules the media resource segment file, or the streaming media server responds to the media resource segment file playback request sent by the user terminal and schedules The media resource fragment file is all to use the media resource fragment file as a unit, obtains the media resource fragment file requested by the media resource fragment file playback request from the storage server of the distributed storage system, and sends to the The media resource segment files obtained by the user terminal feedback can improve the overall performance of the distributed storage system to a certain extent.

本申请实施例以下对从存储服务器处获取媒体资源分片文件播放请所请求的媒体资源分片文件的过程进行详细说明。In the embodiment of the present application, the process of obtaining the media resource fragment file requested by the media resource fragment file playback request from the storage server will be described in detail below.

为描述方便,将能够响应用户终端发送的媒体资源分片播放请求并以媒体资源分片文件为单位,从所述分布式存储系统的存储服务器处获取所述媒体资源分片文件播放请求所请求的媒体资源分片文件,并向所述用户终端反馈获取的媒体资源分片文件的服务器称为第一服务器,该第一服务器可以是存储服务器,也可以是流媒体服务器。For the convenience of description, it will be able to respond to the media resource fragment playback request sent by the user terminal and obtain the media resource fragment file playback request from the storage server of the distributed storage system in units of media resource fragment files. The server that feeds back the acquired media resource fragment files to the user terminal is called the first server, and the first server may be a storage server or a streaming media server.

图7所示为本申请实施例提供的第一服务器调度用户终端请求的播放媒体资源分片文件的一种实施流程图。参阅图7所示,包括:FIG. 7 is a flowchart of an implementation of the first server scheduling the playback of media resource fragment files requested by the user terminal provided by the embodiment of the present application. See Figure 7, including:

S401:分布式存储系统中的第一服务器,获取用户终端发送的媒体资源分片文件播放请求。S401: The first server in the distributed storage system acquires a media resource segment file play request sent by a user terminal.

本申请实施例中第一服务器获取用户终端发送的媒体资源分片文件播放请求的过程可参阅上述实施例中有关存储服务器或者流媒体服务器获取媒体资源分片文件播放请求的过程,在此不再赘述。In the embodiment of the present application, the process of the first server obtaining the playback request of the media resource segment file sent by the user terminal can refer to the process of the storage server or the streaming media server obtaining the playback request of the media resource segment file in the above-mentioned embodiments, which will not be repeated here. repeat.

S402:第一服务器以媒体资源分片文件为单位,从所述分布式存储系统的存储服务器处获取所述媒体资源分片文件播放请求所请求的媒体资源分片文件。S402: The first server acquires the media resource fragment file requested by the media resource fragment file playback request from the storage server of the distributed storage system in units of media resource fragment files.

本申请实施例中第一服务器若为存储服务器,则该存储服务器获取到的用户终端发送的媒体资源分片文件播放请求是用户终端依据分片URL发送的,在该分片URL中包括的存储服务器地址对应的存储服务器是响应用户终端发送的该媒体资源分片文件播放请求的存储服务器,也是存储所述媒体资源分片文件播放请求所请求的媒体资源分片文件的存储服务器。In the embodiment of the present application, if the first server is a storage server, the media resource segment file playback request sent by the user terminal obtained by the storage server is sent by the user terminal according to the segment URL, and the storage server included in the segment URL The storage server corresponding to the server address is a storage server that responds to the media resource segment file playback request sent by the user terminal, and is also a storage server that stores the media resource segment file requested by the media resource segment file playback request.

本申请实施例中,分布式存储系统若采用了冗余处理方式对媒体资源分片文件进行存储,则同一媒体资源分片文件可能会存储在不同的存储服务器上,此时确定分片URL中包括的存储服务器地址时,可根据不同的冗余处理策略采用不同的处理方式。例如,若采用多副本冗余处理方式,则每个媒体资源分片文件都有多个副本分布在不同存储服务器上,需要根据负载均衡原则为不同的媒体资源分片文件选择合适的存储服务器提供媒体资源分片文件,并在生成对应的分片URL时包括该选择的存储服务器的地址。若采用差错码冗余处理方式,则每个媒体资源分片文件只有一个副本且只保存在一个存储服务器上,只能选择该存储服务器提供媒体资源分片文件,生成分片URL时包括的存储服务器地址即为该提供媒体资源分片文件的存储服务器地址。若采用无冗余处理方式,则每个媒体资源分片文件也只保存在一个存储服务器上,只能选择该存储服务器提供媒体资源分片文件,生成分片URL时包括的存储服务器地址即为该提供媒体资源分片文件的存储服务器地址。In the embodiment of this application, if the distributed storage system adopts a redundant processing method to store media resource fragment files, the same media resource fragment files may be stored on different storage servers. When including the storage server address, different processing methods can be adopted according to different redundancy processing strategies. For example, if the multi-copy redundancy processing method is adopted, each media resource fragment file has multiple copies distributed on different storage servers, and it is necessary to select an appropriate storage server for different media resource fragment files according to the load balancing principle. The media resource segment file, and include the address of the selected storage server when generating the corresponding segment URL. If the error code redundancy processing method is used, each media resource fragment file has only one copy and is only stored on one storage server, and only the storage server can be selected to provide the media resource fragment file, and the storage included when generating the fragment URL The server address is the address of the storage server that provides the media resource segment files. If the non-redundant processing method is used, each media resource fragment file is only stored on one storage server, and only this storage server can be selected to provide the media resource fragment file. The storage server address included when generating the fragment URL is This provides the storage server address of the media resource fragment file.

本申请实施例中第一服务器若为流媒体服务器,则流媒体服务器从存储服务器处获取媒体资源分片文件的过程可参阅上述第一服务器为存储服务器情况下,生成分片URL中包括的存储服务器地址中确定存储服务器的过程,在此不再赘述。In the embodiment of the present application, if the first server is a streaming media server, the process for the streaming media server to obtain media resource fragment files from the storage server can refer to the storage included in the generated fragment URL when the first server is a storage server. The process of determining the storage server in the server address will not be repeated here.

本申请实施例中,第一服务器在从存储服务器处,以媒体资源分片文件为单位获取媒体资源分片文件的过程中,可能会出现媒体资源分片文件丢失的场景,若存储服务器故障或者存储服务器中某块硬盘故障,都可能造成媒体资源分片文件丢失的情况发生,需要在系统中利用冗余处理方式提供的可靠性恢复出丢失的内容。本申请实施例以下以采用多副本冗余处理方式、差错码冗余处理方式以及无冗余处理方式下,恢复丢失的媒体资源分片文件内容的过程进行举例说明,参阅图8所示。In the embodiment of the present application, when the first server obtains the media resource fragment file from the storage server, the media resource fragment file may be lost. If the storage server fails or The failure of a certain hard disk in the storage server may cause the loss of fragmented files of media resources. It is necessary to use the reliability provided by the redundant processing method in the system to restore the lost content. In the embodiment of the present application, the process of recovering the content of the lost media resource fragment file is illustrated below by using the multi-copy redundancy processing method, the error code redundancy processing method and the no-redundancy processing method, as shown in FIG. 8 .

本申请实施例中,使用多副本冗余处理方式情况下,若其中存储某一个副本的存储服务器出现故障,则可用其余可用副本在状态正常的存储服务器上恢复即可。例如图8中,媒体资源分片文件A采用三副本冗余模式分别存储在存储服务器1,存储服务器2和存储服务器n上,若存储服务器1发生故障,存储服务器1上存储的全部媒体资源分片文件丢失,则分布式存储系统中具有监控和管理功能的服务器,监测到存储服务器1发生故障,则可利用存储服务器n+1恢复存储服务器1丢失的媒体资源分片文件A,具有监控和管理功能的服务器向存储服务器n+1媒体资源分片文件恢复请求,并在该媒体资源分片文件恢复请求中指示通过存储服务器2恢复,故存储服务器n+1收到媒体资源分片文件恢复请求后可从存储服务器2处获取媒体资源分片文件A,并保存在本地,向具有监控和管理功能的服务器发送媒体资源分片文件A恢复成功的响应消息。具有监控和管理功能的服务器更新元数据服务器中保存的媒体资源分片文件A的分布信息。In the embodiment of the present application, when the multi-copy redundancy processing method is used, if the storage server storing a certain copy fails, the rest of the available copies can be used to recover on the storage server in normal state. For example, in FIG. 8 , the media resource fragment file A is stored in storage server 1, storage server 2 and storage server n respectively in a three-copy redundant mode. If storage server 1 fails, all media resources stored on storage server 1 will be divided If the fragment file is lost, the server with monitoring and management functions in the distributed storage system can use storage server n+1 to restore the lost media resource fragment file A of storage server 1 when it detects that storage server 1 fails. The server of the management function sends a media resource fragment file restoration request to the storage server n+1, and indicates in the media resource fragment file restoration request to restore through the storage server 2, so the storage server n+1 receives the media resource fragment file restoration request. After the request, the media resource fragment file A can be obtained from the storage server 2 and stored locally, and a response message indicating that the media resource fragment file A has been successfully restored is sent to the server with monitoring and management functions. The server with monitoring and management functions updates the distribution information of the media resource fragment file A stored in the metadata server.

本申请实施例中,使用差错码冗余处理方式情况下,若其中存储某一个媒体资源分片文件的存储服务器出现故障,则需要读取剩余的N-1个媒体资源分片,并读取冗余信息分片M,重构出丢失的媒体资源分片文件,保存在状态正常的存储服务器上。例如图8中,采用4+2冗余处理的连续的4个媒体资源分片文件A、B、C和D分别保存在存储服务区1、2、3和4上,2个冗余媒体资源分片文件保存在服务器5和n上。若服务器1发生故障,媒体资源分片文件A丢失,分布式存储系统中具有监控和管理功能的服务器,监测到存储服务器1发生故障,则可利用存储服务器n+1恢复存储服务器1丢失的媒体资源分片文件A。具有监控和管理功能的服务器向存储服务器n+1媒体资源分片文件恢复请求,并在该媒体资源分片文件恢复请求中指示通过存储服务器2、3、4和5恢复,故存储服务器n+1收到媒体资源分片文件恢复请求后可从存储服务器2、3、4和5处获取媒体资源分片文件A的恢复信息,利用获取到的恢复信息使用差错码算法恢复媒体资源分片文件A并保存在本地。存储服务器n+1向具有监控和管理功能的服务器发送媒体资源分片文件A恢复成功的响应消息。具有监控和管理功能的服务器更新元数据服务器中保存的媒体资源分片文件A的分布信息。In the embodiment of this application, in the case of using the error code redundancy processing method, if the storage server storing a certain media resource fragment file fails, it is necessary to read the remaining N-1 media resource fragments, and read The redundant information fragment M reconstructs the lost media resource fragment file and saves it on a storage server with a normal state. For example, in Figure 8, four consecutive media resource fragment files A, B, C, and D that adopt 4+2 redundant processing are stored in storage service areas 1, 2, 3, and 4 respectively, and two redundant media resources Shard files are kept on servers 5 and n. If server 1 fails and media resource fragment file A is lost, and the server with monitoring and management functions in the distributed storage system detects that storage server 1 fails, storage server n+1 can be used to restore the lost media of storage server 1 Resource slice file A. The server with monitoring and management functions requests storage server n+1 to restore the media resource fragment file, and indicates in the media resource fragment file restoration request to restore through storage servers 2, 3, 4 and 5, so storage server n+ 1 After receiving the media resource fragment file recovery request, the recovery information of the media resource fragment file A can be obtained from storage servers 2, 3, 4 and 5, and the media resource fragment file can be restored using the obtained recovery information using the error code algorithm A and save it locally. The storage server n+1 sends a response message indicating that the recovery of the media resource segment file A is successful to the server with monitoring and management functions. The server with monitoring and management functions updates the distribution information of the media resource fragment file A stored in the metadata server.

本申请实施例中,使用无冗余处理方式情况下,若存储某一个媒体资源分片文件的存储服务器出现故障,则需要从媒体资源源站获取媒体资源分片文件,并利用状态正常的存储服务器恢复媒体资源分片文件,例如图8中,媒体资源分片文件A存储在存储服务器1上,若服务器1发生故障,媒体资源分片文件A丢失,分布式存储系统中具有监控和管理功能的服务器,监测到存储服务器1发生故障,则可利用存储服务器n+1恢复存储服务器1丢失的媒体资源分片文件A。具有监控和管理功能的服务器向存储服务器n+1媒体资源分片文件恢复请求,储服务器n+1接收到媒体资源分片文件恢复请求后从媒体资源分片文件A的源站获取到媒体资源分片文件A并保存在本地。存储服务器n+1向具有监控和管理功能的服务器发送媒体资源分片文件A恢复成功的响应消息。具有监控和管理功能的服务器更新元数据服务器中保存的媒体资源分片文件A的分布信息。In the embodiment of this application, in the case of using the non-redundant processing method, if the storage server storing a certain media resource fragment file fails, it is necessary to obtain the media resource fragment file from the media resource source site, and use the normal storage The server restores the media resource fragment file. For example, in Figure 8, the media resource fragment file A is stored on the storage server 1. If the server 1 fails, the media resource fragment file A is lost. The distributed storage system has monitoring and management functions If the server detects the failure of storage server 1, storage server n+1 can be used to restore the lost media resource fragment file A of storage server 1. The server with monitoring and management functions requests the storage server n+1 to restore the media resource fragment file, and the storage server n+1 obtains the media resource from the source station of the media resource fragment file A after receiving the media resource fragment file restoration request Shard file A and save it locally. The storage server n+1 sends a response message indicating that the recovery of the media resource segment file A is successful to the server with monitoring and management functions. The server with monitoring and management functions updates the distribution information of the media resource fragment file A stored in the metadata server.

本申请实施例中状态正常的存储服务器恢复发生故障的存储服务器上存储的媒体资源分片文件后,向具有监控和管理功能的服务器发送媒体资源分片文件A恢复成功的响应消息,具有监控和管理功能的服务器更新元数据服务器中保存的媒体资源分片文件A的分布信息,能够使得后续用户终端能够准确调度到媒体资源分片文件。In the embodiment of the present application, after the storage server with a normal state recovers the media resource fragment file stored on the faulty storage server, it sends a response message that the media resource fragment file A has been successfully restored to the server with monitoring and management functions, which has monitoring and management functions. The server with the management function updates the distribution information of the media resource segment file A stored in the metadata server, so that subsequent user terminals can accurately schedule the media resource segment file.

S403:第一服务器获取到媒体资源分片文件后,向用户终端反馈获取的媒体资源分片文件。S403: After obtaining the media resource fragment file, the first server feeds back the obtained media resource fragment file to the user terminal.

上述主要从分布式存储系统中的各服务器交互的角度对本申请实施例提供的方案进行了介绍。可以理解的是,分布式存储系统中的各服务器为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件单元。结合本申请中所公开的实施例描述的各示例的单元及算法步骤,本申请实施例能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。本领域技术人员可以对每个特定的应用来使用不同的方法来实现所描述的功能,但是这种实现不应认为超出本申请实施例的技术方案的范围。The foregoing mainly introduces the solutions provided by the embodiments of the present application from the perspective of interaction between servers in the distributed storage system. It can be understood that, in order to realize the above-mentioned functions, each server in the distributed storage system includes a corresponding hardware structure and/or software unit for performing each function. Combining the units and algorithm steps of each example described in the embodiments disclosed in this application, the embodiments of this application can be implemented in hardware or a combination of hardware and computer software. Whether a certain function is executed by hardware or computer software drives hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the technical solutions of the embodiments of the present application.

本申请实施例可以根据上述方法示例对分布式存储系统中的各服务器进行功能单元的划分,例如,可以对应各个功能划分各个功能单元,也可以将两个或两个以上的功能集成在一个处理单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。需要说明的是,本申请实施例中对单元的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。The embodiment of the present application can divide the functional units of each server in the distributed storage system according to the above method example, for example, each functional unit can be divided corresponding to each function, or two or more functions can be integrated into one processing in the unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units. It should be noted that the division of units in the embodiment of the present application is schematic, and is only a logical function division, and there may be another division manner in actual implementation.

基于与上述方法实施例相同构思,本申请实施例提供了一种存储媒体资源的装置。Based on the same idea as that of the foregoing method embodiments, the embodiments of the present application provide a device for storing media resources.

在采用集成单元的情况下,图9示出了本申请实施例提供的存储媒体资源的装置100的结构示意图,参阅图9所示,存储媒体资源的装置100包括获取单元101和处理单元102。其中,获取单元101,用于获取媒体资源分片文件,其中,所述媒体资源分片文件是媒体资源能够播放的最小播放单元。处理单元102,用于以媒体资源分片文件为单位,将所述获取单元101获取的媒体资源分片文件存储至分布式存储系统的存储服务器,其中,存储至各存储服务器中的各媒体资源分片文件组成媒体资源。In the case of using an integrated unit, FIG. 9 shows a schematic structural diagram of an apparatus 100 for storing media resources provided by an embodiment of the present application. Referring to FIG. 9 , the apparatus 100 for storing media resources includes an acquisition unit 101 and a processing unit 102 . Wherein, the obtaining unit 101 is configured to obtain a media resource fragment file, wherein the media resource fragment file is the smallest playback unit that the media resource can play. The processing unit 102 is configured to take the media resource fragment file as a unit, and store the media resource fragment file acquired by the acquisition unit 101 in the storage server of the distributed storage system, wherein each media resource stored in each storage server Shard files make up a media resource.

其中,存储至存储服务器中的各媒体资源分片文件的大小可不同。Wherein, the size of each media resource segment file stored in the storage server may be different.

一种可能的实施方式中,所述处理单元102,还用于:将媒体资源分片文件分布信息保存至分布式存储系统的元数据服务器,其中,所述媒体资源分片文件分布信息用于指示媒体资源分片文件、与存储所述媒体资源分片文件的存储服务器之间的对应关系。In a possible implementation manner, the processing unit 102 is further configured to: save the distribution information of the media resource fragment file to the metadata server of the distributed storage system, wherein the distribution information of the media resource fragment file is used for Indicates the correspondence between the media resource fragment file and the storage server storing the media resource fragment file.

又一种可能的实施方式中,所述处理单元102,可将连续的Y个媒体资源分片文件,确定为一个分片文件存储单元,所述Y为正整数;以所述分片文件存储单元为单位,将所述获取的媒体资源分片文件存储至所述存储服务器。In yet another possible implementation manner, the processing unit 102 may determine consecutive Y pieces of media resource fragment files as a fragment file storage unit, wherein Y is a positive integer; The unit is a unit, and the acquired media resource segment file is stored in the storage server.

当采用硬件形式实现时,本申请实施例中,获取单元101可以是输入输出接口,处理单元102可以是处理器或控制器,其中,输入输出接口是统称,可以包括一个或多个接口。When implemented in the form of hardware, in the embodiment of the present application, the acquisition unit 101 may be an input and output interface, and the processing unit 102 may be a processor or a controller, where the input and output interfaces are collectively referred to and may include one or more interfaces.

当获取单元101是输入输出接口,处理单元102是处理器时,本申请实施例所涉及的存储媒体资源的装置100可以为图10所示的存储媒体资源的装置。其中,所述图10所示的存储媒体资源的装置可以是媒体资源写入服务器。When the acquisition unit 101 is an input/output interface and the processing unit 102 is a processor, the device 100 for storing media resources involved in this embodiment of the present application may be the device for storing media resources shown in FIG. 10 . Wherein, the device for storing media resources shown in FIG. 10 may be a media resource writing server.

图10所示为本申请实施例提供的媒体资源写入服务器1000的示意图。该媒体资源写入服务器1000可以用于执行图2至图8中涉及的媒体资源写入服务器的执行方法。如图10所示,所述媒体资源写入服务器1000包括:输入输出接口1001、处理器1002和存储器1003。该输入输出接口1001、处理器1002和存储器1003可以通过总线系统1004相连。FIG. 10 is a schematic diagram of a media resource writing server 1000 provided by an embodiment of the present application. The media resource writing server 1000 can be used to execute the execution method of the media resource writing server involved in FIG. 2 to FIG. 8 . As shown in FIG. 10 , the media resource writing server 1000 includes: an input and output interface 1001 , a processor 1002 and a memory 1003 . The input and output interface 1001 , the processor 1002 and the memory 1003 may be connected through a bus system 1004 .

所述存储器1003用于存储包括程序、指令或代码。所述处理器1002,用于执行所述存储器1003中的程序,以控制输入输出接口1001获取媒体资源分片文件以及实施上述实施方式中媒体资源写入服务器所实施的各步骤及功能,此处不再赘述。上述输入输出接口1001、以及处理器1002的具体实施方式可以相应参考上述图9实施方式中的获取单元101以及处理单元102中的具体说明,这里不再赘述。The memory 1003 is used to store programs, instructions or codes. The processor 1002 is configured to execute the program in the memory 1003 to control the input and output interface 1001 to obtain media resource fragment files and implement the steps and functions implemented by the media resource writing server in the above embodiment, here No longer. For the specific implementation manners of the input and output interface 1001 and the processor 1002, reference may be made to the specific descriptions of the acquisition unit 101 and the processing unit 102 in the implementation manner of FIG. 9 , and details are not repeated here.

基于与上述方法实施例相同的构思,本申请实施例还提供了一种调度媒体资源的装置。Based on the same idea as that of the foregoing method embodiments, the embodiments of the present application further provide an apparatus for scheduling media resources.

在采用集成单元的情况下,图11示出了本申请实施例提供的调度媒体资源的装置200的结构示意图,参阅图11所示,调度媒体资源的装置200包括获取单元201和发送单元202。In the case of using an integrated unit, FIG. 11 shows a schematic structural diagram of an apparatus 200 for scheduling media resources provided by an embodiment of the present application. Referring to FIG. 11 , the apparatus 200 for scheduling media resources includes an acquiring unit 201 and a sending unit 202 .

其中,获取单元201,用于获取用户终端发送的媒体资源分片文件播放请求,以媒体资源分片文件为单位,从所述分布式存储系统的存储服务器处获取所述媒体资源分片文件播放请求所请求的媒体资源分片文件。发送单元202,用于向所述用户终端反馈所述获取单元201获取的媒体资源分片文件。Wherein, the acquiring unit 201 is configured to acquire the media resource fragment file playback request sent by the user terminal, and obtain the media resource fragment file playback request from the storage server of the distributed storage system in units of media resource fragment files. Requests the requested media resource shard file. The sending unit 202 is configured to feed back the media resource segment files acquired by the acquiring unit 201 to the user terminal.

一种可能的实施方式中,所述调度媒体资源的装置为分布式存储系统中的所述存储服务器。分布式存储系统中的调度服务器根据所述分布式存储系统中的元数据服务器中保存的媒体资源分片文件分布信息生成分片URL,所述分片URL中包括分布式存储系统中存储所述媒体资源分片文件播放请求所请求的媒体资源分片文件的存储服务器地址。所述用户终端依据分片URL向所述存储服务器发送所述媒体资源分片文件播放请求,并获取媒体资源分片文件。In a possible implementation manner, the device for scheduling media resources is the storage server in a distributed storage system. The scheduling server in the distributed storage system generates a segment URL according to the distribution information of the media resource segment file stored in the metadata server in the distributed storage system, and the segment URL includes the URL stored in the distributed storage system. The storage server address of the media resource fragment file requested by the media resource fragment file playback request. The user terminal sends the media resource fragment file play request to the storage server according to the fragment URL, and acquires the media resource fragment file.

另一种可能的实施方式中,所述调度媒体资源的装置为独立于所述存储服务器的流媒体服务器,所述流媒体服务器生成分片URL,所述分片URL中包括流媒体服务器的地址,所述用户终端依据分片URL向流媒体服务器发送所述媒体资源分片文件播放请求,并由流媒体服务器从存储服务器处获取媒体资源分片文件反馈给用户终端。In another possible implementation manner, the device for scheduling media resources is a streaming media server independent of the storage server, and the streaming media server generates a segment URL, and the segment URL includes the address of the streaming media server The user terminal sends the media resource fragment file playback request to the streaming server according to the fragment URL, and the streaming media server obtains the media resource fragment file from the storage server and feeds it back to the user terminal.

当采用硬件形式实现时,本申请实施例中,获取单元201可以是输入接口,发送单元202可以是输出接口,其中,输出接口和输入接口是统称,可以包括一个或多个接口。When implemented in the form of hardware, in the embodiment of the present application, the acquiring unit 201 may be an input interface, and the sending unit 202 may be an output interface, where the output interface and the input interface are collectively referred to and may include one or more interfaces.

当获取单元201是输入接口,发送单元202是输出接口时,本申请实施例所涉及的调度媒体资源的装置200可以为图12所示的第一服务器。其中,所述图12所示的第一服务器可以是存储服务器,也可以是流媒体服务器。When the acquiring unit 201 is an input interface and the sending unit 202 is an output interface, the apparatus 200 for scheduling media resources involved in this embodiment of the present application may be the first server shown in FIG. 12 . Wherein, the first server shown in FIG. 12 may be a storage server or a streaming media server.

图12所示为本申请实施例提供的第一服务器2000的示意图。该第一服务器2000可以用于执行图7中涉及的第一服务器的执行方法。如图12所示,所述第一服务器2000包括:输入接口2001、输出接口2002。其中,还可包括处理器2003和存储器2004。该输入接口2001、输出接口2002、处理器2003和存储器2004可以通过总线系统2005相连。FIG. 12 is a schematic diagram of the first server 2000 provided by the embodiment of the present application. The first server 2000 may be used to execute the execution method of the first server involved in FIG. 7 . As shown in FIG. 12 , the first server 2000 includes: an input interface 2001 and an output interface 2002 . Wherein, a processor 2003 and a memory 2004 may also be included. The input interface 2001 , output interface 2002 , processor 2003 and memory 2004 may be connected through a bus system 2005 .

所述存储器2004用于存储包括程序、指令或代码。所述处理器2003,用于执行所述存储器2004中的程序,以控制输入接口2001获取媒体资源播放请求、控制输出接口2002反馈媒体资源分片文件以及实施上述实施方式中第一服务器所实施的各步骤及功能,此处不再赘述。上述输入接口2001和输出接口2002的具体实施方式可以相应参考上述图11实施方式中的获取单元201以及发送单元202中的具体说明,这里不再赘述。The memory 2004 is used to store programs, instructions or codes. The processor 2003 is configured to execute the program in the memory 2004 to control the input interface 2001 to obtain a media resource playback request, control the output interface 2002 to feed back the media resource fragment file, and implement the first server in the above embodiment. The steps and functions will not be repeated here. For specific implementation manners of the above-mentioned input interface 2001 and output interface 2002, reference may be made to the specific descriptions in the acquisition unit 201 and the sending unit 202 in the implementation manner of FIG. 11 , and details are not repeated here.

可以理解的是,图10和图12仅仅示出了媒体资源写入服务器以及第一服务器的简化设计。在实际应用中,媒体资源写入服务器以及第一服务器并不限于上述结构,在实际应用中可以分别包含任意数量的接口,处理器和存储器等,而所有可以实现本申请实施例的终端都在本申请实施例的保护范围之内。It can be understood that Fig. 10 and Fig. 12 only show simplified designs of the media resource writing server and the first server. In practical applications, the media resource writing server and the first server are not limited to the above-mentioned structures, and may include any number of interfaces, processors and memories in practical applications, and all terminals that can implement the embodiments of the present application are in Within the scope of protection of the embodiments of the present application.

进一步可以理解的是,本申请实施例涉及的存储媒体资源的装置100和媒体资源写入服务器1000,以及调度媒体资源的装置200和第一服务器2000可用于实现本申请实施例上述方法实施例中媒体资源写入服务器和第一服务器的相应功能,故对于本申请实施例描述不够详尽的地方,可参阅相关方法实施例的描述,本申请实施例在此不再赘述。It can be further understood that the device 100 for storing media resources and the server 1000 for writing media resources involved in the embodiment of the present application, as well as the device 200 for scheduling media resources and the first server 2000 can be used to implement the above method embodiments of the embodiments of the present application For the corresponding functions of the media resource writing server and the first server, where the description of the embodiment of the present application is not detailed enough, you can refer to the description of the related method embodiment, and the embodiment of the present application will not repeat it here.

进一步可以理解的是,在本申请实施例中涉及的处理器可以是中央处理单元(Central Processing Unit,CPU,还可以是其他通用处理器、数字信号处理器(DSP)、专用集成电路(ASIC)、现成可编程门阵列(FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。It can be further understood that the processor involved in the embodiment of the present application may be a central processing unit (Central Processing Unit, CPU, or other general processors, digital signal processors (DSP), application specific integrated circuits (ASIC) , off-the-shelf programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.

存储器可以包括只读存储器和随机存取存储器,并向处理器提供指令和数据。存储器的一部分还可以包括非易失性随机存取存储器。例如,存储器还可以存储设备类型的信息。The memory, which can include read only memory and random access memory, provides instructions and data to the processor. A portion of the memory may also include non-volatile random access memory. For example, the memory may also store device type information.

总线系统除包括数据总线之外,还可以包括电源总线、控制总线和状态信号总线等。但是为了清楚说明起见,在图中将各种总线都标为总线系统。In addition to the data bus, the bus system can also include a power bus, a control bus, and a status signal bus. However, for the sake of clarity, the various buses are labeled as bus systems in the figures.

在实现过程中,上述方法实施例中涉及的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。结合本申请实施例所公开的报文处理方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器中,处理器读取存储器中的信息,结合其硬件完成上述方法实施例涉及的步骤。为避免重复,这里不再详细描述。In the implementation process, the various steps involved in the above method embodiments may be completed by hardware integrated logic circuits in the processor or instructions in the form of software. The steps of the message processing method disclosed in the embodiments of the present application may be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in the processor. The software module can be located in a mature storage medium in the field such as random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, register. The storage medium is located in the memory, and the processor reads the information in the memory, and completes the steps involved in the foregoing method embodiments in combination with its hardware. To avoid repetition, no detailed description is given here.

本申请实施例还提供一种分布式存储系统,该分布式存储系统包括媒体资源写入服务器、存储服务器和第一服务器。其中,所述媒体资源写入服务器为上述涉及所述存储媒体资源的装置或媒体资源写入服务器,用于获取媒体资源分片文件并以媒体资源分片文件为单位,将所述媒体资源分片文件存储至所述存储服务器。所述存储服务器,用于以媒体资源分片文件为单位,存储所述媒体资源分片文件。所述第一服务器为上述涉及的所述调度媒体资源的装置或第一服务器,用于获取用户终端发送的媒体资源分片文件播放请求,以媒体资源分片文件为单位,从所述分布式存储系统的存储服务器处获取所述媒体资源分片文件播放请求所请求的媒体资源分片文件,向所述用户终端反馈所述媒体资源分片文件。The embodiment of the present application also provides a distributed storage system, and the distributed storage system includes a media resource writing server, a storage server, and a first server. Wherein, the media resource writing server is the above-mentioned device or media resource writing server related to the storage of media resources, and is used to obtain media resource fragment files and divide the media resources into The slice files are stored to the storage server. The storage server is configured to store the media resource fragment files in units of media resource fragment files. The first server is the device for scheduling media resources or the first server involved in the above, and is used to obtain the media resource segment file playback request sent by the user terminal, and use the media resource segment file as a unit, from the distributed The storage server of the storage system obtains the media resource fragment file requested by the media resource fragment file play request, and feeds back the media resource fragment file to the user terminal.

其中,分布式存储系统中还可包括上述方法实施例中涉及的元数据服务器以及调度服务器等中的一个或多个。Wherein, the distributed storage system may further include one or more of the metadata server and the scheduling server involved in the foregoing method embodiments.

本申请提实施例还提供了一种计算机可读存储介质或者计算机程序产品,用于存储计算机程序,该计算机程序用于执行上述方法实施例中涉及的存储、调度媒体资源的方法。The embodiments of the present application also provide a computer-readable storage medium or a computer program product, which is used to store a computer program, and the computer program is used to execute the methods for storing and scheduling media resources involved in the above method embodiments.

本申请实施例提供的存储、调度媒体资源的方法、装置及分布式存储系统,媒体资源写入服务器以媒体资源能够播放的最小播放单元为单位,将媒体资源存储至存储服务器,以使用户终端在请求获取分布式存储系统中保存的某一媒体资源的最小播放单元时,分布式存储系统可直接从存储该最小播放单元的存储服务器处调度该最小播放单元并反馈给用户终端,而无需分布式存储系统各存储服务器之间搬运媒体资源,可以降低对分布式存储系统内部IP网络带宽要求,有助于提高分布式存储系统的整体性能。In the method, device, and distributed storage system for storing and scheduling media resources provided by the embodiments of the present application, the media resource writing server stores the media resources in the storage server in units of the smallest playback unit that the media resources can play, so that the user terminal When requesting to obtain the minimum playback unit of a certain media resource stored in the distributed storage system, the distributed storage system can directly schedule the minimum playback unit from the storage server storing the minimum playback unit and feed it back to the user terminal without distributing Moving media resources between storage servers in the distributed storage system can reduce the requirements for the internal IP network bandwidth of the distributed storage system and help improve the overall performance of the distributed storage system.

本领域内的技术人员应明白,本申请实施例可提供为方法、系统、或计算机程序产品。因此,本申请实施例可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请实施例可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the embodiment of the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.

本申请实施例是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。Embodiments of the present application are described with reference to flowcharts and/or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each procedure and/or block in the flowchart and/or block diagram, and a combination of procedures and/or blocks in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions may be provided to a general purpose computer, special purpose computer, embedded processor, or processor of other programmable data processing equipment to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing equipment produce a An apparatus for realizing the functions specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.

这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising instruction means, the instructions The device realizes the function specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.

这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device, causing a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process, thereby The instructions provide steps for implementing the functions specified in the flow chart or blocks of the flowchart and/or the block or blocks of the block diagrams.

显然,本领域的技术人员可以对本申请实施例进行各种改动和变型而不脱离本申请的精神和范围。这样,倘若本申请实施例的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。Apparently, those skilled in the art can make various changes and modifications to the embodiments of the present application without departing from the spirit and scope of the present application. In this way, if the modifications and variations of the embodiments of the present application fall within the scope of the claims of the present application and equivalent technologies, the present application also intends to include these modifications and variations.

Claims (15)

1. a kind of method of storage media resource, which is characterized in that be applied to distributed memory system, the distributed storage system System includes media resource write service device and storage server, the method includes:
The media resource write service device obtains media resource slicing files, wherein the media resource slicing files are matchmakers The minimum broadcast unit that body resource can play;
The media resource write service device is as unit of media resource slicing files, by the media resource fragment text of the acquisition Part is stored to the storage server, wherein stores each media resource slicing files composition media money into storage server Source.
2. the method as described in claim 1, which is characterized in that further include Metadata Service in the distributed memory system Device, the method further include:
The media resource write service device preserves media resource slicing files distributed intelligence to the meta data server, In, the media resource slicing files distributed intelligence is used to indicate media resource slicing files, divides with the storage media resource Correspondence between the storage server of piece file.
3. method as claimed in claim 1 or 2, which is characterized in that the media resource write service device is with media resource point Piece file is unit, and the media resource slicing files of the acquisition are stored to the storage server, including:
Continuous Y media resource slicing files are determined as a slicing files storage by the media resource write service device Unit, the Y are positive integer;
The media resource write service device is as unit of the slicing files storage unit, by the media resource of the acquisition point Piece file is stored to the storage server.
4. method as described in any one of claims 1 to 3, which is characterized in that store each media money into storage server Source slicing files it is of different sizes.
5. a kind of method of scheduled media resource, which is characterized in that including:
First server in distributed memory system obtains the media resource slicing files playing request that user terminal is sent;
The first server is as unit of media resource slicing files, from the storage server of the distributed memory system The requested media resource slicing files of the media resource slicing files playing request are obtained, and are fed back to the user terminal The media resource slicing files of acquisition.
6. method as claimed in claim 5, which is characterized in that the first server is described in distributed memory system Storage server;
The media resource slicing files playing request is the user terminal according to transmitted by fragment uniform resource position mark URL 's;
The fragment URL is by the dispatch server in the distributed memory system according to the member in the distributed memory system The media resource slicing files distributed intelligence that is preserved in data server generates, and includes in distributed memory system described in storage The storage server address of the requested media resource slicing files of media resource slicing files playing request.
7. method as claimed in claim 5, which is characterized in that the first server is independently of the storage server Streaming media server.
8. a kind of device of storage media resource, which is characterized in that including:
Acquiring unit, for obtaining media resource slicing files, wherein the media resource slicing files are that media resource can The minimum broadcast unit of broadcasting;
Processing unit, the media resource fragment text for as unit of media resource slicing files, the acquiring unit to be obtained Part is stored to the storage server of distributed memory system, wherein stores each media resource fragment into each storage server File forms media resource.
9. device as claimed in claim 8, which is characterized in that the processing unit is additionally operable to:
Media resource slicing files distributed intelligence is preserved to the meta data server of distributed memory system, wherein the matchmaker Body resource slicing files distributed intelligence be used to indicate media resource slicing files, with store the media resource slicing files and deposit Store up the correspondence between server.
10. device as claimed in claim 8 or 9, which is characterized in that the processing unit is provided with media in the following way Source slicing files are unit, and the media resource slicing files of the acquisition are stored to the storage server:
By continuous Y media resource slicing files, it is determined as a slicing files storage unit, the Y is positive integer;
As unit of the slicing files storage unit, the media resource slicing files of the acquisition are stored to the storage and are taken Business device.
11. such as claim 8 to 10 any one of them device, which is characterized in that store each media into storage server Resource slicing files it is of different sizes.
12. a kind of device of scheduled media resource, which is characterized in that including:
Acquiring unit, the media resource slicing files playing request for obtaining user terminal transmission, with media resource fragment text Part is unit, and media resource slicing files playing request institute is obtained from the storage server of the distributed memory system The media resource slicing files of request;
Transmission unit, for feeding back the media resource slicing files that the acquiring unit obtains to the user terminal.
13. device as claimed in claim 12, which is characterized in that the device of the scheduled media resource is distributed storage system The storage server in system;
The media resource slicing files playing request is the user terminal according to transmitted by fragment uniform resource position mark URL 's;
The fragment URL is by the dispatch server in distributed memory system according to the metadata in the distributed memory system The media resource slicing files distributed intelligence preserved in server generates, and includes that the media are stored in distributed memory system The storage server address of the requested media resource slicing files of resource slicing files playing request.
14. device as claimed in claim 12, which is characterized in that the device of the scheduled media resource is to be deposited independently of described Store up the streaming media server of server.
15. a kind of distributed memory system, which is characterized in that including media resource write service device, storage server and first Server;
The media resource write service device is the device that claim 8 to 11 any one of them stores media resource, is used for It obtains media resource slicing files and as unit of media resource slicing files, the media resource slicing files is stored to institute State storage server;
The storage server, for as unit of media resource slicing files, storing the media resource slicing files;
The first server is the device of claim 12 to 14 any one of them scheduled media resource, for obtaining user The media resource slicing files playing request that terminal is sent, as unit of media resource slicing files, from the distributed storage The requested media resource slicing files of media resource slicing files playing request are obtained at the storage server of system, to The user terminal feeds back the media resource slicing files.
CN201710296636.9A 2017-04-28 2017-04-28 Storage, the method, apparatus of scheduled media resource and distributed memory system Pending CN108810565A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710296636.9A CN108810565A (en) 2017-04-28 2017-04-28 Storage, the method, apparatus of scheduled media resource and distributed memory system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710296636.9A CN108810565A (en) 2017-04-28 2017-04-28 Storage, the method, apparatus of scheduled media resource and distributed memory system

Publications (1)

Publication Number Publication Date
CN108810565A true CN108810565A (en) 2018-11-13

Family

ID=64070453

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710296636.9A Pending CN108810565A (en) 2017-04-28 2017-04-28 Storage, the method, apparatus of scheduled media resource and distributed memory system

Country Status (1)

Country Link
CN (1) CN108810565A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110321322A (en) * 2019-07-02 2019-10-11 深信服科技股份有限公司 Data re-establishing method, device, equipment and computer readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020184637A1 (en) * 2001-05-30 2002-12-05 Perlman Stephen G. System and method for improved multi-stream multimedia transmission and processing
CN101771673A (en) * 2008-12-26 2010-07-07 华为技术有限公司 Method and device for processing media data
CN104731516A (en) * 2013-12-18 2015-06-24 腾讯科技(深圳)有限公司 Method and device for accessing files and distributed storage system
WO2015104570A1 (en) * 2014-01-10 2015-07-16 Sony Corporation Method for improving the power consumption of a mobile device during video streaming
CN105792021A (en) * 2014-12-26 2016-07-20 乐视网信息技术(北京)股份有限公司 Method and device for transmitting video stream
CN106559677A (en) * 2015-09-30 2017-04-05 华为技术有限公司 The method and device of terminal, caching server and acquisition video slicing

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020184637A1 (en) * 2001-05-30 2002-12-05 Perlman Stephen G. System and method for improved multi-stream multimedia transmission and processing
CN101771673A (en) * 2008-12-26 2010-07-07 华为技术有限公司 Method and device for processing media data
CN104731516A (en) * 2013-12-18 2015-06-24 腾讯科技(深圳)有限公司 Method and device for accessing files and distributed storage system
WO2015104570A1 (en) * 2014-01-10 2015-07-16 Sony Corporation Method for improving the power consumption of a mobile device during video streaming
CN105792021A (en) * 2014-12-26 2016-07-20 乐视网信息技术(北京)股份有限公司 Method and device for transmitting video stream
CN106559677A (en) * 2015-09-30 2017-04-05 华为技术有限公司 The method and device of terminal, caching server and acquisition video slicing

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
袁高峰、吴亚洲、薛妍妍: "超低功耗云存储系统-cStor", 《中兴通讯技术》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110321322A (en) * 2019-07-02 2019-10-11 深信服科技股份有限公司 Data re-establishing method, device, equipment and computer readable storage medium
CN110321322B (en) * 2019-07-02 2023-07-14 深信服科技股份有限公司 Data reconstruction method, device, equipment and computer readable storage medium

Similar Documents

Publication Publication Date Title
US10956601B2 (en) Fully managed account level blob data encryption in a distributed storage environment
CN110291509B (en) Method and system for storing data in areas of a distributed storage network
US10649828B2 (en) Prioritized data rebuilding in a dispersed storage network
US10372679B2 (en) File versions within content addressable storage
US10205970B2 (en) System, apparatus and method to facilitate live video streaming
RU2435206C2 (en) Reliable, efficient peer-to-peer storage
US8856552B2 (en) Directory synchronization of a dispersed storage network
US11076181B2 (en) Systems and methods for resolving manifest file discontinuities
US11416166B2 (en) Distributed function processing with estimate-based scheduler
US20120011101A1 (en) Integrating client and server deduplication systems
US10372678B2 (en) Files having unallocated portions within content addressable storage
EA031078B1 (en) Method and device for storing and processing data
JP2016510148A (en) Data processing method and device in distributed file storage system
US11416176B2 (en) Function processing using storage controllers for load sharing
CN110825552B (en) Data storage method, data recovery method, node and storage medium
US10067831B2 (en) Slice migration in a dispersed storage network
US10924275B1 (en) Creating multiple encrypted volumes from a single source
WO2019080370A1 (en) Data reading and writing method and apparatus, and storage server
US20170017401A1 (en) Redundant array of independent discs and dispersed storage network system re-director
US10802914B2 (en) Method of using common storage of parity data for unique copy recording
CN108810565A (en) Storage, the method, apparatus of scheduled media resource and distributed memory system
CN109992447B (en) Data duplication method, device and storage medium
CN111163120A (en) Data storage and transmission method and device of distributed database and storage medium
JP2019532399A (en) Data replication in scalable messaging systems
US10642687B2 (en) Pessimistic reads and other smart-read enhancements with synchronized vaults

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20181113