WO2016155599A1 - 流媒体服务与文件下载融合的方法、装置及cdn服务器 - Google Patents

流媒体服务与文件下载融合的方法、装置及cdn服务器 Download PDF

Info

Publication number
WO2016155599A1
WO2016155599A1 PCT/CN2016/077572 CN2016077572W WO2016155599A1 WO 2016155599 A1 WO2016155599 A1 WO 2016155599A1 CN 2016077572 W CN2016077572 W CN 2016077572W WO 2016155599 A1 WO2016155599 A1 WO 2016155599A1
Authority
WO
WIPO (PCT)
Prior art keywords
service
request
file
streaming media
isp
Prior art date
Application number
PCT/CN2016/077572
Other languages
English (en)
French (fr)
Inventor
郑晓川
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2016155599A1 publication Critical patent/WO2016155599A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/643Communication protocols
    • H04N21/6437Real-time Transport Protocol [RTP]

Definitions

  • the present invention relates to the field of CDN (Content Delivery Network) service technologies, and in particular, to a method, an apparatus, and a CDN server for streaming media service and file download.
  • CDN Content Delivery Network
  • the basic idea of the content distribution network CDN is to avoid the bottlenecks and links on the Internet that may affect the speed and stability of data transmission, so that the content transmission is faster and more stable.
  • the CDN system can real-time according to the network traffic and the connection, load status and resource-to-user distance of each node.
  • Comprehensive information such as response time, redirects the user's request to the node closest to the user.
  • the purpose is to enable users to obtain the required content in the vicinity, solve the congestion of the Internet network, improve the response speed of users visiting the website, and save the inter-network settlement.
  • the transmission protocol used in streaming media services includes HTTP Live Streaming (HLS), HLS. It is an HTTP-based streaming media transfer protocol implemented by Apple Inc., which enables streaming and on-demand streaming. It is mainly used in iOS systems, and provides audio and video live and on-demand solutions for iOS devices (such as iPhone and iPad).
  • HLS HTTP Live Streaming
  • Apple Inc. an HTTP-based streaming media transfer protocol implemented by Apple Inc., which enables streaming and on-demand streaming. It is mainly used in iOS systems, and provides audio and video live and on-demand solutions for iOS devices (such as iPhone and iPad).
  • HLS HTTP Live Streaming
  • the performance pressure and bandwidth pressure brought by file download can be greatly alleviated, and the download speed of the user can be improved.
  • a CDN node that provides an OTT (Over The Top) video service has no way to provide an Internet file transfer acceleration service, or vice versa.
  • OTT Over The Top
  • the OTT set-top box terminals, mobile phones, pads, and computers in the user's home are basically all under the same network wifi, but none of them can be integrated into the CDN service.
  • the technical problem to be solved by the embodiments of the present invention is to provide a method and a device for streaming media service and file downloading, and a CDN server, which realizes streaming media service acceleration and file download acceleration integration in a CDN system.
  • the responding separately according to different service specifications corresponding to each request includes:
  • determining, according to the pre-configured service request feature, whether the request belongs to a streaming media service request or a file download request, and responding to the any request by using a corresponding service specification according to the determination result including:
  • each ISP information set includes: an ISP information set corresponding to the streaming media service specification, and an ISP information set corresponding to the file download service specification;
  • the streaming media service request and the file download request sent by the client user are sent in the form of a uniform resource locator URL request;
  • the components of each ISP information set further include: service type and content.
  • the corresponding service processing module is invoked according to the service type in the ISP information set that matches the URL request;
  • the service type includes: a file downloading and a streaming media service
  • the streaming media service includes: a live broadcast, a VOD (Video On Demand, video) On-demand), TVOD (True Video-On-Demand), NVOD (Near-Video-On-Demand), or TSTV (Time-shifted Television);
  • the service processing module responds to the URL request according to the content provider identifier, the acquisition rule of the content identifier, and the acquisition rule of the file name.
  • the component of each ISP information set further includes: an authentication key;
  • the responding to the any streaming media service request or the file download request according to the matching ISP information set further includes:
  • the responding to the URL request according to the ISP information set matching the URL request also includes:
  • the file that is first downloaded is locally cached, and at least the content identifier and the file name of the matched ISP information set are determined. a first cache identifier of the file;
  • the cache identifier corresponding to the file to be downloaded by the other client user is the same as the first cache identifier, the local cache is directly The client user provides the cached file.
  • the component of each ISP information set further includes: an ISP identification code;
  • the executed process further includes:
  • the time-shifted index file is sent to the client user, and the ts index file includes the relative with the ISP identification code.
  • the ts fragment index of the path is used by the client user to resend the URL request.
  • the specific process of matching the URL request sent by the client user based on each pre-configured ISP information set is replaced by:
  • the URL request sent by the client user is matched with the pre-configured ISP information set;
  • the URL request is matched with the pre-configured ISP information sets based on the regular expression matching the URL.
  • each ISP information set further include: an ISP type, a return source parameter, a rewrite URL, and a tstv time format
  • the service processing module further includes an ISP type, a return source parameter, and Rewriting the URL, and the tstv time format, in response to the URL request.
  • the embodiment of the invention further provides a device for integrating a streaming media service and a file download, comprising:
  • a receiving module configured to receive a streaming service request and a file download request sent by the client user
  • the response module is configured to respond to the different service specifications corresponding to each request when receiving the streaming service request and the file download request sent by the client user.
  • An embodiment of the present invention further provides a CDN server, including the foregoing device for converging streaming media service and file download.
  • a computer storage medium is further provided, where the computer storage medium may store an execution instruction, where the execution instruction is used to perform the method of streaming media service and file download fusion in the foregoing embodiment.
  • the embodiment of the present invention has at least the following advantages:
  • the method and device for streaming media service and file downloading and the CDN server in the embodiment of the present invention form each ISP information block by extracting key points, and actively configuring, fuzzy matching, and accurately positioning the ISP information block.
  • the CDN server deploying the functions of the method of the present invention is compatible with streaming media services and Internet file download acceleration, that is, unified convergence acceleration. Enhanced service performance of the CDN system.
  • FIG. 1 is a flowchart of a method for streaming media service and file downloading according to a first embodiment of the present invention
  • FIG. 2 is a flowchart of a method for streaming media service and file download according to a second embodiment of the present invention
  • FIG. 3 is a schematic structural diagram of a device for synthesizing a streaming media service and a file download according to a sixth embodiment of the present invention
  • FIG. 4 is a schematic structural diagram of a fusion processing process of a CDN system according to an eighth embodiment of the present invention.
  • FIG. 5 is a schematic diagram of a general process after a user URL request is scheduled to be internal to a fusion node according to an eighth embodiment of the present invention.
  • a first embodiment of the present invention provides a method for converging a streaming media service with a file download, which can be applied to a CDN server. As shown in FIG. 1, the method includes the following specific steps:
  • Step S101 Receive a streaming service request and a file download request sent by a client user.
  • Step S102 respectively respond according to different service specifications corresponding to the received requests.
  • the step S102 includes: determining, according to the pre-configured service request feature, whether the request belongs to a streaming media service request or a file download request, according to any one of the streaming media service request and the file download request, according to The judgment result responds to any of the requests by using the corresponding service specification.
  • each ISP information set includes: an ISP information set corresponding to the streaming media service specification, and an ISP information set corresponding to the file download service specification;
  • the streaming service request and the file download request sent by the client user are sent in the form of a uniform resource locator URL request;
  • the components of each ISP information set further include: a service type, a content provider identifier, and a content identifier. Obtained Take rules, and the rules for obtaining file names;
  • the responding to the any streaming service request or the file download request according to the matched ISP information set includes:
  • the service type includes: a file downloading and a streaming media service, where the streaming media service includes: live broadcast, video on demand VOD, real video on demand TVOD, near-video on-demand NVOD, or time-shifted TV TSTV;
  • the service processing module responds to the URL request according to the content provider identifier, the acquisition rule of the content identifier, and the acquisition rule of the file name.
  • the second embodiment of the present invention a method for converging a streaming media service and a file download, can be applied to a CDN server, and the method in the embodiment is consistent with the basic idea of the method in the first embodiment, as shown in FIG. 2
  • the method includes the following specific steps:
  • step S201 each ISP information block is pre-configured.
  • each ISP information block includes: an ISP information block corresponding to different streaming media service specifications, and an ISP information block corresponding to different file download service specifications (similar to the ISP information in the first embodiment) Set concept).
  • the various streaming media service specifications supported by the embodiments of the present invention are all streaming media services based on the HLS protocol.
  • the pre-configured components of each ISP information block include: a regular expression matching the URL, a service type, a content provider identifier, an acquisition rule of the content identifier, and an acquisition rule of the file name.
  • the service type includes: a file download and a streaming service
  • the streaming service includes: VOD, TVOD, NVOD, or TSTV.
  • Step S202 matching URL requests sent by client users based on pre-configured ISP information blocks
  • step S202 includes:
  • the URL request sent by the client user is matched with each ISP information block based on the regular expression of the matching URL in each pre-configured ISP information.
  • Step S203 responding to the URL request according to an ISP information block that matches the URL request.
  • step S203 includes:
  • the corresponding service processing module is called according to the service type in the ISP information block that matches the URL request.
  • the service type in each ISP information block can be obtained from the URL request sent by the client user.
  • the service type acquisition rule is set in the ISP information block; or the service type has been configured into the regular expression of the matching URL.
  • the service type information can be determined.
  • the service processing module responds to the URL request according to the content provider identifier, the acquisition rule of the content identifier, and the acquisition rule of the file name.
  • the obtaining rule of the content identifier and the obtaining rule of the file name are respectively used to indicate how to obtain the content identifier from the URL request sent by the client user, and how to obtain the file name from the URL request sent by the client user. Since the specific processing procedure of each service processing module for responding to the URL request sent by the client user is an existing function of the CDN server, it will not be described in detail herein.
  • the component of each ISP information block further includes: an ISP type, a return source parameter, a rewrite URL, and an extension parameter such as a tstv time format, where the service processing module is further configured according to an ISP.
  • the type, the return source parameter, the rewrite URL, and the tstv time format are responsive to the URL request.
  • the ISP type can be a file download tag and a streaming service tag.
  • the return source parameters include: a return source type and a return source URL rule, and the return source refers to acquiring and saving resources from the edge CDN server to the provincial center CND server or to the source station. Rewrite the URL, the URL to fill in when the CDN server changes the URL request address.
  • a computer storage medium is further provided, where the computer storage medium may store an execution instruction, where the execution instruction is used to perform the method of streaming media service and file download fusion in the foregoing embodiment.
  • a third embodiment of the present invention is a method for merging a streaming media service and a file download.
  • the method in this embodiment is substantially the same as the second embodiment.
  • the difference is that the component of each ISP information block further includes: authentication secret. key;
  • step S203 according to the ISP information block that matches the URL request, responding to the URL request, the method further includes:
  • the authentication information carried in the URL request is performed based on the authentication key in the matched ISP information block. Decryption; verify the decrypted authentication information.
  • the authentication information includes: a client user IP address, a content identifier, and an expiration date of the URL request.
  • a fourth embodiment of the present invention is a method for merging a streaming media service with a file download.
  • the method in this embodiment is substantially the same as the second embodiment or the third embodiment, except that the step S203 is based on the URL.
  • the requesting the matched ISP information block, in response to the URL request specifically includes:
  • A3 if the URL request sent by the client user belongs to the service type of the file download and has responded, at least the content identifier and the file in the matched ISP information block are simultaneously cached while the first downloaded file is locally cached. Name identifying the first cache identifier of the file;
  • A4 when receiving a URL request sent by another client user belongs to the file download service type, if the cache identifier corresponding to the file requested by the URL request sent by the other client user is the same as the first cache identifier, then directly from the URL identifier Providing the cached file to the client user locally further speeds up the file download service for the client user.
  • the manner of determining the cache identifier corresponding to the file to be downloaded by the URL requesting by the other client user is also determined according to the content identifier and the file name in the matched ISP information block.
  • a fifth embodiment of the present invention is a method for converging a streaming media service with a file download.
  • the method in this embodiment is substantially the same as the second, third, or fourth embodiment, except that the components of each ISP information block are Also includes: ISP identification code;
  • the executed process further includes:
  • the URL request sent by the client user belongs to the service type of the streaming service, send a ts (Time-shifted) index file to the client user, where the ts index file includes a relative path with the ISP identification code.
  • the ts fragment index is used by the client user to resend the URL request.
  • the CDN server when responding to the streaming media service, sends the ts index file to the client user in the form of a list, and the client user requests the corresponding streaming media from the CDN server according to each ts index file in the list. Fragmentation, the ts index file is improved in the embodiment of the present invention, in which the ISP identification code is added, and each ts fragment index with a relative path of the ISP identification code is formed, for the client user to resend the URL request. If used, the URL request sent by the client user will carry the information of the ISP identification code.
  • the function of adding the ISP identification code is: the CDN server will use the ISP identification code in the URL request and the ISP information block. The ISP identification code is compared to directly determine the previously matched ISP information block, and the matching is not performed based on the regular expression matching the URL, thereby further shortening the matching time.
  • the specific process of matching the URL request sent by the client user by using the pre-configured ISP information block according to the step S202 in the foregoing embodiment is performed by the pre-configured ISP information.
  • the URL request sent by the client user is matched with the pre-configured ISP information block based on the ISP identification code;
  • the URL request is matched with the pre-configured ISP information blocks based on the regular expression matching the URL.
  • the sixth embodiment of the present invention corresponds to the second, third, fourth, or fifth embodiment.
  • This embodiment introduces a device for converging a streaming media service with a file download, and preferably introduces a situation corresponding to the first embodiment.
  • the device includes the following components:
  • the configuration module 100 is configured to pre-configure each ISP information block
  • each ISP information block includes: a regular expression matching the URL, a service type, a content provider identifier, an acquisition rule of the content identifier, and an acquisition rule of the file name;
  • the matching module 200 is configured to match the URL request sent by the client user according to each pre-configured ISP information block;
  • the ISP information block includes: an ISP information block corresponding to different streaming media service specifications, and One-to-one correspondence with different file download service specifications;
  • the matching module 200 matches the URL request sent by the client user with each pre-configured ISP information block based on the regular expression matching the URL.
  • the response module 300 is configured to respond to the URL request based on an ISP information block that matches the URL request.
  • the response module 300 is configured to invoke a corresponding service processing module according to the service type in the ISP information block that matches the URL request;
  • the service type includes: a file download and a streaming media service, where the streaming media service includes: VOD, TVOD, NVOD, or TSTV;
  • the service processing module responds to the URL request according to the content provider identifier, the acquisition rule of the content identifier, and the acquisition rule of the file name.
  • the service processing module 400 respectively corresponds to different service types, and is configured to provide file download acceleration or streaming service acceleration processing for the client user based on the acceleration capability layer and the storage capability layer of the CDN server.
  • the service processing module 400 functions as a function module for providing file download acceleration or streaming service acceleration processing in the CDN server. In the embodiment of the present invention, its function is not changed, but is provided in a CDN server. Coming out, called in response to a URL request for a different service type.
  • the response module 300 in the apparatus is further configured to: before calling the corresponding service processing module according to the service type in the ISP information block matching the URL request, based on the The authentication key in the matched ISP information block decrypts the authentication information carried in the URL request; and performs verification on the decrypted authentication information.
  • the authentication information includes: a client user IP address, a content identifier, and an expiration date of the URL request.
  • the response module 300 in the device is further configured to: if the URL request issued by the client user belongs to the service type of the file download and has responded, the first download is performed. While the file is locally cached, the first cache identifier of the file is determined according to at least the content identifier and the file name in the matched ISP information block;
  • the cache identifier corresponding to the file to be downloaded by the other client user is the same as the first cache identifier, the local cache is directly The client user provides the cached file, further speeding up the file download service for client users.
  • the manner of determining the cache identifier corresponding to the file to be downloaded by the URL requesting by the other client user is also determined according to the content identifier and the file name in the matched ISP information block.
  • each ISP information block further includes: an ISP identification code; the service processing module 400 in the device provides file download acceleration for the client user in response to the URL request. Or in the process of speeding up the processing of streaming media services, it is also specifically used to:
  • the URL request sent by the client user belongs to the service type of the streaming service, send a ts (Time-shifted) index file to the client user, where the ts index file includes a relative path with the ISP identification code.
  • the ts fragment index is used by the client user to resend the URL request.
  • the CDN server when responding to the streaming media service, sends the ts index file to the client user in the form of a list, and the client user requests the corresponding streaming media from the CDN server according to each ts index file in the list. Fragmentation, the ts index file is improved in the embodiment of the present invention, in which the ISP identification code is added, and each ts fragment index with a relative path of the ISP identification code is formed, for the client user to resend the URL request. If used, the URL request sent by the client user will carry the information of the ISP identification code.
  • the role of adding the ISP identification code is: the CDN server will be based on The ISP identification code in the URL request is compared with the ISP identification code in each ISP information block to directly determine the previously matched ISP information block, and the matching is further performed based on the regular expression matching the URL, thereby further shortening the matching. time.
  • the specific function of the matching module 200 is performed by a URL expression requesting a client user and each ISP information block based on a regular expression of a matching URL in each pre-configured ISP information.
  • Match replace with:
  • the URL request sent by the client user is matched with the pre-configured ISP information block based on the ISP identification code;
  • the URL request is matched with the pre-configured ISP information blocks based on the regular expression matching the URL.
  • the present embodiment is based on the sixth embodiment, and a CDN server is described.
  • a plurality of the CDN servers constitute a CDN system as a CDN node, and the CDN server includes the streaming media in the sixth embodiment.
  • the terminal of this embodiment can be understood as a physical device.
  • the client user OTT box requests OTT video on demand as the streaming media service instance 1, and the client user requests to download an application as the file in the appstore.
  • Example 2 of the download an application example of the present invention will be described with reference to Figs.
  • FIG. 4 is a structural diagram of a fusion processing of a CDN system according to the embodiment.
  • an operation and maintenance system in a CDN system sends information including an ISP configuration to a fusion node (ie, a CDN server) through a unified management interface;
  • the ISP identification module ie, the matching module in the fifth embodiment
  • the ISP identification module is used to distinguish the OTT video on demand service from the file download service, and then the corresponding OTT service is invoked.
  • Module and file download service module (the two modules of the OTT service module and the file download service module are equivalent to the service processing module in the fifth embodiment), and each service module realizes the convergence acceleration through the common acceleration capability layer and the storage capability layer. .
  • FIG. 5 is a general process after the user URL request is scheduled to be internal to the fusion node according to the embodiment. As shown in FIG. 5, the process is as follows:
  • S1 The user requests to enter a unified entrance
  • the ISP identification module traverses in the ISP configuration information according to the request url and the regular expression (urlfrom) of the matching URL in each ISP information block, and the regularity matches the corresponding ISP information block, and the information block includes the following information: ISP type (isptype), ISP identification code (ispcode), service type (servicetype), content provider identifier (cpid), content identification acquisition rule (cidurl), and file name acquisition rule (filenameurl), return source type (upstreamtype) , the source request URL URL (upstreamurl), and some other internal private field information, such as time format matching rules.
  • S4 Enter different processing hooks (a certain Handler) according to the service type (servicetype) in the ISP information block.
  • the servicetype mainly includes download, vod, tvod, tstv, nvod, and the like.
  • the direction and special processing of the video service business process, according to the information in the ISP configuration block, the necessary and necessary processing is provided, and the user is provided with high-quality services accurately.
  • the embodiment of the present invention also provides a kind of HLS video service, which can reduce the pressure on the server.
  • the ispcode mechanism for improving the user experience is described as follows: When the user requests the ts index file for video playback, if the exact ISP information block matching and anti-theft chain check are obtained, the ts index file returned to the user will be actively activated. Add an ispcode field, which is actually the md5 value of the urlfrom string. When the user requests it again, it will first match according to the ispcode. There is no need to perform regular fuzzy matching, content identification (cid) calculation, anti-theft chain verification, etc. In this way, the request pressure of the ts fragment is alleviated. Since the user plays the video once, most of the requests are ts fragment requests, which greatly reduces the pressure on the server and improves the user's playback experience.
  • S6 Perform source or relay processing according to the source/relay configuration.
  • Embodiment 1 An application scenario in which a client user OTT box requests OTT video on demand.
  • ISP information configuration for the fusion node is as follows:
  • ISP type is ottcache
  • ISP identification code authentication key
  • video service type content provider identifier
  • content identification acquisition rule file name acquisition rule
  • tstv time format tstv time format.
  • the client user's URL request is:
  • the urlfrom field is fuzzy matched to the ISP information block, the corresponding isptype is ottcache, and the ispcode is 9f14f26664a0ffc79efdbefc53fc8ccb.
  • the url format is the China Telecom specification, and enters the anti-theft chain module, the Authinfo and version brought by the url, and the corresponding key, the AES128 decryption and the validity of the user IP, the content identification CID, and the validity period of the request. Test. It is assumed here that the check is passed.
  • the Vodhandler processing module is executed to perform related processing of the on-demand service.
  • the rewriting of the ts index file mentioned in the embodiment of the present invention to increase the ISPcode field is completed in the module, and is returned to the client user with the relative ISPcode.
  • the ts index file of the path such as:
  • the fusion node When the user requests the ts fragment according to the above ts index file, the fusion node will omit the regular fuzzy matching according to the ispcode, directly obtain the previously matched ISP information block, and enter the Vodhandler for processing.
  • Embodiment 2 A client user requests to download an application scenario of an application in an appstore.
  • the ISP information is configured for the fusion node, as follows
  • ISP type is webcache
  • ISP identification code authentication key
  • file download service type content provider ID
  • content ID acquisition rule file name acquisition rule
  • tstv time format tstv time format.
  • the client user's URL request is:
  • the urlfrom field is fuzzy matched to the ISP information block, the corresponding isptype is webcache, and the ispcode is f3f962c217afce6af3b83da48f558e71.
  • the DownloadHandler processing module is inserted, and the cached identifier cachekey of the app is spelled out according to the obtained content identifier and the file name in the ISP information block.
  • the method in the embodiment of the present invention can be filtered out. Apple's own anti-theft chain information downloadKey enables different user requests in the same converged node to accurately match the unique content based on the comparison of the cached identifiers, providing a high-quality CDN file transfer acceleration service.
  • the method and device for synthesizing the streaming media service and the file downloading and the CDN server in the embodiment of the present invention form a ISP information block (or an ISP information set) by extracting key points, and actively adopting the ISP information block.
  • the configuration, fuzzy matching, and precise positioning enable the CDN server deploying the functions of the method of the present invention to be compatible with streaming media services and Internet file download acceleration, that is, unified convergence acceleration. Enhanced service performance of the CDN system.
  • the method and device for streaming media service and file downloading and the CDN server in the embodiment of the present invention form each ISP information block by extracting key points, and actively configuring, fuzzy matching, and accurately positioning the ISP information block.
  • the CDN server deploying the functions of the method of the present invention is compatible with streaming media services and Internet file download acceleration, that is, unified convergence acceleration. Enhanced service performance of the CDN system.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本发明提出了一种流媒体服务与文件下载融合的方法、装置及CDN服务器,该方法包括:当接收到客户端用户发出的流媒体服务请求和文件下载请求,按照各请求对应的不同服务规范分别进行响应。本发明通过将关键点识提炼出来形成各ISP信息块,通过对该ISP信息块的主动配置、模糊匹配、精确定位,使得部署了本发明所述方法功能的CDN服务器同时兼容流媒体服务和互联网文件下载加速,即统一融合加速。增强了CDN系统的加速服务性能。

Description

流媒体服务与文件下载融合的方法、装置及CDN服务器 技术领域
本发明涉及CDN(Content Delivery Network,内容分发网络)服务技术领域,尤其涉及一种流媒体服务与文件下载融合的方法、装置及CDN服务器。
背景技术
内容分发网络CDN的基本思路是尽可能避开互联网上有可能影响数据传输速度和稳定性的瓶颈和环节,使内容传输的更快、更稳定。通过在网络各处放置节点即CDN服务器所构成的在现有的互联网基础之上的一层智能虚拟网络,CDN系统能够实时地根据网络流量和各节点的连接、负载状况以及资源到用户的距离和响应时间等综合信息,将用户的请求重新导向离用户最近的节点上。其目的是使用户可就近取得所需内容,解决Internet网络拥挤的状况,提高用户访问网站的响应速度,节省网间结算。
目前CDN服务的类型根据其服务的内容主要分为网页加速、流媒体服务、文件下载加速和应用协议加速4类,其中,流媒体服务中采用的传输协议包含HTTP Live Streaming(简称HLS),HLS是苹果公司(Apple Inc.)实现的基于HTTP的流媒体传输协议,可实现流媒体的直播和点播,起初主要应用在iOS系统,为iOS设备(如iPhone、iPad)提供音视频直播和点播方案,目前越来越多的视频服务器和安卓终端采用HLS协议为用户提供优质的流媒体服务,因此,随着互联网业务的发展,大量视频网站的涌现,流媒体流量随之迅速攀升,从而驱动了CDN的应用重点也逐步转向为流媒体服务加速。
通过使用CDN系统的节点提供文件下载加速,可大大缓解文件下载带来的性能压力和带宽压力,提高用户的下载速度。主要用于补丁发布、病毒库更新、游戏客户端下载,尤其是可以为现在各种安卓市场、appstore提高移动客户端安装文件的下载加速。
现有的CDN系统中,提供了OTT(Over The Top,开放互联网)视频服务的CDN节点没有办法提供互联网文件传输加速服务,或者反之。在移动互联网时代,往往多种业务是相互融合、界限模糊的,且用户家中OTT机顶盒终端、手机、pad、电脑,基本都在同一个网络wifi下,然而却没有一种可以融合CDN服务中的流媒体服务加速与文件下载加速于一体的方案。
发明内容
本发明实施例要解决的技术问题是,提供一种流媒体服务与文件下载融合的方法、装置及CDN服务器,在CDN系统中实现流媒体服务加速与文件下载加速融合。
本发明实施例采用的技术方案是,所述流媒体服务与文件下载融合的方法,包括:
当接收到客户端用户发出的流媒体服务请求和文件下载请求,按照各请求对应的不同服务规范分别进行响应。
在本发明实施例中,所述按照各请求对应的不同服务规范分别进行响应,包括:
针对所述流媒体服务请求和文件下载请求中的任一请求,基于预先配置的服务请求特征判断所述任一请求是属于流媒体服务请求还是文件下载请求,根据判断结果采用相应的服务规范对所述任一请求进行响应。
在本发明实施例中,基于预先配置的服务请求特征判断所述任一请求是属于流媒体服务请求还是文件下载请求,根据判断结果采用相应的服务规范对所述任一请求进行响应,包括:
针对任一流媒体服务请求或文件下载请求,基于预先配置的各ISP(Internet Service Provider,互联网服务提供商)信息集中的匹配URL(Uniform Resource Locator,统一资源定位器)的正则表达式,对所述任一流媒体服务请求或所述文件下载请求进行匹配;各ISP信息集,包括:与流媒体服务规范对应的ISP信息集、以及与文件下载服务规范对应的ISP信息集;
根据匹配上的ISP信息集,对所述任一流媒体服务请求或所述文件下载请求进行响应。
在本发明实施例中,所述客户端用户发出的流媒体服务请求和文件下载请求均以统一资源定位器URL请求的形式发出;每个ISP信息集的组成部分,还包括:服务类型、内容提供商标识、内容标识的获取规则、以及文件名的获取规则;
所述根据匹配上的ISP信息集,对所述任一流媒体服务请求或所述文件下载请求进行响应,包括:
根据与所述URL请求匹配的ISP信息集中的服务类型调用相应的业务处理模块;所述服务类型包括:文件下载和流媒体服务,所述流媒体服务包括:直播、VOD(Video On Demand,视频点播)、TVOD(True Video-On-Demand,真实视频点播)、NVOD(Near-Video-On-Demand,就近式视频点播)、或者TSTV(Time-shifted Television,时移电视);
由所述业务处理模块根据内容提供商标识、内容标识的获取规则、以及文件名的获取规则,响应所述URL请求。
在本发明实施例中,每个ISP信息集的组成部分,还包括:认证密钥;
所述根据匹配上的ISP信息集,对所述任一流媒体服务请求或所述文件下载请求进行响应,还包括:
在根据与所述URL请求匹配的ISP信息集中的服务类型调用相应的业务处理模块之前,基于所述匹配的ISP信息集中的认证密钥对所述URL请求中携带的认证信息进行解密;对解密后的认证信息进行校验。
在本发明实施例中,所述根据与所述URL请求匹配的ISP信息集,响应所述URL请求, 还包括:
若客户端用户发出的URL请求属于文件下载的服务类型、且已进行响应,则在对首次下载的文件进行本地缓存的同时,至少根据所述匹配的ISP信息集中的内容标识和文件名确定出所述文件的第一缓存标识;
当收到其他客户端用户发出的URL请求属于文件下载服务类型时,若所述其他客户端用户发出的URL请求所需下载的文件对应的缓存标识与第一缓存标识相同,则直接从本地为客户端用户提供已缓存的所述文件。
在本发明实施例中,每个ISP信息集的组成部分,还包括:ISP标识码;
业务处理模块响应所述URL请求的过程中,所执行的流程还具体包括:
若客户端用户发出的URL请求属于流媒体服务的服务类型,则向客户端用户发送时移ts(Time-shifted,时移)索引文件,所述ts索引文件中包含带有ISP标识码的相对路径的ts分片索引,供客户端用户再发来URL请求时使用。
在本发明实施例中,基于预先配置的各ISP信息集对客户端用户发出的URL请求进行匹配的具体过程替换为:
基于ISP识别码,对客户端用户发出的URL请求与预先配置的各ISP信息集进行匹配;
当匹配失败时,基于匹配URL的正则表达式,对所述URL请求与预先配置的各ISP信息集进行匹配。
在本发明实施例中,每个ISP信息集的组成部分,还包括:ISP类型、回源参数、重写URL、以及tstv时间格式,供所述业务处理模块还根据ISP类型、回源参数、重写URL、以及tstv时间格式,响应所述URL请求。
本发明实施例还提供一种流媒体服务与文件下载融合的装置,包括:
接收模块,设置为接收客户端用户发出的流媒体服务请求和文件下载请求;
响应模块,设置为当接收到客户端用户发出的流媒体服务请求和文件下载请求时,按照各请求对应的不同服务规范分别进行响应。
本发明实施例还提供一种CDN服务器,包括上述的流媒体服务与文件下载融合的装置。
在本发明实施例中,还提供了一种计算机存储介质,该计算机存储介质可以存储有执行指令,该执行指令用于执行上述实施例中的流媒体服务与文件下载融合的方法。
采用上述技术方案,本发明实施例至少具有下列优点:
本发明实施例所述流媒体服务与文件下载融合的方法、装置及CDN服务器,通过将关键点识提炼出来形成各ISP信息块,通过对该ISP信息块的主动配置、模糊匹配、精确定位,使得部署了本发明所述方法功能的CDN服务器同时兼容流媒体服务和互联网文件下载加速,即统一融合加速。增强了CDN系统的加速服务性能。
附图说明
图1为本发明第一实施例的流媒体服务与文件下载融合的方法流程图;
图2为本发明第二实施例的流媒体服务与文件下载融合的方法流程图;
图3为本发明第六实施例的流媒体服务与文件下载融合的装置组成结构示意图;
图4为本发明第八实施例的CDN系统的融合处理结构图示意图;
图5为本发明第八实施例用户URL请求被调度到融合节点内部后的通用流程示意图。
具体实施方式
为更进一步阐述本发明为达成预定目的所采取的技术手段及功效,以下结合附图及较佳实施例,对本发明进行详细说明如后。
本发明第一实施例,一种流媒体服务与文件下载融合的方法,可以应用在CDN服务器上实施,如图1所示,该方法包括以下具体步骤:
步骤S101,接收客户端用户发出的流媒体服务请求和文件下载请求;
步骤S102,按照接收到的各请求对应的不同服务规范分别进行响应。
具体的,步骤S102,包括:针对所述流媒体服务请求和文件下载请求中的任一请求,基于预先配置的服务请求特征判断所述任一请求是属于流媒体服务请求还是文件下载请求,根据判断结果采用相应的服务规范对所述任一请求进行响应。
在本发明实施例中,在步骤S102中,针对任一流媒体服务请求或文件下载请求,基于预先配置的各ISP信息集中的匹配URL的正则表达式,对所述任一流媒体服务请求或所述文件下载请求进行匹配;各ISP信息集,包括:与流媒体服务规范对应的ISP信息集、以及与文件下载服务规范对应的ISP信息集;
根据匹配上的ISP信息集,对所述任一流媒体服务请求或所述文件下载请求进行响应。
所述客户端用户发出的流媒体服务请求和文件下载请求均以统一资源定位器URL请求的形式发出;每个ISP信息集的组成部分,还包括:服务类型、内容提供商标识、内容标识的获 取规则、以及文件名的获取规则;
更进一步的,所述根据匹配上的ISP信息集,对所述任一流媒体服务请求或所述文件下载请求进行响应,包括:
根据与所述URL请求匹配的ISP信息集中的服务类型调用相应的业务处理模块;所述服务类型包括:文件下载和流媒体服务,所述流媒体服务包括:直播、视频点播VOD、真实视频点播TVOD、就近式视频点播NVOD、或者时移电视TSTV;
由所述业务处理模块根据内容提供商标识、内容标识的获取规则、以及文件名的获取规则,响应所述URL请求。
本发明第二实施例,一种流媒体服务与文件下载融合的方法,可以应用在CDN服务器上实施,本实施例所述方法与第一实施例所述方法的基本思路一致,如图2所示,该方法包括以下具体步骤:
步骤S201,预先配置各ISP信息块。
具体的,所述各ISP信息块包括:与不同流媒体服务规范一一对应的ISP信息块、以及与不同的文件下载服务规范一一对应ISP信息块(类似于第一实施例中的ISP信息集的概念)。本发明实施例做支持的各种不同的流媒体服务规范均是基于HLS协议的流媒体服务。
预先配置的每个ISP信息块的组成部分,均包括:匹配URL的正则表达式、服务类型、内容提供商标识、内容标识的获取规则、以及文件名的获取规则。
所述服务类型包括:文件下载和流媒体服务,所述流媒体服务包括:VOD、TVOD、NVOD、或者TSTV。
步骤S202,基于预先配置的各ISP信息块对客户端用户发出的URL请求进行匹配;
具体的,步骤S202包括:
基于预先配置的各ISP信息中的匹配URL的正则表达式,对客户端用户发出的URL请求与各ISP信息块进行匹配。
步骤S203,根据与所述URL请求匹配的ISP信息块,响应所述URL请求。
具体的,步骤S203包括:
A1:根据与所述URL请求匹配的ISP信息块中的服务类型调用相应的业务处理模块。各ISP信息块中的服务类型可以从客户端用户发来的URL请求中获取,此时,ISP信息块中设置有服务类型的获取规则;或者,服务类型已经配置入所述匹配URL的正则表达式中,此时,通过将预先配置的各ISP信息块对客户端用户发出的URL请求进行匹配,就可以确定出服务类型信息了。
A2:由所述业务处理模块根据内容提供商标识、内容标识的获取规则、以及文件名的获取规则,响应所述URL请求。其中,内容标识的获取规则、以及文件名的获取规则分别用于指示怎样从客户端用户发来的URL请求中获取内容标识、以及怎样从客户端用户发来的URL请求中获取文件名。由于各业务处理模块对于客户端用户发来的URL请求进行响应处理的具体处理过程是CDN服务器的现有功能,故此处不详述。
优选的,在本发明实施例中,每个ISP信息块的组成部分,还包括:ISP类型、回源参数、重写URL、以及tstv时间格式等扩展参数,供所述业务处理模块还根据ISP类型、回源参数、重写URL、以及tstv时间格式,响应所述URL请求。其中,ISP类型可以为文件下载标签和流媒体服务标签。回源参数包括:回源类型、回源URL的规则,回源是指从边缘CDN服务器向省中心CND服务器或者向源站获取并保存资源。重写URL、用于当CDN服务器更改URL请求地址时填写的URL。
在本发明实施例中,还提供了一种计算机存储介质,该计算机存储介质可以存储有执行指令,该执行指令用于执行上述实施例中的流媒体服务与文件下载融合的方法。
本发明第三实施例,一种流媒体服务与文件下载融合的方法,本实施例所述方法与第二实施例大致相同,区别在于,每个ISP信息块的组成部分,还包括:认证密钥;
步骤S203所述根据与所述URL请求匹配的ISP信息块,响应所述URL请求,还具体包括:
在步骤A1根据与所述URL请求匹配的ISP信息块中的服务类型调用相应的业务处理模块之前,基于所述匹配的ISP信息块中的认证密钥对所述URL请求中携带的认证信息进行解密;对解密后的认证信息进行校验。认证信息包括:客户端用户IP地址、内容标识、所述URL请求的有效期。
本发明第四实施例,一种流媒体服务与文件下载融合的方法,本实施例所述方法与第二实施例或者第三实施例大致相同,区别在于,步骤S203所述根据与所述URL请求匹配的ISP信息块,响应所述URL请求,还具体包括:
A3,若客户端用户发出的URL请求属于文件下载的服务类型、且已进行响应,则在对首次下载的文件进行本地缓存的同时,至少根据所述匹配的ISP信息块中的内容标识和文件名确定出所述文件的第一缓存标识;
A4,当收到其他客户端用户发出的URL请求属于文件下载服务类型时,若所述其他客户端用户发出的URL请求所需下载的文件对应的缓存标识与第一缓存标识相同,则直接从本地为客户端用户提供已缓存的所述文件,进一步加快了为客户端用户提供文件下载服务的速度。所述其他客户端用户发出的URL请求所需下载的文件对应的缓存标识的确定方式,也是根据所述匹配的ISP信息块中的内容标识和文件名确定出来的。
本发明第五实施例,一种流媒体服务与文件下载融合的方法,本实施例所述方法与第二、第三或者第四实施例大致相同,区别在于,每个ISP信息块的组成部分,还包括:ISP标识码;
步骤A2中业务处理模块响应所述URL请求的过程中,所执行的流程还具体包括:
若客户端用户发出的URL请求属于流媒体服务的服务类型,则向客户端用户发送ts(Time-shifted,时移)索引文件,所述ts索引文件中包含带有ISP标识码的相对路径的ts分片索引,供客户端用户再发来URL请求时使用。
具体的,CDN服务器在响应流媒体服务时,是以列表的形式向客户端用户发送ts索引文件,供额客户端用户基于列表中的各ts索引文件来向CDN服务器请求相应的流媒体的ts分片,本发明实施例对ts索引文件做了改进,在其中加入了ISP标识码,形成了带有ISP标识码的相对路径的各ts分片索引,供客户端用户再发来URL请求时使用,那么客户端用户再发来的URL请求中就会携带有ISP标识码的信息了,加入ISP标识码的作用是:CDN服务器会根据URL请求中的ISP标识码与各ISP信息块中的ISP标识码进行比对以直接确定出之前匹配到的ISP信息块,而不用再基于匹配URL的正则表达式进行匹配了,进一步缩短了匹配的时间。
进一步的,作为一种可选的技术方案,将前述实施例中的步骤S202基于预先配置的各ISP信息块对客户端用户发出的URL请求进行匹配的具体过程,由基于预先配置的各ISP信息中的匹配URL的正则表达式,对客户端用户发出的URL请求与各ISP信息块进行匹配,替换成:
基于ISP识别码,对客户端用户发出的URL请求与预先配置的各ISP信息块进行匹配;
当匹配失败时,再基于匹配URL的正则表达式,对所述URL请求与预先配置的各ISP信息块进行匹配。
本发明第六实施例,与第二、第三、第四、或者第五实施例对应,本实施例介绍一种流媒体服务与文件下载融合的装置,首选介绍与第一实施例对应的情况,如图3所示,该装置包括以下组成部分:
1)配置模块100,设置为预先配置各ISP信息块;
具体的,每个ISP信息块的组成部分,包括:匹配URL的正则表达式、服务类型、内容提供商标识、内容标识的获取规则、以及文件名的获取规则;
2)匹配模块200,设置为基于预先配置的各ISP信息块对客户端用户发出的URL请求进行匹配;所述各ISP信息块包括:与不同流媒体服务规范一一对应的ISP信息块、以及与不同的文件下载服务规范一一对应ISP信息块;
具体的,匹配模块200基于匹配URL的正则表达式,对客户端用户发出的URL请求与预先配置的各ISP信息块进行匹配。
3)响应模块300,设置为根据与所述URL请求匹配的ISP信息块,响应所述URL请求。
具体的,响应模块300设置为根据与所述URL请求匹配的ISP信息块中的服务类型调用相应的业务处理模块;所述服务类型包括:文件下载和流媒体服务,所述流媒体服务包括:VOD、TVOD、NVOD、或者TSTV;
由所述业务处理模块根据内容提供商标识、内容标识的获取规则、以及文件名的获取规则,响应所述URL请求。
4)业务处理模块400,与不同的服务类型分别对应,用以基于CDN服务器的加速能力层以及存储能力层为客户端用户提供文件下载加速或者流媒体服务加速处理。具体的,业务处理模块400作为CDN服务器中现有的提供文件下载加速或者流媒体服务加速处理的功能模块,在本发明实施例中其本身的功能并没有改变,而是在一个CDN服务器中提供出来,为响应不同服务类型的URL请求而被调用。
然后,介绍与第二实施例对应的情况,该装置中的响应模块300还设置为:在根据与所述URL请求匹配的ISP信息块中的服务类型调用相应的业务处理模块之前,基于所述匹配的ISP信息块中的认证密钥对所述URL请求中携带的认证信息进行解密;对解密后的认证信息进行校验。认证信息包括:客户端用户IP地址、内容标识、所述URL请求的有效期。
接下来,介绍与第三实施例对应的情况,该装置中的响应模块300还设置为:若客户端用户发出的URL请求属于文件下载的服务类型、且已进行响应,则在对首次下载的文件进行本地缓存的同时,至少根据所述匹配的ISP信息块中的内容标识和文件名确定出所述文件的第一缓存标识;
当收到其他客户端用户发出的URL请求属于文件下载服务类型时,若所述其他客户端用户发出的URL请求所需下载的文件对应的缓存标识与第一缓存标识相同,则直接从本地为客户端用户提供已缓存的所述文件,进一步加快了为客户端用户提供文件下载服务的速度。所述其他客户端用户发出的URL请求所需下载的文件对应的缓存标识的确定方式,也是根据所述匹配的ISP信息块中的内容标识和文件名确定出来的。
接下来,介绍与第四实施例对应的情况,每个ISP信息块的组成部分,还包括:ISP标识码;该装置中的业务处理模块400响应所述URL请求为客户端用户提供文件下载加速或者流媒体服务加速处理的过程中,还具体用于:
若客户端用户发出的URL请求属于流媒体服务的服务类型,则向客户端用户发送ts(Time-shifted,时移)索引文件,所述ts索引文件中包含带有ISP标识码的相对路径的ts分片索引,供客户端用户再发来URL请求时使用。
具体的,CDN服务器在响应流媒体服务时,是以列表的形式向客户端用户发送ts索引文件,供额客户端用户基于列表中的各ts索引文件来向CDN服务器请求相应的流媒体的ts分片,本发明实施例对ts索引文件做了改进,在其中加入了ISP标识码,形成了带有ISP标识码的相对路径的各ts分片索引,供客户端用户再发来URL请求时使用,那么客户端用户再发来的URL请求中就会携带有ISP标识码的信息了,加入ISP标识码的作用是:CDN服务器会根据 URL请求中的ISP标识码与各ISP信息块中的ISP标识码进行比对以直接确定出之前匹配到的ISP信息块,而不用再基于匹配URL的正则表达式进行匹配了,进一步缩短了匹配的时间。
进一步的,作为一种可选的技术方案,匹配模块200的具体功能,由基于预先配置的各ISP信息中的匹配URL的正则表达式,对客户端用户发出的URL请求与各ISP信息块进行匹配,替换成:
基于ISP识别码,对客户端用户发出的URL请求与预先配置的各ISP信息块进行匹配;
当匹配失败时,再基于匹配URL的正则表达式,对所述URL请求与预先配置的各ISP信息块进行匹配。
本发明第七实施例,本实施例是在第六实施例的基础上,介绍一种CDN服务器,众多的该CDN服务器作为CDN节点组成CDN系统,该CDN服务器包含第六实施例中的流媒体服务与文件下载融合的装置。本实施例的终端可以当作实体装置来理解。
本发明第八实施例,本实施例是在上述实施例的基础上,以客户端用户OTT盒子请求OTT视频点播作为流媒体服务的实例1,以客户端用户请求在appstore下载一个应用程序作为文件下载的实例2,结合附图4~5介绍本发明的应用实例。
图4为本实施例的CDN系统的融合处理结构图,如图3所示,CDN系统中的运维系统通过统一管理接口向融合节点(即CDN服务器)发送包括ISP配置等信息;用户服务请求经过GSLB(Global Server Load Balance,全局负载均衡)设备调度接入融合节点,通过ISP识别模块(即第五实施例中的匹配模块)区分OTT视频点播服务和文件下载服务,然后调用对应的OTT业务模块和文件下载业务模块(OTT业务模块和文件下载业务模块这两个模块相当于第五实施例中的业务处理模块),各业务模块再通过公用的加速能力层以及存储能力层,实现融合加速。
图5为本实施例的用户URL请求被调度到融合节点内部后的通用流程,如图5所示,该流程如下:
S1:用户请求进入统一的入口;
S2:ISP识别模块在ISP配置信息中根据请求url以及各ISP信息块中的匹配URL的正则表达式(urlfrom)进行遍历,正则匹配到对应的ISP信息块,该信息块包含以下信息:ISP类型(isptype)、ISP标识码(ispcode)、服务类型(servicetype)、内容提供商标识(cpid)、内容标识的获取规则(cidurl)、以及文件名的获取规则(filenameurl)、回源类型(upstreamtype)、回源请求URL的规则(upstreamurl)、以及一些其他的内部私有字段信息,比如时间格式匹配规则。
S3:根据识别出的密钥(Authinfokey)以及由URL请求带过来的认证信息Authinfo和密 钥版本,进行防盗链校验,具体是对用户的IP地址、请求的内容标识、请求的有效期进行校验,如果有非法请求,则返回403禁止访问。
S4:根据ISP信息块中的服务类型(servicetype)进入不同的处理钩子(某Handler),servicetype主要包括download、vod、tvod、tstv、nvod等。视频服务业务流程的走向和特殊处理,根据ISP配置块中的信息,得到充分必要的处理,精确的为用户提供优质服务,本发明实施例还为HLS视频服务提供了一种可以减轻服务器压力、提高用户体验的ispcode机制,描述如下:用户请求视频播放的ts索引文件时,如果得到了精确的ISP信息块匹配和防盗链校验,返回给用户的ts索引文件中,ts的url都会被主动添加一个ispcode字段,该字段实际是urlfrom字符串的md5值,等用户再来请求时,会首先根据ispcode来进行匹配,不需要再次进行正则模糊匹配、内容标识(cid)计算、防盗链校验等步骤,这样减轻了ts分片的请求压力,由于用户一次视频播放,大部分的请求都是ts分片请求,所以大大减轻了服务器的压力,也提高了用户的播放体验。
S5:在对应的处理钩子中,会根据cpid、cidurl、filenameurl、重写URL(rewriteurl)、回源类型(upstreamtype)、回源请求URL的规则(upstreamurl)、tstv时间格式(starttime、endtime)、以及其他可能的扩展参数等进行业务流程上的处理。并且,因为提炼了这些关键识别信息,也使得业务流程可以做到大框架上的统一。具体细节不再赘述。
S6:根据回源/中继配置,进行回源或者中继处理。
实施例1:客户端用户OTT盒子请求OTT视频点播的应用场景。
一、ISP配置阶段
首先根据中国电信3.0流媒体服务扩展规范,对融合节点进行ISP信息配置,如下:
Figure PCTCN2016077572-appb-000001
Figure PCTCN2016077572-appb-000002
该配置提供了如下信息,依次解释如下:
匹配url的正则表达式、ISP类型为ottcache、ISP标识码、认证密钥、视频服务类型、内容提供商标识、内容标识的获取规则、文件名的获取规则、回源类型、回源请求Url的规则、重写url、tstv时间格式。
二、融合加速阶段
假设一个中国电信规范的OTT机顶盒请求点播服务。
客户端用户的URL请求为:
http://ip:port/DemoCPID/2/DemoCID/index.m3u8?AuthInfo=SpwsfIN8AYMWkbBb2JeomWFFh87RT3lnNxLLVDF%2BZVhyf%2FZKTamT%2F13JothwYij0&version=1.0&param1=1&paramN=n&virtualDomain=DemoCPID.vod_hls.zte.com
经过ISP识别模块,会通过urlfrom字段模糊匹配到对于的ISP信息块,对应的isptype为ottcache,ispcode为9f14f26664a0ffc79efdbefc53fc8ccb。识别到该url格式为中国电信规范,并进入防盗链模块,对url带过来的Authinfo和version,以及对应的密钥,进行AES128解密和对用户IP、内容标识CID、请求的有效期的合法性校验。这里假设校验通过。
之后根据服务类型vod,进入Vodhandler处理模块,进行点播业务的相关处理,本发明实施例提到的改写ts索引文件以增加ISPcode字段,会在该模块完成,返回给客户端用户带着ISPcode的相对路径的ts索引文件,比如:
Figure PCTCN2016077572-appb-000003
Figure PCTCN2016077572-appb-000004
用户根据上述ts索引文件请求ts分片时,融合节点会根据ispcode省略了正则的模糊匹配,直接得到之前匹配到的ISP信息块,进入Vodhandler来处理。
实施例2:客户端用户请求在appstore下载一个应用程序的应用场景。
一、ISP配置阶段
首先根据appstore下载规范,对融合节点进行ISP信息配置,如下
Figure PCTCN2016077572-appb-000005
该配置提供了如下信息,依次解释如下:
匹配url的正则表达式、ISP类型为webcache、ISP标识码、认证密钥、文件下载服务类型、内容提供商标识、内容标识的获取规则、文件名的获取规则、、回源类型、回源请求Url的规则、重写url、tstv时间格式。
二、融合加速阶段
客户端用户的URL请求为:
http://ip:port/a1156.phobos.apple.com/us/r1000/034/Purple3/v4/ac/6b/87/ac6b875b-2886-6953-2e9b-eb08890d255b/ypb2714011175547172506.D2.pd.ipa?downloadKey=1418273539_150c5e5988d3ccd7886bfc1a898b04e9
经过ISP识别模块,会通过urlfrom字段模糊匹配到对于的ISP信息块,对应的isptype为webcache,ispcode为f3f962c217afce6af3b83da48f558e71。
之后进入防盗链模块,对该ISP信息块,若没有密钥的配置,默认为不进行防盗链校验。
之后根据业务类型,进入DownloadHandler处理模块,根据ISP信息块中的获取的内容标识以及文件名经过设定的的组装规则拼出该app的缓存标识cachekey,本发明实施例的这种方式可以过滤掉苹果自身的防盗链信息downloadKey,使得同一融合节点内不同用户请求均可以基于缓存标识的比对,准确命中该唯一内容,提供了优质的CDN文件传输加速服务。
本发明实施例的所述流媒体服务与文件下载融合的方法、装置及CDN服务器,通过将关键点识提炼出来形成各ISP信息块(或者叫做ISP信息集),通过对该ISP信息块的主动配置、模糊匹配、精确定位,使得部署了本发明所述方法功能的CDN服务器同时兼容流媒体服务和互联网文件下载加速,即统一融合加速。增强了CDN系统的加速服务性能。
通过具体实施方式的说明,应当可对本发明为达成预定目的所采取的技术手段及功效得以更加深入且具体的了解,然而所附图示仅是提供参考与说明之用,并非用来对本发明加以限制。
工业实用性
本发明实施例所述流媒体服务与文件下载融合的方法、装置及CDN服务器,通过将关键点识提炼出来形成各ISP信息块,通过对该ISP信息块的主动配置、模糊匹配、精确定位,使得部署了本发明所述方法功能的CDN服务器同时兼容流媒体服务和互联网文件下载加速,即统一融合加速。增强了CDN系统的加速服务性能。

Claims (11)

  1. 一种流媒体服务与文件下载融合的方法,包括:
    当接收到客户端用户发出的流媒体服务请求和文件下载请求,按照各请求对应的不同服务规范分别进行响应。
  2. 根据权利要求1所述的流媒体服务与文件下载融合的方法,其中,所述按照各请求对应的不同服务规范分别进行响应,包括:
    针对所述流媒体服务请求和文件下载请求中的任一请求,基于预先配置的服务请求特征判断所述任一请求是属于流媒体服务请求还是文件下载请求,根据判断结果采用相应的服务规范对所述任一请求进行响应。
  3. 根据权利要求2所述的流媒体服务与文件下载融合的方法,其中,基于预先配置的服务请求特征判断所述任一请求是属于流媒体服务请求还是文件下载请求,根据判断结果采用相应的服务规范对所述任一请求进行响应,包括:
    针对任一流媒体服务请求或文件下载请求,基于预先配置的各ISP信息集中的匹配URL的正则表达式,对所述任一流媒体服务请求或所述文件下载请求进行匹配;各ISP信息集,包括:与流媒体服务规范对应的ISP信息集、以及与文件下载服务规范对应的ISP信息集;
    根据匹配上的ISP信息集,对所述任一流媒体服务请求或所述文件下载请求进行响应。
  4. 根据权利要求3所述的流媒体服务与文件下载融合的方法,其中,
    所述客户端用户发出的流媒体服务请求和文件下载请求均以统一资源定位器URL请求的形式发出;每个ISP信息集的组成部分,还包括:服务类型、内容提供商标识、内容标识的获取规则、以及文件名的获取规则;
    所述根据匹配上的ISP信息集,对所述任一流媒体服务请求或所述文件下载请求进行响应,包括:
    根据与所述URL请求匹配的ISP信息集中的服务类型调用相应的业务处理模块;所述服务类型包括:文件下载和流媒体服务,所述流媒体服务包括:直播、视频点播VOD、真实视频点播TVOD、就近式视频点播NVOD、或者时移电视TSTV;
    由所述业务处理模块根据内容提供商标识、内容标识的获取规则、以及文件名的获取规则,响应所述URL请求。
  5. 根据权利要求4所述的流媒体服务与文件下载融合的方法,其中,每个ISP信息集的组成部分,还包括:认证密钥;
    所述根据匹配上的ISP信息集,对所述任一流媒体服务请求或所述文件下载请求进行响应,还包括:
    在根据与所述URL请求匹配的ISP信息集中的服务类型调用相应的业务处理模块之前,基于所述匹配的ISP信息集中的认证密钥对所述URL请求中携带的认证信息进行解密;对解密后的认证信息进行校验。
  6. 根据权利要求4所述的流媒体服务与文件下载融合的方法,其中,所述根据与所述URL请求匹配的ISP信息集,响应所述URL请求,还包括:
    若客户端用户发出的URL请求属于文件下载的服务类型、且已进行响应,则在对首次下载的文件进行本地缓存的同时,至少根据所述匹配的ISP信息集中的内容标识和文件名确定出所述文件的第一缓存标识;
    当收到其他客户端用户发出的URL请求属于文件下载服务类型时,若所述其他客户端用户发出的URL请求所需下载的文件对应的缓存标识与第一缓存标识相同,则直接从本地为客户端用户提供已缓存的所述文件。
  7. 根据权利要求4所述的流媒体服务与文件下载融合的方法,其中,每个ISP信息集的组成部分,还包括:ISP标识码;
    业务处理模块响应所述URL请求的过程中,所执行的流程还具体包括:
    若客户端用户发出的URL请求属于流媒体服务的服务类型,则向客户端用户发送时移ts索引文件,所述ts索引文件中包含带有ISP标识码的相对路径的ts分片索引,供客户端用户再发来URL请求时使用。
  8. 根据权利要求7所述的流媒体服务与文件下载融合的方法,其中,基于预先配置的各ISP信息集对客户端用户发出的URL请求进行匹配的具体过程替换为:
    基于ISP识别码,对客户端用户发出的URL请求与预先配置的各ISP信息集进行匹配;
    当匹配失败时,基于匹配URL的正则表达式,对所述URL请求与预先配置的各ISP信息集进行匹配。
  9. 根据权利要求4所述的流媒体服务与文件下载融合的方法,其中,每个ISP信息集的组成部分,还包括:ISP类型、回源参数、重写URL、以及tstv时间格式,供所述业务处理模块还根据ISP类型、回源参数、重写URL、以及tstv时间格式,响应所述URL请求。
  10. 一种流媒体服务与文件下载融合的装置,包括:
    接收模块,设置为接收客户端用户发出的流媒体服务请求和文件下载请求;
    响应模块,设置为当接收到客户端用户发出的流媒体服务请求和文件下载请求时,按照各请求对应的不同服务规范分别进行响应。
  11. 一种内容分发网络CDN服务器,包括如权利要求9所述的流媒体服务与文件下载融合的装置。
PCT/CN2016/077572 2015-03-31 2016-03-28 流媒体服务与文件下载融合的方法、装置及cdn服务器 WO2016155599A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510147701.2A CN106161351A (zh) 2015-03-31 2015-03-31 流媒体服务与文件下载融合的方法、装置及cdn服务器
CN201510147701.2 2015-03-31

Publications (1)

Publication Number Publication Date
WO2016155599A1 true WO2016155599A1 (zh) 2016-10-06

Family

ID=57006553

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/077572 WO2016155599A1 (zh) 2015-03-31 2016-03-28 流媒体服务与文件下载融合的方法、装置及cdn服务器

Country Status (2)

Country Link
CN (1) CN106161351A (zh)
WO (1) WO2016155599A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020006866A1 (zh) * 2018-07-03 2020-01-09 平安科技(深圳)有限公司 文件下载方法、装置、计算机设备和存储介质

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109753322B (zh) * 2017-08-29 2022-04-15 武汉斗鱼网络科技有限公司 一种ios平台上对应用程序的加速方法和装置
CN108449395A (zh) * 2018-03-05 2018-08-24 北京云端智度科技有限公司 一种多cdn任务适配方法及系统
CN110401552A (zh) * 2018-04-24 2019-11-01 贵州白山云科技股份有限公司 一种cdn业务自动调优方法及装置
CN112052413B (zh) * 2020-08-28 2024-02-13 上海谋乐网络科技有限公司 Url模糊匹配方法、装置和系统
CN114466000B (zh) * 2021-12-22 2023-10-10 天翼云科技有限公司 一种cdn网关回源方法及装置
CN114786042A (zh) * 2022-04-12 2022-07-22 北京字节跳动网络技术有限公司 视频播放方法、装置、设备及存储介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101882454A (zh) * 2010-03-24 2010-11-10 深圳市万兴软件有限公司 一种播放方法和播放装置
CN102843616A (zh) * 2012-08-13 2012-12-26 中兴通讯股份有限公司 Iptv系统实现边放边下的方法、终端及cdn服务器
CN103888487A (zh) * 2012-12-19 2014-06-25 中国电信股份有限公司 媒体流控制方法和系统

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020129159A1 (en) * 2001-03-09 2002-09-12 Michael Luby Multi-output packet server with independent streams

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101882454A (zh) * 2010-03-24 2010-11-10 深圳市万兴软件有限公司 一种播放方法和播放装置
CN102843616A (zh) * 2012-08-13 2012-12-26 中兴通讯股份有限公司 Iptv系统实现边放边下的方法、终端及cdn服务器
CN103888487A (zh) * 2012-12-19 2014-06-25 中国电信股份有限公司 媒体流控制方法和系统

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020006866A1 (zh) * 2018-07-03 2020-01-09 平安科技(深圳)有限公司 文件下载方法、装置、计算机设备和存储介质

Also Published As

Publication number Publication date
CN106161351A (zh) 2016-11-23

Similar Documents

Publication Publication Date Title
WO2016155599A1 (zh) 流媒体服务与文件下载融合的方法、装置及cdn服务器
US20200304508A1 (en) Method and device for providing authentication in network-based media processing (nbmp) system
US11470148B2 (en) Content delivery network
US10587906B2 (en) Apparatus and methods for content delivery and message exchange across multiple content delivery networks
US8407472B2 (en) Mobile content delivery optimization
US8555367B2 (en) Method and system for securely streaming content
KR101330052B1 (ko) 적응형 컨텐츠 전송 방식을 지원하는 컨텐츠 캐싱 서비스 제공 방법 및 이를 위한 로컬 캐싱 장치
US10334406B2 (en) Methods and apparatus for analyzing and grouping service layer subscriptions and notifications for enhanced efficiency
JP5805934B2 (ja) Urlを利用した分散コントロール方法及び装置
JP5678367B2 (ja) 契約者機器から得られる情報を使用することによりネットワーク・サービスへのアクセスを承認するためのシステムおよび方法
SG178429A1 (en) Network selection method based on multi-link and apparatus thereof
KR101436049B1 (ko) 컨텐츠 캐싱 서비스 제공 방법 및 이를 위한 로컬 캐싱 장치
US9264774B2 (en) Seamless multi-channel TV everywhere sign-in
TW201737675A (zh) 應用內容打包和傳送的訊號傳遞
US20160127435A1 (en) Method for Delivering Advertising Content and/or Advertising Media and Communication System for Performing the Method
RU2602244C1 (ru) Наследование параметров унифицированного идентификатора ресурса (uri)
WO2018103644A1 (zh) 直播分享方法及装置、家庭媒体设备和存储介质
CN103139236A (zh) 一种元数据的处理方法、装置及cdn互通系统
CN105100147A (zh) 一种基于内容提供商与服务提供商分离的控制方法及装置
WO2011072462A1 (zh) 节目内容获取方法及机顶盒
WO2014117508A1 (zh) 内容分发网络及在内容分发网络中进行内容管理的方法
WO2014177058A1 (zh) 文件数据的传输方法及装置
US20130283053A1 (en) Apparatus and method for audience measurement in multimedia streaming system
US20170085623A1 (en) Content downloading and network provisioning
US11671515B2 (en) Methods, network node and client device for acquisition and delivery of resources in a communications network

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16771354

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16771354

Country of ref document: EP

Kind code of ref document: A1