CDN resource dynamic adjustment method, electronic device and storage medium
Through automated CDN resource adjustment methods, the processor and storage media are used to solve the problems of low efficiency and high cost of CDN resource adjustment, fast response and service quality guarantees are achieved, and bandwidth and human resource consumption are reduced.
Patent Information
- Application Number
- CN202211438587.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-17
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2042-11-17
AI Technical Summary
The adjustment of existing CDN resources mainly relies on manual adjustments, which are inefficient, high cost, and difficult to ensure bandwidth requirements and service quality, which can easily lead to poor network service quality or service interruption.
Through a dynamic CDN resource adjustment method, the processor and storage medium are used to automatically adjust the IP resources over the IP, and according to the incremental needs of customers, IP sorting, tag pre-checking, bandwidth pre-filtering and resource pool IP limiting are carried out. Exhaust algorithms generate high-quality coverage resource planning to ensure service quality and cost-effectiveness.
It realizes automated CDN resource adjustment, saves human resources and bandwidth costs, quickly responds to customer needs, ensures service quality, and reduces bandwidth costs and human resources consumption.
Smart Images

Figure CN115913969B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of Internet technology, and in particular to a CDN resource dynamic adjustment method, electronic equipment and storage medium. Background Art
[0002] Content Delivery Network (CDN) refers to a bandwidth allocation management platform composed of edge node servers distributed in different regions, which provides users with decentralized storage and caching of content, and distributes content to fast and stable edge node servers based on network dynamic traffic and load conditions, thereby improving the response speed and stability of user access to content.
[0003] Furthermore, using a group of upstream traffic IPs (IP addresses of edge node servers that are exposed to the outside and can be used by users to access content) to provide services for the resolution group (a collection of domain names that require CDN acceleration)-regional granularity is also called the coverage resources of the resolution group in this region. A resolution group needs to be provided with services by one or more upstream traffic IPs in each region, and one upstream traffic IP can also provide services for multiple resolution groups-regional granularity.
[0004] The number of IPs planned at a resolution group-region granularity is not fixed. Sometimes, due to reasons such as customer events, the number of domain name responses and bandwidth traffic will increase suddenly, which will lead to a sudden increase in the bandwidth of the resolution group-region granularity mapped to the domain name. The comprehensive redundant bandwidth of the existing coverage planned IPs may not be able to meet the sudden increase in bandwidth demand. Therefore, it is necessary to make corresponding adjustments to the planned IP resources, eliminate IPs with insufficient coverage redundant bandwidth, and add additional IPs to share the incremental bandwidth so that the covered IP resources can meet customer needs.
[0005] Adjusting the coverage IP resources is not a simple matter of adding a few high-traffic IPs to meet the demand. Restrictions such as service label restrictions, IP Internet Protocol version restrictions, and IP integrated redundant bandwidth restrictions make it difficult for coverage planning to meet the expected requirements by relying solely on manual processing. If the planned coverage is unreasonable, it will not only increase bandwidth costs, but also affect the user's service quality.
[0006] Currently, the adjustment of coverage resources at the analysis group-region granularity is generally done manually based on experience. This approach will cause several problems:
[0007] (1) Generally, there are many analysis groups and regions that need to be adjusted. Manually adjusting them one by one is time-consuming and laborious, wasting a lot of human resources.
[0008] (2) Adjusting coverage IP resources is not a simple matter of adding or removing IPs. It is necessary to consider factors such as the bandwidth requirements of the resolution group-region, whether the IP comprehensive redundant bandwidth is sufficient, whether the service labels match, and whether the IP types are consistent. Manual experience alone cannot necessarily take all factors into account. If the manual adjustment plan is unreasonable, it may lead to problems such as poor network service quality or even service interruption, causing customer complaints.
[0009] (3) Manual planning cannot use complex algorithms like machines to find a coverage solution with relatively good bandwidth cost while satisfying coverage constraints, which leads to increased bandwidth costs.
[0010] Therefore, it is necessary to provide a CDN resource dynamic adjustment method, electronic device and storage medium to improve the above situation. Summary of the invention
[0011] In view of the deficiencies of the above-mentioned prior art, the present invention aims to propose a CDN resource dynamic adjustment method, electronic device and storage medium, so as to automatically adjust the coverage IP at the resolution group-region granularity of the customer's bandwidth increment, and generate a relatively high-quality coverage resource plan according to the corresponding constraints, while ensuring the customer's service quality, not only saving a lot of human resources, but also saving bandwidth costs.
[0012] The present invention provides a method for dynamically adjusting CDN resources, comprising the following steps:
[0013] Step S1: Obtain the bearer bandwidth and planned incremental bandwidth of IPv4 and the bearer bandwidth and planned incremental bandwidth of IPv6 of the resolution group-area granularity for which the customer needs to perform coverage bandwidth increment;
[0014] Step S2: Obtain the IP information and resource pool IP information of the resolution group-region;
[0015] Step S3: Preprocess the resource pool IP to facilitate subsequent calculations. IPv4 and IPv6 IPs need to be preprocessed separately. Preprocessing includes IP sorting, label pre-checking, bandwidth pre-filtering, and resource pool IP number limitation. The main steps are:
[0016] Step S31: IP sorting: IPs are sorted using two dimensions: hierarchy and bandwidth redundancy. The hierarchy is from small to large: same city, same province, same region, same operator, same country, same continent, same world. The hierarchy calculation rule is to determine which minimum hierarchy the IP region and the region that needs to be incremented belong to. IPs are sorted from small to large according to hierarchy, and IPs of the same hierarchy are sorted from large to small according to comprehensive redundant bandwidth.
[0017] Step S32: Label pre-verification: select the IP corresponding to the service label according to the service label attribute of the resolution group, and the service label set of the selected IP needs to include the service label of the resolution group.
[0018] Step S33: Bandwidth pre-filtering: Filter IPs with insufficient comprehensive redundancy according to the resolution group-region bearer bandwidth and the planned incremental bandwidth. Since the comprehensive redundant bandwidth of an IP is the smaller of the redundant bandwidth of the IP and the redundant bandwidth of the edge node server to which the IP belongs, it is necessary to pre-deduct the bandwidth of the edge node server, that is, if multiple IPs belong to the same edge node server, the occupied bandwidth of the previous unfiltered IP needs to be deducted when calculating the redundant bandwidth of the edge node of the subsequent IP.
[0019] Step S34: Limit the number of IPs in the resource pool: Since the IPs pushed to the client are limited by the message length, the number of IPs is limited. Therefore, redundant IPs can be filtered out during the resource filtering stage to improve the computing efficiency of subsequent steps.
[0020] Step S4: According to the coverage bandwidth and planned incremental bandwidth of IPv4 and IPv6 at the granularity of the parsing group-area, all possible scheme combinations are enumerated in order from the minimum number of IPs added to the maximum number of IPs added. If the selected scheme meets all restrictions, the coverage resource adjustment is considered successful. The main steps are:
[0021] Step S41: from the minimum number of added IPs to the maximum number of added IPs, exhaustively combine the pre-processed resource pool IPs according to the number of IPs to generate all possible IP collocation schemes, and traverse all IP collocation schemes in turn, and it is necessary to consider the number of added IPs for both IPv4 and IPv6 IPs;
[0022] Step S42: Label verification: Calculate the label set of the covered IP and the newly added IP. If it contains all the labels of the parsed group, the verification is successful and proceed to the next step. Otherwise, it is considered a failure and the next IP matching solution is traversed.
[0023] Step S43: Covered IP bandwidth verification: According to the coverage bandwidth of the analysis group-region granularity and the number of covered IPs, the covered IP has carried bandwidth, and the planned carrying bandwidth of the covered IP is calculated according to the planned carrying bandwidth (the sum of the incremental bandwidth and the coverage bandwidth) and the number of IPs in the current IP matching scheme (including the covered IP and the newly added IP), and each covered IP is traversed in turn to perform bandwidth verification. The main steps are as follows:
[0024] Step S431: If the planned carrying bandwidth of the coverage IP is greater than the already carried bandwidth of the coverage IP, it is necessary to determine whether the comprehensive redundant bandwidth of the coverage IP can carry the newly added bandwidth (the planned carrying bandwidth of the coverage IP minus the already carried bandwidth of the coverage IP). If it can be carried, it is deemed that the coverage IP bandwidth verification is successful, but the edge node server bandwidth needs to be pre-deducted, that is, this part of the occupied bandwidth needs to be deducted when calculating the redundant bandwidth of the edge node server to which the IP belongs; if it cannot be carried, it is deemed that the bandwidth verification has failed. At this time, as long as one coverage IP verification fails, it is considered that the entire IP matching plan verification has failed, and the next IP matching plan is traversed.
[0025] Step S432: If the planned bearer bandwidth of the coverage IP is equal to the carried bandwidth of the coverage IP, the coverage IP bandwidth verification is deemed successful. Since the bearer bandwidth before and after the increment has not changed, there is no need to pre-deduct the edge node server bandwidth.
[0026] Step S433: If the planned carrying bandwidth of the coverage IP is less than the carrying bandwidth of the coverage IP, the coverage IP bandwidth verification is deemed to be successful. It also means that after the implementation of the new plan, the coverage IP can release part of the bandwidth, and the edge node server bandwidth needs to be pre-increased, that is, this part of the released bandwidth needs to be added when calculating the redundant bandwidth of the edge node server to which the IP belongs.
[0027] Step S44: New IP bandwidth verification: Calculate the new IP planned bearer bandwidth according to the planned bearer bandwidth (the sum of the incremental bandwidth and the coverage bandwidth) and the number of IPs in the current IP collocation scheme (including the sum of the number of covered IPs and the number of newly added IPs), and traverse each newly added IP in turn to perform bandwidth verification. The main steps are as follows:
[0028] Step S441: If the comprehensive redundant bandwidth of the newly added IP can carry the planned carrying bandwidth, the bandwidth verification is deemed to be successful, and the bandwidth of the edge node server needs to be pre-deducted, that is, this part of the occupied bandwidth needs to be deducted when calculating the redundant bandwidth of the edge node server to which the IP belongs;
[0029] Step S442: If the integrated redundant bandwidth of the newly added IP cannot carry the planned bandwidth, it is considered that the bandwidth verification has failed. At this time, if only one newly added IP fails to verify, the entire IP collocation plan verification is considered to have failed, and the next IP collocation plan is traversed. If all newly added IPs are verified successfully, the IP collocation plan is considered to be successful and no further traversal is performed.
[0030] Step S5: There are two reasons for the failure of step S4. If the newly added IP redundancy is insufficient, it is considered that there is no IP with sufficient redundant bandwidth in the resource pool, and the increment is directly judged as a failure; if the covered IP redundancy is insufficient, it is necessary to remove the covered IP and try to increment again. The main steps are as follows:
[0031] Step S51: sort the covered IPs in ascending order according to IP comprehensive redundancy;
[0032] Step S52: Try to eliminate one covering IP and then eliminate all covering IPs in sequence, repeat step S4 to select IP matching solutions, and end the traversal as long as there is an IP matching solution that succeeds in the exhaustive combination.
[0033] Step S6: For the IP matching solution that is successful in step S4 or step S5, this solution is considered to be the final solution and deployed, while retaining the bandwidth withholding or increase for all IPs in this solution. If there are IPs using this solution in other resolution groups-regional granularities in the future, this part of the pre-occupied or released bandwidth needs to be considered when calculating the redundant bandwidth of the edge node server until the incremental bandwidth of this IP matching solution takes effect.
[0034] The present invention also provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned cache node bandwidth scheduling method.
[0035] The present invention also provides a computer-readable storage medium storing a computer program, which implements the above-mentioned cache node bandwidth scheduling method when the computer program is executed by a processor.
[0036] The beneficial effects of the present invention are:
[0037] The present invention can automatically and timely generate a relatively optimal coverage resource plan according to the incremental bandwidth requirements required by the resolution group-region granularity. Compared with the method of manually adjusting the coverage of the resolution group-region one by one, it is more intelligent, not only saving labor resource costs, but also responding quickly to meet the incremental needs of customers. The resource pool IP is pre-processed before coverage calculation, including sorting the IP and pre-filtering the bandwidth, giving priority to IPs with large redundancy to save bandwidth costs; pre-checking the labels and limiting the number of IPs, reducing the number of IPs under the condition of satisfying the constraints, and saving subsequent exhaustive calculation performance consumption. In the coverage adjustment stage, an exhaustive algorithm is used to find the optimal IP matching plan from all possible combinations while satisfying all restrictions, to ensure the service quality during the customer's bandwidth increment. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the drawings required for use in the description of the present invention or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0039] Figure 1 A flow chart of a method for dynamically adjusting CDN resources; DETAILED DESCRIPTION
[0040] The technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments.
[0041] A method for dynamically adjusting CDN resources, the main system process is as follows Figure 1 As shown, it is characterized by comprising:
[0042] Step S1: Obtain the bearer bandwidth and planned incremental bandwidth of IPv4 and the bearer bandwidth and planned incremental bandwidth of IPv6 of the resolution group-area granularity for which the customer needs to perform coverage bandwidth increment;
[0043] In implementation, the resolution group is a collection of domain names that require CDN acceleration; the region is the geographical location of the user's IP plus the operator's granularity planning, the bearer bandwidth is the bandwidth that the resolution group-region has already served, and the planned incremental bandwidth is the bandwidth that the resolution group-region estimates needs to increase.
[0044] Step S2: Obtain the IP information and resource pool IP information of the resolution group-region;
[0045] In implementation, the IP information includes IP redundant bandwidth, service labels, hierarchical relationships between IP and incremental areas, etc., providing basic data for subsequent processing.
[0046] Step S3: Preprocess the resource pool IP to facilitate subsequent calculations. IPv4 and IPv6 IPs need to be preprocessed separately. Preprocessing includes IP sorting, label pre-checking, bandwidth pre-filtering, and resource pool IP number limitation. The main steps are:
[0047] Step S31: IP sorting: IPs are sorted using two dimensions: hierarchy and bandwidth redundancy. The hierarchy is from small to large: same city, same province, same region, same operator, same country, same continent, same world. The hierarchy calculation rule is to determine which minimum hierarchy the IP region and the region that needs to be incremented belong to. IPs are sorted from small to large according to hierarchy, and IPs of the same hierarchy are sorted from large to small according to comprehensive redundant bandwidth.
[0048] Step S32: Label pre-verification: select the IP corresponding to the service label according to the service label attribute of the resolution group, and the service label set of the selected IP needs to include the service label of the resolution group.
[0049] Step S33: Bandwidth pre-filtering: Filter IPs with insufficient comprehensive redundancy according to the resolution group-region bearer bandwidth and the planned incremental bandwidth. Since the comprehensive redundant bandwidth of an IP is the smaller of the redundant bandwidth of the IP and the redundant bandwidth of the edge node server to which the IP belongs, it is necessary to pre-deduct the bandwidth of the edge node server, that is, if multiple IPs belong to the same edge node server, the occupied bandwidth of the previous unfiltered IP needs to be deducted when calculating the redundant bandwidth of the edge node of the subsequent IP.
[0050] Step S34: Limit the number of IPs in the resource pool: Since the IPs pushed to the client are limited by the message length, the number of IPs is limited. Therefore, redundant IPs can be filtered out during the resource filtering stage to improve the computing efficiency of subsequent steps.
[0051] In the implementation, it is assumed that the IPv4 bearer bandwidth of the resolution group-region is 100M, the planned incremental bandwidth is 100M, the maximum number of IPv4 covered is limited to 5, the IPv6 bearer bandwidth is 50M, the planned incremental bandwidth is 50M, the maximum number of IPv6 covered is limited to 3, and the resolution group has labels x and y. In the resource pool, there are IPv4 types IP_v4_a1 (redundant bandwidth 50M), IP_v4_a2 (redundant bandwidth 60M), IP_v4_a3 (redundant bandwidth 40M) and IPv6 type IP_v6_a1 (redundant bandwidth 35M) belonging to edge node server A (redundant bandwidth 300M, same provincial resources), IPv4 types IP_v4_b1 (redundant bandwidth 50M), IP_v4_b2 (redundant bandwidth 50M) belonging to edge node server B (redundant bandwidth 50M, same regional resources), and IPv4 type IP_v4_c1 (redundant bandwidth 70M) belonging to Edge node server C (redundant bandwidth 100M, same province resources), IP_v4_d1 (redundant bandwidth 30M) with IPv4 type belongs to edge node server D (redundant bandwidth 50M, same province resources), IP_v6_e1 (redundant bandwidth 40M), IP_v6_e2 (redundant bandwidth 45M), IP_v6_e3 (redundant bandwidth 50M) with IPv6 type belong to edge node server E (redundant bandwidth 100M, same province resources), IP_v6_f1 (redundant bandwidth 70M) with IPv6 type belongs to edge node server F (redundant bandwidth 100M, same region resources). IP_v4_b1 has label x, IP_v4_b2 and IP_v4_c1 have label y, IP_v6_a1 has label x, IP_v6_e1, IP_v6_e2, IP_v6_e3 have label y.
[0052] In implementation, after sorting the IPs according to step S31, the order of IPv4 is:
[0053] IP_v4_c1, IP_v4_a2, IP_v4_a1, IP_v4_a3, IP_v4_d1, IP_v4_b1, IP_v4_b2; the order of IPv6 is: IP_v6_e3, IP_v6_e2, IP_v6_e1, IP_v6_a1, IP_v6_f1.
[0054] In implementation, after the IP label is verified according to step S32, the IPs pre-selected by IPv4 are: IP_v4_b1 and IP_v4_c1. Although IP_v4_b2 also carries label y, after IP_v4_b1 is selected, the redundant bandwidth of edge node server B needs to be pre-deducted, and the pre-deducted amount = resolution group-regional planned bearing bandwidth 200M / v4 maximum number limit 5=40M, so at this time, the IP comprehensive redundancy of IP_v4_b2 is only 10M, which does not meet the bandwidth requirement and cannot be selected. The IPs pre-selected by IPv6 are: IP_v6_a1 and IP_v6_e3. At this time, although the IP comprehensive redundancy of IP_v6_e2 is also sufficient, the label only needs to include the label on the resolution group, so there is no need to select multiple IPs with the same label in the label verification link.
[0055] In implementation, the remaining IP bandwidth is pre-filtered according to step S33, and the edge node server bandwidth pre-withholding is considered. The IPs after IPv4 pre-filtering are: IP_v4_b1, IP_v4_c1, IP_v4_a2, IP_v4_a3, IP_v4_a1, IP_v4_b2. The IPs after IPv6 pre-filtering are: IP_v6_a1, IP_v6_e3, IP_v6_e2, IP_v6_f1.
[0056] In implementation, according to step S4, the IPs that exceed the number limit after pre-filtering are eliminated, and the final result of resource pool preprocessing is IPv4: IP_v4_b1, IP_v4_c1, IP_v4_a2, IP_v4_a3, IP_v4_a1; IPv6: IP_v6_a1, IP_v6_e3, IP_v6_e2.
[0057] Step S4: According to the coverage bandwidth and planned incremental bandwidth of IPv4 and IPv6 at the granularity of the parsing group-area, all possible scheme combinations are enumerated in order from the minimum number of IPs added to the maximum number of IPs added. If the selected scheme meets all restrictions, the coverage resource adjustment is considered successful. The main steps are:
[0058] Step S41: from the minimum number of added IPs to the maximum number of added IPs, exhaustively combine the pre-processed resource pool IPs according to the number of IPs to generate all possible IP collocation schemes, and traverse all IP collocation schemes in turn, and it is necessary to consider the number of added IPs for both IPv4 and IPv6 IPs;
[0059] In the implementation, it is assumed that the IPv4 IPs covered by the resolution group-region are IP41, IP42, IP43, the resource pool IPv4 are IP4a, IP4b, IP4c, the IPv6 IPs are IP61, IP62, the resource pool IPv6 are IP6a, IP6b, the maximum number of covered IPv4 is limited to 5, and the maximum number of covered IPv6 is limited to 3. Then all the IP collocation schemes after exhaustive enumeration are shown in Table 1, a total of 18 IP collocation schemes.
[0060] Table 1 Exhaustive list of all IP configuration solutions
[0061]
[0062]
[0063] Step S42: Label verification: Calculate the label set of the covered IP and the newly added IP. If it contains all the labels of the parsed group, the verification is successful and proceed to the next step. Otherwise, it is considered a failure and the next IP matching solution is traversed.
[0064] Step S43: Covered IP bandwidth verification: According to the coverage bandwidth of the analysis group-region granularity and the number of covered IPs, the covered IP has carried bandwidth, and the planned carrying bandwidth of the covered IP is calculated according to the planned carrying bandwidth (the sum of the incremental bandwidth and the coverage bandwidth) and the number of IPs in the current IP matching scheme (including the covered IP and the newly added IP), and each covered IP is traversed in turn to perform bandwidth verification. The main steps are as follows:
[0065] Step S431: If the planned carrying bandwidth of the coverage IP is greater than the already carried bandwidth of the coverage IP, it is necessary to determine whether the comprehensive redundant bandwidth of the coverage IP can carry the newly added bandwidth (the planned carrying bandwidth of the coverage IP minus the already carried bandwidth of the coverage IP). If it can be carried, it is deemed that the coverage IP bandwidth verification is successful, but the edge node server bandwidth needs to be pre-deducted, that is, this part of the occupied bandwidth needs to be deducted when calculating the redundant bandwidth of the edge node server to which the IP belongs; if it cannot be carried, it is deemed that the bandwidth verification has failed. At this time, as long as one coverage IP verification fails, it is considered that the entire IP matching plan verification has failed, and the next IP matching plan is traversed.
[0066] Step S432: If the planned bearer bandwidth of the coverage IP is equal to the carried bandwidth of the coverage IP, the coverage IP bandwidth verification is deemed successful. Since the bearer bandwidth before and after the increment has not changed, there is no need to pre-deduct the edge node server bandwidth.
[0067] Step S433: If the planned carrying bandwidth of the coverage IP is less than the carrying bandwidth of the coverage IP, the coverage IP bandwidth verification is deemed to be successful. It also means that after the implementation of the new plan, the coverage IP can release part of the bandwidth, and the edge node server bandwidth needs to be pre-increased, that is, this part of the released bandwidth needs to be added when calculating the redundant bandwidth of the edge node server to which the IP belongs.
[0068] Step S44: New IP bandwidth verification: Calculate the new IP planned bearer bandwidth according to the planned bearer bandwidth (the sum of the incremental bandwidth and the coverage bandwidth) and the number of IPs in the current IP collocation scheme (including the sum of the number of covered IPs and the number of newly added IPs), and traverse each newly added IP in turn to perform bandwidth verification. The main steps are as follows:
[0069] Step S441: If the comprehensive redundant bandwidth of the newly added IP can carry the planned carrying bandwidth, the bandwidth verification is deemed to be successful, and the bandwidth of the edge node server needs to be pre-deducted, that is, this part of the occupied bandwidth needs to be deducted when calculating the redundant bandwidth of the edge node server to which the IP belongs;
[0070] Step S442: If the integrated redundant bandwidth of the newly added IP cannot carry the planned bandwidth, it is considered that the bandwidth verification has failed. At this time, if only one newly added IP fails to verify, the entire IP collocation plan verification is considered to have failed, and the next IP collocation plan is traversed. If all newly added IPs are verified successfully, the IP collocation plan is considered to be successful and no further traversal is performed.
[0071] Step S5: There are two reasons for the failure of step S4. If the newly added IP redundancy is insufficient, it is considered that there is no IP with sufficient redundant bandwidth in the resource pool, and the increment is directly judged as a failure; if the covered IP redundancy is insufficient, it is necessary to remove the covered IP and try to increment again. The main steps are as follows:
[0072] Step S51: sort the covered IPs in ascending order according to IP comprehensive redundancy;
[0073] Step S52: Try to eliminate one covering IP and then eliminate all covering IPs in sequence, repeat step S4 to select IP matching solutions, and end the traversal as long as there is an IP matching solution that succeeds in the exhaustive combination.
[0074] In implementation, it is assumed that the IPv4 IPs covered by the resolution group-region include IP41, IP42, and IP43, the resource pool IPv4 includes IP4a, IP4b, and IP4c, the IPv6 IPs include IP61 and IP62, the resource pool IPv6 includes IP6a and IP6b, the maximum number of IPv4 covered is limited to 5, and the maximum number of IPv6 covered is limited to 3. As shown in Table 2, if the redundancy of covering IPv4 is insufficient and the redundancy of covering IPv6 is sufficient, then the covered IPv4 is gradually eliminated, and all IP collocation solutions are exhausted each time until a successful IP collocation solution is selected; for the case where the redundancy of covering IPv4 is sufficient and the redundancy of covering IPv6 is insufficient, the covered IPv6 is gradually eliminated, and all IP collocation solutions are exhausted each time until a successful IP collocation solution is selected; for the case where the redundancy of covering both IPv4 and IPv6 is insufficient, both need to be eliminated together, and all IP collocation solutions are exhausted until a successful IP collocation solution is selected.
[0075] Table 2 All IP matching solutions excluding IP exhaustive
[0076]
[0077] Step S6: For the IP matching solution that is successful in step S4 or step S5, this solution is considered to be the final solution and deployed, while retaining the bandwidth withholding or increase for all IPs in this solution. If there are IPs using this solution in other resolution groups-regional granularities in the future, this part of the pre-occupied or released bandwidth needs to be considered when calculating the redundant bandwidth of the edge node server until the incremental bandwidth of this IP matching solution takes effect.
[0078] The present invention also provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned dynamic adjustment method.
[0079] The present invention also provides a computer-readable storage medium storing a computer program, and the computer program implements the above-mentioned dynamic adjustment method when executed by a processor.
[0080] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for dynamically adjusting CDN resources, characterized in that: The following steps are involved: Step S1: Obtain the bearer bandwidth and planned incremental bandwidth of IPv4 and the bearer bandwidth and planned incremental bandwidth of IPv6 of the resolution group-area granularity for which the customer needs to perform coverage bandwidth increment; Step S2: Obtain the IP information and resource pool IP information covered by the resolution group-area; Step S3: pre-processing the IPv4 and IPv6 IPs in the resource pool respectively; The steps of preprocessing the IPv4 and IPv6 IPs in the resource pool are as follows: Step S31: IP sorting: IPs are sorted using two dimensions: hierarchy and bandwidth redundancy. The hierarchy is in the following order: same city, same province, same region, same operator, same country, same continent, same world. The hierarchy calculation rule is to determine which minimum hierarchy the IP region and the region that needs to be incremented belong to. IPs are sorted from small to large according to hierarchy. For IPs of the same hierarchy, they are sorted from large to small according to comprehensive redundant bandwidth. Step S32: label pre-verification: select an IP corresponding to a service label according to the service label attribute of the resolution group, and the service label set of the selected IP includes the service label of the resolution group; Step S33: Bandwidth pre-filtering: Filter IPs with insufficient comprehensive redundancy according to the resolution group-region bearer bandwidth and the planned incremental bandwidth; the IP comprehensive redundant bandwidth is the smaller of the IP redundant bandwidth and the redundant bandwidth of the edge node server to which the IP belongs, and the edge node server bandwidth needs to be pre-deducted. If multiple IPs belong to the same edge node server, the occupied bandwidth of the previous unfiltered IP needs to be deducted when calculating the edge node redundant bandwidth of the subsequent IP; Step S34: Limit the number of IPs in the resource pool: Limit the number of IPs pushed to customers by limiting the length of the message, thereby filtering out redundant IPs and improving the calculation efficiency of subsequent steps; Step S4: According to the coverage bandwidth and planned incremental bandwidth of IPv4 and IPv6 at the granularity of the parsing group-region, all possible scheme combinations are enumerated in order from the minimum number of IPs added to the maximum number of IPs added, until the selected scheme meets all restrictions and the coverage resource adjustment is successful; The steps to exhaustively enumerate all possible solution combinations are: Step S41: from the minimum number of added IPs to the maximum number of added IPs, exhaustively combine the pre-processed resource pool IPs according to the number of IPs to generate all possible IP collocation schemes, and traverse all IP collocation schemes in turn, and it is necessary to consider the number of added IPs for both IPv4 and IPv6 IPs; Step S42: Label verification: Calculate the label set of the covered IP and the newly added IP. If it contains all the labels of the parsed group, the verification is successful and proceed to the next step. Otherwise, it is considered a failure and the next IP matching solution is traversed. Step S43: Covered IP bandwidth verification: Calculate the covered IP's carried bandwidth based on the coverage bandwidth of the parsing group-region granularity and the number of covered IPs. At the same time, calculate the planned carrying bandwidth of the covered IP based on the planned carrying bandwidth and the number of IPs in the current IP matching solution, and traverse each covered IP in turn to perform bandwidth verification; Step S44: Check the bandwidth of the newly added IP: Calculate the planned bearer bandwidth of the newly added IP according to the planned bearer bandwidth and the number of IPs in the current IP matching scheme, and perform bandwidth check on each newly added IP in turn; Step S5: If step S4 fails and the newly added IP is insufficient in redundancy, it is considered that there is no IP with sufficient redundant bandwidth in the resource pool, and the increment is directly determined to have failed; If the covered IP redundancy is insufficient, you need to remove the covered IP and try to increase it again; Step S6: For the IP matching solution that is successful in step S4 or step S5, this solution is considered to be the final solution and deployed, while retaining the bandwidth withholding or increase for all IPs in this solution. If there are IPs using this solution in other resolution groups-regional granularities in the future, this part of the pre-occupied or released bandwidth needs to be considered when calculating the redundant bandwidth of the edge node server until the incremental bandwidth of this IP matching solution takes effect.
2. A method for dynamically adjusting CDN resources according to claim 1, characterized in that: The steps to override IP bandwidth verification are as follows: Step S431: If the planned carrying bandwidth of the coverage IP is greater than the already carried bandwidth of the coverage IP, it is necessary to determine whether the comprehensive redundant bandwidth of the coverage IP can carry the newly added bandwidth. If it can, it is considered that the coverage IP bandwidth verification is successful, but the edge node server bandwidth needs to be pre-deducted. This part of the occupied bandwidth needs to be deducted when calculating the redundant bandwidth of the edge node server to which the IP belongs; if it cannot be carried, it is considered that the bandwidth verification has failed. At this time, as long as one coverage IP verification fails, it is considered that the entire IP collocation plan verification has failed, and the next IP collocation plan will be traversed; Step S432: If the planned bearer bandwidth of the coverage IP is equal to the carried bandwidth of the coverage IP, the coverage IP bandwidth verification is deemed to be successful. Since the bearer bandwidth before and after the increment does not change, it is not necessary to pre-deduct the edge node server bandwidth. Step S433: If the planned carrying bandwidth of the coverage IP is less than the carrying bandwidth of the coverage IP, the coverage IP bandwidth verification is deemed successful. It also means that the coverage IP can release part of the bandwidth after the implementation of the new plan. The edge node server bandwidth needs to be pre-increased. This part of the released bandwidth needs to be added when calculating the redundant bandwidth of the edge node server to which the IP belongs.
3. A method for dynamically adjusting CDN resources according to claim 2, characterized in that: The steps to add IP bandwidth verification are as follows: Step S441: If the comprehensive redundant bandwidth of the newly added IP can carry the planned carrying bandwidth, the bandwidth verification is deemed to be successful, and the bandwidth of the edge node server needs to be pre-deducted. This part of the occupied bandwidth needs to be deducted when calculating the redundant bandwidth of the edge node server to which the IP belongs; Step S442: If the comprehensive redundant bandwidth of the newly added IP cannot carry the planned carrying bandwidth, it is considered that the bandwidth verification has failed. At this time, as long as one newly added IP verification fails, the entire IP matching plan verification is considered to have failed, and the next IP matching plan is traversed. If all newly added IPs are verified successfully, this IP matching plan is considered to be successful and will not be traversed again.
4. According to a method for dynamically adjusting CDN resources as described in claim 1, it is characterized in that: The steps to remove the covered IP and try to increase the value are as follows: Step S51: sort the covered IPs in ascending order according to IP comprehensive redundancy; Step S52: Try from eliminating one covering IP to eliminating all covering IPs in sequence, repeat the step of selecting IP matching solutions in step S4, and end the traversal as long as there is an IP matching solution that succeeds in the exhaustive combination.
5. According to a method for dynamically adjusting CDN resources as described in claim 3, it is characterized in that: The planned bearer bandwidth is the sum of the incremental bandwidth and the coverage bandwidth, and the number of IPs in the current IP matching solution is the sum of the number of covered IPs and the number of newly added IPs.
6. A method for dynamically adjusting CDN resources according to claim 2, characterized in that: The newly added bandwidth is the planned bearing bandwidth of the coverage IP minus the bearing bandwidth of the coverage IP.
7. An electronic device comprising: at least one processor; And, a memory communicatively connected to at least one processor; wherein the memory stores instructions executable by at least one processor, and the instructions are executed by at least one processor so that the at least one processor can execute the dynamic adjustment method as described in any one of claims 1-6.
8. A computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the dynamic adjustment method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
CDN coverage scheme generating method and apparatus
CN107707378A
Cold access back-to-source scheduling system and processing method thereof
CN112287259A
CDN bandwidth prediction method, device and system and electronic equipment
CN114465915A
Computerized system and method for automatically determining malicious IP clusters using network activity data
US20180097828A1
