Computer room-level cluster adjustment method and device for content distribution network, and computing equipment
By sorting and combining or splitting the service nodes of the old computer room cluster by type in the content distribution network, a reasonable new computer room cluster is formed, which solves the problem of resource waste in the computer room cluster and improves resource utilization.
Patent Information
- Application Number
- CN202510503244.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-21
- Publication Date
- 2025-07-04
AI Technical Summary
In the prior art, there are complex types of super-large computer room clusters and service nodes in the computer room clusters of content distribution networks, resulting in the problem of waste of resources.
Add service nodes of the same node type in the old computer room cluster to the same node collection, and calculate parameters based on the number of nodes and thresholds to determine whether there is a sparse node collection. If there is, merge the service nodes to form a mixed new computer room cluster. If there is no, split it into a single new computer room cluster to ensure that the number of nodes in each new computer room cluster is within the threshold range.
By accurately scheduling the computer room cluster, the resource utilization rate is improved, resource waste is reduced, too many or too few nodes in the new computer room cluster are avoided, and the overall resource utilization efficiency is improved.
Smart Images

Figure CN120263787A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet technologies, and in particular, to a method, apparatus, computing device, computer storage medium, and computer program product for adjusting a computer room-level cluster of a content delivery network. Background Art
[0002] A content delivery network (CDN), which is a distributed server network system, has extensive applications in streaming media platforms, information platforms, game platforms, etc. A computer room cluster is the lowest-level cluster in a content delivery network, and each computer room cluster contains several service nodes.
[0003] However, the inventor found in the implementation process that the prior art has the following defects: In the prior art, all service nodes existing in a physical computer room are divided into a computer room cluster. However, this method is prone to generate an extremely large computer room cluster, and the service node types in the computer room cluster are complex, thus easily causing waste of service resources in the content delivery network. Summary of the Invention
[0004] In view of the above problems, the present application is proposed to provide a method, apparatus, computing device, computer storage medium, and computer program product for adjusting a computer room-level cluster of a content delivery network that overcomes the above problems or at least partially solves the above problems.
[0005] According to a first aspect of the present application, there is provided a method for adjusting a computer room cluster of a content delivery network, including:
[0006] Adding service nodes of the same node type in an old computer room cluster to the same node set, and calculating a first parameter and a second parameter of any node set; wherein, the first parameter is the quotient of the number of nodes in the node set and a first threshold, and the second parameter is the remainder of the number of nodes in the node set divided by the first threshold;
[0007] Determining whether there is a node-scarce set in the node set; wherein, the number of nodes in the node-scarce set is less than a second threshold;
[0008] If so, for other node sets other than the node-scarce set, extracting second-parameter service nodes from the other node sets, merging the extracted second-parameter service nodes with the service nodes in the node-scarce set into a mixed new computer room cluster, and equally splitting the remaining service nodes in the other node sets into first-parameter single new computer room clusters;
[0009] Otherwise, for any node set, split the service nodes in the node set into a third parameter number of single new computer room clusters; where the third parameter of the node set is greater than or equal to the first parameter of the node set; where the number of nodes in each new computer room cluster is greater than or equal to the second threshold and less than or equal to the first threshold.
[0010] Optionally, the third parameter is determined in the following manner:
[0011] For any node set, obtain the first parameter and the second parameter of the node set;
[0012] Determine whether the second parameter is equal to 0;
[0013] If so, the third parameter of the node set = the first parameter;
[0014] If not, the third parameter of the node set = the first parameter + 1.
[0015] Optionally, the splitting of the service nodes in the node set into a third parameter number of single new computer room clusters includes:
[0016] If the second parameter of the node set is equal to 0, evenly split the service nodes in the node set into the first parameter number of single new computer room clusters;
[0017] If the second parameter of the node set is greater than 0 and less than the second threshold, extract the second threshold number of service nodes from the node set and add them to a single new computer room cluster, extract the fourth parameter * first threshold number of service nodes from the node set and evenly split them into the fourth parameter number of single new computer room clusters, and add the remaining service nodes in the node set to another single new computer room cluster; where the fourth parameter of the node set = the first parameter of the node set - 1;
[0018] If the second parameter of the node set is greater than or equal to the second threshold, extract the first parameter * first threshold number of service nodes from the node set and evenly split them into the first parameter number of single new computer room clusters, and add the remaining service nodes in the node set to another single new computer room cluster.
[0019] Optionally, the merging of the extracted second parameter number of service nodes with the service nodes in the node sparse set into a hybrid new computer room cluster includes:
[0020] Calculate the sum of the number of nodes in the node sparse set and the second parameter;
[0021] If the sum is greater than the first threshold, merge the extracted second parameter number of service nodes with the service nodes in the node sparse set into multiple hybrid new computer room clusters;
[0022] If the sum is less than or equal to the first threshold, the second-parameter service nodes extracted are merged with the service nodes in the node-scarce set into a new hybrid computer room cluster.
[0023] Optionally, the method further includes: if there is a node-scarce set in the node set, generating a first type of alarm information;
[0024] And / or, the determining the node types of the service nodes in the old computer room cluster and adding the service nodes of the same node type to the same node set includes: determining the node types of the service nodes in the old computer room cluster, if there is a preset node type in the old computer room cluster, generating a second type of alarm information, and after removing the service nodes of the preset node type from the old computer room cluster, adding the service nodes of the same node type to the same node set.
[0025] Optionally, the method further includes: calculating the service quality index and the cost-benefit index under the historical values of the first threshold and the second threshold in the historical period;
[0026] Determining an adjustment parameter according to the service quality index and the cost-benefit index;
[0027] Adjusting the historical values of the first threshold and the second threshold by using the adjustment parameter to obtain the current first threshold and the second threshold.
[0028] Optionally, the determining an adjustment parameter according to the service quality index and the cost-benefit index includes:
[0029] Calculating the quality optimization value of the first historical period according to the service quality index of the first historical period and the service quality index of the second historical period; wherein, the first historical period is the most recent historical period currently, and the second historical period is the historical period before the first historical period;
[0030] Calculating the cost optimization value of the first historical period according to the cost-benefit index of the first historical period and the cost-benefit index of the second historical period;
[0031] If the quality optimization value and the cost optimization value of the first historical period meet the preset conditions, taking the historical value of the first threshold of the first historical period as the current first threshold and taking the historical value of the second threshold of the first historical period as the current second threshold;
[0032] If the quality optimization value and the cost optimization value of the first historical period do not meet the preset conditions, generating an adjustment parameter, and adjusting the quality optimization value and the cost optimization value of the first historical period by using the adjustment parameter to generate the current first threshold and the second threshold.
[0033] According to the second aspect of the present application, a device for adjusting a computer room cluster of a content distribution network is provided, including:
[0034] A determination module, configured to determine the node types of each service node in the old computer room cluster, and add the service nodes of the same node type to the same node set;
[0035] A calculation module, configured to calculate a first parameter and a second parameter of any node set; wherein, the first parameter is the quotient of the number of nodes in the node set and a first threshold, and the second parameter is the remainder of the number of nodes in the node set divided by the first threshold;
[0036] A splitting module, configured to determine whether there is a node-scarce set in the node set; wherein, the number of nodes in the node-scarce set is less than a second threshold;
[0037] If so, for other node sets other than the node-scarce set, extract the second parameter of service nodes from the other node sets, merge the extracted second parameter of service nodes with the service nodes in the node-scarce set into a hybrid new computer room cluster, and evenly split the remaining service nodes in the other node sets into the first parameter of single new computer room clusters;
[0038] If not, for any node set, split the service nodes in the node set into the third parameter of single new computer room clusters; wherein, the third parameter of the node set is greater than or equal to the first parameter of the node set;
[0039] Wherein, the number of nodes in each new computer room cluster is greater than or equal to the second threshold and less than or equal to the first threshold.
[0040] Optionally, the splitting module is configured to: for any node set, obtain the first parameter and the second parameter of the node set; determine whether the second parameter is equal to 0; if so, the third parameter of the node set = the first parameter; if not, the third parameter of the node set = the first parameter + 1.
[0041] Optionally, the splitting module is configured to: if the second parameter of the node set is equal to 0, evenly split the service nodes in the node set into the first parameter of single new computer room clusters;
[0042] If the second parameter of the node set is greater than 0 and less than the second threshold, extract the second threshold of service nodes from the node set and add them to a single new computer room cluster, extract the fourth parameter * first threshold of service nodes from the node set and evenly split them into the fourth parameter of single new computer room clusters, and add the remaining service nodes in the node set to another single new computer room cluster; wherein, the fourth parameter of the node set = the first parameter of the node set - 1;
[0043] If the second parameter of the node set is greater than or equal to the second threshold, extract the first parameter * the first threshold number of service nodes from the node set and evenly split them into the first parameter of single new computer room clusters, and add the remaining service nodes of the node set to another single new computer room cluster.
[0044] Optionally, the splitting module is used to: calculate the sum of the number of nodes in the node sparse set and the second parameter; if the sum is greater than the first threshold, merge the extracted second parameter of service nodes with the service nodes in the node sparse set into multiple hybrid new computer room clusters; if the sum is less than or equal to the first threshold, merge the extracted second parameter of service nodes with the service nodes in the node sparse set into one hybrid new computer room cluster.
[0045] Optionally, the splitting module is used to: if there is a node sparse set in the node set, generate a first type of alarm information;
[0046] And / or, determine the node types of each service node in the old computer room cluster. If there is a preset node type in the old computer room cluster, generate a second type of alarm information, and after removing the service nodes of the preset node type from the old computer room cluster, add the service nodes of the same node type to the same node set.
[0047] Optionally, the device further includes: a threshold determination module, configured to calculate the service quality index and the cost-benefit index under the first threshold historical value and the second threshold historical value in the historical period;
[0048] Determine an adjustment parameter according to the service quality index and the cost-benefit index;
[0049] Use the adjustment parameter to adjust the first threshold historical value and the second threshold historical value to obtain the current first threshold and second threshold.
[0050] Optionally, the threshold determination module is used to: calculate the quality optimization value of the first historical period according to the service quality index of the first historical period and the service quality index of the second historical period; wherein, the first historical period is the current nearest historical period, and the second historical period is the previous historical period of the first historical period;
[0051] Calculate the cost optimization value of the first historical period according to the cost-benefit index of the first historical period and the cost-benefit index of the second historical period;
[0052] If the quality optimization value and the cost optimization value of the first historical period meet the preset conditions, use the first threshold historical value of the first historical period as the current first threshold, and use the second threshold historical value of the first historical period as the current second threshold;
[0053] If the quality optimization value and the cost optimization value in the first historical period do not meet the preset conditions, an adjustment parameter is generated, and the current first threshold and second threshold are generated after adjusting the quality optimization value and the cost optimization value in the first historical period by using the adjustment parameter.
[0054] According to a third aspect of the present application, there is provided a computing device, including: a processor, a memory, a communication interface, and a communication bus. The processor, the memory, and the communication interface complete communication with each other through the communication bus; the memory is used to store at least one executable instruction, and the executable instruction causes the processor to execute the operations corresponding to the above-mentioned content distribution network's computer room cluster adjustment method.
[0055] According to a fourth aspect of the present application, there is provided a computer storage medium, in which at least one executable instruction is stored, and the executable instruction causes a processor to execute the operations corresponding to the above-mentioned content distribution network's computer room cluster adjustment method.
[0056] According to a fifth aspect of the present application, there is provided a computer program product, including at least one executable instruction, and the executable instruction causes a processor to execute the operations corresponding to the above-mentioned content distribution network's computer room cluster adjustment method.
[0057] In the embodiment of the present application, the service nodes in the old computer room cluster are split into different types of node sets according to the node types. When there is no node-scarce set, the service nodes in each node set are split into the corresponding number of single new computer room clusters. Thus, the node types of the service nodes in the single new computer room cluster are the same, which is convenient for accurately scheduling the computer room cluster, improving the overall resource utilization rate, and reducing the resource waste of the content distribution network; moreover, only when there is a node-scarce set, the service nodes in it are merged with the service nodes in other sets to obtain a mixed new computer room cluster, reducing the number of mixed new computer room clusters; and the number of service nodes in each obtained new computer room cluster is between the first threshold and the second threshold, avoiding too much or too little resources in the cluster, further improving the overall resource utilization rate, and avoiding resource waste.
[0058] In the embodiment of the present application, when there is no node-scarce set, a matching splitting method is adopted according to the second parameter situation of the node set to obtain a single new computer room cluster, ensuring that the generated single new computer room cluster is greater than or equal to the second threshold and less than or equal to the first threshold.
[0059] In the embodiment of the present application, when there is a node-scarce set, one or more mixed new computer room clusters are generated according to the size of the sum of the node-scarce set and the extracted service nodes, so as to further reduce the number of mixed new computer room clusters while ensuring that the number of nodes in the new computer room cluster meets the requirements, improving the scheduling accuracy of the new computer room cluster, and improving the overall resource utilization rate.
[0060] Embodiments of the present application dynamically adjust the first threshold and the second threshold according to historical data, improve the rationality of the first threshold and the second threshold, and further improve the resource utilization rate of the content delivery network.
[0061] Embodiments of the present application determine whether the first threshold and the second threshold of the most recent historical period need to be adjusted according to whether the quality optimization value and the cost optimization value of the most recent historical period meet preset conditions, determine the adjustment parameters when it is determined that adjustment is needed, and obtain the current first threshold and second threshold based on the values of the first threshold and the second threshold of the most recent historical period, improve the rationality of the first threshold and the second threshold, and further improve the resource utilization rate.
[0062] The above description is only an overview of the technical solution of the present application. In order to be able to understand the technical means of the present application more clearly, it can be implemented according to the content of the specification. And in order to make the above and other purposes, features and advantages of the present application more obvious and understandable, the specific embodiments of the present application are specifically given below. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] By reading the detailed description of the preferred embodiments below, various other advantages and benefits will become clear to those of ordinary skill in the art. The drawings are only for the purpose of showing the preferred embodiments and are not considered to be a limitation of the present application. Moreover, throughout the drawings, the same reference numerals are used to represent the same components. In the drawings:
[0064] Figure 1 Shows a schematic diagram of an operating environment provided for implementing at least one embodiment of the present application;
[0065] Figure 2 Shows a flowchart of a method for adjusting a computer room cluster of a content delivery network provided in Embodiment 1 of the present application;
[0066] Figure 3 Shows a flowchart of a method for adjusting a computer room cluster of a content delivery network provided in Embodiment 2 of the present application;
[0067] Figure 4 Shows a schematic diagram of a determination process of a first threshold and a second threshold provided in Embodiment 2 of the present application;
[0068] Figure 5 Shows a flowchart of a method for adjusting a computer room cluster of a content delivery network provided in Embodiment 3 of the present application;
[0069] Figure 6 Shows a schematic diagram of the structure of a device for adjusting a computer room cluster of a content delivery network provided in Embodiment 4 of the present application;
[0070] Figure 7Shows a schematic structural diagram of a computing device provided in Embodiment 5 of the present application. Detailed implementation
[0071] Hereinafter, exemplary embodiments of the present application will be described in more detail with reference to the accompanying drawings. Although the exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided so that the present application can be more thoroughly understood and the scope of the present application can be fully conveyed to those skilled in the art.
[0072] Figure 1 Shows an operating architecture diagram provided to implement at least one embodiment of the present application. This operating architecture diagram is applied to the client and the content delivery network.
[0073] The client can be an electronic device running operating systems such as Windows, Android TM ), or IOS, such as a smart phone, a tablet device, a laptop computer, a virtual reality device, a game device, a set-top box, a vehicle-mounted terminal, a smart TV. Based on the above operating systems, various application programs can be run, such as browsers, live broadcast software, etc.
[0074] The content delivery network includes at least one computer room cluster, and each computer room cluster contains several service nodes. Each service node can be composed of a single or multiple computing devices. The computing device can include virtualized computing instances. The virtualized computing instances can include virtual machines, such as emulations of computer systems, operating systems, servers, etc. The computing device can load virtual machines based on virtual images and / or other data that define specific software (e.g., operating systems, dedicated application programs, servers) for emulation. As the demand for different types of processing services changes, different virtual machines can be loaded and / or terminated on one or more computing devices. A hypervisor can be implemented to manage the use of different virtual machines on the same computing device.
[0075] The service nodes in the content delivery network can be configured to communicate with the client or other nodes through the network. The network includes various network devices, such as routers, switches, multiplexers, hubs, modems, bridges, repeaters, firewalls, proxy devices, and / or the like. The network can include physical links, such as coaxial cable links, twisted pair cable links, fiber optic links, and combinations thereof, or wireless links, such as cellular links, satellite links, Wi-Fi links, etc.
[0076] Embodiment 1
[0077] Figure 2 Shows a flowchart of a method for adjusting a computer room cluster of a content delivery network provided in Embodiment 1 of the present application. Specifically, asFigure 2 As shown in Figure 2 , the method includes the following steps:
[0078] Step S201: Add service nodes of the same node type in the old computer room cluster to the same node set.
[0079] The old computer room cluster is the cluster to be adjusted in the embodiments of the present application. The old computer room cluster usually adopts the construction method of the computer room cluster in the prior art. The embodiments of the present application obtain a new computer room cluster by adjusting the old computer room cluster.
[0080] Specifically, for any old computer room cluster, determine the node type of each service node in the old computer room cluster. Among them, the node type can specifically be the service type provided by the service node. Taking a streaming media platform as an example, the node types include: on-demand type, live broadcast type, and on-demand + live broadcast type, etc. The node type can be obtained according to the node attribute data of the service node. In addition, in some scenarios, the corresponding node type can be assigned to the service node according to specific requirements of the service node. For example, for the service node covering the province, the on-demand type of node type can be assigned to it.
[0081] Optionally, pre-obtain historical data, determine the node type with the lowest resource utilization rate from the historical data, and use the node type with the lowest resource utilization rate as the preset node type. For example, in a streaming media platform, the utilization rate of the service nodes of the live broadcast type is low, so the live broadcast type can be used as the preset node type. Then, in this step during the real-time process, determine the node type of each service node in the old computer room cluster. If there is a preset node type in the old computer room cluster, generate a second type of alarm information, and after removing the service nodes of the preset node type from the old computer room cluster, then execute the subsequent step of adding service nodes of the same node type to the same node set. The second type of alarm information includes the node information of the service node and a prompt message indicating that the service node is of the preset node type, so as to optimize the service node by the relevant processing end to improve the resource utilization rate of the content distribution network.
[0082] Further, add service nodes of the same node type to the same node set. Among them, generate corresponding node sets, and the node sets correspond one-to-one with the node types, that is, one node set corresponds to one node type. For any node set, add the service nodes of the node type matching the node set to the node set. Thus, the service nodes included in the same node set have the same node type, and the node types of different node sets are different.
[0083] Step S202: Calculate a first parameter and a second parameter of any node set.
[0084] For any node set, a first parameter of the node set is obtained according to the quotient of the number of nodes in the node set and a first threshold, and a second parameter is obtained according to the remainder of the number of nodes in the node set and the first threshold. Thus, the first parameter is the quotient of the number of nodes in the node set and the first threshold, and the second parameter is the remainder of the number of nodes in the node set and the first threshold.
[0085] Wherein, the first threshold is the upper limit of the number of nodes in the new computer room cluster pre-generated in the embodiments of the present application.
[0086] Step S203, determine whether there is a node-scarce set in the node set; if so, execute step S204; if not, execute step S205.
[0087] Pre-generate the lower limit of the number of nodes in the new computer room cluster, and the lower limit of the number of nodes in the new computer room cluster is the second threshold.
[0088] Further identify the node-scarce set according to the size relationship between the number of nodes in the node set and the second threshold. Specifically, if the number of nodes in the node set is less than the second threshold, it is determined that the node set is a node-scarce set, so the number of nodes in the node-scarce set is less than the second threshold.
[0089] Step S204, for the other node sets other than the node-scarce set, extract the second parameter of service nodes from the other node sets, merge the extracted second parameter of service nodes with the service nodes in the node-scarce set into a hybrid new computer room cluster, and evenly split the remaining service nodes in the other node sets into the first parameter of single new computer room clusters.
[0090] If there is at least one node-scarce set in the generated node sets, since the number of nodes in the node-scarce set is less than the lower limit of the number of nodes (the second threshold) that make up a new computer room cluster, extract the second parameter of service nodes from the other node sets other than the node-scarce set. The other node sets can be node-scarce sets or not. The second parameter here is specifically the second parameter of the other node sets. If there are multiple other node sets, for each other node set, extract its second parameter of service nodes. After merging the extracted second parameter of service nodes with the service nodes in the node-scarce set, a new computer room cluster is obtained. Since the service nodes in this new computer room cluster come from multiple node sets, this new computer room cluster corresponds to multiple node types, so this new computer room cluster is a hybrid new computer room cluster.
[0091] Further, since the second-parameter number of service nodes are extracted from other node sets, and the second parameter is the remainder of the number of nodes in the node set divided by the first threshold, the number of remaining service nodes in other node sets = the first threshold * the first parameter. Then, for any other node set, the remaining service nodes in this other node set are evenly split into the first-parameter number of new computer room clusters. Thus, the service types of the service nodes included in each new computer room cluster are the same, and this new computer room cluster is a single new computer room cluster. Also, since the number of remaining service nodes in other node sets = the first threshold * the first parameter, the number of nodes in the single new computer room cluster generated in this step = the first threshold.
[0092] In this step, only when there is a node-scarce set, a mixed new computer room cluster is generated by combining the service nodes of the node-scarce set and other node sets, so that it can not only ensure that the number of nodes in each new computer room cluster is greater than or equal to the second threshold, but also reduce the number of mixed new computer room clusters, thereby facilitating service scheduling and improving resource utilization.
[0093] Optionally, if there is a node-scarce set in the node set, a first type of alarm information is generated to prompt the relevant processing end that the current node configuration is unreasonable, so as to facilitate determining the optimization points of the cluster and improving the overall service quality.
[0094] Step S205, for any node set, split the service nodes in this node set into the third-parameter number of single new computer room clusters.
[0095] If there is no node-scarce set in the generated node set, then for each node set, a new computer room cluster corresponding to this set is generated, and this new computer room cluster only includes the service nodes in this node set. Thus, the service nodes in each new computer room cluster correspond to the same node type, and the new computer room cluster generated in this step is a single new computer room cluster. The single new computer room clusters obtained by splitting each node set can be one or more.
[0096] Specifically, for any node set, determine the third parameter of this node set, and the third parameter is greater than or equal to the first parameter of this node set. Split the service nodes of this node set into the third-parameter number of single new computer room clusters, that is, the service nodes in these third-parameter single new computer room clusters all come from this node set. And, the third parameter of this node set is greater than or equal to the first parameter of this node set, so that the number of nodes in the obtained single new computer room cluster is less than or equal to the first threshold.
[0097] It should be understood here that the first parameter, the second parameter, and the third parameter in this application all correspond one-to-one with the node set, that is, each node set has its matching first parameter, second parameter, and third parameter.
[0098] Moreover, the number of nodes in the single new computer room cluster and the hybrid new computer room cluster generated in the embodiments of the present application is greater than or equal to the second threshold and less than or equal to the first threshold, avoiding excessive or insufficient resources in the new computer room cluster.
[0099] Optionally, the third parameter is determined in the following manner: for any node set, obtain the first parameter and the second parameter of the node set; determine whether the second parameter is equal to 0; if so, the third parameter of the node set = the first parameter, so that the number of single new computer room clusters generated by the node set is the first parameter, and the number of nodes in each single new computer room cluster is the first threshold. If not, the third parameter of the node set = the first parameter + 1, so that the number of nodes in at least one single new computer room cluster in the single new computer room clusters generated by the node set is less than the first threshold.
[0100] Optionally, in the content delivery network for on-demand / live broadcast, service nodes preferentially provide resources for users through caching. To improve the cache hit rate, usually a hash ring calculation within the computer room cluster is performed on the same resource. To ensure the stability of the hash ring structure, this embodiment preferentially adds according to the previous computer room cluster identifier (such as LastIDCID) of the service node, and adds in ascending order of the identifier when adding.
[0101] It can be seen that the method for adjusting the computer room cluster of the content delivery network provided by the embodiments of the present application splits the service nodes in the old computer room cluster into different types of node sets according to the node types of the service nodes. When there is no node-scarce set, the service nodes in each node set are split into corresponding numbers of single new computer room clusters. Thus, the node types of the service nodes in the single new computer room clusters are the same, which is convenient for precise scheduling of the computer room cluster and improving the overall resource utilization rate, thereby reducing resource waste in the content delivery network and saving resources; moreover, only when there is a node-scarce set, the service nodes in it are merged with the service nodes in other sets to obtain a hybrid new computer room cluster, reducing the number of hybrid new computer room clusters; and the number of service nodes in each obtained new computer room cluster is between the first threshold and the second threshold, avoiding excessive or insufficient resources in the cluster and further improving the overall resource utilization rate.
[0102] Embodiment 2
[0103] Figure 3 The flowchart of a method for adjusting the computer room cluster of the content delivery network provided by Embodiment 2 of the present application is shown. Specifically, as Figure 3 shown, the method includes the following steps:
[0104] Step S301: Determine the node types of each service node in the old computer room cluster, and add the service nodes with the same node type to the same node set; for any node set, calculate the first parameter and the second parameter of this node set.
[0105] Among them, the first parameter is the quotient of the number of nodes in this node set and the first threshold, and the second parameter is the remainder of the number of nodes in this node set divided by the first threshold.
[0106] Step S302: Determine whether there is a node-scarce set in the node set; if so, execute Step S303; if not, execute Step S308.
[0107] Among them, the number of nodes in the node-scarce set is less than the second threshold.
[0108] Step S303: For the other node sets other than this node-scarce set, extract the second parameter of service nodes from this other node set, and evenly split the remaining service nodes in this other node set into the first parameter of single new computer room clusters.
[0109] If there are at least two node-scarce sets currently, the other node sets other than this node-scarce set also include node-scarce sets. For the node-scarce sets in the other node sets, since the first parameter of the node-scarce set is 0, no single new computer room cluster of the node-scarce set will be obtained in this step; for the non-node-scarce sets in the other node sets, if the first parameter of this non-node-scarce set is 0, no single new computer room cluster of this non-node-scarce set will be obtained in this step; if the first parameter of this non-node-scarce set is greater than 0, more than 0 single new computer room clusters of this non-node-scarce set will be obtained in this step.
[0110] If there is only one node-scarce set currently, the other node sets are all non-node-scarce sets. If the first parameter of this non-node-scarce set is 0, no single new computer room cluster of this non-node-scarce set will be obtained in this step; if the first parameter of this non-node-scarce set is greater than 0, more than 0 single new computer room clusters of this non-node-scarce set will be obtained in this step.
[0111] In short, in this step, for any other node set, the number of clusters of the single new computer room cluster split from this other node set = the first parameter of this other node set.
[0112] Step S304: Calculate the sum of the number of nodes in this node-scarce set and the second parameter.
[0113] This sum is the sum of the current node-scarce set and the service nodes extracted from the other node sets.
[0114] Step S305, determine whether the sum is greater than the first threshold; if yes, execute Step S306; if no, execute Step S307.
[0115] Step S306, merge the second-parameter number of service nodes extracted with the service nodes in the node sparse set into multiple hybrid new computer room clusters.
[0116] If the sum is greater than the first threshold, to avoid the number of nodes in the hybrid new computer room cluster exceeding the first threshold, merge the extracted service nodes with the service nodes in the node sparse set into multiple hybrid new computer room clusters.
[0117] Step S307, merge the second-parameter number of service nodes extracted with the service nodes in the node sparse set into one hybrid new computer room cluster.
[0118] If the sum is less than or equal to the first threshold, merge the second-parameter number of service nodes extracted with the service nodes in the node sparse set into one hybrid new computer room cluster.
[0119] And ensure that the number of nodes in the generated hybrid new computer room cluster is greater than or equal to the second threshold.
[0120] Step S308, for any node set, determine the second parameter of this node set; if the second parameter = 0, execute Step S309; if 0 < the second parameter < the second threshold, execute Step S310; if the second threshold ≤ the second parameter, execute Step S311.
[0121] For any node set, according to the size relationship between the second parameter of this node set and 0 and the second threshold, generate a single new computer room cluster of this node set in a matching manner.
[0122] Step S309, evenly split the service nodes in the node set into the first-parameter number of single new computer room clusters.
[0123] If the second parameter = 0, then the third parameter = the first parameter, so as to evenly split the service nodes in the node set into the first-parameter number of single new computer room clusters. The number of single new computer room clusters obtained by splitting the node set is the first parameter of this node set, and the number of nodes in each single new computer room cluster is the first threshold.
[0124] Step S310, extract the second-threshold number of service nodes from the node set and add them to one single new computer room cluster, extract the fourth-parameter * first-threshold number of service nodes from the node set and evenly split them into the fourth-parameter number of single new computer room clusters, and add the remaining service nodes of the node set to another single new computer room cluster; where the fourth parameter of this node set = the first parameter - 1.
[0125] If 0 < the second parameter < the second threshold, then the third parameter = the first parameter + 1. When splitting this node set, extract the second threshold number of service nodes from this node set and add them to a single new computer room cluster. Thus, the number of nodes in the single new computer room cluster here (abbreviated as the first type) = the second threshold, and the number of clusters in the single new computer room cluster is 1.
[0126] Moreover, extract the fourth parameter * the first threshold number of service nodes from this node set and evenly split them into the fourth parameter of single new computer room clusters. Among them, the fourth parameter of this node set = the first parameter of this node set - 1. Thus, the number of nodes in the single new computer room cluster here (abbreviated as the second type) = the first threshold, and the number of clusters in the single new computer room cluster = the first parameter - 1.
[0127] Further add the remaining service nodes of this node set to another single new computer room cluster. Thus, the number of nodes in the single new computer room cluster here (abbreviated as the third type) = the number of nodes in this node set - the second threshold - the fourth parameter * the first threshold = the first threshold - the second threshold + the second parameter, and the number of clusters in the single new computer room cluster = 1.
[0128] Therefore, three types of single new computer room clusters can be obtained in this step. The number of clusters of the three types of single new computer room clusters = 1 + the first parameter - 1 + 1 = the first parameter + 1; the number of nodes of the three types of single new computer room clusters = the second threshold + (the first parameter - 1) * the first threshold + (the first threshold - the second threshold + the second parameter) = the first parameter * the first threshold + the second parameter = the number of nodes in this node set.
[0129] Step S311: Extract the first parameter * the first threshold number of service nodes from this node set and evenly split them into the first parameter of single new computer room clusters, and add the remaining service nodes of this node set to another single new computer room cluster.
[0130] If the second parameter of this node set is greater than or equal to the second threshold, then the third parameter = the first parameter + 1.
[0131] Extract the first parameter * the first threshold number of service nodes from this node set and evenly split them into the first parameter of single new computer room clusters. Thus, the number of single new computer room clusters obtained here = the first parameter, and the number of nodes in each single new computer room cluster = the first threshold.
[0132] Further add the remaining service nodes of this node set to another single new computer room cluster. The number of single new computer room clusters obtained here = 1, and the number of nodes in each single new computer room cluster = the second parameter.
[0133] Optionally, before each step of this method is executed, the first threshold and the second threshold used in this adjustment process can be determined in advance. Specifically, in this embodiment, the first threshold and the second threshold are dynamically adjusted according to historical data to improve the rationality of the first threshold and the second threshold, and thus improve the resource utilization rate of the content delivery network.
[0134] Specifically, calculate the quality of service index and the cost-benefit index under the historical values of the first threshold and the historical values of the second threshold in the historical period; determine the adjustment parameter according to the quality of service index and the cost-benefit index; use the adjustment parameter to adjust the historical values of the first threshold and the historical values of the second threshold to obtain the current first threshold and the second threshold. Among them, the historical period is periodically segmented to obtain each historical period, and the first threshold and the second threshold in each historical period are obtained. The first threshold and the second threshold in the historical period are respectively referred to as the historical value of the first threshold and the historical value of the second threshold. The quality of service is quantitatively evaluated by using the quality of service index. For example, the quality of service index can be determined according to the stuttering rate, the first-frame duration, and / or the error rate, etc.; the cost-benefit of the content delivery network is evaluated by using the cost-benefit index, and the cost-benefit index can be determined according to the bandwidth utilization rate, etc.
[0135] In the specific implementation process, calculate the quality optimization value of the first historical period according to the quality of service index of the first historical period and the quality of service index of the second historical period. For example, the difference between the quality of service index of the first historical period and the quality of service index of the second historical period can be used as the quality optimization value of the first historical period; calculate the cost optimization value of the first historical period according to the cost-benefit index of the first historical period and the cost-benefit index of the second historical period. For example, the difference between the cost-benefit index of the first historical period and the cost-benefit index of the second historical period can be used as the cost optimization value of the first historical period; among them, the first historical period is the current nearest historical period, and the second historical period is the previous historical period of the first historical period.
[0136] If the quality optimization value and the cost optimization value of the first historical period meet the preset conditions, then use the historical value of the first threshold of the first historical period as the current first threshold, and use the historical value of the second threshold of the first historical period as the current second threshold; if the quality optimization value and the cost optimization value of the first historical period do not meet the preset conditions, then generate an adjustment parameter, and use the adjustment parameter to adjust the quality optimization value and the cost optimization value of the first historical period to generate the current first threshold and the second threshold. Among them, the embodiments of the present application do not limit the specific generation method of the adjustment parameter. For example, the initial values of the first threshold and the second threshold can be selected as corresponding larger values. When generating the adjustment parameter before, the cost-benefit index maximization can be used as the objective function, and the greedy algorithm can be used to determine the adjustment parameter of the first threshold and the adjustment parameter of the second threshold, and then the current first threshold and the second threshold are obtained after adjustment. For example,
[0137] refer to Figure 4 , observe the quality optimization value and cost optimization value under the first threshold m and the second threshold n of the most recent first historical cycle. If the quality has not deteriorated and the cost has benefit, determine that the preset conditions are currently met (such as the quality optimization value is greater than or equal to 0, and the cost optimization value is greater than or equal to 0), so that the first threshold m and the second threshold n of the first historical cycle are used as the starting value of the stable state, and the first threshold m and the second threshold n of the stable state are used as the current latest first threshold and second threshold values. If the quality and cost deteriorate, the preset conditions are not met at present. Based on the greedy algorithm of maximizing cost-benefit, determine the downward adjustment step size, and then determine the adjustment parameters, and observe the next cycle. This process is in a trial state process. In the trial process, the quality usually fluctuates with the cost. After stabilization, the quality changes relatively stably relative to the cost, so that the first threshold historical value and the second threshold historical value corresponding to the starting point of the stability of quality with cost can be used as the subsequent first threshold and second threshold.
[0138] Optionally, after the implementation of this method, nodes can be added and deleted from the generated new computer room cluster. When adding a node, obtain the node type of the service node to be added. If a non-full single new computer room cluster that matches the node type can be found, add the service node to the single new computer room cluster; if a non-full single new computer room cluster that matches the node type cannot be found, obtain the second threshold -1 service node from the full single new computer room cluster that matches the node type, and merge it with the service node into a new single new computer room cluster; if there is currently no single new computer room cluster that matches the node type, add the service node to a non-full mixed new computer room cluster; if there is currently no non-full mixed new computer room cluster, add the service to a non-full single new computer room cluster that does not match the node type to form a mixed new computer room cluster; if there is currently no non-full single new computer room cluster that does not match the node type, obtain the second threshold -1 service node from the full single new computer room cluster that does not match the type, and form a new mixed new computer room cluster with the service node. This approach can further improve the resource utilization of the content distribution network.
[0139] It can be seen that for the method for adjusting the computer room cluster of the content distribution network provided by the embodiments of the present application, when there is no set of nodes with few nodes, a matching splitting method is adopted according to the second parameter situation of the node set to obtain a single new computer room cluster, ensuring that the generated single new computer room cluster is greater than or equal to the second threshold and less than or equal to the first threshold; when there is a set of nodes with few nodes, one or more hybrid new computer room clusters are generated according to the sum of the set of nodes with few nodes and the extracted service nodes, so as to further reduce the number of hybrid new computer room clusters while ensuring that the number of nodes in the new computer room cluster meets the requirements, thereby improving the scheduling accuracy of the new computer room cluster and the overall resource utilization rate.
[0140] Embodiment III
[0141] Figure 5 The flowchart of a method for adjusting the computer room cluster of the content distribution network provided by Embodiment III of the present application is shown. Among them, this embodiment takes an on-demand / live broadcast platform as an example to elaborate the implementation process of this method in detail.
[0142] Specifically, as Figure 5 shown, the method includes the following steps:
[0143] Step S501, determine the node types of each service node in the old computer room cluster.
[0144] In this embodiment, the node types of the service nodes include type I, type P, and type Q respectively. Type I corresponds to pure live broadcast nodes, type P corresponds to pure on-demand nodes, and type Q corresponds to live broadcast + on-demand nodes.
[0145] Step S502, determine whether there are type I service nodes in the old computer room cluster; if so, execute step S503; if not, execute step S504.
[0146] Step S503, remove the type I service nodes and generate a second type of alarm information.
[0147] Step S504, add service nodes of the same node type to the same node set.
[0148] After removing the type I service nodes, the node sets generated in this step include two, namely the type P node set and the type Q node set. The service nodes included in the type P node set are all of type P, and the service nodes included in the type Q node set are all of type Q.
[0149] Step S505, for any node set, calculate the first parameter and the second parameter of the node set.
[0150] Among them, the first parameter of the type P node set is Pn, and the second parameter is Ps; the first parameter of the type Q node set is Qn, and the second parameter is Qs.
[0151] Step S506: Extract m*Pn service nodes from the set of P-type nodes and split them into Pn P-type computer room clusters; extract m*Qn service nodes from the set of Q-type nodes and split them into Qn Q-type computer room clusters.
[0152] Among them, the P-type computer room cluster is a single new computer room cluster, and the service types of the service nodes it contains are all P-type; the Q-type computer room cluster is a single new computer room cluster, and the service types of the service nodes it contains are all Q-type.
[0153] Each P-type computer room cluster in this step contains m P-type service nodes, and each Q-type computer room cluster contains m Q-type service nodes. After extraction, there are still Ps P-type service nodes left in the set of P-type nodes, and there are still Qs Q-type service nodes left in the set of Q-type nodes.
[0154] Step S507: Determine whether Ps≥n and Qs≥n are satisfied; if so, execute step S508; if not, execute step S509.
[0155] In this embodiment, the first threshold is m and the second threshold is n.
[0156] Step S508: Generate 1 P-type computer room cluster from the remaining Ps P-type service nodes in the set of P-type nodes, and generate 1 Q-type computer room cluster from the remaining Qs Q-type service nodes in the set of Q-type nodes.
[0157] Step S509: Determine whether Pn>0 and Qn>0 are satisfied; if so, execute step S510; if not, execute step S511.
[0158] Step S510: If Ps<n, extract n - Ps P-type service nodes from one P-type computer room cluster, and generate 1 P-type computer room cluster with the extracted n - Ps P-type service nodes and the remaining Ps P-type service nodes in the set of P-type nodes; if Qs<n, extract n - Qs Q-type service nodes from one Q-type computer room cluster, and generate 1 Q-type computer room cluster with the extracted n - Qs Q-type service nodes and the remaining Qs Q-type service nodes in the set of Q-type nodes.
[0159] Step S511: Generate the first type of alarm information.
[0160] Step S512: Determine whether Ps + Qs>m is satisfied; if so, execute step S513; if not, execute step S514.
[0161] Step S513: Generate two O-type computer room clusters.
[0162] If Ps + Qs > m, merge the remaining service nodes in the P-type node set and the Q-type node set, and split them into two O-type computer room clusters, where the O-type computer room cluster is a hybrid new computer room cluster.
[0163] Step S514, generate an O-type computer room cluster.
[0164] If Ps + Qs ≤ m, merge the remaining service nodes in the P-type node set and the Q-type node set, and add them to an O-type computer room cluster.
[0165] If the number of nodes in each obtained computer room cluster is less than n, generate a third type of alarm message.
[0166] It can be seen that the method for adjusting computer room clusters of the content distribution network provided by the embodiments of the present application preferentially splits out a single P-type computer room cluster and a Q-type computer room cluster, and generates a hybrid O-type computer room cluster when Pn > 0 and Qn > 0 are not satisfied and when Pn > 0 and Qn > 0 are not satisfied. This facilitates the precise scheduling of computer room clusters and improves the overall resource utilization rate; moreover, the number of service nodes in each obtained new computer room cluster is between the first threshold and the second threshold, avoiding too much or too little resources in the cluster and further improving the overall resource utilization rate.
[0167] Embodiment 4
[0168] Figure 6 shows a schematic structural diagram of a device for adjusting computer room clusters of a content distribution network provided by Embodiment 4 of the present application. As Figure 6 shown, the device 600 includes: a determination module 610, a calculation module 620, and a splitting module 630.
[0169] The determination module 610 is configured to add service nodes of the same node type in the old computer room cluster to the same node set;
[0170] The calculation module 620 is configured to calculate a first parameter and a second parameter of any node set; wherein, the first parameter is the quotient of the number of nodes in the node set and the first threshold, and the second parameter is the remainder of the number of nodes in the node set and the first threshold;
[0171] The splitting module 630 is configured to determine whether there is a node-scarce set in the node set; wherein, the number of nodes in the node-scarce set is less than the second threshold;
[0172] If so, for other node sets other than the node-scarce set, extract the second parameter of service nodes from the other node sets, merge the extracted second parameter of service nodes with the service nodes in the node-scarce set into a hybrid new computer room cluster, and evenly split the remaining service nodes in the other node sets into the first parameter of single new computer room clusters;
[0173] Otherwise, for any node set, split the service nodes in the node set into the third parameter of single new computer room clusters; wherein, the third parameter of the node set is greater than or equal to the first parameter of the node set;
[0174] Wherein, the number of nodes in each new computer room cluster is greater than or equal to the second threshold and less than or equal to the first threshold.
[0175] Optionally, the splitting module 630 is used for: for any node set, obtaining the first parameter and the second parameter of the node set;
[0176] Judging whether the second parameter is equal to 0;
[0177] If so, the third parameter of the node set = the first parameter;
[0178] If not, the third parameter of the node set = the first parameter + 1.
[0179] Optionally, the splitting module 630 is used for: if the second parameter of the node set is equal to 0, evenly splitting the service nodes in the node set into the first parameter of single new computer room clusters;
[0180] If the second parameter of the node set is greater than 0 and less than the second threshold, extract the second threshold of service nodes from the node set and add them to a single new computer room cluster, extract the fourth parameter * the first threshold of service nodes from the node set and evenly split them into the fourth parameter of single new computer room clusters, and add the remaining service nodes of the node set to another single new computer room cluster; wherein, the fourth parameter of the node set = the first parameter of the node set - 1;
[0181] If the second parameter of the node set is greater than or equal to the second threshold, extract the first parameter * the first threshold of service nodes from the node set and evenly split them into the first parameter of single new computer room clusters, and add the remaining service nodes of the node set to another single new computer room cluster.
[0182] Optionally, the splitting module 630 is used for: calculating the sum of the number of nodes in the node sparse set and the second parameter;
[0183] If the sum is greater than the first threshold, merge the extracted second parameter of service nodes with the service nodes in the node sparse set into multiple hybrid new computer room clusters;
[0184] If the sum is less than or equal to the first threshold, merge the extracted second parameter of service nodes with the service nodes in the node sparse set into one hybrid new computer room cluster.
[0185] Optionally, the splitting module 630 is configured to: generate a first type of alarm information if there is a sparse node set in the node set;
[0186] And / or, determining the node types of the service nodes in the old computer room cluster and adding the service nodes of the same node type to the same node set includes: determining the node types of the service nodes in the old computer room cluster, if there is a preset node type in the old computer room cluster, generating a second type of alarm information, and after removing the service nodes of the preset node type from the old computer room cluster, adding the service nodes of the same node type to the same node set.
[0187] Optionally, the apparatus further includes: a threshold determination module (not shown in the figure), configured to calculate a service quality index and a cost-benefit index at the historical value of the first threshold and the historical value of the second threshold within a historical period;
[0188] Determine an adjustment parameter according to the service quality index and the cost-benefit index;
[0189] Adjust the historical value of the first threshold and the historical value of the second threshold by using the adjustment parameter to obtain the current first threshold and second threshold.
[0190] Optionally, the threshold determination module (not shown in the figure) is configured to: calculate a quality optimization value of the first historical period according to the service quality index of the first historical period and the service quality index of the second historical period; wherein, the first historical period is the most recent historical period currently, and the second historical period is the previous historical period of the first historical period;
[0191] Calculate a cost optimization value of the first historical period according to the cost-benefit index of the first historical period and the cost-benefit index of the second historical period;
[0192] If the quality optimization value and the cost optimization value of the first historical period meet the preset conditions, use the historical value of the first threshold of the first historical period as the current first threshold, and use the historical value of the second threshold of the first historical period as the current second threshold;
[0193] If the quality optimization value and the cost optimization value of the first historical period do not meet the preset conditions, generate an adjustment parameter, and adjust the quality optimization value and the cost optimization value of the first historical period by using the adjustment parameter to generate the current first threshold and second threshold.
[0194] It can be seen that the computer room cluster adjustment device of the content distribution network provided by the embodiments of the present application can facilitate the precise scheduling of the computer room cluster, improve the overall resource utilization rate, and reduce the resource waste of the memory distribution network; moreover, only when there is a sparse node set, its service nodes are merged with the service nodes in other sets to obtain a new hybrid computer room cluster, thereby reducing the number of new hybrid computer room clusters; and the number of service nodes in each obtained new computer room cluster is between the first threshold and the second threshold, avoiding too much or too little resources in the cluster and further improving the overall resource utilization rate.
[0195] Embodiment 5
[0196] Figure 7 FIG. shows a schematic structural diagram of a computing device provided by Embodiment 5 of the present application. The specific implementation of the computing device is not limited in the specific embodiments of the present application.
[0197] As Figure 7 shown, the computing device may include: a processor 702, a communication interface 704, a memory 706, and a communication bus 708.
[0198] Wherein: the processor 702, the communication interface 704, and the memory 706 communicate with each other through the communication bus 708. The communication interface 704 is used to communicate with network elements of other devices such as clients or other servers. The processor 702 is used to execute the program 710, and specifically can execute the relevant steps in the above-mentioned method embodiments for adjusting the computer room cluster of the content distribution network of the computing device.
[0199] Specifically, the program 710 may include program code, and the program code includes computer operation instructions.
[0200] The processor 702 may be a central processing unit CPU, or a specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present application. One or more processors included in the computing device may be of the same type of processor, such as one or more CPUs; or may be of different types of processors, such as one or more CPUs and one or more ASICs.
[0201] The memory 706 is used to store the program 710. The memory 706 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk memory. The program 710 is specifically used to cause the processor 702 to perform the operations in any of the above method embodiments.
[0202] Example VI
[0203] Example VI of the present application provides a non - volatile computer storage medium. The computer storage medium stores at least one executable instruction or computer program, and the executable instruction or computer program enables a processor to perform operations corresponding to the method for adjusting a computer room cluster of a content delivery network in any of the above - mentioned method embodiments.
[0204] Example VII
[0205] Example VII of the present application provides a computer program product. The computer program product includes at least one executable instruction or computer program, and the executable instruction or computer program enables a processor to perform operations corresponding to the method for adjusting a computer room cluster of a content delivery network in any of the above - mentioned method embodiments.
[0206] In summary, according to the computing device, computer storage medium, and computer program product provided in this embodiment, it is possible to facilitate the accurate scheduling of the computer room cluster, improve the overall resource utilization rate, and reduce the resource waste of the content delivery network; moreover, only when there is a set with few nodes, its service nodes are merged with the service nodes in other sets to obtain a new hybrid computer room cluster, reducing the number of new hybrid computer room clusters; and the number of service nodes in each obtained new computer room cluster is between a first threshold and a second threshold, avoiding too much or too little resources in the cluster and further improving the overall resource utilization rate.
[0207] The algorithms or displays provided herein are not inherently related to any particular computer, virtual system, or other device. Various general - purpose systems can also be used in conjunction with the teachings provided herein. The structure required to construct such systems will be apparent from the above description. In addition, the embodiments of the present application are not directed to any specific programming language. It should be understood that the content of the present application described herein can be implemented using various programming languages, and the descriptions of specific languages above are for disclosing the best mode of the present application.
[0208] In the specification provided herein, a large number of specific details are set forth. However, it can be understood that the embodiments of the present application can be practiced without these specific details. In some instances, well - known methods, structures, and technologies have not been shown in detail so as not to obscure the understanding of this specification.
[0209] Similarly, it should be understood that, in order to streamline the present application and assist in understanding one or more of the various inventive aspects, in the foregoing description of the exemplary embodiments of the present application, the various features of the embodiments of the present application are sometimes grouped together into a single embodiment, figure, or description thereof. However, the disclosed method should not be construed as reflecting an intention that the claimed application requires more features than are expressly recited in each claim. Rather, as reflected in the following claims, the inventive aspects lie in less than all of the features of the single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into the detailed description, with each claim standing on its own as a separate embodiment of the present application.
[0210] Those skilled in the art will appreciate that the modules in the devices in the embodiments can be adaptively changed and disposed in one or more devices different from the embodiments. The modules or units or components in the embodiments can be combined into one module or unit or component, and in addition, they can be divided into multiple sub-modules or sub-units or sub-components. Except that at least some of such features and / or processes or units are mutually exclusive, any combination can be used to combine all the features disclosed in this specification (including the accompanying claims, abstract, and drawings) and all the processes or units of any method or device so disclosed. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstract, and drawings) can be replaced by an alternative feature that provides the same, equivalent, or similar purpose.
[0211] Furthermore, those skilled in the art will be able to understand that although some of the embodiments herein include certain features included in other embodiments rather than other features, the combination of the features of different embodiments means that it is within the scope of the present application and forms different embodiments. For example, in the following claims, any one of the claimed embodiments can be used in any combination.
[0212] The various component embodiments of the present application can be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art should understand that a microprocessor or a digital signal processor (DSP) can be used in practice to implement some or all of the functions of some or all of the components according to the embodiments of the present application. The present application can also be implemented as a device or apparatus program (e.g., a computer program and a computer program product) for executing part or all of the methods described herein. Such a program for implementing the present application can be stored on a computer-readable medium, or can be in the form of one or more signals. Such signals can be downloaded from an Internet website, or provided on a carrier signal, or in any other form.
[0213] It should be noted that the above embodiments illustrate the present application rather than limit the present application, and those skilled in the art can design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in the claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present application can be implemented by means of hardware including several different elements and by means of a suitably programmed computer. In the unit claims listing several devices, several of these devices may be embodied by the same item of hardware. The use of the words first, second, and third, etc. does not denote any order. These words may be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be construed as limiting the order of execution.
Claims
1. A method for adjusting the computer room cluster of a content delivery network, characterized in that Including: Adding service nodes of the same node type in the old computer room cluster to the same node set, and calculating a first parameter and a second parameter for any node set; wherein, the first parameter is the quotient of the number of nodes in the node set and a first threshold, and the second parameter is the remainder of the number of nodes in the node set divided by the first threshold; Determining whether there is a node-scarce set in the node set; wherein, the number of nodes in the node-scarce set is less than a second threshold; If so, for other node sets other than the node-scarce set, extracting the second parameter of service nodes from the other node sets, merging the extracted second parameter of service nodes with the service nodes in the node-scarce set into a hybrid new computer room cluster, and equally splitting the remaining service nodes in the other node sets into the first parameter of single new computer room clusters; If not, for any node set, splitting the service nodes in the node set into the third parameter of single new computer room clusters; wherein, the third parameter of the node set is greater than or equal to the first parameter of the node set; wherein, the number of nodes in each new computer room cluster is greater than or equal to the second threshold and less than or equal to the first threshold.
2. The method according to claim 1, wherein The third parameter is determined by the following method: For any node set, obtaining the first parameter and the second parameter of the node set; Determining whether the second parameter is equal to 0; If so, the third parameter of the node set = the first parameter; If not, the third parameter of the node set = the first parameter + 1.
3. The method according to claim 2, wherein The splitting the service nodes in the node set into the third parameter of single new computer room clusters includes: If the second parameter of the node set is equal to 0, equally splitting the service nodes in the node set into the first parameter of single new computer room clusters; If the second parameter of the node set is greater than 0 and less than the second threshold, extracting the second threshold of service nodes from the node set and adding them to a single new computer room cluster, extracting the fourth parameter * first threshold of service nodes from the node set and equally splitting them into the fourth parameter of single new computer room clusters, and adding the remaining service nodes in the node set to another single new computer room cluster; wherein, the fourth parameter of the node set = the first parameter of the node set - 1; If the second parameter of the node set is greater than or equal to the second threshold, extracting the first parameter * first threshold of service nodes from the node set and equally splitting them into the first parameter of single new computer room clusters, and adding the remaining service nodes in the node set to another single new computer room cluster.
4. The method according to any one of claims 1 to 3, characterized in that The merging the extracted second parameter of service nodes with the service nodes in the node-scarce set into a hybrid new computer room cluster includes: Calculating the sum of the number of nodes in the node-scarce set and the second parameter; If the sum is greater than the first threshold, merging the extracted second parameter of service nodes with the service nodes in the node-scarce set into multiple hybrid new computer room clusters; If the sum is less than or equal to the first threshold, merging the extracted second parameter of service nodes with the service nodes in the node-scarce set into a single hybrid new computer room cluster.
5. The method according to any one of claims 1-4, characterized in that, The method further includes: if there is a node-scarce set in the node set, generating a first type of alarm information; And / or, the determining the node types of the service nodes in the old computer room cluster and adding the service nodes of the same node type to the same node set includes: determining the node types of the service nodes in the old computer room cluster, if there is a preset node type in the old computer room cluster, generating a second type of alarm information, and removing the service nodes of the preset node type from the old computer room cluster, and then adding the service nodes of the same node type to the same node set.
6. The method according to any one of claims 1-5, characterized in that, The method further includes: Calculating the service quality index and the cost-benefit index under the first threshold historical value and the second threshold historical value in the historical period; Determining an adjustment parameter according to the service quality index and the cost-benefit index; Adjusting the first threshold historical value and the second threshold historical value by using the adjustment parameter to obtain the current first threshold and second threshold.
7. The method according to claim 6, wherein The determining an adjustment parameter according to the service quality index and the cost-benefit index includes: Calculating the quality optimization value of the first historical period according to the service quality index of the first historical period and the service quality index of the second historical period; wherein, the first historical period is the current nearest historical period, and the second historical period is the previous historical period of the first historical period; Calculating the cost optimization value of the first historical period according to the cost-benefit index of the first historical period and the cost-benefit index of the second historical period; If the quality optimization value and the cost optimization value of the first historical period meet the preset conditions, taking the first threshold historical value of the first historical period as the current first threshold and taking the second threshold historical value of the first historical period as the current second threshold; If the quality optimization value and the cost optimization value of the first historical period do not meet the preset conditions, generating an adjustment parameter, and adjusting the quality optimization value and the cost optimization value of the first historical period by using the adjustment parameter to generate the current first threshold and second threshold.
8. An adjustment device for the computer room cluster of a content distribution network, characterized in that, Including: A determining module, configured to add the service nodes of the same node type in the old computer room cluster to the same node set; A calculating module, configured to calculate a first parameter and a second parameter of any node set; wherein, the first parameter is the quotient of the number of nodes in the node set and the first threshold, and the second parameter is the remainder of the number of nodes in the node set divided by the first threshold; A splitting module, configured to determine whether there is a node-scarce set in the node set; wherein, the number of nodes in the node-scarce set is less than the second threshold; If so, for other node sets other than the node-scarce set, extracting the second parameter of service nodes from the other node sets, merging the extracted second parameter of service nodes with the service nodes in the node-scarce set into a hybrid new computer room cluster, and equally splitting the remaining service nodes in the other node sets into the first parameter of single new computer room clusters; If not, for any node set, splitting the service nodes in the node set into the third parameter of single new computer room clusters; wherein, the third parameter of the node set is greater than or equal to the first parameter of the node set; Among them, the number of nodes in each new computer room cluster is greater than or equal to the second threshold and less than or equal to the first threshold.
9. A computing device, characterized in that, Including: A processor, a memory, a communication interface, and a communication bus. The processor, the memory, and the communication interface complete communication with each other through the communication bus; The memory is used to store at least one executable instruction, and the executable instruction causes the processor to execute the operations corresponding to the computer room cluster adjustment method of the content distribution network according to any one of claims 1-7.
10. A computer storage medium, characterized in that, At least one executable instruction is stored in the storage medium, and the executable instruction causes the processor to execute the operations corresponding to the computer room cluster adjustment method of the content distribution network according to any one of claims 1-7.
11. A computer program product, characterized in that, Including at least one executable instruction, and the executable instruction causes the processor to execute the operations corresponding to the computer room cluster adjustment method of the content distribution network according to any one of claims 1-7.