CN113014422B - Method, device and equipment for scheduling content distribution network bandwidth - Google Patents

Method, device and equipment for scheduling content distribution network bandwidth Download PDF

Info

Publication number
CN113014422B
CN113014422B CN202110178711.8A CN202110178711A CN113014422B CN 113014422 B CN113014422 B CN 113014422B CN 202110178711 A CN202110178711 A CN 202110178711A CN 113014422 B CN113014422 B CN 113014422B
Authority
CN
China
Prior art keywords
bandwidth
target
cache
cdn
cache file
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
CN202110178711.8A
Other languages
Chinese (zh)
Other versions
CN113014422A (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.)
Beijing Kingsoft Cloud Network Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network 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 Beijing Kingsoft Cloud Network Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN202110178711.8A priority Critical patent/CN113014422B/en
Publication of CN113014422A publication Critical patent/CN113014422A/en
Priority to PCT/CN2022/072831 priority patent/WO2022170934A1/en
Application granted granted Critical
Publication of CN113014422B publication Critical patent/CN113014422B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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

Abstract

The embodiment of the application discloses a method, a device and equipment for scheduling bandwidth of a content delivery network. And determining the cache files in the cache file subsets corresponding to the number of the cache file subsets to be scheduled as target files, and determining all requests for accessing the target files of the target domain name as target requests. This may enable the centralization of requests to access target files of the same target domain name. And finally, forwarding the target request to other CDN nodes, wherein the other CDN nodes can process the target file in a centralized manner when processing the target request. The types and the ranges of the files to be processed by other CDN nodes according to the forwarding request are reduced, and therefore the request return sources of other CDN nodes are reduced.

Description

Method, device and equipment for scheduling content distribution network bandwidth
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, and a device for scheduling a content delivery network bandwidth.
Background
A CDN (Content Delivery Network) is an intelligent virtual Network built on the basis of an existing Network. The CDN is provided with CDN edge nodes and CDN center nodes, the CDN center nodes are used for managing the CDN edge nodes, and the CDN edge nodes are connected with the terminal users. Service resources are cached in the CDN edge node, and a terminal user can obtain the relevant service resources by accessing the CDN edge node. A general CDN edge node may be referred to as a CDN node for short.
In order to ensure the quality of service and the cost of the CDN node, 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. Currently, in the process of performing bandwidth control on a CDN node, the CDN node forwards a part of a request to another CDN node. Other CDN nodes may cause an increase in the back-sourcing of requests while processing forwarded requests.
Disclosure of Invention
In view of this, embodiments of the present application provide a method, an apparatus, and a device for scheduling a content delivery network bandwidth, which can reduce the back source of a request when a CDN node processes a network request.
In order to solve the above problem, the technical solution provided by the embodiment of the present application is as follows:
a method for CDN bandwidth scheduling of a content delivery network, the method comprising:
triggering the current CDN node to start bandwidth scheduling;
dividing the cache files of the target domain name into a plurality of cache file subsets;
determining the number of the subsets of the cache files to be scheduled according to the bandwidth to be adjusted and the occupied bandwidth of each subset of the cache files;
determining the cache files in the cache file subsets corresponding to the cache file subsets to be scheduled as target files;
determining all requests for accessing the target file of the target domain name as target requests;
and forwarding the target request to other CDN nodes.
In one possible implementation, the method further includes:
and determining the received access request which is not successfully responded as a target request.
In a possible implementation manner, the triggering a current CDN node to start bandwidth scheduling includes:
acquiring a planned bandwidth of a current CDN node, acquiring an outlet bandwidth of the current CDN node, and triggering the current CDN node to start bandwidth scheduling when the outlet bandwidth is greater than the planned bandwidth;
alternatively, the first and second electrodes may be,
when a bandwidth scheduling instruction sent by a CDN central node is received, triggering the current CDN node to start bandwidth scheduling.
In a possible implementation manner, the dividing the cache file of the target domain name into a plurality of 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;
taking a module of the hash value to N to obtain a packet serial number; n is the number of the cache file subsets;
and dividing the target cache file into cache file subsets corresponding to the grouping sequence numbers.
In a possible implementation manner, the determining, according to the bandwidth to be adjusted and the occupied bandwidth of each cache file subset, the number of cache file subsets to be scheduled includes:
and dividing the bandwidth to be adjusted by the target occupied bandwidth, and then rounding up to obtain the number of the cache file subsets to be scheduled, wherein the target occupied bandwidth is determined according to the occupied bandwidth of each cache file subset.
An apparatus for Content Delivery Network (CDN) bandwidth scheduling, the apparatus comprising:
the triggering unit is used for triggering the current CDN node to start bandwidth scheduling;
the dividing unit is used for dividing the cache files of the target domain name into a plurality of cache file subsets;
the first determining unit is used for determining the number of the cache file subsets to be scheduled according to the bandwidth to be adjusted and the occupied bandwidth of each cache file subset;
a second determining unit, configured to determine, as a target file, a cache file in the cache file subset corresponding to the to-be-scheduled cache file subset number;
a third determining unit, configured to determine all requests for accessing a target file of the target domain name as target requests;
and the forwarding unit is used for forwarding the target request to other CDN nodes.
In one possible implementation, the apparatus further includes:
and a fourth determining unit, configured to determine the received access request that is not successfully responded as the target request.
In a possible implementation manner, the triggering unit is specifically configured to obtain a planned bandwidth of a current CDN node, acquire an exit bandwidth of the current CDN node, and trigger the current CDN node to start bandwidth scheduling when the exit bandwidth is greater than the planned bandwidth;
alternatively, the first and second electrodes may be,
when a bandwidth scheduling instruction sent by a CDN central node is received, triggering the current CDN node to start bandwidth scheduling.
In a possible implementation manner, the dividing unit is specifically configured to perform hash calculation on an identifier of a target cache file of a target domain name to obtain a hash value; the target cache file is each of the cache files of the target domain name;
taking a module of the hash value to N to obtain a packet serial number; n is the number of the cache file subsets;
and dividing the target cache file into cache file subsets corresponding to the grouping sequence numbers.
In a possible implementation manner, the first determining unit is specifically configured to divide the bandwidth to be adjusted by a target occupied bandwidth and then round up the divided bandwidth to obtain the number of the cache file subsets to be scheduled, where the target occupied bandwidth is determined according to the occupied bandwidth of each cache file subset.
A device for CDN bandwidth scheduling for a content delivery network, comprising: the content delivery network CDN bandwidth scheduling method comprises a memory, a processor and a computer program which is stored in the memory and can run on the processor, wherein when the processor executes the computer program, the method for scheduling the CDN bandwidth of the content delivery network is realized.
A computer-readable storage medium having stored therein instructions which, when run on a terminal device, cause the terminal device to perform the method of CDN bandwidth scheduling as described above.
Therefore, the embodiment of the application has the following beneficial effects:
the embodiment of the application provides a method, a device and equipment for scheduling content delivery network bandwidth. And determining the number of the cache file subsets to be scheduled according to the bandwidth to be adjusted and the occupied bandwidth of each cache file subset. And determining the cache files in the cache file subsets corresponding to the number of the cache file subsets to be scheduled as target files, and determining all requests for accessing the target files of the target domain name as target requests. This may enable the concentration of requests to access target files of the same target domain name. Finally, the target request is forwarded to other CDN nodes, the types of files to be processed by the other CDN nodes according to the forwarding request are reduced, the probability that the files corresponding to the cache request do not exist in the other CDN nodes and the request is returned to the source is reduced, and therefore the request of the other CDN nodes is reduced.
Drawings
Fig. 1 is a schematic diagram of a framework of an exemplary application scenario provided in an embodiment of the present application;
fig. 2 is a flowchart of a method for scheduling bandwidth of a content delivery network according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a device for CDN bandwidth scheduling in a content delivery network according to an embodiment of the present application.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, embodiments accompanying the drawings are described in detail below.
In order to facilitate understanding and explaining the technical solutions provided by the embodiments of the present application, the following description will first describe the background art of the present application.
The inventor discovers that when an existing CDN node obtains a request for accessing a specific file of a specific domain name, whether the existing CDN node has the specific file needs to be queried in a local cache file after studying traditional CDN node bandwidth scheduling. If the corresponding specific file is not cached in the CDN node, the CDN node needs to send a request to the source station to return to the source, and obtain the corresponding specific file from the source station. When the CDN node is scheduled, the CDN node that needs to be scheduled randomly forwards a request for accessing the domain name to another CDN node, where the forwarded request may relate to a file that is not cached by the other CDN node, so that the other CDN node needs to send a request to the source station to obtain the corresponding file. Too many back sources may result in access delays that affect the performance of the CDN nodes.
Based on this, embodiments of the present application provide a method, an apparatus, and a device for scheduling a content delivery network bandwidth, where bandwidth scheduling is started by triggering a current CDN node, and a cache file of a target domain name is first divided into multiple cache file subsets, so as to select a target file from the multiple cache file subsets. And determining the number of the cache file subsets to be scheduled according to the bandwidth to be adjusted and the occupied bandwidth of each cache file subset. And determining the cache files in the cache file subsets corresponding to the number of the cache file subsets to be scheduled as target files, and determining all requests for accessing the target files of the target domain name as target requests. This may enable the concentration of target file requests that access the same target domain name. Finally, the target request is forwarded to other CDN nodes, the types of files to be processed by the other CDN nodes according to the forwarding request are reduced, the probability that the files corresponding to the cache request do not exist in the other CDN nodes and the request is returned to the source is reduced, and therefore the request of the other CDN nodes is returned to the source is reduced.
In order to facilitate understanding of the method for scheduling bandwidth of a content distribution network provided in the embodiment of the present application, the following description is made with reference to a scenario example shown in fig. 1. Referring to fig. 1, the figure is a schematic diagram of a framework of an exemplary application scenario provided in an embodiment of the present application.
In practical application, the bandwidth scheduling is started by triggering the current CDN node 101, and the cache file of the target domain name is first divided into multiple cache file subsets. And determining the number of the subsets of the cache files to be scheduled according to the bandwidth to be adjusted and the occupied bandwidth of each subset of the cache files. And determining the cache files in the cache file subsets corresponding to the number of the cache file subsets to be scheduled as target files. All requests for accessing the target file of the target domain name are determined as target requests, and the target requests are forwarded to other CDN nodes 102.
Those skilled in the art will appreciate that the block diagram shown in fig. 1 is only one example in which embodiments of the present application may be implemented. The scope of applicability of the embodiments of the present application is not limited in any way by this framework.
For the convenience of understanding of the present application, a method for scheduling bandwidth of a content distribution network provided in an embodiment of the present application is described below with reference to the accompanying drawings.
Referring to fig. 2, which is a flowchart of a method for scheduling a content distribution network bandwidth according to an embodiment of the present application, as shown in fig. 2, the method may include S201 to S206:
s201: and triggering the current CDN node to start bandwidth scheduling.
The current CDN node is a CDN node that needs bandwidth scheduling, and may be an edge node serving a user in the CDN. It should be noted that, the CDN node may be a cluster composed of a plurality of servers.
By triggering the current CDN node to start bandwidth scheduling, the current CDN node can forward a part of requests for accessing the domain name to other CDN nodes.
The method for triggering the bandwidth scheduling of the current CDN node is not limited in the embodiment of the present application, and the method may be automatically triggered by the current CDN node or triggered by the CDN center node. The embodiment of the present application provides a specific implementation manner for triggering a current CDN node to start bandwidth scheduling, please refer to the following.
S202: and dividing the cache files of the target domain name into a plurality of cache file subsets.
It can be understood that the request for accessing the domain name obtained by the current CDN node has a corresponding file. In order to facilitate the adjustment of the bandwidth, the cache file of the target domain name may be divided into a plurality of cache file subsets. And then determining the number of the cache file subsets according to the occupied bandwidth corresponding to the cache file subsets.
In a possible implementation manner, the cache files of the target domain name may be divided by using a hash bucket algorithm to obtain a subset of the cache files. The embodiment of the present application provides a specific implementation manner for dividing a cache file of a target domain name into a plurality of cache file subsets, please refer to the following.
S203: and determining the number of the cache file subsets to be scheduled according to the bandwidth to be adjusted and the occupied bandwidth of each cache file subset.
The divided multiple cache file subsets have corresponding occupied bandwidths, and the occupied bandwidths are bandwidths required by the CDN node when file transmission is carried out to the terminal equipment initiating the access request. For example, the divided cache file subsets have 100 shares, and the occupied bandwidth of each cache file subset is 1G. The number of the cache file subsets to be scheduled can be determined according to the bandwidth to be adjusted of the current CDN node. For example, when the bandwidth to be adjusted of the current CDN node is 10G, the number of corresponding cache file subsets that need to be scheduled is 10.
In a possible implementation manner, the bandwidth to be adjusted cannot be completely matched with a certain amount of occupied bandwidth, and an embodiment of the present application further provides a specific implementation manner for determining the number of the cache file subsets to be scheduled according to the bandwidth to be adjusted and the occupied bandwidth of each cache file subset, please refer to the following.
S204: and determining the cache files in the cache file subsets corresponding to the number of the cache file subsets to be scheduled as target files.
In order to reduce the request return of other CDN nodes, the requests may be divided according to the type of the cache file corresponding to the request. Before dividing the request, the cache file corresponding to the request needs to be determined.
And determining the cache files in the cache file subsets corresponding to the number of the cache file subsets to be scheduled as target files. Taking the above-mentioned cache file subset as an example, after determining that the number of the cache file subsets to be scheduled is 10, selecting 10 cache file subsets from 100 cache file subsets, and taking a cache file D in the 10 cache file subsets as a target file.
S205: and determining all requests for accessing the target file of the target domain name as target requests.
Correspondingly, the forwarding request is determined by the determined target file. All requests to access the target file of the target domain name are determined as target requests. Taking the above target file as the cache file D as an example, a request for accessing the cache file D of the target domain name is taken as a target request.
S206: and forwarding the target request to other CDN nodes.
The target request is a request concentrated on accessing a target file of a target domain name, and the target request is forwarded to other CDN nodes, so that the target file can be processed by the other CDN nodes in a concentrated manner based on the target request, and compared with the random forwarding of the access request to the other CDN nodes, the types and ranges of cache files required to be processed by the other CDN nodes are reduced, and the request return of the other CDN nodes can be reduced.
For example, the cache files of the target domain name corresponding to the access request obtained by the current CDN node have 10000 types, and each cache file has 10 corresponding access requests. The occupied bandwidth of all the cache files is 20G, and the bandwidth to be adjusted is 10G. If a method of randomly forwarding access requests to other CDN nodes is adopted, a part of access requests corresponding to 10000 types of cache files may be selected and forwarded to other CDN nodes. For example, 10000 cache files are respectively selected to have 5 access requests to be forwarded to other CDN nodes. Therefore, other CDN nodes need to process access requests corresponding to 10000 cache files, and the probability that 10000 cache files are not cached in other CDN nodes is relatively high, so that the other CDN nodes need to request back to the source. If the content distribution network bandwidth scheduling method is adopted, the cache file of the target domain name is divided into a plurality of cache file subsets, for example, 10 cache file subsets, and the occupied bandwidth of each cache file subset is 2G. And determining the number of the cache file subsets to be scheduled according to the bandwidth to be adjusted and the occupied bandwidth of the cache file subsets, wherein the number of the cache file subsets to be scheduled is 5, for example. The cached files corresponding to the 5 cached file subsets may be selected as the target file. All the secondary access requests corresponding to the target files respectively serve as target requests, that is, 10 secondary cache requests corresponding to 5000 types of cache files respectively are forwarded to other CDN nodes. Therefore, other CDN nodes only need to process access requests related to 5000 kinds of cache files, the types and the ranges of the cache files corresponding to the access requests are reduced, the probability that the cache files corresponding to the access requests which are not cached in other CDN nodes need to be requested to return to the source is reduced, and the request return to the source of other CDN nodes is reduced.
Based on the related content of the above S201-S206, the target request for accessing the target file of the target domain name is forwarded to other CDN nodes by determining the target file of the current CDN node that triggers bandwidth scheduling, so that the other CDN nodes perform more centralized processing on the target file based on the target request. By forwarding the request for accessing the target file of the target domain name to other CDN nodes as the target request, the types of the files processed by the other CDN nodes based on the forwarded request are reduced, the probability that the files corresponding to the forwarded request are not cached in the other CDN nodes is reduced, and the requests of the other CDN nodes are returned to the source.
When the CDN node processes the access request, if the CDN node does not cache the file corresponding to the access request, the CDN node fails to respond to the access request, and the CDN node may need to send a back-source request to the source station to obtain the file corresponding to the access request.
When the CDN node needs to perform bandwidth scheduling, the access request that is not successfully responded may be forwarded to other CDN nodes, and if a file corresponding to the access request is cached in the other CDN nodes, the request return of the CDN node may be reduced.
Based on this, an embodiment of the present application further provides a method for scheduling a content delivery network bandwidth, where in addition to the above steps, the method further includes:
and determining the received access request which is not successfully responded as a target request.
If the file corresponding to the access request is not cached in the current CDN node, the access request may not be successfully responded to. When bandwidth scheduling is performed on the current CDN node, an access request that has not successfully responded may be used as a target request and forwarded to another CDN node. If the other CDN nodes cache the file corresponding to the access request, the other CDN nodes may respond to the access request without sending a request to the source, so that request to the source of the CDN nodes may be reduced.
In the embodiment of the application, the target request can be processed by other CDN nodes by determining the access request which is not successfully responded to the current CDN node as the target request and forwarding the target request to other CDN nodes, so that the request return of the CDN nodes is reduced, and the performance of the CDN nodes is improved.
In a possible implementation manner, the current CDN node may trigger the bandwidth scheduling by the CDN central node or by the current CDN node itself. The embodiment of the present application provides a specific implementation manner for triggering a current CDN node to start bandwidth scheduling, which specifically includes:
acquiring a planned bandwidth of a current CDN node, acquiring an outlet bandwidth of the current CDN node, and triggering the current CDN node to start bandwidth scheduling when the outlet bandwidth is greater than the planned bandwidth;
alternatively, the first and second electrodes may be,
when a bandwidth scheduling instruction sent by a CDN central node is received, triggering the current CDN node to start bandwidth scheduling.
The CDN node may obtain a planned bandwidth of the current CDN node, and acquire an exit 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. And if the outlet bandwidth is greater than the planned bandwidth, bandwidth adjustment needs to be performed on the current CDN node, and the current CDN node is triggered to start bandwidth scheduling.
In another possible implementation, the CDN node may be triggered by the CDN hub node to start bandwidth scheduling. The CDN center node can obtain the outlet bandwidth of each CDN node, and determines whether the CDN nodes need to perform bandwidth scheduling or not by using the outlet bandwidth and the planned bandwidth corresponding to the CDN nodes. And if the CDN node needs to perform bandwidth scheduling, the CDN central node sends a bandwidth scheduling instruction to the CDN node. After receiving a bandwidth scheduling instruction sent by the CDN central node, the CDN node triggers the current CDN node to start bandwidth scheduling.
Based on the content, the current CDN node or the CDN central node triggers the CDN node to start bandwidth scheduling, so that the current CDN node determines a corresponding target request according to a target file, and forwards the target request to other CDN nodes.
In a possible implementation manner, in order to implement the partition of the cache file of the target domain name, a hash bucket algorithm may be used to partition the cache file. Specifically, an embodiment of the present application provides a specific implementation manner for dividing a cache file of a target domain name into a plurality of cache file subsets, which specifically 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;
taking a module of the hash value to N to obtain a packet serial number; n is the number of the cache file subsets;
and dividing the target cache file into cache file subsets corresponding to the grouping sequence numbers.
The cache files of the target domain names have corresponding identifications, the cache files of each target domain name are used as the target cache files, and the hash value corresponding to the target cache files is obtained by carrying out hash calculation on the identifications of the target cache files.
To implement the partitioning of the cache files, the number N of subsets of cache files may be modulo. And performing modulo N calculation on the hash value corresponding to the identifier of the target cache file, and calculating to obtain a modulo remainder. And taking the obtained residual value as a packet serial number corresponding to the target cache file.
And dividing the target cache file into corresponding cache file subsets according to the group sequence number corresponding to the target cache file, so as to realize the division of the target cache file.
Based on the above, in the embodiment of the present application, by performing hash calculation and modulo operation by using the identifier of the target cache file of the target domain name, the cache file of the target domain name can be divided, so as to obtain the divided multiple cache file subsets.
In a possible implementation manner, the occupied bandwidth of the cache file subset corresponding to the number of the cache file subsets to be scheduled and the bandwidth to be adjusted cannot be completely matched. Correspondingly, an embodiment of the present application further provides a specific implementation manner for determining the number of the subsets of the cache files to be scheduled according to the bandwidth to be adjusted and the occupied bandwidth of each subset of the cache files, including:
and dividing the bandwidth to be adjusted by the target occupied bandwidth, and then rounding up to obtain the number of the cache file subsets to be scheduled. Wherein the target occupied bandwidth is determined according to the occupied bandwidth of each cache file subset.
It can be understood that the occupied bandwidths of each subset of cache files are basically consistent, the occupied bandwidth of any subset of cache files can be used as the target occupied bandwidth, and the average value of the occupied bandwidths of each subset of cache files can also be used as the target occupied bandwidth. And the target occupied bandwidth can represent the occupied bandwidth corresponding to one cache file subset, and the number of the cache file subsets to be scheduled can be obtained according to the bandwidth to be adjusted and the target occupied bandwidth.
And the occupied bandwidth and the bandwidth to be adjusted corresponding to a certain number of cache file subsets may not completely correspond to each other. For example, when the bandwidth to be adjusted is 7G and the target occupied bandwidth is 2G, the occupied bandwidth corresponding to a certain number of cache file subsets is selected and cannot correspond to the bandwidth to be adjusted.
In order to ensure bandwidth scheduling of the current CDN node, the occupied bandwidth of the cache file subset corresponding to the number of cache file subsets may be slightly greater than the bandwidth to be adjusted. And if the obtained calculation result is an integer, the occupied bandwidth corresponding to the number of the cache file subsets is matched with the bandwidth to be adjusted, and further adjustment is not needed. If the obtained calculation result is not an integer, rounding up the calculation result to obtain the corresponding number of the cache file subsets to be scheduled.
Taking the bandwidth to be adjusted as 7G and the target occupied bandwidth as 2G as an example, the quotient of the bandwidth to be adjusted and the target occupied bandwidth is calculated, and the obtained calculation result is 3.5. And rounding up the obtained calculation result to obtain the number 4 of the cache file subsets to be scheduled.
In the embodiment of the application, when the occupied bandwidth corresponding to a certain number of cache file subsets does not completely correspond to the bandwidth to be adjusted, the bandwidth to be adjusted is divided by the target occupied bandwidth and then rounded up, so that the number of the cache file subsets to be scheduled is obtained. Therefore, the request return source of the CDN node can be reduced on the basis of finishing the bandwidth scheduling of the current CDN node.
Based on the method for scheduling the bandwidth of the content delivery network CDN provided by the foregoing method embodiment, the embodiment of the present application further provides a method for scheduling the bandwidth of the content delivery network CDN, and a device for scheduling the bandwidth of the content delivery network CDN will be described below with reference to the accompanying drawings.
Referring to fig. 3, the figure is a schematic structural diagram of an apparatus for CDN bandwidth scheduling in a content delivery network according to an embodiment of the present application. As shown in fig. 3, the device for CDN bandwidth scheduling of the content delivery network includes:
a triggering unit 301, configured to trigger a current CDN node to start bandwidth scheduling;
a dividing unit 302, configured to divide the cache file of the target domain name into multiple cache file subsets;
a first determining unit 303, configured to determine the number of the subsets of cache files to be scheduled according to the bandwidth to be adjusted and the occupied bandwidth of each subset of cache files;
a second determining unit 304, configured to determine, as a target file, a cache file in the cache file subset corresponding to the to-be-scheduled cache file subset quantity;
a third determining unit 305 for determining all requests for accessing the target file of the target domain name as target requests;
a forwarding unit 306, configured to forward the target request to other CDN nodes.
In one possible implementation, the apparatus further includes:
and a fourth determining unit, configured to determine the received access request that is not successfully responded as the target request.
In a possible implementation manner, the triggering unit 301 is specifically configured to obtain a planned bandwidth of a current CDN node, acquire an exit bandwidth of the current CDN node, and trigger the current CDN node to start bandwidth scheduling when the exit bandwidth is greater than the planned bandwidth;
alternatively, the first and second liquid crystal display panels may be,
when a bandwidth scheduling instruction sent by a CDN central node is received, triggering the current CDN node to start bandwidth scheduling.
In a possible implementation manner, the dividing unit 302 is specifically configured to perform hash calculation on an identifier of a target cache file of a target domain name to obtain a hash value; the target cache file is each of the cache files of the target domain name;
taking a module of the hash value pair N to obtain a packet serial number; n is the number of the cache file subsets;
and dividing the target cache file into cache file subsets corresponding to the grouping sequence numbers.
In a possible implementation manner, the first determining unit 303 is specifically configured to divide the bandwidth to be adjusted by a target occupied bandwidth, and then round up the divided bandwidth to obtain the number of the cache file subsets to be scheduled, where the target occupied bandwidth is determined according to an occupied bandwidth of each cache file subset.
In addition, an embodiment of the present application further provides a device for scheduling a CDN bandwidth in a content delivery network, including: the content delivery network CDN bandwidth scheduling method includes, when the processor executes the computer program, implementing the content delivery network CDN bandwidth scheduling method according to the above embodiment.
In addition, an embodiment of the present application further provides 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 is caused to execute the method for scheduling a CDN bandwidth of a content delivery network according to the foregoing embodiment.
According to the device and the equipment for scheduling the bandwidth of the content delivery network, the CDN node firstly acquires the planning bandwidth of the current CDN node and acquires the outlet bandwidth of the current CDN node, so that the real-time acquisition of the outlet bandwidth of the current CDN node is realized, and the real-time performance of bandwidth scheduling is improved. And when the exit bandwidth is larger than the planned bandwidth, calculating the bandwidth to be adjusted by using the planned bandwidth, the difference value between the exit bandwidth and the planned bandwidth, the proportional parameter and the integral parameter and adopting a proportional-integral algorithm. The bandwidth to be adjusted obtained through proportional integral calculation is accurate. Finally, the exit bandwidth of the current CDN node is adjusted by using the bandwidth to be adjusted, so that the exit bandwidth can be stably adjusted to be close to the planned bandwidth, and the exit bandwidth is adjusted by the current CDN node, so that the adjusting efficiency can be improved. Therefore, the real-time and accurate dispatching of the exit bandwidth of the current CDN node can be realized.
It should be noted that, in the present specification, each embodiment is described in a progressive manner, and each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other. For the system or the device disclosed by the embodiment, the description is simple because the system or the device corresponds to the method disclosed by the embodiment, and the relevant points can be referred to the method part for description.
It should be understood that, in this application, "at least one" means one or more, "a plurality" means two or more. "and/or" for describing an association relationship of associated objects, indicating that there may be three relationships, e.g., "a and/or B" may indicate: only A, only B and both A and B are present, wherein A and B may be singular or plural. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. "at least one of the following" or similar expressions refer to any combination of these items, including any combination of the singular or plural items. For example, at least one (one) of a, b, or c, may represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", wherein a, b, c may be single or plural.
It is further noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method for CDN bandwidth scheduling of content delivery network is characterized in that the method comprises:
triggering the current CDN node to start bandwidth scheduling;
dividing the cache files of the target domain name into a plurality of cache file subsets;
determining the number of the subsets of the cache files to be scheduled according to the bandwidth to be adjusted and the occupied bandwidth of each subset of the cache files;
determining the cache files in the cache file subsets corresponding to the number of the cache file subsets to be scheduled as target files;
determining all requests for accessing the target file of the target domain name as target requests;
and forwarding the target request to other CDN nodes.
2. The method of claim 1, further comprising:
and determining the received access request which is not successfully responded as a target request.
3. The method of claim 1, wherein triggering the current CDN node to initiate bandwidth scheduling comprises:
acquiring a planned bandwidth of a current CDN node, acquiring an outlet bandwidth of the current CDN node, and triggering the current CDN node to start bandwidth scheduling when the outlet bandwidth is greater than the planned bandwidth;
alternatively, the first and second electrodes may be,
and when receiving a bandwidth scheduling instruction sent by the CDN central node, triggering the current CDN node to start bandwidth scheduling.
4. The method according to claim 1, wherein the dividing the cache file of the target domain name into a plurality of cache file subsets comprises:
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;
taking a module of the hash value pair N to obtain a packet serial number; n is the number of the cache file subsets;
and dividing the target cache file into cache file subsets corresponding to the grouping sequence numbers.
5. The method of claim 1, wherein determining the number of subsets of cache files to be scheduled according to the bandwidth to be adjusted and the occupied bandwidth of each subset of cache files comprises:
and dividing the bandwidth to be adjusted by the target occupied bandwidth, and then rounding up to obtain the number of the subsets of the cache files to be scheduled, wherein the target occupied bandwidth is determined according to the occupied bandwidth of each subset of the cache files.
6. An apparatus for CDN bandwidth scheduling of a content delivery network, the apparatus comprising:
the triggering unit is used for triggering the current CDN node to start bandwidth scheduling;
the dividing unit is used for dividing the cache files of the target domain name into a plurality of cache file subsets;
the first determining unit is used for determining the number of the cache file subsets to be scheduled according to the bandwidth to be adjusted and the occupied bandwidth of each cache file subset;
a second determining unit, configured to determine, as a target file, a cache file in the cache file subset corresponding to the number of the cache file subsets to be scheduled;
a third determining unit configured to determine all requests for accessing the target file of the target domain name as target requests;
and the forwarding unit is used for forwarding the target request to other CDN nodes.
7. The apparatus of claim 6, further comprising:
and a fourth determining unit, configured to determine the received access request that is not successfully responded as the target request.
8. The apparatus according to claim 6, wherein the triggering unit is specifically configured to obtain a planned bandwidth of a current CDN node, acquire an exit bandwidth of the current CDN node, and trigger the current CDN node to start bandwidth scheduling when the exit bandwidth is greater than the planned bandwidth;
alternatively, the first and second electrodes may be,
when a bandwidth scheduling instruction sent by a CDN central node is received, triggering the current CDN node to start bandwidth scheduling.
9. A device for CDN bandwidth scheduling of a content delivery network is characterized by comprising: memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the method for CDN bandwidth scheduling according to any of claims 1-5 when executing the computer program.
10. A computer-readable storage medium having stored therein instructions that, when run on a terminal device, cause the terminal device to perform the method of CDN bandwidth scheduling of any of claims 1-5.
CN202110178711.8A 2021-02-09 2021-02-09 Method, device and equipment for scheduling content distribution network bandwidth Active CN113014422B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202110178711.8A CN113014422B (en) 2021-02-09 2021-02-09 Method, device and equipment for scheduling content distribution network bandwidth
PCT/CN2022/072831 WO2022170934A1 (en) 2021-02-09 2022-01-19 Content delivery network bandwidth scheduling method, apparatus, and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110178711.8A CN113014422B (en) 2021-02-09 2021-02-09 Method, device and equipment for scheduling content distribution network bandwidth

Publications (2)

Publication Number Publication Date
CN113014422A CN113014422A (en) 2021-06-22
CN113014422B true CN113014422B (en) 2022-09-23

Family

ID=76383938

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110178711.8A Active CN113014422B (en) 2021-02-09 2021-02-09 Method, device and equipment for scheduling content distribution network bandwidth

Country Status (2)

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

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113014422B (en) * 2021-02-09 2022-09-23 北京金山云网络技术有限公司 Method, device and equipment for scheduling content distribution network bandwidth
CN113783751B (en) * 2021-08-30 2023-01-17 北京东方网信科技股份有限公司 Method, electronic device and medium for detecting user broadband quality

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110474852A (en) * 2019-08-01 2019-11-19 网宿科技股份有限公司 A kind of bandwidth scheduling method and device
CN111464323A (en) * 2019-01-18 2020-07-28 北京沃东天骏信息技术有限公司 Node bandwidth scheduling method and scheduling device

Family Cites Families (4)

* 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
US9380096B2 (en) * 2006-06-09 2016-06-28 Qualcomm Incorporated Enhanced block-request streaming system for handling low-latency streaming
CN112153160A (en) * 2020-09-30 2020-12-29 北京金山云网络技术有限公司 Access request processing method and device and electronic equipment
CN113014422B (en) * 2021-02-09 2022-09-23 北京金山云网络技术有限公司 Method, device and equipment for scheduling content distribution network bandwidth

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111464323A (en) * 2019-01-18 2020-07-28 北京沃东天骏信息技术有限公司 Node bandwidth scheduling method and scheduling device
CN110474852A (en) * 2019-08-01 2019-11-19 网宿科技股份有限公司 A kind of bandwidth scheduling method and device

Also Published As

Publication number Publication date
WO2022170934A1 (en) 2022-08-18
CN113014422A (en) 2021-06-22

Similar Documents

Publication Publication Date Title
CN109246229B (en) Method and device for distributing resource acquisition request
US11290381B2 (en) Method and system for transmitting data resource acquisition request
CN113014422B (en) Method, device and equipment for scheduling content distribution network bandwidth
CN108173774B (en) Client upgrading method and system
CN107277134B (en) Data transmission method and system based on peer-to-peer network
US9405588B2 (en) Cloud resource allocation system and method
CN110868465A (en) Load balancing system and method for container cloud
CN107404541B (en) Method and system for selecting neighbor node in peer-to-peer network transmission
CN112714029B (en) Method, device and equipment for scheduling content distribution network bandwidth
CN110336848B (en) Scheduling method, scheduling system and scheduling equipment for access request
CN108123866B (en) Method for message transmission and device
CN110888735A (en) Distributed message distribution method and device based on consistent hash and scheduling node
CN111031113A (en) User queuing method for supporting platform-level customer service system
CN111385357B (en) Network resource management method and device, computer equipment and storage medium
CN112799839A (en) Request processing method and device, computer readable storage medium and electronic equipment
US20220166842A1 (en) Data distribution method and electronic device
CN101854287B (en) Method and device for optimizing P2P traffic
CN107800744B (en) Service request forwarding method, device and system
CN108124021B (en) Method, device and system for obtaining Internet Protocol (IP) address and accessing website
CN105634932B (en) Message pushing method, device, system and computer readable storage medium
US10154414B2 (en) Resource allocation
CN109688171B (en) Cache space scheduling method, device and system
CN110798492B (en) Data storage method and device and data processing system
US20100057914A1 (en) Method, apparatus and system for scheduling contents
CN112925946A (en) Service data storage method and device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant