Movatterモバイル変換


[0]ホーム

URL:


CN110856007B - Content distribution network, storage optimization method thereof, electronic device, and storage medium - Google Patents

Content distribution network, storage optimization method thereof, electronic device, and storage medium
Download PDF

Info

Publication number
CN110856007B
CN110856007BCN201911149884.6ACN201911149884ACN110856007BCN 110856007 BCN110856007 BCN 110856007BCN 201911149884 ACN201911149884 ACN 201911149884ACN 110856007 BCN110856007 BCN 110856007B
Authority
CN
China
Prior art keywords
content
slice
storage
edge node
live
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911149884.6A
Other languages
Chinese (zh)
Other versions
CN110856007A (en
Inventor
蒋伟
王�琦
李立锋
王斌
杜欧杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Group Co Ltd
MIGU Video Technology Co Ltd
MIGU Culture Technology Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
MIGU Video Technology Co Ltd
MIGU Culture Technology 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 China Mobile Communications Group Co Ltd, MIGU Video Technology Co Ltd, MIGU Culture Technology Co LtdfiledCriticalChina Mobile Communications Group Co Ltd
Priority to CN201911149884.6ApriorityCriticalpatent/CN110856007B/en
Publication of CN110856007ApublicationCriticalpatent/CN110856007A/en
Application grantedgrantedCritical
Publication of CN110856007BpublicationCriticalpatent/CN110856007B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Images

Classifications

Landscapes

Abstract

Translated fromChinese

本发明实施例提供一种内容分发网络及其存储优化方法、电子设备及存储介质,其中,内容中心在预设时间段内未收到边缘节点对指定直播频道发起的直播请求时,将内存中与指定直播频道对应的预设时长的目标内容切片写入存储,并将目标内容切片发送至边缘节点。通过本发明实施例,使得写入内容中心的存储中的目标内容切片的预设时长小于正常情况下的完整内容切片时长,可以节约内容中心的存储资源,同时可以节约内容源站至内容中心之间的传输带宽资源。另外,将目标内容切片发送至边缘节点,使边缘节点写入存储,当边缘节点收到用户终端对指定直播频道发起的直播请求时,直接从自身存储中将目标内容切片发送至用户终端,降低了网络延时。

Figure 201911149884

Embodiments of the present invention provide a content distribution network and storage optimization method, electronic device, and storage medium, wherein, when the content center does not receive a live broadcast request initiated by an edge node for a specified live channel within a preset time period, the content center The preset duration target content slice corresponding to the specified live channel is written to storage, and the target content slice is sent to the edge node. Through the embodiments of the present invention, the preset duration of the target content slice written in the storage of the content center is smaller than the duration of the complete content slice under normal conditions, which can save the storage resources of the content center and save the time between the content source site and the content center. transmission bandwidth resources. In addition, the target content slice is sent to the edge node, so that the edge node writes to the storage. When the edge node receives the live broadcast request initiated by the user terminal for the designated live channel, it directly sends the target content slice from its own storage to the user terminal. network delay.

Figure 201911149884

Description

Translated fromChinese
内容分发网络及其存储优化方法、电子设备及存储介质Content distribution network and storage optimization method thereof, electronic device and storage medium

技术领域technical field

本发明涉及多媒体以及内容分发技术领域,尤其涉及内容分发网络及其存储优化方法、电子设备及存储介质。The present invention relates to the technical field of multimedia and content distribution, and in particular, to a content distribution network and its storage optimization method, electronic device and storage medium.

背景技术Background technique

内容分发网络(Content Delivery Network,CDN)是通过将内容发布到网络的边缘节点,实现内容的分布式就近服务。CDN的各节点均放置有内容缓存服务器,由CDN的全局负载均衡系统实时地根据网络流量和各节点的连接、负载状况以及到用户的距离和响应时间等综合信息将用户的请求导向至离用户最近的边缘节点上。其目的是使用户可就近取得所需内容,解决网络拥挤的状况,提高用户访问网站的响应速度。Content Delivery Network (CDN) is a distributed and nearby service of content by publishing content to the edge nodes of the network. Each node of the CDN is placed with a content cache server, and the CDN's global load balancing system guides the user's request to the user's request in real time according to the network traffic, the connection of each node, the load status, the distance to the user and the response time and other comprehensive information. on the nearest edge node. Its purpose is to enable users to obtain the desired content nearby, solve the situation of network congestion, and improve the response speed of users visiting the website.

现有技术中的CDN在对内容站源的直播内容进行分发时,通常将内容源站的直播内容发送至内容中心,内容中心将直播内容全部写入自身存储,当用户终端访问距离最近的边缘节点时,该边缘节点根据直播请求判断自身存储内是否存在与直播请求相匹配的直播内容,如果有则直接将该边缘节点存储内与直播请求相匹配的直播内容发送至用户终端,如果没有则由该边缘节点向距离最近的内容中心请求与直播请求相匹配的直播内容。该边缘节点接收内容中心发送的与直播请求相匹配的直播内容,写入自身存储,并将与直播请求相匹配的直播内容发送至用户终端。When the CDN in the prior art distributes the live content of the content source, it usually sends the live content of the content source to the content center, and the content center writes all the live content into its own storage. When the user terminal accesses the nearest edge. node, the edge node judges whether there is live broadcast content matching the live broadcast request in its own storage according to the live broadcast request, and if so, directly sends the live broadcast content that matches the live broadcast request in the edge node storage to the user terminal, if not, then The edge node requests the live content matching the live broadcast request from the nearest content center. The edge node receives the live broadcast content that matches the live broadcast request sent by the content center, writes it into its own storage, and sends the live broadcast content that matches the live broadcast request to the user terminal.

现有技术中通过CDN对直播内容进行分发,可以使用户终端直接访问距离最近的边缘节点并取得所需直播内容,实现对直播内容的加速。但是,在某一边缘节点没有用户终端访问的情况下,这种CDN分发方式将浪费大量的存储资源。因此,现急需提供一种内容分发网络及其存储优化方法、电子设备及存储介质。In the prior art, the live content is distributed through the CDN, so that the user terminal can directly access the nearest edge node and obtain the required live content, so as to realize the acceleration of the live content. However, when an edge node does not have user terminal access, this CDN distribution method will waste a lot of storage resources. Therefore, there is an urgent need to provide a content distribution network and its storage optimization method, electronic device and storage medium.

发明内容SUMMARY OF THE INVENTION

针对现有技术存在的问题,本发明实施例中提供了一种内容分发网络及其存储优化方法、电子设备及存储介质。Aiming at the problems existing in the prior art, the embodiments of the present invention provide a content distribution network and a storage optimization method thereof, an electronic device, and a storage medium.

第一方面,本发明实施例提供了一种内容分发网络的存储优化方法,包括:In a first aspect, an embodiment of the present invention provides a storage optimization method for a content distribution network, including:

确认预设时间段内未收到边缘节点对指定直播频道发起的直播请求,将内存中与所述指定直播频道对应的预设时长的目标内容切片写入存储,并将所述目标内容切片发送至所述边缘节点;所述预设时长小于与所述指定直播频道对应的完整内容切片时长;Confirm that the live broadcast request initiated by the edge node to the specified live channel has not been received within the preset time period, write the target content slice of the preset duration corresponding to the designated live channel in the memory into storage, and send the target content slice to the edge node; the preset duration is less than the duration of the complete content slice corresponding to the designated live channel;

将所述目标内容切片发送至所述边缘节点后,若接收到任一边缘节点对所述指定直播频道发起的直播请求,将所述内存内与所述指定直播频道对应的最新完整内容切片写入所述存储,并将所述最新完整内容切片发送至所述任一边缘节点。After the target content slice is sent to the edge node, if a live broadcast request initiated by any edge node to the designated live channel is received, write the latest complete content slice corresponding to the designated live channel in the memory. into the storage, and send the latest complete content slice to any of the edge nodes.

优选地,所述预设时长基于如下方法确定:Preferably, the preset duration is determined based on the following method:

确定边缘节点的内容切片平均下载速度以及所述指定直播频道的平均码率;Determine the average download speed of the content slices of the edge node and the average bit rate of the specified live channel;

基于所述平均码率与所述内容切片平均下载速度的比值,确定时长系数;determining a duration factor based on the ratio of the average bit rate to the average download speed of the content slice;

将所述时长系数与所述完整内容切片时长的乘积作为所述预设时长;taking the product of the duration coefficient and the duration of the complete content slice as the preset duration;

其中,所述时长系数小于1。Wherein, the duration factor is less than 1.

优选地,所述将内存中与所述指定直播频道对应的预设时长的目标内容切片写入存储之后,还包括:Preferably, after writing and storing the target content slice of the preset duration corresponding to the designated live channel in the memory, the method further includes:

修改所述存储中的索引文件,将所述索引文件中与所述指定直播频道对应的内容切片文件名修改为所述目标内容切片对应的文件名。Modifying the index file in the storage, and modifying the file name of the content slice corresponding to the specified live channel in the index file to the file name corresponding to the target content slice.

优选地,还包括:Preferably, it also includes:

确认所述预设时间段内未收到某一边缘节点对指定直播频道发起的直播请求,将所述存储中目标表格中的所述某一边缘节点删除;Confirm that a live broadcast request initiated by a certain edge node to a specified live channel has not been received within the preset time period, and delete the certain edge node in the target table in the storage;

其中,所述目标表格用于指示所述指定直播频道在每个边缘节点处的播放状态。Wherein, the target table is used to indicate the playing status of the specified live channel at each edge node.

优选地,所述基于所述平均码率与所述内容切片平均下载速度的比值,确定时长系数,具体包括:Preferably, determining the duration coefficient based on the ratio of the average bit rate to the average download speed of the content slices specifically includes:

基于所述比值以及所述指定直播频道的热度保障权重,确定所述预设时长。The preset duration is determined based on the ratio and the popularity guarantee weight of the designated live channel.

优选地,在确认预设时间段内未收到边缘节点对指定直播频道发起的直播请求之前,还包括:Preferably, before confirming that the live broadcast request initiated by the edge node to the designated live channel is not received within the preset time period, the method further includes:

实时接收内容源站发送的所述指定直播频道对应的完整内容切片;receiving, in real time, the complete content slice corresponding to the designated live channel sent by the content source station;

将接收的所述内容源站发送的完整内容切片写入内存。Write the received complete content slice sent by the content source site into the memory.

第二方面,本发明实施例提供一种内容分发网络的存储优化方法,包括:In a second aspect, an embodiment of the present invention provides a storage optimization method for a content distribution network, including:

在预设时间段内未收到用户终端对指定直播频道发起的直播请求后,若接收到所述任一用户终端对指定直播频道发起的直播请求,将存储内预设时长的目标内容切片发送至所述任一用户终端,并向内容中心发送所述直播请求;After the live broadcast request initiated by the user terminal to the designated live channel is not received within the preset time period, if any user terminal receives the live broadcast request initiated by the designated live channel, the target content slices with the preset duration in the storage are sent to the to any of the user terminals, and send the live broadcast request to the content center;

接收与所述指定直播频道对应的最新完整内容切片并写入存储,当再次获取所述任一用户终端对所述指定直播频道发起的直播请求时,将所述最新完整内容切片发送至所述任一用户终端。Receive the latest complete content slice corresponding to the designated live channel and write it into storage, and send the latest complete content slice to the any user terminal.

第三方面,本发明实施例提供一种内容分发网络,包括:一个或者多个内容中心,每个内容中心分别对应于一个或者多个边缘节点;In a third aspect, an embodiment of the present invention provides a content distribution network, including: one or more content centers, each of which corresponds to one or more edge nodes;

其中,所述内容中心用于执行如第一方面所述的内容分发网络的存储优化方法;所述边缘节点用于执行如第二方面所述的内容分发网络的存储优化方法。Wherein, the content center is configured to execute the storage optimization method of the content distribution network as described in the first aspect; the edge node is configured to execute the storage optimization method of the content distribution network as described in the second aspect.

第四方面,本发明实施例提供一种电子设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现如第一方面或第二方面所述内容分发网络存储优化方法的步骤。In a fourth aspect, an embodiment of the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the first aspect or The steps of the method for optimizing the storage of a content distribution network in the second aspect.

第五方面,本发明实施例提供一种非暂态计算机可读存储介质,其上存储有计算机程序,其特征在于,该计算机程序被处理器执行时实现如第一方面或第二方面所述内容分发网络存储优化方法的步骤。In a fifth aspect, an embodiment of the present invention provides a non-transitory computer-readable storage medium on which a computer program is stored, characterized in that, when the computer program is executed by a processor, the implementation is as described in the first aspect or the second aspect Steps of a content delivery network storage optimization method.

本发明实施例提供的内容分发网络及其存储优化方法、电子设备及存储介质,内容中心在预设时间段内未收到边缘节点对指定直播频道发起的直播请求时,将内存中与指定直播频道对应的预设时长的目标内容切片写入存储,并将目标内容切片发送至边缘节点。使写入内容中心的存储中的目标内容切片的预设时长小于正常情况下的完整内容切片时长,可以节约内容中心的存储资源,同时可以节约内容源站至内容中心之间的传输带宽资源。另外,将目标内容切片发送至边缘节点,使边缘节点写入存储,当边缘节点收到用户终端对指定直播频道发起的直播请求时,直接从自身存储中将目标内容切片发送至用户终端,降低了网络延时。In the content distribution network and storage optimization method, electronic device, and storage medium provided by the embodiments of the present invention, when the content center does not receive a live broadcast request initiated by an edge node for a designated live channel within a preset time period, the content center will transfer the memory to the designated live channel. The preset duration target content slice corresponding to the channel is written into storage, and the target content slice is sent to the edge node. The preset duration of the target content slice written in the storage of the content center is smaller than the duration of the complete content slice under normal conditions, which can save the storage resources of the content center and the transmission bandwidth resources between the content source site and the content center. In addition, the target content slice is sent to the edge node, so that the edge node writes to the storage. When the edge node receives the live broadcast request initiated by the user terminal for the specified live channel, it directly sends the target content slice from its own storage to the user terminal. network delay.

附图说明Description of drawings

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

图1为本发明实施例中提供的一种内容分发网络的存储优化方法的流程示意图;1 is a schematic flowchart of a storage optimization method for a content distribution network provided in an embodiment of the present invention;

图2为本发明实施例中提供的一种内容分发网络的存储优化方法中内容中心的内存中一个完整内容切片示意图;2 is a schematic diagram of a complete content slice in the memory of a content center in a storage optimization method for a content distribution network provided in an embodiment of the present invention;

图3为本发明实施例中提供的一种内容分发网络的存储优化方法的流程示意图;3 is a schematic flowchart of a storage optimization method for a content distribution network provided in an embodiment of the present invention;

图4为本发明实施例中提供的一种内容分发网络的结构示意图;4 is a schematic structural diagram of a content distribution network provided in an embodiment of the present invention;

图5为本发明实施例中提供的一种内容分发网络的存储优化装置的结构示意图;5 is a schematic structural diagram of a storage optimization device of a content distribution network provided in an embodiment of the present invention;

图6为本发明实施例中提供的一种内容分发网络的存储优化装置的结构示意图;6 is a schematic structural diagram of a storage optimization device of a content distribution network provided in an embodiment of the present invention;

图7为本发明实施例中提供的一种电子设备的实体结构示意图。FIG. 7 is a schematic diagram of a physical structure of an electronic device provided in an embodiment of the present invention.

具体实施方式Detailed ways

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

由于现有技术中无论任何情况发生,在内容源站将直播内容发送至内容中心后,内容中心均将直播内容从内存中写入存储,如此将导致内容中心长时间未访问的情况发生时出现存储资源浪费的现象发生。为此,本发明实施例中提供了内容分发网络及其存储优化方法、电子设备及存储介质。No matter what happens in the prior art, after the content source station sends the live content to the content center, the content center writes the live content from the memory for storage, which will cause the content center to not be accessed for a long time. The phenomenon of wasting storage resources occurs. To this end, the embodiments of the present invention provide a content distribution network and a storage optimization method thereof, an electronic device, and a storage medium.

如图1所示,本发明实施例中提供了一种内容分发网络的存储优化方法,包括:As shown in FIG. 1, an embodiment of the present invention provides a storage optimization method for a content distribution network, including:

S11,确认预设时间段内未收到边缘节点对指定直播频道发起的直播请求,将内存中与所述指定直播频道对应的预设时长的目标内容切片写入存储,并将所述目标内容切片发送至所述边缘节点;所述预设时长小于与所述指定直播频道对应的完整内容切片时长;S11. Confirm that the live broadcast request initiated by the edge node to the designated live channel has not been received within the preset time period, write into storage the target content slice of the preset duration corresponding to the designated live channel in the memory, and store the target content The slice is sent to the edge node; the preset duration is less than the duration of the complete content slice corresponding to the designated live channel;

S12,将所述目标内容切片发送至所述边缘节点后,若接收到任一边缘节点对所述指定直播频道发起的直播请求,将所述内存内与所述指定直播频道对应的最新完整内容切片写入所述存储,并将所述最新完整内容切片发送至所述任一边缘节点。S12: After sending the target content slice to the edge node, if a live broadcast request initiated by any edge node to the designated live channel is received, send the latest complete content corresponding to the designated live channel in the memory The slice is written to the store, and the latest complete content slice is sent to any of the edge nodes.

具体地,内容分发网络(Content Delivery Network,CDN)包括内容中心和边缘节点。其中,内容中心用于接收内容源站发送的直播内容,内容中心作为CDN内容的全量库,内存中写入了内容源站的所有内容。内容源站通常使用hls协议,通过不停的推流和拉流,将ts文件传输至CDN实现全网络分发。因此本发明实施例中所说的内容切片均是指ts切片。Specifically, a content delivery network (Content Delivery Network, CDN) includes a content center and edge nodes. Among them, the content center is used to receive the live content sent by the content source station, and the content center serves as the full library of CDN content, and all the content of the content source station is written in the memory. The content source site usually uses the hls protocol to transfer the ts files to the CDN through continuous push and pull streams to achieve network-wide distribution. Therefore, the content slices mentioned in the embodiments of the present invention all refer to ts slices.

一般情况下,CDN包括一个或者多个内容中心,为使每一个内容中心服务于附近相对应的边缘节点(pop节点),以降低时延,CDN的内容中心的数量可以为至少两个,当其中若干内容中心发生故障后,可以使其服务的边缘节点调度至其他内容中心,由其他内容中心服务,可以避免其中任一内容中心故障后出现文件丢失的情况。pop节点为入网点,需要观看直播内容的用户终端需要先访问pop节点,向pop节点发送直播请求,pop节点根据用户终端的直播请求,判断自身存储内是否存在与直播请求相对应的用户终端所需的直播内容,如果存在则将存储内的直播内容发送至用户终端,为用户终端提供服务;如果不存在则pop节点向距离最近的内容中心发送直播请求,pop节点在收到内容中心下发的直播内容后,一方面将直播内容发送给用户终端,为用户终端提供服务,另一方面将直播内容写入存储进行保存,为下一个用户终端提供本地服务。In general, a CDN includes one or more content centers. In order to make each content center serve the corresponding nearby edge nodes (pop nodes) and reduce the delay, the number of CDN content centers can be at least two. When When some of the content centers fail, the edge nodes served by them can be dispatched to other content centers, and the other content centers serve, which can avoid the situation of file loss after any one of the content centers fails. The pop node is the network access point. The user terminal that needs to watch the live content needs to visit the pop node first, and send a live broadcast request to the pop node. The pop node determines whether there is a user terminal corresponding to the live broadcast request in its own storage according to the live broadcast request of the user terminal. If the required live content exists, the live content in the storage will be sent to the user terminal to provide services for the user terminal; if it does not exist, the pop node will send a live broadcast request to the nearest content center, and the pop node will send it after receiving the content center. After the live content is uploaded, on the one hand, the live content is sent to the user terminal to provide services for the user terminal, and on the other hand, the live content is written into the storage for preservation, and local services are provided for the next user terminal.

本发明实施例中提供的内容分发网络的存储优化方法,执行主体为CDN的内容中心。对于CDN的每个内容中心,首先,执行步骤S11。内容中心判断预设时间段内是否有收到边缘节点对指定直播频道发起的直播请求,如果确认预设时间段内未收到边缘节点对指定直播频道发起的直播请求,将内存中与所述指定直播频道对应的预设时长的目标内容切片写入存储,并将所述目标内容切片发送至所述边缘节点。如图2所示,为内存中一个完整内容切片示意图,其中将预设时长的目标内容切片1写入存储。其中,预设时间段可以根据需要进行设定,例如可以是20s至50s,也可以设定其他数值。直播频道是指直播内容对应的频道,是直播内容的播放通道。一个pop节点可以提供CDN网络能够提供的所有直播频道的直播内容。本发明实施例中所说的指定直播频道可以是所有直播频道中的任一直播频道。The storage optimization method of the content distribution network provided in the embodiment of the present invention is executed by the content center of the CDN. For each content center of the CDN, first, step S11 is performed. The content center determines whether a live broadcast request initiated by the edge node to the specified live channel has been received within the preset time period, and if it is confirmed that the edge node has not received the live broadcast request initiated by the specified live channel within the preset time period, it will be stored in the memory with the described live broadcast request. A target content slice with a preset duration corresponding to the specified live channel is written into storage, and the target content slice is sent to the edge node. As shown in FIG. 2 , it is a schematic diagram of a complete content slice in the memory, in which atarget content slice 1 of a preset duration is written into storage. The preset time period can be set as required, for example, it can be 20s to 50s, or other values can be set. The live channel refers to the channel corresponding to the live content, and is the playback channel of the live content. A pop node can provide live content of all live channels that the CDN network can provide. The designated live channel in the embodiment of the present invention may be any live channel among all live channels.

预设时长是指不影响服务体验的前提下写入内容中心的存储中的内容切片的时长,预设时长小于完整内容切片时长,且满足用户终端在播放完目标内容切片后再次发送直播请求时,可以不需要等待地直接从边缘节点下载最新完整内容切片,即预设时长大于等于边缘节点向内容中心下载最新完整内容切片的时长,也即预设时长大于等于内容中心将最新完整内容切片发送至边缘节点所需的时长。预设时长与直播频道有关,不同的直播频道对应有不同的预设时长。预设时长可以通过内容中心自身确定,也可以是由其他设备确定然后传输至内容中心,本发明实施例中对预设时长的来源不作具体限定。The preset duration refers to the duration of the content slice written into the storage of the content center without affecting the service experience. The preset duration is less than the duration of the complete content slice and satisfies the requirement when the user terminal sends a live broadcast request again after playing the target content slice. , the latest complete content slice can be downloaded directly from the edge node without waiting, that is, the preset duration is greater than or equal to the duration of the edge node downloading the latest complete content slice to the content center, that is, the preset duration is greater than or equal to the content center sending the latest complete content slice The time required to reach the edge node. The preset duration is related to the live channel, and different live channels have different preset durations. The preset duration may be determined by the content center itself, or may be determined by other devices and then transmitted to the content center. The source of the preset duration is not specifically limited in this embodiment of the present invention.

本发明实施例中在确认预设时间段内未收到边缘节点对指定直播频道发起的直播请求时,并不将内容中心的内存中与指定直播频道对应的完整内容切片写入内容中心的存储,而是只将预设时长的目标内容切片写入内容中心的存储,以节约存储资源和传输带宽资源。同时,将预设时长的目标内容切片发送至内容中心周围对应的边缘节点,以使边缘节点将接收到的目标内容切片写入边缘节点的存储,当边缘节点收到。这里需要说明的是,本发明实施例中所说的内存是指运行内存,存储是指硬件存储。In the embodiment of the present invention, when it is confirmed that the live broadcast request initiated by the edge node for the designated live channel has not been received within the preset time period, the complete content slice corresponding to the designated live channel in the memory of the content center is not written into the storage of the content center. , but only write target content slices of preset duration into the storage of the content center to save storage resources and transmission bandwidth resources. At the same time, the target content slice with a preset duration is sent to the corresponding edge nodes around the content center, so that the edge node writes the received target content slice into the storage of the edge node, when the edge node receives it. It should be noted here that the memory mentioned in the embodiments of the present invention refers to the running memory, and the storage refers to hardware storage.

然后执行步骤S12。当预设时间段内未收到边缘节点对指定直播频道发起的直播请求后,即将所述目标内容切片发送至所述边缘节点后,若内容中心重新获取任一边缘节点pop(n)对指定直播频道发起的直播请求时,将内容中心的内存内与指定直播频道对应的最新完整内容切片写入存储,并将最新完整内容切片发送至pop(n)。其中,最新完整内容切片是指在收到目标内容切片的下一时刻收到的完整内容切片。pop(n)表示内容中心对应的第n个pop节点,1≤n≤N,N为内容中心对应的pop节点的数量。由于内容中心在预设时间段内未收到边缘节点对指定直播频道发起的直播请求后,边缘节点的存储中写入的是目标内容切片,并不是最新完整内容切片,因此内容中心重新获取pop(n)的直播请求时,表示pop(n)上有用户终端发起直播请求,且pop(n)已经将存储内的目标内容切片发送至用户终端,此时内容中心需要将内存中与指定直播频道对应的最新完整内容切片写入存储,以备后续接收到边缘节点发起的对指定直播频道的直播请求后直接将存储内的最新完整内容切片发送至边缘节点。在将最新完整内容切片写入存储的同时,将最新完整内容切片发送至pop(n)。Then step S12 is performed. When the live broadcast request initiated by the edge node to the specified live channel is not received within the preset time period, that is, after the target content slice is sent to the edge node, if the content center re-acquires any edge node pop(n) for the specified live channel When a live broadcast request is initiated by a live channel, the latest complete content slice corresponding to the specified live channel in the content center's memory is written to storage, and the latest complete content slice is sent to pop(n). The latest complete content slice refers to the complete content slice received at the next moment when the target content slice is received. pop(n) represents the nth pop node corresponding to the content center, 1≤n≤N, where N is the number of pop nodes corresponding to the content center. Since the content center does not receive the live broadcast request initiated by the edge node to the specified live channel within the preset time period, the target content slice is written in the storage of the edge node, not the latest complete content slice. Therefore, the content center re-obtains the pop (n), it means that a user terminal has initiated a live broadcast request on pop(n), and pop(n) has sent the target content slice in the storage to the user terminal. At this time, the content center needs to match the memory and the specified live broadcast to the user terminal. The latest complete content slice corresponding to the channel is written into the storage, so that the latest complete content slice in the storage can be directly sent to the edge node after receiving the live broadcast request initiated by the edge node for the specified live channel. The latest complete content slice is sent to pop(n) at the same time as the latest complete content slice is written to storage.

本发明实施例中提供的内容分发网络的存储优化方法,内容中心在预设时间段内未收到边缘节点对指定直播频道发起的直播请求时,将内存中与指定直播频道对应的预设时长的目标内容切片写入存储,并将目标内容切片发送至边缘节点。使写入内容中心的存储中的目标内容切片的预设时长小于正常情况下的完整内容切片时长,可以节约内容中心的存储资源,同时可以节约内容源站至内容中心之间的传输带宽资源。另外,将目标内容切片发送至边缘节点,使边缘节点写入存储,当边缘节点收到用户终端对指定直播频道发起的直播请求时,直接从自身存储中将目标内容切片发送至用户终端,降低了网络延时。In the storage optimization method for a content distribution network provided in the embodiment of the present invention, when the content center does not receive a live broadcast request initiated by an edge node for a specified live channel within a preset time period, the content center stores the preset time length corresponding to the specified live channel in the memory The target content slice is written to the storage, and the target content slice is sent to the edge node. The preset duration of the target content slice written in the storage of the content center is smaller than the duration of the complete content slice under normal conditions, which can save the storage resources of the content center and the transmission bandwidth resources between the content source site and the content center. In addition, the target content slice is sent to the edge node, so that the edge node writes to the storage. When the edge node receives the live broadcast request initiated by the user terminal for the specified live channel, it directly sends the target content slice from its own storage to the user terminal. network delay.

在上述实施例的基础上,本发明实施例中提供的内容分发网络的存储优化方法,其特征在于,所述预设时长基于如下方法确定:On the basis of the foregoing embodiment, the storage optimization method for a content distribution network provided in the embodiment of the present invention is characterized in that the preset duration is determined based on the following method:

确定边缘节点的内容切片平均下载速度以及所述指定直播频道的平均码率;Determine the average download speed of the content slices of the edge node and the average bit rate of the specified live channel;

基于所述平均码率与所述内容切片平均下载速度的比值,确定时长系数;determining a duration factor based on the ratio of the average bit rate to the average download speed of the content slice;

将所述时长系数与所述完整内容切片时长的乘积作为所述预设时长;taking the product of the duration coefficient and the duration of the complete content slice as the preset duration;

其中,所述时长系数小于1。Wherein, the duration factor is less than 1.

具体地,预设时长的确定方法有多种,例如可以根据经验值直接设定,还可以根据当前的网络环境确定。本发明实施例中则采用如下方法确定,其执行主体可以是内容中心,也可以是其他设备。Specifically, there are various methods for determining the preset duration, for example, it can be directly set according to an empirical value, or it can be determined according to the current network environment. In this embodiment of the present invention, the following method is used to determine, and the execution body may be a content center or other devices.

首先,确定边缘节点的内容切片平均下载速度以及所述指定直播频道的平均码率。其中,内容切片的平均下载速度是指内容中心对应的所有边缘节点的内容切片平均下载速度,可以通过边缘节点下载的内容切片大小和下载时间确定,还可以通过内容中心端一段时间内被下载的内容切片大小确定。指定直播频道的平均码率可以由内容中心监控得到,也可以由用户终端在播放指定直播频道对应的内容切片后统计并发送至内容中心。First, determine the average download speed of the content slices of the edge node and the average bit rate of the specified live channel. The average download speed of content slices refers to the average download speed of content slices of all edge nodes corresponding to the content center. The content slice size is determined. The average bit rate of the specified live channel can be monitored by the content center, or it can be calculated by the user terminal after playing the content slice corresponding to the specified live channel and sent to the content center.

然后,基于平均码率与内容切片平均下载速度的比值,确定时长系数。边缘节点接收内容中心发送的最新完整内容切片这一过程与内容切片下载速度有关,而由于预设时长是考虑内容中心对应的所有边缘节点得到的综合性数据,因此需要考虑边缘节点的内容切片平均下载速度。同时,为保证用户终端的良好播放体验,避免出现延时,需要考虑指定直播频道播放内容切片的平均码率。因此,本发明实施例中可以根据平均码率与内容切片平均下载速度的比值,确定时长系数,用于表示完整内容切片时长与预设时长之间的倍数关系。由于平均码率小于内容切片平均下载速度,且相差至少一个量级,所以比值小于1,因此可以很容易根据比值确定出一个小于1的时长系数,Then, the duration factor is determined based on the ratio of the average bit rate to the average download speed of the content slice. The process of the edge node receiving the latest complete content slice sent by the content center is related to the download speed of the content slice. Since the preset duration is the comprehensive data obtained by considering all the edge nodes corresponding to the content center, the average content slice content of the edge node needs to be considered. download speed. At the same time, in order to ensure a good playback experience of the user terminal and avoid delay, it is necessary to consider the average bit rate of the content slices played by the specified live channel. Therefore, in this embodiment of the present invention, a duration coefficient may be determined according to the ratio of the average bit rate to the average download speed of the content slice, which is used to represent the multiple relationship between the duration of the complete content slice and the preset duration. Since the average bit rate is smaller than the average download speed of the content slices, and the difference is at least one order of magnitude, the ratio is less than 1, so it is easy to determine a duration factor less than 1 according to the ratio.

最后,将时长系数与所述完整内容切片时长的乘积作为所述预设时长。Finally, the product of the duration coefficient and the duration of the complete content slice is used as the preset duration.

本发明实施例中提供的内容分发网络的存储优化方法,采用平均码率以及内容切片平均下载速度,确定出预设时长。使确定出的预设时长可以适用于内容中心对应的所有边缘节点,同时可以尽可能保证服务体验以及节约存储。The storage optimization method for a content distribution network provided in the embodiment of the present invention uses an average bit rate and an average download speed of content slices to determine a preset duration. The determined preset duration can be applied to all edge nodes corresponding to the content center, and at the same time, the service experience and storage saving can be guaranteed as much as possible.

在上述实施例的基础上,本发明实施例中提供的所述将内存中与所述指定直播频道对应的预设时长的目标内容切片写入存储之后,还包括:On the basis of the above embodiment, after the target content slice of the preset duration corresponding to the designated live channel in the memory is written and stored in the embodiment of the present invention, the method further includes:

修改所述存储中的索引文件,将所述索引文件中与所述指定直播频道对应的内容切片文件名修改为所述目标内容切片对应的文件名。Modifying the index file in the storage, and modifying the file name of the content slice corresponding to the specified live channel in the index file to the file name corresponding to the target content slice.

具体地,本发明实施例中,由于通常使用hls协议,通过不停的推流和拉流,将ts文件传输至CDN实现全网络分发,这一过程中会产生索引文件用以指示播放的内容切片。索引文件随内容切片写入内容中心的存储,因此当将内存中与指定直播频道对应的预设时长的目标内容切片写入存储之后,需要修改存储中的索引文件,这里所说的索引文件通常为m3u8文件。由于m3u8文件中存储有ts文件的文件名,因此,将m3u8文件中与指定直播频道对应的内容切片文件名修改为目标内容切片对应的文件名,即可在播放内容切片时,选择目标内容切片进行播放。Specifically, in the embodiment of the present invention, because the hls protocol is usually used, the ts file is transmitted to the CDN to achieve network-wide distribution by continuously pushing and pulling the stream. In this process, an index file is generated to indicate the content to be played. slice. The index file is written into the storage of the content center along with the content slice. Therefore, after writing the target content slice of the preset duration corresponding to the specified live channel in the memory into the storage, the index file in the storage needs to be modified. The index file mentioned here is usually for m3u8 files. Since the file name of the ts file is stored in the m3u8 file, modify the file name of the content slice corresponding to the specified live channel in the m3u8 file to the file name corresponding to the target content slice, and then select the target content slice when playing the content slice. to play.

本发明实施例中提供的内容分发网络的存储优化方法,在将内存中与所述指定直播频道对应的预设时长的目标内容切片写入存储之后,对索引文件做适应性修改,可以保证播放时选择目标内容切片进行播放,使整个过程更加流畅,降低时延。In the storage optimization method for a content distribution network provided in the embodiment of the present invention, after the target content slice of the preset duration corresponding to the designated live channel in the memory is written into storage, the index file is adaptively modified to ensure playback Select the target content slice for playback at any time, making the whole process smoother and reducing the delay.

在上述实施例的基础上,本发明实施例中提供的内容分发网络的存储优化方法,其特征在于,还包括:On the basis of the foregoing embodiment, the storage optimization method for a content distribution network provided in the embodiment of the present invention is characterized in that, further comprising:

确认所述预设时间段内未收到某一边缘节点对指定直播频道发起的直播请求,则将所述存储中目标表格中的所述某一边缘节点删除;所述目标表格用于指示所述指定直播频道在每个边缘节点处的播放状态。Confirm that a live broadcast request initiated by an edge node to a specified live channel has not been received within the preset time period, and delete the one edge node in the target table in the storage; the target table is used to indicate the Describe the playback status of the specified live channel at each edge node.

具体地,本发明实施例中,在内容中心还存储有指示对应的边缘节点处指定直播频道的播放状态的目标表格,具体形式如下:Specifically, in the embodiment of the present invention, the content center also stores a target table indicating the playback state of the specified live channel at the corresponding edge node, and the specific form is as follows:

ID=2200179363ID=2200179363

title=“A”title="A"

ts_bit=4mb/sts_bit=4mb/s

ts_time=10s;ts_time = 10s;

server=ip(1),ip(2)server=ip(1), ip(2)

client=pop(1),pop(2)client=pop(1), pop(2)

data=/…/....2200179363data=/.../....2200179363

fastdata=/…/....2200179363_fastfastdata=/…/….2200179363_fast

fr[pop,bit]==[pop(1),10mb/s],[pop(n),5mb/s]fr[pop,bit]==[pop(1),10mb/s],[pop(n),5mb/s]

其中,上述目标表格以下表1中的A直播频道为例进行说明,表1为直播频道和直播频道对应的内容ID之间的关系表。上述目标表格中,ID指A直播频道对应的内容ID,title表示直播频道名,ts_bit表示A直播频道的平均码率,ts_time为最新完整内容切片长度,server表示内容中心对应的处于播放状态的所有边缘节点的IP地址,client表示内容中心对应的处于播放状态的所有边缘节点的名称,Data表示A直播频道的最新完整内容切片的具体信息,fastData为A直播频道的目标内容切片的具体信息,fr[pop,bit]表示处于播放状态的每个边缘节点的内容切片下载速度。Wherein, the above target table is described below by taking the live channel A in Table 1 as an example, and Table 1 is a relationship table between the live channel and the content ID corresponding to the live channel. In the above target table, ID refers to the content ID corresponding to the live channel A, title refers to the name of the live channel, ts_bit refers to the average bit rate of the live channel A, ts_time refers to the length of the latest complete content slice, and server refers to all the files in the playing state corresponding to the content center. IP address of the edge node, client represents the name of all edge nodes in the playing state corresponding to the content center, Data represents the specific information of the latest complete content slice of the A live channel, fastData is the specific information of the target content slice of the A live channel, fr [pop,bit] indicates the content slice download speed of each edge node in the playing state.

表1直播频道和直播频道对应的内容ID之间的关系表Table 1 The relationship between the live channel and the content ID corresponding to the live channel

直播频道Live channel内容IDContent IDAA22001793632200179363BB55000391195500039119CC55000282775500028277

内容中心获取直播内容的url链接为:The URL link of the content center to obtain the live content is:

IP:port/…/2200179363/index.m3u8。IP: port/…/2200179363/index.m3u8.

在内容中心,直播频道对应的内容ID对应的存储名称为“2200179363”。In the content center, the storage name corresponding to the content ID corresponding to the live channel is "2200179363".

本发明实施例中,首先判断内容中心在预设时间段内是否收到某一边缘节点对指定直播频道发起的直播请求,如果没有收到,则将存储中目标表格中的该边缘节点删除,包括名称、IP地址以及内容切片下载速度。In the embodiment of the present invention, it is first judged whether the content center has received a live broadcast request initiated by an edge node for a specified live channel within a preset time period, and if not received, the edge node in the target table in the storage is deleted, Including the name, IP address, and download speed of the content slice.

本发明实施例中,在确定内容中心在预设时间段内未收到某一边缘节点对指定直播频道发起的直播请求时,将目标表格中的该边缘节点删除,可以在步骤S1之前初步节约存储资源。In the embodiment of the present invention, when it is determined that the content center has not received a live broadcast request initiated by an edge node for a designated live channel within a preset time period, the edge node in the target table is deleted, which can save a preliminary amount of money before step S1 storage resources.

在上述实施例的基础上,所述确定边缘节点的内容切片平均下载速度,具体包括:On the basis of the foregoing embodiment, the determining the average download speed of the content slices of the edge node specifically includes:

确定每个边缘节点的内容切片下载速度;Determine the download speed of content slices for each edge node;

基于所述内容切片下载速度,确定所述内容切片平均下载速度。Based on the content slice download speed, an average download speed of the content slice is determined.

具体地,本发明实施例中,从边缘节点角度确定边缘节点的内容切片平均下载速度,首先确定每个边缘节点的内容切片下载速度,然后基于内容切片下载速度,确定内容切片平均下载速度。其中,确定每个边缘节点的内容切片下载速度时,可以通过下载的内容切片大小以及下载时间,基于如下公式确定每个边缘节点的内容切片下载速度。Specifically, in this embodiment of the present invention, the average download speed of content slices of edge nodes is determined from the perspective of edge nodes. First, the download speed of content slices of each edge node is determined, and then based on the download speed of content slices, the average download speed of content slices is determined. Wherein, when determining the content slice download speed of each edge node, the content slice download speed of each edge node can be determined based on the following formula based on the size of the downloaded content slice and the download time.

fr=filesize*8/timefr=filesize*8/time

其中,fr为每个边缘节点的内容切片下载速度,单位为mb/s;filesize为下载的内容切片大小,单位为mB;time为下载时间,单位为秒s。Among them, fr is the content slice download speed of each edge node, in mb/s; filesize is the size of the downloaded content slice, in mB; time is the download time, in seconds.

然后,求取所有边缘节点的内容切片下载速度的平均值,即可确定内容切片平均下载速度。Then, the average download speed of the content slices of all edge nodes is calculated to determine the average download speed of the content slices.

本发明实施例中,通过每个边缘节点的内容切片下载信息,确定内容切片平均下载速度,由于每个边缘节点的内容切片下载信息便于收集,使得确定内容切片平均下载速度的过程更加简化。In the embodiment of the present invention, the average download speed of content slices is determined by the content slice download information of each edge node. Since the content slice download information of each edge node is easy to collect, the process of determining the average download speed of content slices is simplified.

在上述实施例的基础上,本发明实施例中提供的内容分发网络的存储优化方法,所述基于所述平均码率与所述内容切片平均下载速度的比值,确定时长系数,具体包括:On the basis of the above embodiment, the storage optimization method for a content distribution network provided in the embodiment of the present invention, the determining the duration coefficient based on the ratio of the average bit rate to the average download speed of the content slice, specifically includes:

基于所述比值以及所述指定直播频道的热度保障权重,确定所述预设时长。The preset duration is determined based on the ratio and the popularity guarantee weight of the designated live channel.

具体地,本发明实施例中,采用平均码率与所述内容切片平均下载速度的比值与指定直播频道的热度保障权重,确定所述预设时长。如下公式所示。Specifically, in the embodiment of the present invention, the preset duration is determined by using the ratio of the average bit rate to the average download speed of the content slices and the heat protection weight of the designated live channel. as shown in the formula below.

k=ts_bit/fra*f(x)k=ts_bit/fra*f(x)

其中,k为时长系数,ts_bit为平均码率,fra为内容切片平均下载速度,f(x)为指定直播频道的热度保障权重,可以根据指定直播频道的热度进行设置,为常数。Among them, k is the duration coefficient, ts_bit is the average bit rate, fra is the average download speed of content slices, and f(x) is the heat guarantee weight of the specified live channel, which can be set according to the heat of the specified live channel and is a constant.

相应地,采用如下公式确定预设时长。Correspondingly, the following formula is used to determine the preset duration.

t_f=ts_time*k=ts_time*ts_bit/fra*f(x)=(ts_time*ts_bit/fra)*f(x)t_f=ts_time*k=ts_time*ts_bit/fra*f(x)=(ts_time*ts_bit/fra)*f(x)

其中,t_f为预设时长,ts_time为完整内容切片时长。Among them, t_f is the preset duration, and ts_time is the duration of the complete content slice.

以A直播频道为例,完整内容切片时长ts_time为10s,A直播频道的平均码率ts_bit为4mbps,内容切片平均下载速度fra为40mbps,A直播频道的热度保障权重为1.1,则预设时长为:Taking the live channel A as an example, the complete content slice duration ts_time is 10s, the average bit rate ts_bit of the A live channel is 4mbps, the average download speed fra of the content slice is 40mbps, and the heat protection weight of the A live channel is 1.1, then the preset duration is :

t_f=(10*4/40)*1.1=1.1(s)。t_f=(10*4/40)*1.1=1.1(s).

相比于现有技术中直接写入10s的完整内容切片,在预设时间段内未收到边缘节点对指定直播频道发起的直播请求时,优化CDN网络的存储利用率,可以节约8倍以上的存储,可以有效节约成本。而且,还可以优化带宽利用率,实现视频的快速加速。Compared with the existing technology, which directly writes a 10-second complete content slice, when no live broadcast request initiated by an edge node to a specified live channel is received within a preset time period, the storage utilization of the CDN network can be optimized, which can save more than 8 times. storage, which can effectively save costs. Moreover, bandwidth utilization can be optimized to achieve rapid video acceleration.

在上述实施例的基础上,本发明实施例中提供的内容分发网络存储优化方法,在确认预设时间段内未收到边缘节点对指定直播频道发起的直播请求之前,还包括:On the basis of the foregoing embodiment, the method for optimizing network storage for content distribution provided in the embodiment of the present invention further includes:

实时接收内容源站发送的所述指定直播频道对应的完整内容切片;receiving, in real time, the complete content slice corresponding to the designated live channel sent by the content source station;

将接收的所述内容源站发送的完整内容切片写入内存。Write the received complete content slice sent by the content source site into the memory.

具体地,在应用内容分发网络实现直播内容的分发与加速时,内容源站通常使用hls协议,通过不停的推流和拉流,将ts文件传输至CDN实现全网络分发。主要是将完整内容切片发送至CDN的内容中心。所以,在内容中心将内存中与所述指定直播频道对应的预设时长的目标内容切片写入存储之前,还包括:内容中心实时接收内容源站发送的指定直播频道对应的完整内容切片,然后将接收的内容源站发送的完整内容切片写入内存。如此在确认预设时间段内未收到边缘节点对指定直播频道发起的直播请求时,内容中心的内存中已写入了内容源站发送的指定直播频道对应的完整内容切片。相应地,内存中与所述指定直播频道对应的预设时长的目标内容切片是完整内容切片的一部分,将内存中与所述指定直播频道对应的预设时长的目标内容切片写入存储是指将完整内容切片的一部分写入存储,而不是全部。Specifically, when the content distribution network is used to realize the distribution and acceleration of live content, the content source station usually uses the hls protocol to transmit the ts file to the CDN to achieve network-wide distribution through continuous push and pull streams. It is mainly to send complete content slices to the content center of the CDN. Therefore, before the content center writes the target content slice of the preset duration corresponding to the designated live channel in the memory into storage, the method further includes: the content center receives the complete content slice corresponding to the designated live channel sent by the content source station in real time, and then Writes the received full content slice sent by the content origin into memory. In this way, when it is confirmed that the live broadcast request initiated by the edge node for the specified live channel is not received within the preset time period, the complete content slice corresponding to the specified live channel sent by the content source station has been written in the memory of the content center. Correspondingly, the target content slice of the preset duration corresponding to the specified live channel in the memory is a part of the complete content slice, and writing the target content slice of the preset duration corresponding to the specified live channel in the memory into storage refers to: Write a portion of the full content slice to storage, not the entirety.

如图3所示,在上述实施例的基础上,本发明实施例中提供的内容分发网络的存储优化方法,包括:As shown in FIG. 3, on the basis of the above-mentioned embodiment, the storage optimization method of the content distribution network provided in the embodiment of the present invention includes:

S31,在预设时间段内未收到用户终端对指定直播频道发起的直播请求后,若接收到任一用户终端对指定直播频道发起的直播请求,将存储内预设时长的目标内容切片发送至所述任一用户终端,并向内容中心发送所述直播请求;S31: After the live broadcast request initiated by the user terminal for the designated live channel is not received within the preset time period, if a live broadcast request initiated by any user terminal to the designated live channel is received, send the target content slices with the preset duration in the storage to any of the user terminals, and send the live broadcast request to the content center;

S32,接收与所述指定直播频道对应的最新完整内容切片,当再次获取所述任一用户终端对所述指定直播频道发起的直播请求时,将所述最新完整内容切片发送至所述任一用户终端。S32: Receive the latest complete content slice corresponding to the designated live channel, and send the latest complete content slice to any of the designated live channels when acquiring the live broadcast request initiated by the any user terminal for the designated live channel again. user terminal.

具体地,本发明实施例中提供的内容分发网络的存储优化方法,执行主体为CDN的边缘节点,其应用场景为预设时间段内未收到用户终端对指定直播频道发起的直播请求之后,即此时边缘节点的存储中已写入了预设时长的目标内容切片。首先执行步骤S31,在预设时间段内未收到用户终端对指定直播频道发起的直播请求后,若接收到任一用户终端M对指定直播频道发起的直播请求,将存储内预设时长的目标内容切片发送至用户终端M,并向内容中心发送所述直播请求。边缘节点获取用户终端M对指定直播频道发起的直播请求后,将边缘节点的存储内预设时长的目标内容切片发送至用户终端M,同时向边缘节点对应的内容中心发送直播请求,以使内容中心在接到直播请求后,将内容中心的内存内与指定直播频道对应的最新完整内容切片写入内容中心的存储,并将最新完整内容切片返回边缘节点。Specifically, the storage optimization method for a content distribution network provided in the embodiment of the present invention is executed by an edge node of a CDN, and its application scenario is that after a live broadcast request initiated by a user terminal for a specified live channel is not received within a preset time period, That is, a target content slice with a preset duration has been written into the storage of the edge node at this time. First, step S31 is executed, after the live broadcast request initiated by the user terminal to the designated live channel is not received within the preset time period, if any user terminal M receives the live broadcast request initiated by the designated live channel, the preset time duration will be stored in the storage. The target content slice is sent to the user terminal M, and the live broadcast request is sent to the content center. After the edge node obtains the live broadcast request initiated by the user terminal M for the specified live channel, it sends the target content slice with a preset duration in the storage of the edge node to the user terminal M, and at the same time sends the live broadcast request to the content center corresponding to the edge node, so that the content After receiving the live broadcast request, the center writes the latest complete content slice corresponding to the specified live channel in the content center's memory to the content center's storage, and returns the latest complete content slice to the edge node.

然后执行步骤S32,边缘节点接收内容中心发送的、与指定直播频道对应的最新完整内容切片并写入边缘节点的存储,当边缘节点再次获取用户终端M对指定直播频道发起的直播请求时,将最新完整内容切片发送至用户终端M。Then step S32 is executed, the edge node receives the latest complete content slice corresponding to the designated live channel sent by the content center and writes it into the storage of the edge node. When the edge node obtains the live broadcast request initiated by the user terminal M for the designated live channel again, the The latest complete content slice is sent to the user terminal M.

需要说明的是,用户终端对指定直播频道发起直播请求的时间间隔通常为内容切片的长度,即预设时间段内未收到用户终端对指定直播频道发起的直播请求之后,重新收到用户终端对指定直播频道发起的直播请求,用户终端会接收到边缘节点发送的预设时长的目标内容切片,当用户终端播放完目标内容切片后,则会再次发起直播请求,此后的执行操作与现有技术中一致,即回到正常的直播状态。It should be noted that the time interval for the user terminal to initiate a live broadcast request to the specified live channel is usually the length of the content slice, that is, after the user terminal does not receive a live broadcast request initiated by the user terminal to the specified live channel within the preset time period, the user terminal will be re-received. For a live broadcast request initiated by a specified live channel, the user terminal will receive the target content slice with a preset duration sent by the edge node. After the user terminal finishes playing the target content slice, it will initiate a live broadcast request again, and the subsequent execution operations are the same as the existing ones. The technology is consistent, that is, it returns to the normal live broadcast state.

本发明实施例中提供的内容分发网络的存储优化方法,在预设时间段内未收到用户终端对指定直播频道发起的直播请求后,若边缘节点接收到任一用户终端对指定直播频道发起的直播请求,将存储内预设时长的目标内容切片发送至所述任一用户终端,并向内容中心发送直播请求;然后接收与指定直播频道对应的最新完整内容切片并写入存储,当再次获取所述任一用户终端对指定直播频道发起的直播请求时,将最新完整内容切片发送至所述任一用户终端。边缘节点接收的内容切片的时长小于正常情况下的完整内容切片时长,可以节约边缘节点的存储资源,同时可以节约边缘节点至用户终端之间的传输带宽资源。另外,当边缘节点收到用户终端对指定直播频道发起的直播请求时,直接从自身存储中将目标内容切片发送至用户终端,降低了网络延时。In the storage optimization method for a content distribution network provided in the embodiment of the present invention, after a live broadcast request initiated by a user terminal to a designated live channel is not received within a preset time period, if the edge node receives any user terminal initiated by a designated live channel send the target content slice with preset duration in the storage to any of the user terminals, and send the live broadcast request to the content center; then receive the latest complete content slice corresponding to the specified live channel and write it into storage, when it is again When acquiring the live broadcast request initiated by the any user terminal to the designated live channel, the latest complete content slice is sent to the any user terminal. The duration of the content slice received by the edge node is shorter than the duration of the complete content slice under normal conditions, which can save the storage resources of the edge node and the transmission bandwidth resources between the edge node and the user terminal. In addition, when the edge node receives the live broadcast request initiated by the user terminal for the designated live channel, it directly sends the target content slice from its own storage to the user terminal, which reduces the network delay.

在上述实施例的基础上,本发明实施例中还提供了一种内容分发网络,包括:一个或者多个内容中心,每个内容中心分别对应于一个或者多个边缘节点;其中,所述内容中心用于执行上述以内容中心为执行主体的方法类实施例中示出的内容分发网络的存储优化方法;所述边缘节点用于执行上述以边缘节点为执行主体的方法类实施例中示出的内容分发网络的存储优化方法。On the basis of the above-mentioned embodiment, an embodiment of the present invention further provides a content distribution network, including: one or more content centers, each content center corresponding to one or more edge nodes; wherein, the content The center is used to execute the storage optimization method of the content distribution network shown in the above-mentioned method class embodiment with the content center as the execution body; the edge node is used to execute the above-mentioned method class with the edge node as the execution body shown in the embodiment class embodiment Storage Optimization Methods for Content Delivery Networks.

具体地,所述内容中心用于确认预设时间段内未收到边缘节点对指定直播频道发起的直播请求,将内存中与所述指定直播频道对应的预设时长的目标内容切片写入存储,并将所述目标内容切片发送至所述边缘节点;所述预设时长小于与所述指定直播频道对应的完整内容切片时长;Specifically, the content center is used to confirm that the live broadcast request initiated by the edge node to the designated live channel has not been received within the preset time period, and write the target content slice of the preset time length corresponding to the designated live channel in the memory into storage. , and send the target content slice to the edge node; the preset duration is less than the complete content slice duration corresponding to the designated live channel;

所述边缘节点用于在预设时间段内未收到用户终端对指定直播频道发起的直播请求后,若接收到任一用户终端对指定直播频道发起的直播请求,将存储内预设时长的目标内容切片发送至所述任一用户终端,并向内容中心发送所述直播请求;The edge node is used to store the preset time length in the storage if it receives a live broadcast request initiated by any user terminal to the designated live channel after not receiving the live broadcast request initiated by the user terminal to the designated live channel within the preset time period. sending the target content slice to any of the user terminals, and sending the live broadcast request to the content center;

所述内容中心还用于将所述目标内容切片发送至所述边缘节点后,若接收到任一边缘节点对所述指定直播频道发起的直播请求,将内存内与所述指定直播频道对应的最新完整内容切片写入所述存储,并将所述最新完整内容切片发送至所述任一边缘节点;The content center is further configured to send the target content slice to the edge node, if any edge node receives a live broadcast request initiated by the designated live channel, the content center corresponding to the designated live channel will be stored in the memory. writing the latest complete content slice into the storage, and sending the latest complete content slice to any of the edge nodes;

所述边缘节点还用于接收与所述指定直播频道对应的最新完整内容切片,当再次获取所述任一用户终端对所述指定直播频道发起的直播请求时,将所述最新完整内容切片发送至所述任一用户终端。The edge node is further configured to receive the latest complete content slice corresponding to the designated live channel, and send the latest complete content slice when acquiring a live broadcast request initiated by any user terminal to the designated live channel again. to any of the user terminals.

具体地,如图4所示,为本发明实施例中提供的一种内容分发网络的结构示意图。图4中仅示出了两个内容中心2、3,以及每个内容中心对应的4个边缘节点,分别为pop21、pop22、pop23、pop24以及pop31、pop32、pop33、pop34。内容中心的具体作用的实现参见上述以内容中心为执行主体的方法类实施例,边缘节点的具体作用的实现参见上述以边缘节点为执行主体的方法类实施例,本发明实施例中不再赘述。Specifically, as shown in FIG. 4 , it is a schematic structural diagram of a content distribution network provided in an embodiment of the present invention. Figure 4 shows only twocontent centers 2 and 3, and four edge nodes corresponding to each content center, which are pop21, pop22, pop23, pop24, and pop31, pop32, pop33, and pop34, respectively. For the implementation of the specific role of the content center, please refer to the above-mentioned method embodiment with the content center as the main body of execution, and the implementation of the specific role of the edge node may refer to the above-mentioned method type embodiment with the edge node as the main body of execution, which will not be repeated in this embodiment of the present invention. .

本发明实施例中提供的内容分发网络,内容中心在预设时间段内未收到边缘节点对指定直播频道发起的直播请求时,将内存中与指定直播频道对应的预设时长的目标内容切片写入存储,并将目标内容切片发送至边缘节点。使写入内容中心的存储中的内容切片的时长小于正常情况下的完整内容切片时长,可以节约内容中心的存储资源,同时可以节约内容源站至内容中心之间的传输带宽资源。另外,将目标内容切片发送至边缘节点,使边缘节点写入存储,当边缘节点收到用户终端对指定直播频道发起的直播请求时,直接从自身存储中将目标内容切片发送至用户终端,降低了网络延时。边缘节点首先获取用户终端对指定直播频道发起的直播请求,将存储内预设时长的目标内容切片发送至用户终端,并向内容中心发送直播请求;然后接收与指定直播频道对应的最新完整内容切片并写入存储,当再次获取用户终端对指定直播频道发起的直播请求时,将最新完整内容切片发送至用户终端。边缘节点接收的内容切片的时长小于正常情况下的完整内容切片时长,可以节约边缘节点的存储资源,同时可以节约边缘节点至用户终端之间的传输带宽资源。另外,当边缘节点收到用户终端对指定直播频道发起的直播请求时,直接从自身存储中将目标内容切片发送至用户终端,降低了网络延时。In the content distribution network provided in the embodiment of the present invention, when the content center does not receive a live broadcast request initiated by an edge node for a specified live channel within a preset time period, it slices the target content of the preset duration corresponding to the specified live channel in the memory Write to storage and send the target content slice to edge nodes. The duration of the content slice written in the storage of the content center is shorter than the duration of the complete content slice under normal conditions, which can save the storage resources of the content center and the transmission bandwidth resources between the content source station and the content center. In addition, the target content slice is sent to the edge node, so that the edge node writes to the storage. When the edge node receives the live broadcast request initiated by the user terminal for the specified live channel, it directly sends the target content slice from its own storage to the user terminal. network delay. The edge node first obtains the live broadcast request initiated by the user terminal to the specified live broadcast channel, sends the target content slice with a preset duration in the storage to the user terminal, and sends the live broadcast request to the content center; then receives the latest complete content slice corresponding to the specified live broadcast channel. and write into storage, and when the live broadcast request initiated by the user terminal to the designated live channel is obtained again, the latest complete content slice is sent to the user terminal. The duration of the content slice received by the edge node is shorter than the duration of the complete content slice under normal conditions, which can save the storage resources of the edge node and the transmission bandwidth resources between the edge node and the user terminal. In addition, when the edge node receives the live broadcast request initiated by the user terminal for the designated live channel, it directly sends the target content slice from its own storage to the user terminal, which reduces the network delay.

如图5所示,在上述实施例的基础上,本发明实施例中提供了一种内容分发网络的存储优化装置,包括:内容切片写入模块51和内容切片发送模块52。其中,As shown in FIG. 5 , on the basis of the foregoing embodiment, an embodiment of the present invention provides a storage optimization device for a content distribution network, including: a contentslice writing module 51 and a contentslice sending module 52 . in,

内容切片写入模块51用于确认预设时间段内未收到边缘节点对指定直播频道发起的直播请求,将内存中与所述指定直播频道对应的预设时长的目标内容切片写入存储,并将所述目标内容切片发送至所述边缘节点;所述预设时长小于与所述指定直播频道对应的完整内容切片时长;The contentslice writing module 51 is configured to confirm that the live broadcast request initiated by the edge node to the designated live channel has not been received within the preset time period, and write and store the target content slice of the preset time length corresponding to the designated live channel in the memory, and sending the target content slice to the edge node; the preset duration is less than the duration of the complete content slice corresponding to the designated live channel;

内容切片发送模块52用于将所述目标内容切片发送至所述边缘节点后,若接收到任一边缘节点对所述指定直播频道发起的直播请求,将所述内存内与所述指定直播频道对应的最新完整内容切片写入所述存储,并将所述最新完整内容切片发送至所述任一边缘节点。The contentslice sending module 52 is configured to send the target content slice to the edge node, if any edge node receives a live broadcast request initiated by the designated live channel, send the content in the memory to the designated live channel. The corresponding latest complete content slice is written into the storage, and the latest complete content slice is sent to any of the edge nodes.

具体地,本发明实施例中提供的内容分发网络的存储优化装置中各模块的作用与上述以内容中心为执行主体的方法类实施例中各步骤的操作流程是一一对应的,实现的效果也是一致的,本发明实施例中不再赘述。Specifically, the functions of the modules in the storage optimization device for the content distribution network provided in the embodiment of the present invention correspond one-to-one with the operation flow of each step in the above-mentioned method embodiment with the content center as the main body of execution, and the effect achieved is The same is also true, and details are not repeated in this embodiment of the present invention.

在上述实施例的基础上,本发明实施例中提供的内容分发网络的存储优化装置,还包括:预设时长确定模块,具体用于:On the basis of the foregoing embodiment, the storage optimization device for a content distribution network provided in the embodiment of the present invention further includes: a preset duration determination module, which is specifically used for:

确定边缘节点的内容切片平均下载速度以及所述指定直播频道的平均码率;Determine the average download speed of the content slices of the edge node and the average bit rate of the specified live channel;

基于所述平均码率与所述内容切片平均下载速度的比值,确定时长系数;determining a duration factor based on the ratio of the average bit rate to the average download speed of the content slice;

将所述时长系数与所述完整内容切片时长的乘积作为所述预设时长;taking the product of the duration coefficient and the duration of the complete content slice as the preset duration;

其中,所述时长系数小于1。Wherein, the duration factor is less than 1.

在上述实施例的基础上,本发明实施例中提供的内容分发网络的存储优化装置,还包括:修改模块,用于:On the basis of the foregoing embodiment, the storage optimization device for a content distribution network provided in the embodiment of the present invention further includes: a modification module, configured to:

修改所述存储中的索引文件,将所述索引文件中与所述指定直播频道对应的内容切片文件名修改为所述目标内容切片对应的文件名。Modifying the index file in the storage, and modifying the file name of the content slice corresponding to the specified live channel in the index file to the file name corresponding to the target content slice.

在上述实施例的基础上,本发明实施例中提供的内容分发网络的存储优化装置,还包括:删除模块,用于:On the basis of the foregoing embodiment, the storage optimization device for a content distribution network provided in the embodiment of the present invention further includes: a deletion module, configured to:

确认所述预设时间段内未收到某一边缘节点对指定直播频道发起的直播请求,则将所述存储中目标表格中的所述某一边缘节点删除;所述目标表格用于指示所述指定直播频道在每个边缘节点处的播放状态。Confirm that a live broadcast request initiated by an edge node to a specified live channel has not been received within the preset time period, and delete the one edge node in the target table in the storage; the target table is used to indicate the Describe the playback status of the specified live channel at each edge node.

在上述实施例的基础上,本发明实施例中提供的内容分发网络的存储优化装置,所述预设时长确定模块,具体用于:On the basis of the foregoing embodiment, in the storage optimization device for a content distribution network provided in the embodiment of the present invention, the preset duration determination module is specifically used for:

基于所述比值以及所述指定直播频道的热度保障权重,确定所述预设时长。The preset duration is determined based on the ratio and the popularity guarantee weight of the designated live channel.

在上述实施例的基础上,本发明实施例中提供的内容分发网络的存储优化装置,还包括:内容切片接收模块,用于:On the basis of the foregoing embodiment, the storage optimization device for a content distribution network provided in the embodiment of the present invention further includes: a content slice receiving module, configured to:

在确认预设时间段内未收到边缘节点对指定直播频道发起的直播请求之前,实时接收内容源站发送的所述指定直播频道对应的完整内容切片;Receive, in real time, the complete content slice corresponding to the designated live channel sent by the content source station before confirming that the live broadcast request initiated by the edge node to the designated live channel has not been received within the preset time period;

将接收的所述内容源站发送的完整内容切片写入内存。Write the received complete content slice sent by the content source site into the memory.

如图6所示,在上述实施例的基础上,本发明实施例中提供了一种内容分发网络的存储优化装置,包括:直播请求发送模块61和内容切片接收模块62。其中,As shown in FIG. 6 , on the basis of the foregoing embodiment, an embodiment of the present invention provides a storage optimization device for a content distribution network, including: a live broadcastrequest sending module 61 and a contentslice receiving module 62 . in,

直播请求发送模块61用于在预设时间段内未收到用户终端对指定直播频道发起的直播请求后,若接收到任一用户终端对指定直播频道发起的直播请求,将存储内预设时长的目标内容切片发送至所述任一用户终端,并向内容中心发送所述直播请求;The live broadcastrequest sending module 61 is configured to store the preset time length in the storage if a live broadcast request initiated by any user terminal to the designated live channel is received after the user terminal has not received the live broadcast request initiated by the user terminal to the designated live channel within the preset time period. The target content slice is sent to any user terminal, and the live broadcast request is sent to the content center;

内容切片接收模块62用于接收与所述指定直播频道对应的最新完整内容切片并写入存储,当再次获取所述任一用户终端对所述指定直播频道发起的直播请求时,将所述最新完整内容切片发送至所述任一用户终端。The contentslice receiving module 62 is configured to receive the latest complete content slice corresponding to the specified live channel and write it into storage. The complete content slice is sent to any of the user terminals.

具体地,本发明实施例中提供的内容分发网络的存储优化装置中各模块的作用与上述以边缘节点为执行主体的方法类实施例中各步骤的操作流程是一一对应的,实现的效果也是一致的,本发明实施例中不再赘述。Specifically, the functions of the modules in the storage optimization device for the content distribution network provided in the embodiment of the present invention correspond one-to-one with the operation flow of each step in the above-mentioned method embodiment with the edge node as the main body of execution, and the effect achieved is The same is also true, and details are not repeated in this embodiment of the present invention.

图7示例了一种电子设备的实体结构示意图,如图7所示,该电子设备可以包括:处理器(processor)710、通信接口(Communications Interface)720、存储器(memory)830和通信总线740,其中,处理器710,通信接口720,存储器730通过通信总线740完成相互间的通信。处理器710可以调用存储器730中的逻辑指令,以执行如下方法:确认预设时间段内未收到边缘节点对指定直播频道发起的直播请求,将内存中与所述指定直播频道对应的预设时长的目标内容切片写入存储,并将所述目标内容切片发送至所述边缘节点;所述预设时长小于与所述指定直播频道对应的完整内容切片时长;将所述目标内容切片发送至所述边缘节点后,若接收到任一边缘节点对所述指定直播频道发起的直播请求,将所述内存内与所述指定直播频道对应的最新完整内容切片写入所述存储,并将所述最新完整内容切片发送至所述任一边缘节点。或者执行如下方法:在预设时间段内未收到用户终端对指定直播频道发起的直播请求后,若接收到任一用户终端对指定直播频道发起的直播请求,将存储内预设时长的目标内容切片发送至所述任一用户终端,并向内容中心发送所述直播请求;接收与所述指定直播频道对应的最新完整内容切片并写入存储,当再次获取所述任一用户终端对所述指定直播频道发起的直播请求时,将所述最新完整内容切片发送至所述任一用户终端。FIG. 7 illustrates a schematic diagram of the physical structure of an electronic device. As shown in FIG. 7 , the electronic device may include: a processor (processor) 710, a communication interface (Communications Interface) 720, a memory (memory) 830, and acommunication bus 740, Theprocessor 710 , thecommunication interface 720 , and thememory 730 communicate with each other through thecommunication bus 740 . Theprocessor 710 can call the logic instruction in thememory 730 to perform the following method: confirming that no live broadcast request initiated by the edge node to the specified live channel is received within the preset time period, and the preset corresponding to the specified live channel in the memory is stored. Write and store the target content slice of the duration, and send the target content slice to the edge node; the preset duration is less than the duration of the complete content slice corresponding to the specified live channel; send the target content slice to After the edge node, if receiving a live broadcast request initiated by any edge node to the designated live channel, write the latest complete content slice in the memory corresponding to the designated live channel into the storage, and store all the content slices in the memory. The latest complete content slice is sent to any of the edge nodes. Or perform the following method: after a live broadcast request initiated by the user terminal to the specified live channel is not received within a preset time period, if any user terminal receives a live broadcast request initiated by the designated live channel, the target of the preset duration is stored in the storage. The content slice is sent to any of the user terminals, and the live broadcast request is sent to the content center; the latest complete content slice corresponding to the specified live channel is received and written into storage. When a live broadcast request initiated by the specified live broadcast channel is sent, the latest complete content slice is sent to any of the user terminals.

需要说明的是,本实施例中的电子设备在具体实现时可以为服务器,也可以为PC机,还可以为其他设备,只要其结构中包括如图7所示的处理器710、通信接口720、存储器730和通信总线740,其中处理器710,通信接口720,存储器730通过通信总线740完成相互间的通信,且处理器710可以调用存储器730中的逻辑指令以执行上述方法即可。本实施例不对电子设备的具体实现形式进行限定。It should be noted that the electronic device in this embodiment may be a server, a PC, or other devices during specific implementation, as long as its structure includes theprocessor 710 and thecommunication interface 720 as shown in FIG. 7 . , amemory 730 and acommunication bus 740, wherein theprocessor 710, thecommunication interface 720, and thememory 730 communicate with each other through thecommunication bus 740, and theprocessor 710 can call the logic instructions in thememory 730 to execute the above method. This embodiment does not limit the specific implementation form of the electronic device.

此外,上述的存储器730中的逻辑指令可以通过软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。In addition, the above-mentioned logic instructions in thememory 730 can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present invention can be embodied in the form of a software product in essence, or the part that contributes to the prior art or the part of the technical solution. The computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, Read-Only Memory (ROM, Read-Only Memory), Random Access Memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program codes .

进一步地,本发明实施例公开一种计算机程序产品,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,计算机能够执行上述各方法实施例所提供的方法,例如包括:确认预设时间段内未收到边缘节点对指定直播频道发起的直播请求,将内存中与所述指定直播频道对应的预设时长的目标内容切片写入存储,并将所述目标内容切片发送至所述边缘节点;所述预设时长小于与所述指定直播频道对应的完整内容切片时长;将所述目标内容切片发送至所述边缘节点后,若接收到任一边缘节点对所述指定直播频道发起的直播请求,将所述内存内与所述指定直播频道对应的最新完整内容切片写入所述存储,并将所述最新完整内容切片发送至所述任一边缘节点。或者包括:在预设时间段内未收到用户终端对指定直播频道发起的直播请求后,若接收到任一用户终端对指定直播频道发起的直播请求,将存储内预设时长的目标内容切片发送至所述任一用户终端,并向内容中心发送所述直播请求;接收与所述指定直播频道对应的最新完整内容切片并写入存储,当再次获取所述任一用户终端对所述指定直播频道发起的直播请求时,将所述最新完整内容切片发送至所述任一用户终端。Further, an embodiment of the present invention discloses a computer program product, the computer program product includes a computer program stored on a non-transitory computer-readable storage medium, the computer program includes program instructions, and when the program instructions are executed by a computer During execution, the computer can execute the methods provided by the above method embodiments, for example, including: confirming that no live broadcast request initiated by the edge node to the designated live channel is received within a preset time period, and storing the corresponding live channel in the memory. Write and store the target content slice with a preset duration, and send the target content slice to the edge node; the preset duration is less than the complete content slice duration corresponding to the specified live channel; slice the target content After sending to the edge node, if a live broadcast request initiated by any edge node to the designated live channel is received, write the latest complete content slice corresponding to the designated live channel in the memory into the storage, and The latest complete content slice is sent to any of the edge nodes. Or include: after the user terminal does not receive a live broadcast request initiated by the user terminal to the specified live channel channel within a preset time period, if any user terminal receives a live broadcast request initiated by the designated live channel channel, slice the target content of the preset duration in the storage. Send to any user terminal, and send the live broadcast request to the content center; receive the latest complete content slice corresponding to the specified live channel and write it into storage, When a live broadcast request is initiated by a live broadcast channel, the latest complete content slice is sent to any of the user terminals.

另一方面,本发明实施例还提供一种非暂态计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现以执行上述各实施例提供的传输方法,例如包括:确认预设时间段内未收到边缘节点对指定直播频道发起的直播请求,将内存中与所述指定直播频道对应的预设时长的目标内容切片写入存储,并将所述目标内容切片发送至所述边缘节点;所述预设时长小于与所述指定直播频道对应的完整内容切片时长;将所述目标内容切片发送至所述边缘节点后,若接收到任一边缘节点对所述指定直播频道发起的直播请求,将所述内存内与所述指定直播频道对应的最新完整内容切片写入所述存储,并将所述最新完整内容切片发送至所述任一边缘节点。或者包括:在预设时间段内未收到用户终端对指定直播频道发起的直播请求后,若接收到任一用户终端对指定直播频道发起的直播请求,将存储内预设时长的目标内容切片发送至所述任一用户终端,并向内容中心发送所述直播请求;接收与所述指定直播频道对应的最新完整内容切片并写入存储,当再次获取所述任一用户终端对所述指定直播频道发起的直播请求时,将所述最新完整内容切片发送至所述任一用户终端。On the other hand, an embodiment of the present invention further provides a non-transitory computer-readable storage medium on which a computer program is stored, and the computer program is implemented by a processor to execute the transmission method provided by the above embodiments, for example, including : Confirm that the live broadcast request initiated by the edge node to the specified live channel has not been received within the preset time period, write the target content slice of the preset duration corresponding to the specified live channel in the memory into storage, and slice the target content sent to the edge node; the preset duration is less than the duration of the complete content slice corresponding to the designated live channel; after the target content slice is sent to the edge node, if any edge node receives a response to the For a live broadcast request initiated by a designated live broadcast channel, write the latest complete content slice in the memory corresponding to the designated live broadcast channel into the storage, and send the latest complete content slice to any of the edge nodes. Or include: after the user terminal does not receive a live broadcast request initiated by the user terminal to the specified live channel channel within a preset time period, if any user terminal receives a live broadcast request initiated by the designated live channel channel, slice the target content of the preset duration in the storage. Send to any user terminal, and send the live broadcast request to the content center; receive the latest complete content slice corresponding to the specified live channel and write it into storage, When a live broadcast request is initiated by a live broadcast channel, the latest complete content slice is sent to any of the user terminals.

以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性的劳动的情况下,即可以理解并实施。The device embodiments described above are only illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in One place, or it can be distributed over multiple network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution in this embodiment. Those of ordinary skill in the art can understand and implement it without creative effort.

通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件。基于这样的理解,上述技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行各个实施例或者实施例的某些部分所述的方法。From the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and certainly can also be implemented by hardware. Based on this understanding, the above-mentioned technical solutions can be embodied in the form of software products in essence or the parts that make contributions to the prior art, and the computer software products can be stored in computer-readable storage media, such as ROM/RAM, magnetic A disc, an optical disc, etc., includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform the methods described in various embodiments or some parts of the embodiments.

最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, but not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that it can still be The technical solutions described in the foregoing embodiments are modified, or some technical features thereof are equivalently replaced; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (9)

CN201911149884.6A2019-11-212019-11-21Content distribution network, storage optimization method thereof, electronic device, and storage mediumActiveCN110856007B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201911149884.6ACN110856007B (en)2019-11-212019-11-21Content distribution network, storage optimization method thereof, electronic device, and storage medium

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201911149884.6ACN110856007B (en)2019-11-212019-11-21Content distribution network, storage optimization method thereof, electronic device, and storage medium

Publications (2)

Publication NumberPublication Date
CN110856007A CN110856007A (en)2020-02-28
CN110856007Btrue CN110856007B (en)2021-12-03

Family

ID=69603237

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201911149884.6AActiveCN110856007B (en)2019-11-212019-11-21Content distribution network, storage optimization method thereof, electronic device, and storage medium

Country Status (1)

CountryLink
CN (1)CN110856007B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN112422686B (en)*2020-11-192023-01-24北京浪潮数据技术有限公司Cloud platform optimization method, device, equipment and readable storage medium
CN113489999B (en)*2021-06-232023-04-21北京金山云网络技术有限公司Data transmission method, device, system, electronic equipment and storage medium
CN114390099B (en)*2022-01-122023-06-02中国联合网络通信集团有限公司Content distribution method and edge server
CN114666318B (en)*2022-02-172024-04-12网宿科技股份有限公司 Method, device, electronic device and storage medium for downloading streaming media data

Citations (6)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
WO2005060229A2 (en)*2003-12-102005-06-30Time Warner Inc.Method and apparatus for exchanging preferences for replaying a program on a personal video recorder
CN101207799A (en)*2007-11-222008-06-25深圳市同洲电子股份有限公司System and method for storing program and program ordering system
CN101345690A (en)*2007-07-122009-01-14中国电信股份有限公司Contents grading memory of telecommunication level P2P network and transmission method
CN102447973A (en)*2011-10-102012-05-09华为技术有限公司Method, device and system for cache adjustment
CN103747047A (en)*2013-12-242014-04-23乐视网信息技术(北京)股份有限公司CDN file storage method, file distribution control center and system thereof
CN108513162A (en)*2017-02-232018-09-07中兴通讯股份有限公司Caching, playback method and the system reviewed is broadcast live

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US9049484B2 (en)*2011-12-062015-06-02Echostar Technologies L.L.C.Efficient assignment of program copies in a network digital video recorder

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
WO2005060229A2 (en)*2003-12-102005-06-30Time Warner Inc.Method and apparatus for exchanging preferences for replaying a program on a personal video recorder
CN101345690A (en)*2007-07-122009-01-14中国电信股份有限公司Contents grading memory of telecommunication level P2P network and transmission method
CN101207799A (en)*2007-11-222008-06-25深圳市同洲电子股份有限公司System and method for storing program and program ordering system
CN102447973A (en)*2011-10-102012-05-09华为技术有限公司Method, device and system for cache adjustment
CN103747047A (en)*2013-12-242014-04-23乐视网信息技术(北京)股份有限公司CDN file storage method, file distribution control center and system thereof
CN108513162A (en)*2017-02-232018-09-07中兴通讯股份有限公司Caching, playback method and the system reviewed is broadcast live

Also Published As

Publication numberPublication date
CN110856007A (en)2020-02-28

Similar Documents

PublicationPublication DateTitle
CN110856007B (en)Content distribution network, storage optimization method thereof, electronic device, and storage medium
KR101072966B1 (en)Method, device and system for distributing file data
US20130144984A1 (en)Systems and Methods for Connection Pooling for Video Streaming in Content Delivery Networks
US20040111492A1 (en)Access relaying apparatus
CN110445723B (en)Network data scheduling method and edge node
CN101626385B (en)media service method and system
WO2019128800A1 (en)Content service implementation method and device, and content delivery network node
CN112543357B (en)Stream media data transmission method based on DASH protocol
US12200051B2 (en)Peer-to-peer network scheduling method and system
US9356985B2 (en)Streaming video to cellular phones
WO2017125017A1 (en)Method for adjusting cache content, device, and system
CN103430489A (en)File download method, device, and system in content delivery network
CN102055718A (en)Method, device and system for layering request content in http streaming system
CN102158518B (en)Data transmission method in content distribution network (CDN), network node and system
CN105898388A (en)Node downloading scheduling method and node downloading scheduling device
WO2022166593A1 (en)Pont-to-point network scheduling method and system
CN113891176B (en)HLS-based on-demand flow control method, device, equipment and storage medium
US11218412B2 (en)Method and system for managing the download of data
JP5699619B2 (en) Cache device, data management method, program, and cache system
CN110012071A (en)Caching method and device for Internet of Things
WO2013185547A1 (en)Caching server service method, caching server and system thereof
WO2024032363A1 (en)Back-to-source processing method and apparatus, and computing device and storage medium
KR102235622B1 (en)Method and Apparatus for Cooperative Edge Caching in IoT Environment
CN113810461B (en)Bandwidth control method, device and equipment and readable storage medium
CN103401892A (en)HTTP POST based data upload accelerating method and server

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp