WO2022170934A1 - 一种内容分发网络带宽调度的方法、装置及设备 - Google Patents

一种内容分发网络带宽调度的方法、装置及设备 Download PDF

Info

Publication number
WO2022170934A1
WO2022170934A1 PCT/CN2022/072831 CN2022072831W WO2022170934A1 WO 2022170934 A1 WO2022170934 A1 WO 2022170934A1 CN 2022072831 W CN2022072831 W CN 2022072831W WO 2022170934 A1 WO2022170934 A1 WO 2022170934A1
Authority
WO
WIPO (PCT)
Prior art keywords
bandwidth
target
cdn
cache file
scheduling
Prior art date
Application number
PCT/CN2022/072831
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 WO2022170934A1 publication Critical patent/WO2022170934A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0896Bandwidth or capacity management, i.e. automatically increasing or decreasing capacities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/566Grouping or aggregating service requests, e.g. for unified processing

Definitions

  • the present application relates to the field of computer technologies, and in particular, to a method, apparatus, and device for bandwidth scheduling of content distribution networks.
  • CDN Content Delivery Network
  • the CDN has a CDN edge node and a CDN central node.
  • the CDN central node is used to manage the CDN edge nodes, and the CDN edge nodes are connected with end users.
  • CDN edge nodes may be referred to as CDN nodes for short.
  • the bandwidth of the CDN node needs to be controlled so that the bandwidth of the CDN node is below the planned bandwidth and as close as possible to the planned bandwidth.
  • the CDN node forwards some requests to other CDN nodes. When other CDN nodes process forwarded requests, it may result in an increase in the back-to-origin of requests.
  • embodiments of the present application provide a method, apparatus, and device for bandwidth scheduling of a content distribution network, which can reduce the back-to-source of requests when a CDN node processes a network request.
  • a method for CDN bandwidth scheduling in a content distribution network includes: triggering a current CDN node to start bandwidth scheduling; dividing a cache file of a target domain name into multiple caches File subsets; determine the number of cached file subsets to be scheduled according to the bandwidth to be adjusted and the occupied bandwidth of each cached file subset; determine the cached files in the cached file subset corresponding to the number of cached file subsets to be scheduled as target file; determine all requests for accessing the target file of the target domain name as target requests; forward the target requests to other CDN nodes.
  • the method further includes: determining the received access request that has not responded successfully as a target request.
  • the triggering the current CDN node to start bandwidth scheduling includes: acquiring the planned bandwidth of the current CDN node, collecting the egress bandwidth of the current CDN node, and triggering the current CDN node when the egress bandwidth is greater than the planned bandwidth.
  • the CDN node starts bandwidth scheduling; or, when receiving the bandwidth scheduling instruction sent by the CDN central node, triggers the current CDN node to start bandwidth scheduling.
  • dividing the cache file of the target domain name into multiple cache file subsets includes: performing hash calculation on the identifier of the target cache file of the target domain name to obtain a hash value; the target cache file is: Each of the cache files of the target domain name; the hash value is modulo N to obtain a group sequence number; the N is the number of cache file subsets; the target cache file is divided into the group sequence number The corresponding cache file subset.
  • determining the number of cached file subsets to be scheduled according to the bandwidth to be adjusted and the occupied bandwidth of each cached file subset includes: dividing the bandwidth to be adjusted by the target occupied bandwidth and rounding up to obtain the number of cached file subsets to be scheduled.
  • the target occupied bandwidth is determined according to the occupied bandwidth of each cached file subset.
  • an apparatus for CDN bandwidth scheduling in a content distribution network includes: a triggering unit, configured to trigger the current CDN node to start bandwidth scheduling; a dividing unit, configured to assign a target domain name
  • the cached file is divided into multiple cached file subsets; the first determination unit is set to determine the number of cached file subsets to be scheduled according to the bandwidth to be adjusted and the occupied bandwidth of each cached file subset; the second determination unit is set to Determining the cache files in the cache file subsets corresponding to the number of cache file subsets to be scheduled as target files; a third determining unit is set to determine all requests for accessing the target files of the target domain name as target requests; forwarding The unit is configured to forward the target request to other CDN nodes.
  • the apparatus further includes: a fourth determining unit, configured to determine the received access request that has not responded successfully as the target request.
  • the triggering unit is specifically configured to obtain the planned bandwidth of the current CDN node, collect the egress bandwidth of the current CDN node, and trigger the current CDN node to start the bandwidth when the egress bandwidth is greater than the planned bandwidth. scheduling; or, when receiving a bandwidth scheduling instruction sent by the CDN central node, triggering the current CDN node to start bandwidth scheduling.
  • the dividing unit is specifically configured to perform hash calculation on the identifier of the target cache file of the target domain name to obtain a hash value; the target cache file is each of the cache files of the target domain name. ; taking the hash value modulo N to obtain a grouping sequence number; the N is the number of cached file subsets; dividing the target cached file into a cached file subset corresponding to the grouping sequence number.
  • the first determining unit is specifically set to divide the bandwidth to be adjusted by the target occupied bandwidth and round up to obtain the number of cached file subsets to be scheduled, and the target occupied bandwidth is based on each cached file. The occupied bandwidth of the subset is determined.
  • a device for scheduling bandwidth of a content distribution network CDN including: a memory, a processor, and a computer program stored on the memory and running on the processor , when the processor executes the computer program, the above-mentioned method for scheduling CDN bandwidth in a content distribution network is implemented.
  • Embodiments of the present application also provide a technical solution as follows: a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the instructions are executed on a terminal device, the terminal device executes the instructions.
  • a computer-readable storage medium where instructions are stored in the computer-readable storage medium, and when the instructions are executed on a terminal device, the terminal device executes the instructions.
  • the embodiments of the present application have the following beneficial effects: the embodiments of the present application provide a method, apparatus and device for bandwidth scheduling of a content distribution network.
  • the cache files of the target domain name are first divided into Multiple cache file subsets to select target files from multiple cache file subsets.
  • the number of cached file subsets to be scheduled is determined according to the bandwidth to be adjusted and the occupied bandwidth of each cached file subset.
  • the cache files in the cache file subset corresponding to the number of cache file subsets to be scheduled are determined as target files, and all requests for accessing the target files of the target domain name are determined as target requests.
  • the target request is forwarded to other CDN nodes, which reduces the types of files to be processed by other CDN nodes according to the forwarding request, and reduces the probability of requesting back to the source because the file corresponding to the request is not cached in other CDN nodes. Reduce back-to-origin requests from other CDN nodes.
  • FIG. 1 is a schematic framework diagram of an exemplary application scenario provided by the present application
  • FIG. 2 is a flowchart of a method for scheduling content distribution network bandwidth provided by the present application
  • FIG. 3 is a schematic structural diagram of an apparatus for scheduling bandwidth of a content distribution network CDN provided by the present application.
  • the inventor After researching the bandwidth scheduling of traditional CDN nodes, the inventor found that when an existing CDN node obtains a request to access a specific file of a specific domain name, it first needs to check whether a specific file exists in a local cache file. If the corresponding specific file is not cached in the CDN node, the CDN node needs to send a back-to-origin request to the origin site to obtain the corresponding specific file from the origin site.
  • the CDN node that needs to be scheduled will randomly forward the request to access the domain name to other CDN nodes, and the forwarded request may involve files that are not cached by other CDN nodes, so that other CDN nodes need to Send a back-to-origin request to the origin to get the corresponding file. Too much back-to-source will cause access delay and affect the performance of CDN nodes.
  • the embodiments of the present application provide a method, apparatus, and device for bandwidth scheduling of content distribution networks.
  • the cache files of the target domain name are first divided into multiple cache file subsets, so as to obtain the Select the target file from a subset of multiple cache files.
  • the number of cached file subsets to be scheduled is determined according to the bandwidth to be adjusted and the occupied bandwidth of each cached file subset.
  • the cache files in the cache file subset corresponding to the number of cache file subsets to be scheduled are determined as target files, and all requests for accessing the target files of the target domain name are determined as target requests. In this way, the target file requests accessing the same target domain name can be centralized.
  • the target request is forwarded to other CDN nodes, which reduces the types of files to be processed by other CDN nodes according to the forwarding request, and reduces the probability of requesting back to the source because the file corresponding to the request is not cached in other CDN nodes. Reduce requests from other CDN nodes back to the source.
  • FIG. 1 this figure is a schematic frame diagram of an exemplary application scenario provided by an embodiment of the present application.
  • the cache files of the target domain name are first divided into multiple cache file subsets. Then, the number of cache file subsets to be scheduled is determined according to the bandwidth to be adjusted and the occupied bandwidth of each cache file subset. A cache file in the cache file subset corresponding to the number of cache file subsets to be scheduled is determined as the target file. Then, all requests for accessing the target files of the target domain name are determined as target requests, and the target requests are forwarded to other CDN nodes 102 .
  • FIG. 1 the schematic diagram of the framework shown in FIG. 1 is only an example in which the embodiments of the present application can be implemented. The scope of application of the embodiments of the present application is not limited by any aspect of the framework.
  • FIG. 2 is a flowchart of a method for scheduling content distribution network bandwidth provided by an embodiment of the present application. As shown in FIG. 2 , the method may include S201-S206:
  • S201 Trigger the current CDN node to start bandwidth scheduling.
  • the current CDN node is a CDN node that needs to perform bandwidth scheduling, and may be an edge node in the CDN serving users. It should be noted that the current CDN node may be a cluster composed of multiple servers.
  • the current CDN node can forward some requests for accessing domain names to other CDN nodes.
  • the embodiments of the present application do not limit the manner of triggering the current CDN node to perform bandwidth scheduling, which may be automatically triggered by the current CDN node, or may be triggered by the CDN central node.
  • the embodiment of the present application provides a specific implementation manner of triggering the current CDN node to start bandwidth scheduling, please refer to the following.
  • the request for accessing the domain name obtained by the current CDN node has a corresponding file.
  • the cache files of the target domain name may be divided into multiple cache file subsets. Further, the number of cached file subsets is determined according to the occupied bandwidth corresponding to the cached file subsets.
  • the cache files of the target domain name may be divided by using a hash bucket algorithm to obtain a subset of cache files.
  • the embodiment of the present application provides a specific implementation manner of dividing a cache file of a target domain name into multiple cache file subsets, please refer to the following.
  • S203 Determine the number of cached file subsets to be scheduled according to the bandwidth to be adjusted and the occupied bandwidth of each cached file subset.
  • the divided subsets of the multiple cached files have corresponding occupied bandwidth, and the occupied bandwidth is the bandwidth required by the CDN node to transmit files to the terminal device that initiates the access request.
  • the divided cache file subset has 100 copies, and the occupied bandwidth of each cache file subset is 1G.
  • the number of cache file subsets to be scheduled can be determined according to the to-be-adjusted bandwidth of the current CDN node. For example, when the bandwidth to be adjusted of the current CDN node is 10G, the corresponding number of cache file subsets to be scheduled is 10.
  • the bandwidth to be adjusted cannot completely match a certain amount of occupied bandwidth.
  • the embodiment of the present application also provides a method for determining the subset of cached files to be scheduled according to the bandwidth to be adjusted and the occupied bandwidth of each cached file subset. For the specific implementation of the quantity, see below.
  • S204 Determine the cache files in the cache file subsets corresponding to the number of cache file subsets to be scheduled as target files.
  • requests can be divided according to the types of cache files corresponding to the requests. Before dividing the request, it is necessary to determine the cache file corresponding to the request.
  • a cache file in the cache file subset corresponding to the number of cache file subsets to be scheduled is determined as the target file. Taking the above cached file subset as an example, after determining that the number of cached file subsets to be scheduled is 10, select 10 cached file subsets from the 100 cached file subsets, and select the cached file D in the 10 cached file subsets. as the target file.
  • S205 Determine all requests for accessing the target files of the target domain name as target requests.
  • the forwarding request is determined by using the determined target file. All requests for accessing the target file of the target domain name are determined as target requests. Taking the above-mentioned target file as the cache file D as an example, the request for accessing the cache file D of the target domain name is taken as the target request.
  • the target request is a request focused on accessing the target file of the target domain name.
  • other CDN nodes can centrally process the target file based on the target request, rather than randomly forwarding access requests to other CDN nodes. , which reduces the types and scope of cache files that other CDN nodes need to process, and can reduce the return of requests from other CDN nodes to the source.
  • each cache file has corresponding 10 access requests.
  • the bandwidth occupied by all cached files is 20G, and the bandwidth to be adjusted is 10G.
  • the access requests corresponding to parts of 10,000 cached files may be selected and forwarded to other CDN nodes. For example, each of 10,000 cached files selects 5 access requests and forwards them to other CDN nodes.
  • the cache file of the target domain name is divided into multiple cache file subsets, for example, into 10 cache file subsets, and the occupied bandwidth of each cache file subset is 2G.
  • the number of cache file subsets to be scheduled is determined according to the bandwidth to be adjusted and the occupied bandwidth of the cache file subset, for example, the number of cache file subsets to be scheduled is 5. Then, the cache files corresponding to the 5 cache file subsets can be selected as the target files.
  • All secondary access requests corresponding to the target files are taken as target requests, that is, 10 cache requests corresponding to 5000 cache files are forwarded to other CDN nodes.
  • other CDN nodes only need to process access requests involving 5,000 types of cached files, reducing the types and scope of cached files corresponding to the access requests, reducing the need to request back-to-origin for cached files that are not corresponding to cached access requests in other CDN nodes. Probability, reducing requests from other CDN nodes back to the source.
  • the target request for accessing the target file of the target domain name is forwarded to other CDN nodes, so that other CDN nodes can perform the target file based on the target request. more concentrated processing.
  • the types of files processed by other CDN nodes based on the forwarded request are reduced, and the probability that the file corresponding to the forwarding request is not cached in other CDN nodes is reduced. , reducing the request back-to-origin of other CDN nodes.
  • the CDN node When the CDN node processes the access request, if the file corresponding to the access request is not cached by the CDN node, the CDN node does not respond to the access request successfully, and the CDN node may need to send back the source request to the origin site to obtain the file corresponding to the access request. .
  • the CDN node When the CDN node needs to perform bandwidth scheduling, it can forward the access request that has not responded successfully to other CDN nodes. If other CDN nodes cache files corresponding to the access request, it can reduce the request back-to-source of the CDN node.
  • an embodiment of the present application further provides a method for scheduling content distribution network bandwidth.
  • the method further includes:
  • the access request will not respond successfully.
  • the unresponsive access request may be used as the target request and forwarded to other CDN nodes. If files corresponding to the access request are cached in other CDN nodes, other CDN nodes can respond to the access request without sending back-to-origin requests, thereby reducing the number of requests from CDN nodes back-to-origin.
  • the current CDN node may be triggered by the CDN central node or by the current CDN node itself to initiate bandwidth scheduling.
  • the embodiment of the present application provides a specific implementation manner of triggering the current CDN node to start bandwidth scheduling, which specifically includes:
  • the CDN node can obtain the planned bandwidth of the current CDN node and collect the egress bandwidth of the current CDN node. By comparing the size between the egress bandwidth and the planned bandwidth, it can be determined whether the current CDN node needs to perform bandwidth adjustment. If the egress bandwidth is greater than the planned bandwidth, you need to adjust the bandwidth of the current CDN node and trigger the current CDN node to start bandwidth scheduling.
  • the CDN node can be triggered to initiate bandwidth scheduling by the CDN central node.
  • the CDN central node can obtain the egress bandwidth of each CDN node, and use the egress bandwidth and the planned bandwidth corresponding to the CDN node to determine whether the CDN node needs to perform bandwidth scheduling. If the CDN node needs to perform bandwidth scheduling, the CDN central node sends a bandwidth scheduling instruction to the CDN node. After receiving the bandwidth scheduling instruction sent by the CDN central node, the CDN node triggers the current CDN node to start bandwidth scheduling.
  • the current CDN node can determine the corresponding target request according to the target file, and forward the target request to other CDN nodes.
  • a hash bucket algorithm may be used to divide the cache files.
  • the embodiment of the present application provides a specific implementation manner of dividing a cache file of a target domain name into multiple cache file subsets, which specifically includes:
  • Hash calculation is performed on the identifier of the target cache file of the target domain name to obtain a hash value; the target cache file is each of the cache files of the target domain name;
  • the hash value is modulo N to obtain the grouping sequence number; the N is the number of cached file subsets;
  • the cache file of the target domain name has a corresponding identifier, and the cache file of each target domain name is used as the target cache file, and the identifier of the target cache file is hashed to obtain the corresponding hash value of the target cache file.
  • the number N of cache file subsets can be taken as the modulus.
  • the modulo calculation of N is performed on the hash value corresponding to the identifier of the target cache file, and the remainder of the modulo can be calculated.
  • the obtained residual value is used as the group sequence number corresponding to the target cache file.
  • the target cache files are divided into corresponding cache file subsets according to the group sequence numbers corresponding to the target cache files, so as to realize the division of the target cache files.
  • the occupied bandwidth of the cache file subset corresponding to the number of cache file subsets to be scheduled does not completely match the bandwidth to be adjusted.
  • the embodiment of the present application also provides a specific implementation manner of determining the number of cached file subsets to be scheduled according to the bandwidth to be adjusted and the occupied bandwidth of each cached file subset, including:
  • the target occupied bandwidth is determined according to the occupied bandwidth of each cached file subset.
  • the occupied bandwidth of each cached file subset is basically the same.
  • the occupied bandwidth of any cached file subset can be used as the target occupied bandwidth, or the average of the occupied bandwidth of each cached file subset can be used as the target occupied bandwidth.
  • the target occupies the bandwidth.
  • the target occupied bandwidth may represent the occupied bandwidth corresponding to a cache file subset, and the number of cache file subsets to be scheduled can be obtained according to the to-be-adjusted bandwidth and the target occupied bandwidth.
  • the occupied bandwidth corresponding to a certain number of cached file subsets may not completely correspond to the bandwidth to be adjusted. For example, when the bandwidth to be adjusted is 7G and the target occupied bandwidth is 2G, the occupied bandwidth corresponding to selecting a certain number of cached file subsets cannot correspond to the bandwidth to be adjusted.
  • the occupied bandwidth of the cache file subset corresponding to the number of cache file subsets may be slightly larger than the bandwidth to be adjusted.
  • the calculation result is obtained by dividing the bandwidth to be adjusted by the target occupied bandwidth. If the obtained calculation result is an integer, it means that the occupied bandwidth corresponding to the number of cached file subsets matches the bandwidth to be adjusted, and no adjustment is required. If the obtained calculation result is not an integer, the calculation result needs to be rounded up to obtain the corresponding number of cache file subsets to be scheduled.
  • the quotient of the bandwidth to be adjusted and the target occupied bandwidth is calculated, and the calculation result is 3.5.
  • the obtained calculation result is rounded up to obtain 4, the number of subsets of cache files to be scheduled.
  • the to-be-adjusted bandwidth is divided by the target occupied bandwidth and then rounded up to obtain the to-be-scheduled cache file subset. number of sets. In this way, it can be ensured that on the basis of completing the bandwidth scheduling of the current CDN node, the request of the CDN node to be returned to the source is reduced.
  • the embodiments of the present application also provide a method for scheduling content distribution network CDN bandwidth. Be explained.
  • this figure is a schematic structural diagram of an apparatus for scheduling CDN bandwidth in a content distribution network according to an embodiment of the present application.
  • the device for scheduling bandwidth of the content distribution network CDN includes:
  • Triggering unit 301 configured to trigger the current CDN node to start bandwidth scheduling
  • the dividing unit 302 is configured to divide the cache file of the target domain name into multiple cache file subsets
  • the first determining unit 303 is configured to determine the number of cached file subsets to be scheduled according to the bandwidth to be adjusted and the occupied bandwidth of each cached file subset;
  • the second determining unit 304 is configured to determine the cache files in the cache file subsets corresponding to the number of cache file subsets to be scheduled as target files;
  • the third determining unit 305 is configured to determine all requests for accessing the target files of the target domain name as target requests;
  • the forwarding unit 306 is configured to forward the target request to other CDN nodes.
  • the apparatus further comprises:
  • the fourth determining unit is configured to determine the received access request that has not responded successfully as a target request.
  • the triggering unit 301 is specifically configured to obtain the planned bandwidth of the current CDN node, collect the egress bandwidth of the current CDN node, and trigger the current CDN node to start when the egress bandwidth is greater than the planned bandwidth. bandwidth scheduling;
  • the dividing unit 302 is specifically configured to perform hash calculation on the identifier of the target cache file of the target domain name to obtain a hash value; the target cache file is each of the cache files of the target domain name. One;
  • the hash value is modulo N to obtain the grouping sequence number; the N is the number of cached file subsets;
  • the first determining unit 303 is specifically configured to divide the bandwidth to be adjusted by the target occupied bandwidth and round up to obtain the number of cached file subsets to be scheduled, and the target occupied bandwidth is based on each cache. The occupied bandwidth of a subset of files is determined.
  • an embodiment of the present application also provides a device for scheduling bandwidth of a content distribution network CDN, including: a memory, a processor, and a computer program stored on the memory and running on the processor, the processing When the computer executes the computer program, the method for scheduling the bandwidth of the content distribution network CDN as described in the above embodiments is implemented.
  • an embodiment of the present application further provides a computer-readable storage medium, where an instruction is stored in the computer-readable storage medium, and when the instruction is executed on a terminal device, the terminal device is made to execute the above-mentioned embodiment.
  • the CDN node first obtains the planned bandwidth of the current CDN node and collects the egress bandwidth of the current CDN node, so as to realize real-time collection of the egress bandwidth of the current CDN node, The real-time performance of bandwidth scheduling is improved.
  • the egress bandwidth is greater than the planned bandwidth
  • the planned bandwidth, the difference between the egress bandwidth and the planned bandwidth, the proportional parameter, and the integral parameter are used to calculate the bandwidth to be adjusted by using the proportional integral algorithm.
  • the bandwidth to be adjusted calculated by the proportional integral is relatively accurate.
  • the egress bandwidth of the current CDN node can be stably adjusted to be close to the planned bandwidth, and the adjustment efficiency can be improved by adjusting the egress bandwidth through the current CDN node. In this way, real-time and accurate scheduling of the egress bandwidth of the current CDN node can be achieved.
  • At least one (item) refers to one or more, and "a plurality” refers to two or more.
  • “And/or” is used to describe the relationship between related objects, indicating that there can be three kinds of relationships, for example, “A and/or B” can mean: only A, only B, and both A and B exist , where A and B can be singular or plural.
  • the character “/” generally indicates that the associated objects are an “or” relationship.
  • At least one item(s) below” or similar expressions thereof refer to any combination of these items, including any combination of single item(s) or plural items(s).
  • At least one (a) of a, b or c can mean: a, b, c, "a and b", “a and c", “b and c", or "a and b and c" ", where a, b, c can be single or multiple.
  • a software module can be placed in random access memory (RAM), internal memory, read only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other in the technical field. in any other known form of storage medium.
  • RAM random access memory
  • ROM read only memory
  • electrically programmable ROM electrically erasable programmable ROM
  • registers hard disk, removable disk, CD-ROM, or any other in the technical field. in any other known form of storage medium.
  • the cache file of the target domain name is first divided into multiple cache file subsets, so that the multiple cache files can be divided into Select the target file from a subset of cache files.
  • the number of cached file subsets to be scheduled is determined according to the bandwidth to be adjusted and the occupied bandwidth of each cached file subset.
  • the cache files in the cache file subset corresponding to the number of cache file subsets to be scheduled are determined as target files, and all requests for accessing the target files of the target domain name are determined as target requests. In this way, requests for accessing target files of the same target domain name can be centralized.
  • the target request is forwarded to other CDN nodes, which reduces the types of files to be processed by other CDN nodes according to the forwarding request, and reduces the probability of requesting back to the source because the file corresponding to the request is not cached in other CDN nodes. It reduces the request back-to-source of other CDN nodes, which has strong industrial practicability.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本申请公开了一种内容分发网络带宽调度的方法、装置及设备,通过触发当前CDN节点启动带宽调度,先将目标域名的缓存文件划分为多份缓存文件子集,根据待调整带宽以及每份缓存文件子集的占用带宽,确定待调度的缓存文件子集数量。再将待调度的缓存文件子集数量对应的缓存文件子集中的缓存文件确定为目标文件,将访问目标域名的目标文件的全部请求确定为目标请求。如此可以实现访问相同目标域名的目标文件的请求的集中。最后,将目标请求转发给其他CDN节点,其他CDN节点在对目标请求进行处理时会集中处理目标文件。减少了其他CDN节点根据转发请求所要处理的文件的种类以及范围,从而实现了减少其他CDN节点的请求回源。

Description

一种内容分发网络带宽调度的方法、装置及设备
本公开要求于2021年02月09日提交中国专利局、申请号为202110178711.8、发明名称为“一种内容分发网络带宽调度的方法、装置及设备”的中国专利申请的优先权,其全部内容通过引用结合在本公开中。
技术领域
本申请涉及计算机技术领域,具体涉及一种内容分发网络带宽调度的方法、装置及设备。
背景技术
CDN(Content Delivery Network,内容分发网络)是建立在现有的网络基础之上的智能虚拟网络。CDN中具有CDN边缘节点和CDN中心节点,CDN中心节点用于对CDN边缘节点进行管理,CDN边缘节点与终端用户相连接。CDN边缘节点中缓存有服务资源,终端用户可以通过访问CDN边缘节点获取相关的服务资源。一般CDN边缘节点可以简称为CDN节点。
为了确保CDN节点的服务质量和成本,需要对CDN节点的带宽进行控制,使得CDN节点的带宽在规划带宽以下,并且尽可能地接近规划带宽。目前,在对CDN节点进行带宽控制的过程中,CDN节点会将部分请求转发至其他CDN节点。其他CDN节点在处理转发的请求时,可能会导致请求的回源增加。
发明内容
有鉴于此,本申请实施例提供一种内容分发网络带宽调度的方法、 装置及设备,能够减少CDN节点处理网络请求时请求的回源。
为解决上述问题,本申请实施例提供的技术方案如下:一种内容分发网络CDN带宽调度的方法,所述方法包括:触发当前CDN节点启动带宽调度;将目标域名的缓存文件划分为多份缓存文件子集;根据待调整带宽以及每份缓存文件子集的占用带宽确定待调度的缓存文件子集数量;将所述待调度的缓存文件子集数量对应的缓存文件子集中的缓存文件确定为目标文件;将访问所述目标域名的目标文件的全部请求确定为目标请求;将所述目标请求转发给其他CDN节点。
在一实施方式中,所述方法还包括:将接收到的未响应成功的访问请求确定为目标请求。
在一实施方式中,所述触发当前CDN节点启动带宽调度,包括:获取当前CDN节点的规划带宽,采集所述当前CDN节点的出口带宽,当所述出口带宽大于所述规划带宽时,触发当前CDN节点启动带宽调度;或者,当接收CDN中心节点发送的带宽调度指令时,触发当前CDN节点启动带宽调度。
在一实施方式中,所述将目标域名的缓存文件划分为多份缓存文件子集,包括:对目标域名的目标缓存文件的标识进行哈希计算,得到哈希值;所述目标缓存文件为所述目标域名的缓存文件中的每一个;将所述哈希值对N取模,得到分组序号;所述N为缓存文件子集的数量;将所述目标缓存文件划分到所述分组序号对应的缓存文件子集。
在一实施方式中,所述根据待调整带宽以及每份缓存文件子集的占用带宽确定待调度的缓存文件子集数量,包括:将待调整带宽除以目标占用带宽之后向上取整得到待调度的缓存文件子集数量,所述目标占用带宽是根据每份缓存文件子集的占用带宽确定的。
本申请实施例还提供了一种技术方案如下:一种内容分发网络 CDN带宽调度的装置,所述装置包括:触发单元,设置为触发当前CDN节点启动带宽调度;划分单元,设置为将目标域名的缓存文件划分为多份缓存文件子集;第一确定单元,设置为根据待调整带宽以及每份缓存文件子集的占用带宽确定待调度的缓存文件子集数量;第二确定单元,设置为将所述待调度的缓存文件子集数量对应的缓存文件子集中的缓存文件确定为目标文件;第三确定单元,设置为将访问所述目标域名的目标文件的全部请求确定为目标请求;转发单元,设置为将所述目标请求转发给其他CDN节点。
在一实施方式中,所述装置还包括:第四确定单元,设置为将接收到的未响应成功的访问请求确定为目标请求。
在一实施方式中,所述触发单元,具体设置为获取当前CDN节点的规划带宽,采集所述当前CDN节点的出口带宽,当所述出口带宽大于所述规划带宽时,触发当前CDN节点启动带宽调度;或者,当接收CDN中心节点发送的带宽调度指令时,触发当前CDN节点启动带宽调度。
在一实施方式中,所述划分单元,具体设置为对目标域名的目标缓存文件的标识进行哈希计算,得到哈希值;所述目标缓存文件为所述目标域名的缓存文件中的每一个;将所述哈希值对N取模,得到分组序号;所述N为缓存文件子集的数量;将所述目标缓存文件划分到所述分组序号对应的缓存文件子集。
在一实施方式中,所述第一确定单元,具体设置为将待调整带宽除以目标占用带宽之后向上取整得到待调度的缓存文件子集数量,所述目标占用带宽是根据每份缓存文件子集的占用带宽确定的。
本申请实施例还提供了一种技术方案如下:一种内容分发网络CDN带宽调度的设备,包括:存储器,处理器,及存储在所述存储 器上并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时,实现如上述的内容分发网络CDN带宽调度的方法。
本申请实施例还提供了一种技术方案如下:一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,当所述指令在终端设备上运行时,使得所述终端设备执行如上述的内容分发网络CDN带宽调度的方法。
由此可见,本申请实施例具有如下有益效果:本申请实施例提供一种内容分发网络带宽调度的方法、装置及设备,通过触发当前CDN节点启动带宽调度,先将目标域名的缓存文件划分为多份缓存文件子集,以便从多份缓存文件子集中选取目标文件。根据待调整带宽以及每份缓存文件子集的占用带宽,确定待调度的缓存文件子集数量。再将待调度的缓存文件子集数量对应的缓存文件子集中的缓存文件确定为目标文件,将访问目标域名的目标文件的全部请求确定为目标请求。如此可以实现访问相同目标域名的目标文件的请求的集中。最后,将目标请求转发给其他CDN节点,减少了其他CDN节点根据转发请求所要处理的文件的种类,降低了由于其他CDN节点中没有缓存请求所对应的文件而请求回源的概率,从而实现了减少其他CDN节点的请求回源。
附图说明
图1为本申请提供的示例性应用场景的框架示意图;
图2为本申请提供的一种内容分发网络带宽调度的方法的流程图;
图3为本申请提供的一种内容分发网络CDN带宽调度的装置的结构示意图。
具体实施方式
为使本申请实施例的上述目的、特征和优点能够更加明显易懂,下面结合附图和具体实施方式对本申请实施例作详细的说明。
为了便于理解和解释本申请实施例提供的技术方案,下面将先对本申请实施例的背景技术进行说明。
发明人在对传统的CDN节点带宽调度进行研究后发现,现有的CDN节点在获取到访问特定域名的特定文件的请求时,先需要在本地的缓存文件中查询是否具有特定文件。如果CDN节点中没有缓存对应的特定文件时,CDN节点需要向源站发送回源请求,从源站获取对应的特定文件。而在对CDN节点进行调度时,需要进行调度的CDN节点会将访问域名的请求随机转发至其他CDN节点中,而转发的请求可能涉及到其他CDN节点并未缓存的文件,使得其他CDN节点需要向源站发送回源请求,以获取对应的文件。过多的回源会导致访问延时,影响CDN节点的性能。
基于此,本申请实施例提供了一种内容分发网络带宽调度的方法、装置及设备,通过触发当前CDN节点启动带宽调度,先将目标域名的缓存文件划分为多份缓存文件子集,以便从多份缓存文件子集中选取目标文件。根据待调整带宽以及每份缓存文件子集的占用带宽,确定待调度的缓存文件子集数量。再将待调度的缓存文件子集数量对应的缓存文件子集中的缓存文件确定为目标文件,将访问目标域名的目标文件的全部请求确定为目标请求。如此可以实现访问相同目标域名的目标文件请求的集中。最后,将目标请求转发给其他CDN节点,减少了其他CDN节点根据转发请求所要处理的文件的种类,降低了由于其他CDN节点中没有缓存请求所对应的文件而请求回源的概率,从而实现了降低其他CDN节点的请求回源。
为了便于理解本申请实施例提供的内容分发网络带宽调度的方法,下面结合图1所示的场景示例进行说明。参见图1,该图为本申请实施例提供的示例性应用场景的框架示意图。
在实际应用中,通过触发当前CDN节点101启动带宽调度,先将目标域名的缓存文件划分为多份缓存文件子集。再根据待调整带宽以及每份缓存文件子集的占用带宽确定待调度的缓存文件子集数量。将待调度的缓存文件子集数量对应的缓存文件子集中的缓存文件确定为目标文件。再将访问目标域名的目标文件的全部请求确定为目标请求,将目标请求转发给其他CDN节点102。
本领域技术人员可以理解,图1所示的框架示意图仅是本申请实施例可以在其中得以实现的一个示例。本申请实施例的适用范围不受到该框架任何方面的限制。
为了便于理解本申请实施例,下面结合附图对本申请实施例提供的一种内容分发网络带宽调度的方法进行说明。
参见图2,该图为本申请实施例提供的一种内容分发网络带宽调度的方法的流程图,如图2所示,该方法可以包括S201-S206:
S201:触发当前CDN节点启动带宽调度。
当前CDN节点是需要进行带宽调度的CDN节点,可以是CDN中的服务于用户的边缘节点。需要说明的是,当前CDN节点可以是由多个服务器组成的集群。
通过触发当前CDN节点启动带宽调度,可以使得当前CDN节点将部分访问域名的请求转发至其他CDN节点。
本申请实施例不限定触发当前CDN节点进行带宽调度的方式,可以是当前CDN节点自动触发,也可以是CDN中心节点触发。本申请实施例提供了一种触发当前CDN节点启动带宽调度的具体实施 方式,请参见下文。
S202:将目标域名的缓存文件划分为多份缓存文件子集。
可以理解的是,当前CDN节点获取的访问域名的请求具有对应的文件。为了便于实现带宽的调整,可以将目标域名的缓存文件划分为多个缓存文件子集。进而根据缓存文件子集所对应的占用带宽进行缓存文件子集数量的确定。
在一实施方式中,可以将目标域名的缓存文件利用哈希桶算法进行划分,得到缓存文件子集。本申请实施例提供一种将目标域名的缓存文件划分为多份缓存文件子集的具体实施方式,请参见下文。
S203:根据待调整带宽以及每份缓存文件子集的占用带宽确定待调度的缓存文件子集数量。
划分后的多份缓存文件子集具有对应的占用带宽,占用带宽为CDN节点在向发起访问请求的终端设备进行文件传输时所需要的带宽。例如,划分后的缓存文件子集具有100份,每份缓存文件子集的占用带宽为1G。根据当前CDN节点的待调整带宽可以确定需要进行待调度的缓存文件子集的数量。例如,当前CDN节点的待调整带宽为10G时,对应的需要待调度的缓存文件子集数量为10份。
在一实施方式中,待调整带宽不能与一定数量的占用带宽完全匹配,本申请实施例还提供了一种根据待调整带宽以及每份缓存文件子集的占用带宽确定待调度的缓存文件子集数量的具体实施方式,请参见下文。
S204:将所述待调度的缓存文件子集数量对应的缓存文件子集中的缓存文件确定为目标文件。
为了减少其他CDN节点的请求回源,可以按照请求所对应的缓存文件的种类对请求进行划分。在对请求进行划分之前,先需要确定 请求对应的缓存文件。
将与待调度的缓存文件子集数量对应的缓存文件子集中的缓存文件确定为目标文件。以上述缓存文件子集为例,在确定待调度的缓存文件子集数量为10份之后,从100份缓存文件子集中选取10份缓存文件子集,将10份缓存文件子集中的缓存文件D作为目标文件。
S205:将访问所述目标域名的目标文件的全部请求确定为目标请求。
对应的,利用确定的目标文件确定进行转发的请求。将访问目标域名的目标文件的全部的请求确定为目标请求。以上述目标文件为缓存文件D为例,将访问目标域名的缓存文件D的请求作为目标请求。
S206:将所述目标请求转发给其他CDN节点。
目标请求是集中于访问目标域名的目标文件的请求,通过将目标请求转发至其他CDN节点,其他CDN节点可以实现基于目标请求对目标文件进行集中的处理,相对于随机向其他CDN节点转发访问请求,减少了其他CDN节点所需要处理的缓存文件的种类以及范围,可以降低其他CDN节点的请求回源。
例如,当前CDN节点获取的访问请求所对应的目标域名的缓存文件具有10000种,每种缓存文件具有对应的10次访问请求。全部缓存文件的占用带宽为20G,待调整带宽为10G。若采用随机向其他CDN节点转发访问请求的方法,可能会选取10000种缓存文件所对应的部分的访问请求转发至其他CDN节点。比如,10000种缓存文件各选5次访问请求转发至其他CDN节点。如此其他CDN节点就需要对10000种缓存文件对应的访问请求进行处理,其他CDN节点中没有缓存10000种缓存文件的概率较大,导致其他CDN节点需要进行请求回源。若采用上述内容分发网络带宽调度的方法,将目标域名的缓存文件划 分为多份缓存文件子集,例如划分为10份缓存文件子集,每份缓存文件子集的占用带宽为2G。根据待调整带宽和缓存文件子集的占用带宽确定待调度的缓存文件子集数量,例如待调度的缓存文件子集数量为5。则可以选择5份缓存文件子集对应的缓存文件作为目标文件。将目标文件分别对应的全部的次访问请求作为目标请求,也就是5000种缓存文件分别对应的10次缓存请求转发至其他CDN节点。如此,其他CDN节点仅需要对涉及到5000种缓存文件的访问请求进行处理,访问请求对应的缓存文件种类和范围减少,降低了其他CDN节点中没有缓存访问请求对应的缓存文件需要请求回源的概率,减少了其他CDN节点的请求回源。
基于上述S201-S206的相关内容可知,通过确定触发带宽调度的当前CDN节点的目标文件,将访问目标域名的目标文件的目标请求转发至其他CDN节点,以便其他CDN节点基于目标请求对目标文件进行较为集中的处理。通过将访问目标域名的目标文件的请求作为目标请求转发至其他CDN节点,减少了其他CDN节点基于转发的请求处理的文件的种类,减小了其他CDN节点中没有缓存转发请求对应的文件的概率,减少了其他CDN节点的请求回源。
CDN节点在对访问请求进行处理时,若访问请求对应的文件CDN节点并未缓存,则CDN节点对访问请求未响应成功,CDN节点可能需要向源站发送回源请求以获取访问请求对应的文件。
在当CDN节点需要进行带宽调度时,可以将未响应成功的访问请求转发至其他CDN节点,若其他CDN节点中缓存有访问请求对应的文件,可以降低CDN节点的请求回源。
基于此,本申请实施例还提供一种内容分发网络带宽调度的方法,除上述步骤以外,所述方法还包括:
将接收到的未响应成功的访问请求确定为目标请求。
若当前CDN节点中没有缓存访问请求对应的文件,则会导致该访问请求未响应成功。在对当前CDN节点进行带宽调度时,可以将未响应成功的访问请求作为目标请求,转发至其他CDN节点中。若其他CDN节点中缓存有该访问请求对应的文件,则其他CDN节点可以对访问请求进行响应,不需要发送回源请求,从而可以减少CDN节点的请求回源。
在本申请实施例中,通过将当前CDN节点的未响应成功的访问请求确定为目标请求转发至其他CDN节点,可以实现其他CDN节点对于目标请求的处理,降低了CDN节点的请求回源,提高了CDN节点的性能。
在一实施方式中,当前CDN节点可以由CDN中心节点或者是由当前CDN节点自身触发启动带宽调度。本申请实施例提供一种触发当前CDN节点启动带宽调度的具体实施方式,具体包括:
获取当前CDN节点的规划带宽,采集所述当前CDN节点的出口带宽,当所述出口带宽大于所述规划带宽时,触发当前CDN节点启动带宽调度;
或者,
当接收CDN中心节点发送的带宽调度指令时,触发当前CDN节点启动带宽调度。
CDN节点可以获取当前CDN节点的规划带宽,并且采集当前CDN节点的出口带宽。通过比较出口带宽和规划带宽之间的大小,可以确定当前CDN节点是否需要进行带宽调整。若出口带宽大于规划带宽,则需要对当前CDN节点进行带宽调节,触发当前CDN节点启动带宽调度。
在另一实施方式中中,可以通过CDN中心节点触发CDN节点启动带宽调度。CDN中心节点可以获取各个CDN节点的出口带宽,利用出口带宽和CDN节点对应的规划带宽,确定CDN节点是否需要进行带宽调度。如果CDN节点需要进行带宽调度,CDN中心节点向该CDN节点发送带宽调度指令。CDN节点在接收到CDN中心节点发送的带宽调度指令后,触发当前CDN节点启动带宽调度。
基于上述内容可知,通过当前CDN节点或者是CDN中心节点触发CDN节点启动带宽调度,可以实现当前CDN节点根据目标文件确定对应的目标请求,并将目标请求转发至其他CDN节点。
在一实施方式中,为了实现对目标域名的缓存文件的划分,可以采用哈希桶算法对缓存文件进行划分。具体的,本申请实施例提供一种将目标域名的缓存文件划分为多份缓存文件子集的具体实施方式,具体包括:
对目标域名的目标缓存文件的标识进行哈希计算,得到哈希值;所述目标缓存文件为所述目标域名的缓存文件中的每一个;
将所述哈希值对N取模,得到分组序号;所述N为缓存文件子集的数量;
将所述目标缓存文件划分到所述分组序号对应的缓存文件子集。
目标域名的缓存文件具有对应的标识,将每个目标域名的缓存文件作为目标缓存文件,对目标缓存文件的标识进行哈希计算,得到目标缓存文件对应的哈希值。
为了实现对缓存文件的划分,可以将缓存文件子集的数量N作为模。对目标缓存文件的标识对应的哈希值进行对N取模计算,可以计算得到模数的余值。将得到的余值作为目标缓存文件对应的分组序号。
根据目标缓存文件对应的分组序号将目标缓存文件划分至对应的缓存文件子集中,实现对于目标缓存文件的划分。
基于上述内容可知,在本申请实施例中,通过利用目标域名的目标缓存文件的标识进行哈希计算以及取模运算,可以实现对于目标域名的缓存文件的划分,得到划分后的多份缓存文件子集。
在一实施方式中,待调度的缓存文件子集数量所对应的缓存文件子集的占用带宽与待调整带宽并不能完全匹配。对应的,本申请实施例还提供一种根据待调整带宽以及每份缓存文件子集的占用带宽确定待调度的缓存文件子集数量的具体实现方式,包括:
将待调整带宽除以目标占用带宽之后向上取整得到待调度的缓存文件子集数量。其中,目标占用带宽是根据每份缓存文件子集的占用带宽确定的。
可以理解的是,每份缓存文件子集的占用带宽基本一致,可以将任意一份缓存文件子集的占用带宽作为目标占用带宽,也可以将每份缓存文件子集的占用带宽的平均值作为目标占用带宽。目标占用带宽可以代表一份缓存文件子集所对应的占用带宽,则根据待调整带宽和目标占用带宽可以得到待调度的缓存文件子集数量。
又由于一定数量的缓存文件子集所对应的占用带宽和待调整带宽可能并不能完全对应。例如,当待调整带宽为7G,目标占用带宽为2G时,选取一定数量的缓存文件子集所对应的占用带宽并不能与待调整带宽相对应。
为了确保当前CDN节点的带宽调度,可以使得缓存文件子集数量对应的缓存文件子集的占用带宽稍大于待调整带宽。则计算待调整带宽除以目标占用带宽后得到计算结果,若得到的计算结果是整数,则说明该数量的缓存文件子集所对应的占用带宽与待调整带宽相匹配, 无需进行调整。若得到的计算结果不是整数,则需要对计算结果进行向上取整,得到对应的待调度的缓存文件子集数量。
以上述待调整带宽为7G,目标占用带宽为2G为例,计算待调整带宽与目标占用带宽的商,得到的计算结果为3.5。对得到的计算结果进行向上取整,得到待调度的缓存文件子集数量4。
在本申请实施例中,当一定数量的缓存文件子集所对应的占用带宽与待调整带宽不完全对应时,对待调整带宽除以目标占用带宽之后进行向上取整,得到待调度的缓存文件子集数量。如此可以确保在完成当前CDN节点的带宽调度的基础上,降低CDN节点的请求回源。
基于上述方法实施例提供的一种内容分发网络CDN带宽调度的方法,本申请实施例还提供了一种内容分发网络CDN带宽调度的方法,下面将结合附图对内容分发网络CDN带宽调度的装置进行说明。
参见图3,该图为本申请实施例提供的一种内容分发网络CDN带宽调度的装置的结构示意图。如图3所示,该内容分发网络CDN带宽调度的装置包括:
触发单元301,设置为触发当前CDN节点启动带宽调度;
划分单元302,设置为将目标域名的缓存文件划分为多份缓存文件子集;
第一确定单元303,设置为根据待调整带宽以及每份缓存文件子集的占用带宽确定待调度的缓存文件子集数量;
第二确定单元304,设置为将所述待调度的缓存文件子集数量对应的缓存文件子集中的缓存文件确定为目标文件;
第三确定单元305,设置为将访问所述目标域名的目标文件的全部请求确定为目标请求;
转发单元306,设置为将所述目标请求转发给其他CDN节点。
在一实施方式中,所述装置还包括:
第四确定单元,设置为将接收到的未响应成功的访问请求确定为目标请求。
在一实施方式中,所述触发单元301,具体设置为获取当前CDN节点的规划带宽,采集所述当前CDN节点的出口带宽,当所述出口带宽大于所述规划带宽时,触发当前CDN节点启动带宽调度;
或者,
当接收CDN中心节点发送的带宽调度指令时,触发当前CDN节点启动带宽调度。
在一实施方式中,所述划分单元302,具体设置为对目标域名的目标缓存文件的标识进行哈希计算,得到哈希值;所述目标缓存文件为所述目标域名的缓存文件中的每一个;
将所述哈希值对N取模,得到分组序号;所述N为缓存文件子集的数量;
将所述目标缓存文件划分到所述分组序号对应的缓存文件子集。
在一实施方式中,所述第一确定单元303,具体设置为将待调整带宽除以目标占用带宽之后向上取整得到待调度的缓存文件子集数量,所述目标占用带宽是根据每份缓存文件子集的占用带宽确定的。
另外,本申请实施例还提供了一种内容分发网络CDN带宽调度的设备,包括:存储器,处理器,及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时,实现如上述实施例所述的内容分发网络CDN带宽调度的方法。
另外,本申请实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,当所述指令在终端设备上运行时, 使得所述终端设备执行如上述实施例所述的内容分发网络CDN带宽调度的方法。
本申请实施例提供的一种内容分发网络带宽调度的装置及设备,由CDN节点先获取当前CDN节点的规划带宽以及采集当前CDN节点的出口带宽,实现对于当前CDN节点的出口带宽的实时采集,提高了带宽调度的实时性。在出口带宽大于规划带宽时,利用规划带宽、出口带宽和规划带宽之间的差值、比例参数以及积分参数,采用比例积分算法计算待调整带宽。通过比例积分计算得到的待调整带宽较为准确。最后通过利用待调整带宽调整当前CDN节点的出口带宽,可以较为稳定地将出口带宽调整至接近规划带宽,并且通过当前CDN节点对出口带宽进行调节,可以提高调节的效率。由此可以实现实时地并且准确地对当前CDN节点的出口带宽的调度。
需要说明的是,本申请中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。对于实施例公开的系统或装置而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。
应当理解,在本申请实施例中,“至少一个(项)”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,用于描述关联对象的关联关系,表示可以存在三种关系,例如,“A和/或B”可以表示:只存在A,只存在B以及同时存在A和B三种情况,其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项(个)”或其类似表达,是指这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b或c中的至少一项(个),可以表示:a,b,c,“a和b”,“a和c”,“b和c”,或“a和b和c”, 其中a,b,c可以是单个,也可以是多个。
还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
结合本文中所公开的实施例描述的方法或算法的步骤可以直接用硬件、处理器执行的软件模块,或者二者的结合来实施。软件模块可以置于随机存储器(RAM)、内存、只读存储器(ROM)、电可编程ROM、电可擦除可编程ROM、寄存器、硬盘、可移动磁盘、CD-ROM、或技术领域内所公知的任意其它形式的存储介质中。
对所公开的实施例的上述说明,使本领域专业技术人员能够实现或使用本申请实施例。对这些实施例的多种修改对本领域的专业技术人员来说将是显而易见的,本文中所定义的一般原理可以在不脱离本申请实施例的精神或范围的情况下,在其它实施例中实现。因此,本申请实施例将不会被限制于本文所示的这些实施例,而是要符合与本文所公开的原理和新颖特点相一致的最宽的范围。
工业实用性
通过本申请实施例提供的一种内容分发网络带宽调度的方法、装置及设备,通过触发当前CDN节点启动带宽调度,先将目标域名的缓存文件划分为多份缓存文件子集,以便从多份缓存文件子集中选取目标 文件。根据待调整带宽以及每份缓存文件子集的占用带宽,确定待调度的缓存文件子集数量。再将待调度的缓存文件子集数量对应的缓存文件子集中的缓存文件确定为目标文件,将访问目标域名的目标文件的全部请求确定为目标请求。如此可以实现访问相同目标域名的目标文件的请求的集中。最后,将目标请求转发给其他CDN节点,减少了其他CDN节点根据转发请求所要处理的文件的种类,降低了由于其他CDN节点中没有缓存请求所对应的文件而请求回源的概率,从而实现了减少其他CDN节点的请求回源,具有很强的工业实用性。

Claims (10)

  1. 一种内容分发网络CDN带宽调度的方法,所述方法包括:
    触发当前CDN节点启动带宽调度;
    将目标域名的缓存文件划分为多份缓存文件子集;
    根据待调整带宽以及每份缓存文件子集的占用带宽确定待调度的缓存文件子集数量;
    将所述待调度的缓存文件子集数量对应的缓存文件子集中的缓存文件确定为目标文件;
    将访问所述目标域名的目标文件的全部请求确定为目标请求;
    将所述目标请求转发给其他CDN节点。
  2. 根据权利要求1所述的方法,其中,所述方法还包括:
    将接收到的未响应成功的访问请求确定为目标请求。
  3. 根据权利要求1或2所述的方法,其中,所述触发当前CDN节点启动带宽调度,包括:
    获取当前CDN节点的规划带宽,采集所述当前CDN节点的出口带宽,当所述出口带宽大于所述规划带宽时,触发当前CDN节点启动带宽调度;
    或者,
    当接收CDN中心节点发送的带宽调度指令时,触发当前CDN节点启动带宽调度。
  4. 根据权利要求1-3任一项所述的方法,其中,所述将目标域名的缓存文件划分为多份缓存文件子集,包括:
    对目标域名的目标缓存文件的标识进行哈希计算,得到哈希值;所述目标缓存文件为所述目标域名的缓存文件中的每一个;
    将所述哈希值对N取模,得到分组序号;所述N为缓存文件子 集的数量;
    将所述目标缓存文件划分到所述分组序号对应的缓存文件子集。
  5. 根据权利要求1-4任一项所述的方法,其中,所述根据待调整带宽以及每份缓存文件子集的占用带宽确定待调度的缓存文件子集数量,包括:
    将待调整带宽除以目标占用带宽之后向上取整得到待调度的缓存文件子集数量,所述目标占用带宽是根据每份缓存文件子集的占用带宽确定的。
  6. 一种内容分发网络CDN带宽调度的装置,所述装置包括:
    触发单元,设置为触发当前CDN节点启动带宽调度;
    划分单元,设置为将目标域名的缓存文件划分为多份缓存文件子集;
    第一确定单元,设置为根据待调整带宽以及每份缓存文件子集的占用带宽确定待调度的缓存文件子集数量;
    第二确定单元,设置为将所述待调度的缓存文件子集数量对应的缓存文件子集中的缓存文件确定为目标文件;
    第三确定单元,设置为将访问所述目标域名的目标文件的全部请求确定为目标请求;
    转发单元,设置为将所述目标请求转发给其他CDN节点。
  7. 根据权利要求6所述的装置,其中,所述装置还包括:
    第四确定单元,设置为将接收到的未响应成功的访问请求确定为目标请求。
  8. 根据权利要求6或7所述的装置,其中,所述触发单元,设置为获取当前CDN节点的规划带宽,采集所述当前CDN节点的出口带宽,当所述出口带宽大于所述规划带宽时,触发当前CDN节点 启动带宽调度;
    或者,
    当接收CDN中心节点发送的带宽调度指令时,触发当前CDN节点启动带宽调度。
  9. 一种内容分发网络CDN带宽调度的设备,包括:存储器,处理器,及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时,实现如权利要求1-5任一项所述的内容分发网络CDN带宽调度的方法。
  10. 一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,当所述指令在终端设备上运行时,使得所述终端设备执行如权利要求1-5任一项所述的内容分发网络CDN带宽调度的方法。
PCT/CN2022/072831 2021-02-09 2022-01-19 一种内容分发网络带宽调度的方法、装置及设备 WO2022170934A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110178711.8A CN113014422B (zh) 2021-02-09 2021-02-09 一种内容分发网络带宽调度的方法、装置及设备
CN202110178711.8 2021-02-09

Publications (1)

Publication Number Publication Date
WO2022170934A1 true WO2022170934A1 (zh) 2022-08-18

Family

ID=76383938

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/072831 WO2022170934A1 (zh) 2021-02-09 2022-01-19 一种内容分发网络带宽调度的方法、装置及设备

Country Status (2)

Country Link
CN (1) CN113014422B (zh)
WO (1) WO2022170934A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113014422B (zh) * 2021-02-09 2022-09-23 北京金山云网络技术有限公司 一种内容分发网络带宽调度的方法、装置及设备
CN113783751B (zh) * 2021-08-30 2023-01-17 北京东方网信科技股份有限公司 一种检测用户宽带质量的方法、电子设备及介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130007223A1 (en) * 2006-06-09 2013-01-03 Qualcomm Incorporated Enhanced block-request streaming system for handling low-latency streaming
CN110474852A (zh) * 2019-08-01 2019-11-19 网宿科技股份有限公司 一种带宽调度方法及装置
CN111464323A (zh) * 2019-01-18 2020-07-28 北京沃东天骏信息技术有限公司 节点带宽的调度方法和调度装置
CN112153160A (zh) * 2020-09-30 2020-12-29 北京金山云网络技术有限公司 访问请求的处理方法、装置及电子设备
CN113014422A (zh) * 2021-02-09 2021-06-22 北京金山云网络技术有限公司 一种内容分发网络带宽调度的方法、装置及设备

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6854013B2 (en) * 2001-06-25 2005-02-08 Nortel Networks Limited Method and apparatus for optimizing network service

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130007223A1 (en) * 2006-06-09 2013-01-03 Qualcomm Incorporated Enhanced block-request streaming system for handling low-latency streaming
CN111464323A (zh) * 2019-01-18 2020-07-28 北京沃东天骏信息技术有限公司 节点带宽的调度方法和调度装置
CN110474852A (zh) * 2019-08-01 2019-11-19 网宿科技股份有限公司 一种带宽调度方法及装置
CN112153160A (zh) * 2020-09-30 2020-12-29 北京金山云网络技术有限公司 访问请求的处理方法、装置及电子设备
CN113014422A (zh) * 2021-02-09 2021-06-22 北京金山云网络技术有限公司 一种内容分发网络带宽调度的方法、装置及设备

Also Published As

Publication number Publication date
CN113014422A (zh) 2021-06-22
CN113014422B (zh) 2022-09-23

Similar Documents

Publication Publication Date Title
WO2022170934A1 (zh) 一种内容分发网络带宽调度的方法、装置及设备
US10778801B2 (en) Content delivery network architecture with edge proxy
CN109660607B (zh) 一种业务请求分发方法、接收方法、装置及服务器集群
CN107801086B (zh) 多缓存服务器的调度方法和系统
US8560617B2 (en) Multi-source transmission system and method of instant messaging file
EP3800870A1 (en) Method and device for controlling multi-cname traffic ratio
Monnerat et al. D1HT: A distributed one hop hash table
WO2021253889A1 (zh) 负载均衡方法、装置、代理设备、缓存设备及服务节点
WO2010028590A1 (zh) 地址列表的提供方法、对等网络及其调度方法
WO2008025297A1 (fr) Procédé de téléchargement de fichiers selon la technique p2p (pair à pair) et système de téléchargement p2p
WO2013075578A1 (zh) 网络资源文件的离线下载系统和方法
WO2013078875A1 (zh) 内容的管理方法的方法、装置和系统
WO2008034352A1 (fr) Procédé, système et serveur frontière destinés à distribuer des ressources
CN106790340B (zh) 一种链路调度方法及装置
JP2011525278A5 (zh)
WO2019006775A1 (zh) 一种数据传输方法及其系统
Steiner et al. Faster content access in KAD
CN105978936A (zh) Cdn服务器及其缓存数据的方法
CN108989220B (zh) 路由方法和路由系统
JP5177919B2 (ja) インデックスサーバとその方法
Shen et al. A proximity-aware interest-clustered P2P file sharing system
Li et al. Challenges, designs, and performances of large-scale open-P2SP content distribution
RU2483457C2 (ru) Платформа маршрутизации сообщений
WO2021073405A1 (zh) 数据分发方法、电子设备及存储介质
WO2016062079A1 (zh) 离线消息处理方法及装置

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: 22752096

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: 22752096

Country of ref document: EP

Kind code of ref document: A1