Resource deployment method and device
By analyzing the block file download information of the client node, determining the hot block file and predicting its replica deployment increment, the problem of low bandwidth utilization of P2P devices is solved and more efficient resource and bandwidth utilization is achieved.
Patent Information
- Application Number
- CN202210741553.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-28
- Publication Date
- 2025-02-21
- Estimated Expiration
- 2042-06-28
AI Technical Summary
After the prior art deploys resources to P2P devices, the bandwidth utilization rate of P2P devices cannot be effectively guaranteed.
By obtaining the block file download information of the client node, the resource identification of the hot block file is determined, and based on this information, the replica deployment increment of the hot block file is expected to be implemented in the next cycle, so as to optimize the resource and bandwidth utilization of the edge server. .
It effectively improves the device utilization, bandwidth utilization and resource utilization after the hot block file is deployed on edge servers, avoiding the problems of excessive resource consumption and low utilization.
Smart Images

Figure CN115134351B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer science and technology, and in particular to a resource deployment method and device. Background Art
[0002] With the development of computer science and technology, resource pre-distribution technology continues to improve.
[0003] When a terminal user needs to download and play a video, he can request the resource file of the video from the content delivery network (CDN), and then the CDN can distribute the deployed resource file of the video to the terminal user. As the number of terminal users, the number of videos, and the amount of resource data increase, the burden on the CDN is becoming more and more serious, and the bandwidth consumption is also increasing. Since the bandwidth cost of CDN is relatively high, the resource consumption cost of CDN cannot be ignored.
[0004] Specifically, the existing technology can deploy resource files in advance to multiple P2P devices with low bandwidth costs (such as routers, etc.), so that when the end user needs to play a certain video, he can directly request the video resource from a P2P device that has deployed the corresponding video resource, without having to request it from the CDN, thereby effectively reducing the burden on the CDN and reducing resource consumption costs.
[0005] However, after resources are deployed to P2P devices, the prior art cannot effectively guarantee the bandwidth utilization of the P2P devices. Summary of the invention
[0006] In view of the above problems, the present invention provides a resource deployment method and device that overcomes the above problems or at least partially solves the above problems. The technical solution is as follows:
[0007] A resource deployment method, comprising:
[0008] Obtaining block file download information of at least one client node, wherein the block file download information of each client node includes resource identifiers of each block file downloaded by the client node within a target period, and the resource identifiers of each block file include a source server identifier and a file identifier;
[0009] Based on the block file download information of each of the client nodes, determining a resource identifier of at least one hot block file from the resource identifiers of each of the block files;
[0010] From the block file download information of each client node, respectively obtain the download information of each hot block file within the target cycle time, the download information including the number of downloads from the central server and the number of downloads from the edge server;
[0011] Based on the downloaded information of each of the hot block files within the target cycle duration, the replica deployment increment of the next cycle duration corresponding to each of the hot block files is estimated.
[0012] Optionally, the determining, based on the block file download information of each of the client nodes, a resource identifier of at least one hot block file from the resource identifiers of each of the block files includes:
[0013] Based on the block file download information of each client node, respectively counting the download information of each block file within the target period;
[0014] Based on the downloaded information of each of the block files within the target period, the resource identifier of each of the hot block files is determined from the resource identifiers of each of the block files.
[0015] Optionally, the determining the resource identifier of each of the hot block files from the resource identifiers of each of the block files based on the downloaded information of each of the block files within the target cycle duration includes:
[0016] Based on the downloaded information of each of the block files within the target period, the server download times of each of the block files are calculated respectively, where the server download times are the sum of the central server download times and the edge server download times;
[0017] Determine the sum of the server download times of each of the block files as the total download times;
[0018] The server download times of each of the block files are sorted in descending order of the server download times, and the resource identifiers of each of the block files whose server download times are arranged in order not greater than i are determined as the resource identifiers of the hot block files;
[0019] Among them, the sum of the server download times of each of the block files whose arrangement number is not greater than the i is N, the sum of the server download times of each of the block files whose arrangement number is not greater than the j is M, the value obtained by subtracting the j from the i is 1, the N is not less than the download threshold, the M is less than the download threshold, and the download threshold is the product of the total download times and a predefined coefficient.
[0020] Optionally, the estimating the replica deployment increment of the next cycle duration corresponding to each hot block file based on the downloaded information of each hot block file within the target cycle duration respectively includes:
[0021] Determine the downloaded information of one of the hot block files within the target cycle duration as the downloaded information of the target hot block file within the target cycle duration;
[0022] Based on the download information of the target hot segmented file within the target cycle duration, estimate the number of downloads of the target hot segmented file by the central server in the next cycle duration and the download rate of the target hot segmented file by the edge server in the target cycle;
[0023] Determine the flow growth rate of the target hot block file;
[0024] Determine a replica deployment increment for the next cycle duration corresponding to the target hot block file based on the number of downloads of the target hot block file from the central server for the next cycle duration, the download rate of the target hot block file from the edge server within the target cycle, and the traffic growth rate of the target hot block file;
[0025] Return to the step of determining the downloaded information of one of the hot block files within the target cycle duration as the downloaded information of the target hot block file within the target cycle duration, until the replica deployment increment of the next cycle duration corresponding to each of the hot block files is determined.
[0026] Optionally, determining the flow growth rate of the target hot block file includes:
[0027] Obtaining the download information of the target hot block file within a historical cycle duration; the historical cycle duration is continuous with the target cycle duration;
[0028] The flow growth rate of the target hot block file is determined based on the downloaded information of the target hot block file in the historical period duration and the target period duration respectively.
[0029] A resource deployment device includes: a first obtaining unit, a first determining unit, a second obtaining unit and a predicting unit; wherein:
[0030] The first obtaining unit is used to obtain the block file download information of at least one client node, the block file download information of each client node includes the resource identifier of each block file downloaded by the client node within the target period, and the resource identifier of each block file includes a source server identifier and a file identifier;
[0031] The first determining unit is configured to determine a resource identifier of at least one hot block file from resource identifiers of each of the block files based on the block file download information of each of the client nodes;
[0032] The second obtaining unit is used to obtain the download information of each of the hot block files within the target period from the block file download information of each of the client nodes, wherein the download information includes the number of downloads from the central server and the number of downloads from the edge server;
[0033] The estimation unit is used to estimate the replica deployment increment of the next cycle duration corresponding to each of the hot block files based on the downloaded information of each of the hot block files within the target cycle duration.
[0034] Optionally, the first determining unit includes: a statistical unit and a second determining unit;
[0035] The statistical unit is used to count the download information of each of the block files within the target period based on the block file download information of each of the client nodes;
[0036] The second determining unit is configured to determine the resource identifier of each of the hot block files from the resource identifiers of each of the block files based on the downloaded information of each of the block files within the target period.
[0037] Optionally, the second determining unit includes: a calculating unit, a third determining unit, a sorting unit and a fourth determining unit; wherein:
[0038] The calculation unit is used to calculate the server download times of each of the block files based on the download information of each of the block files within the target cycle time, where the server download times are the sum of the central server download times and the edge server download times;
[0039] The third determining unit is used to determine the sum of the server download times of each of the block files as the total download times;
[0040] The sorting unit is used to sort the server download times of each of the block files in descending order of the server download times;
[0041] The fourth determination unit is used to determine the resource identifiers of each of the block files whose server download times are arranged in a sequence number not greater than i as the resource identifiers of the hot block files; wherein the sum of the server download times of each of the block files whose server download times are arranged in a sequence number not greater than i is N, the sum of the server download times of each of the block files whose server download times are arranged in a sequence number not greater than j is M, the value obtained by subtracting j from i is 1, N is not less than a download threshold, M is less than the download threshold, and the download threshold is the product of the total download times and a predefined coefficient.
[0042] Optionally, the prediction unit includes: a fifth determination unit, an estimation unit, a sixth determination unit and a seventh determination unit; wherein:
[0043] The fifth determining unit is used to determine the downloaded information of one of the hot block files within the target cycle duration as the downloaded information of the target hot block file within the target cycle duration;
[0044] The estimation unit is used to estimate the number of downloads of the target hot block file from the central server in the next cycle duration and the download rate of the target hot block file from the edge server in the target cycle based on the downloaded information of the target hot block file in the target cycle duration;
[0045] The sixth determining unit is used to determine the flow rate growth rate of the target hot block file;
[0046] The seventh determination unit is used to determine the replica deployment increment for the next cycle duration corresponding to the target hot block file based on the number of downloads of the target hot block file in the central server for the next cycle duration, the edge server download rate of the target hot block file in the target cycle, and the traffic growth rate of the target hot block file, and trigger the fifth determination unit until the replica deployment increment for the next cycle duration corresponding to each of the hot block files is determined.
[0047] Optionally, the sixth determining unit includes: a third obtaining unit and an eighth determining unit; wherein:
[0048] The third obtaining unit is used to obtain the download information of the target hot block file within a historical cycle duration; the historical cycle duration is continuous with the target cycle duration;
[0049] The eighth determination unit is configured to determine the flow rate growth rate of the target hot block file based on the downloaded information of the target hot block file in the historical cycle duration and the target cycle duration respectively.
[0050] The resource deployment method and device proposed in the present invention can obtain the block file download information of at least one client node, the block file download information of each client node includes the resource identifier of each block file downloaded by the client node within the target cycle duration, and the resource identifier of each block file includes the source server identifier and the file identifier; based on the block file download information of each client node, the resource identifier of at least one hot block file is determined from the resource identifier of each block file; from the block file download information of each client node, the downloaded information of each hot block file within the target cycle duration is obtained respectively, and the downloaded information includes the number of downloads from the central server and the number of downloads from the edge server; based on the downloaded information of each hot block file within the target cycle duration, the replica deployment increment corresponding to each hot block file for the next cycle duration is estimated. The present invention can utilize the block file download information of each client node to determine the resource identifier of at least one hot block file, and then determine the replica deployment increment of each hot block file in the next cycle length based on the downloaded information of each hot block file, so as to effectively ensure the equipment utilization rate, bandwidth utilization rate and resource utilization rate after the edge server deploys the hot block file, avoid excessive resource consumption caused by too many edge servers or too many hot block files deployed, and low equipment utilization rate, bandwidth utilization rate and resource utilization rate, and avoid the problem of insufficient edge servers or a small number of hot block files deployed to meet the needs of terminal users.
[0051] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0053] Figure 1 A flow chart of a first resource deployment method provided by an embodiment of the present invention is shown;
[0054] Figure 2 A flow chart of a second resource deployment method provided by an embodiment of the present invention is shown;
[0055] Figure 3 A flowchart of a third resource deployment method provided by an embodiment of the present invention is shown;
[0056] Figure 4 A schematic diagram of the structure of a resource deployment device provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0057] The exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present invention and to enable the scope of the present invention to be fully communicated to those skilled in the art.
[0058] like Figure 1 As shown, this embodiment proposes a first resource deployment method, which may include the following steps:
[0059] S101, obtaining block file download information of at least one client node, wherein the block file download information of each client node includes resource identifiers of each block file downloaded by the client node within a target period, and the resource identifiers of each block file include a source server identifier and a file identifier;
[0060] The client node may be an electronic device used by a terminal user to request to download resources, such as a mobile phone and a tablet computer.
[0061] It should be noted that, in the prior art, when deploying a resource file to a P2P device, the resource file can be first divided into blocks to obtain a plurality of corresponding block files, and the plurality of block files can be named and identified using different identification codes, and then the plurality of block files can be respectively deployed to a plurality of P2P devices. Among them, except for the last divided block file in the resource file, the data volume of each block file can be the same, for example, they can all be 20 megabytes.
[0062] Specifically, the block file download information of a certain client node may include the resource identifiers of all the block files downloaded by the client node within the target cycle duration. It should be noted that the resource identifier may be an identification code used to name and identify the block file, and the resource identifier may be used to uniquely identify a block file. Specifically, the resource identifier may be composed of a source server identifier and a file identifier.
[0063] The source server identifier is the machine identifier of the server that provides the block file to the client node. For example, the source server identifier of a block file in the block file download information of a client node is the machine identifier of the server that provides the block file to the client node; it can be understood that the source server can be a P2P device. It should be noted that the source server can also be a PCDN, that is, a P2P CDN, a P2P device in a CDN built on the basis of P2P technology.
[0064] The file identifier of the block file can be used to uniquely identify the block file. Optionally, the file identifier of the block file can be the block sequence number of the block file. It should be noted that the file identifier of the block file can reflect the resource file to which the block file belongs, and the block sequence number of the block file in the resource file.
[0065] It should be noted that the present invention can divide time periodically to obtain multiple cycle durations. The duration of each cycle duration can be the same, such as 5 minutes. The target cycle duration can be the cycle duration of a certain time period determined by a technician, for example, the target cycle duration can be the cycle duration of the current time period.
[0066] S102, based on the block file download information of each client node, determining a resource identifier of at least one hot block file from the resource identifiers of each block file;
[0067] Among them, the hot block files are block files with high popularity and high terminal user request frequency.
[0068] It should be noted that the present invention can first identify hot block files, and preferentially deploy the hot block files to the source server, avoiding the deployment of cold block files, that is, block files with low heat and low terminal user request frequency, to the source server, so that the block files deployed in the source server can often be requested to download by the terminal user, and then the source server can often process the resource download request of the terminal user, ensuring the device utilization and bandwidth utilization of the source server. Moreover, when the source server is a P2P device, the bandwidth cost consumed in the process of processing the resource download request of the terminal user and sending the resource file to the terminal user is low, which can effectively improve the resource utilization.
[0069] Specifically, after obtaining the block file download information of each client node, the present invention can organize the download information of each block file, determine the download times and downloading users of different block files, and based on this information, determine the resource identifiers of the block files whose download times exceed a certain threshold from the resource identifiers of each block file, or determine the resource identifiers of the block files that meet certain evaluation rules, and determine them all as the resource identifiers of hot block files.
[0070] S103, obtaining the download information of each hot block file within the target period from the block file download information of each client node, wherein the download information includes the number of downloads from the central server and the number of downloads from the edge server;
[0071] The central server may be a server that originally stores resource files or segmented files and distributes the stored resource files or segmented files to the edge servers in advance, such as a CDN.
[0072] The edge server may be a server that provides block files to client nodes, such as a P2P device.
[0073] Specifically, the number of central server downloads is the number of downloads of a certain hot block file from the central server, and the number of edge server downloads is the number of downloads of a certain hot block file from the edge server. Specifically, the number of edge server downloads of a certain hot block file may be the sum of the number of times each client node downloads the hot block file from each edge server.
[0074] Specifically, the present invention can obtain the download information of each hot block file within the target period by collecting statistics on the block file download information of each client node.
[0075] It should be noted that when a client node requests to download a certain block file, it can first make a request to each edge server. If each edge server can return the block file to the client node, the client node does not need to send a request to the central server again; if each edge server does not respond to the client node or cannot return the block file, the client node can further send a request to download the block file to the central server to download the block file from the central server.
[0076] S104: based on the download information of each hot block file within the target cycle duration, estimate the replica deployment increment of each hot block file corresponding to the next cycle duration.
[0077] The next cycle duration is a cycle duration that is adjacent to the target cycle duration and is located after the target cycle duration.
[0078] The replica deployment increment may be to increase the number of deployed hot segmented files in one or more edge servers in order to meet the download demand of terminal users for a hot segmented file in the next cycle. It should be noted that for a hot segmented file, when the hot segmented file is stored in an edge server, it can be considered that the hot segmented file has one replica; when the hot segmented file is stored on multiple edge servers, it can be considered that the hot segmented file has a certain number of replicas.
[0079] Specifically, the present invention can deploy the hot block files that need to be added on all current edge servers after determining the replica deployment increment. The hot block files deployed on each edge server can be one or more. For example, when the replica deployment increment of a certain hot block file is 100, it is necessary to incrementally deploy 100 of the hot block files on all current edge servers.
[0080] Specifically, after determining the replica deployment increment, the present invention can add a corresponding number of edge servers on the basis of all current edge servers, and then deploy a hot block file on each added edge server; for example, when the replica deployment increment of a hot block file is 100, the present invention can add 100 edge servers on the basis of all current edge servers, and deploy the 100 hot block files to the 100 edge servers respectively, that is, one hot block file is deployed on each of the 100 edge servers.
[0081] It should be noted that the present invention can deploy hot block files on the edge servers of the current province and major operators as much as possible to avoid terminal users making cross-provincial and cross-operator download requests and ensure resource download speed.
[0082] Specifically, after obtaining the download information of each hot block file within the target cycle duration, the present invention can estimate the replica deployment increment of the next cycle duration corresponding to each hot block file based on the download information of each hot block file within the target cycle. For example, the present invention can estimate the replica deployment increment of the next cycle duration corresponding to the first hot block file based on the download information of the first hot block file within the target cycle.
[0083] Optionally, in other resource deployment methods proposed in this embodiment, the above step S104 may include steps S1041, S1042, S1043, S1044 and S1045:
[0084] S1041, determining the downloaded information of a hot block file within the target cycle duration as the downloaded information of the target hot block file within the target cycle duration;
[0085] S1042: based on the download information of the target hot segmented file within the target period, estimate the number of downloads of the target hot segmented file by the central server in the next period and the download rate of the target hot segmented file by the edge server in the target period;
[0086] S1043, determining the flow growth rate of the target hot block file;
[0087] S1044, determining a replica deployment increment for the next cycle duration corresponding to the target hot block file based on the number of downloads of the target hot block file by the central server in the next cycle duration, the download rate of the target hot block file by the edge server in the target cycle, and the traffic growth rate of the target hot block file;
[0088] S1045. Return to step S1041 until the replica deployment increment corresponding to the next cycle length of each hot block file is determined.
[0089] Specifically, the present invention can use the following formula (1) to estimate the number of times the target hot block file is downloaded by the central server within the next cycle.
[0090] M=(1+P)×M0---------------Formula (1);
[0091] Wherein, M is the number of times the target hot block file is downloaded by the central server within the next cycle duration, P is the traffic growth rate of the target hot block file, and M0 is the number of times the target hot block file is downloaded by the central server within the target cycle duration;
[0092] The traffic growth rate P of the target hot block file may be set or estimated by a technician according to actual conditions.
[0093] It should be noted that if M0 is 0, it can be explained that the requests of each client node for the target hot block file within the target cycle duration can be responded to by the edge server, and the target hot block file is not downloaded from the central server. At this time, the present invention can be considered that the current edge server and the current file deployment of each edge server can meet the download requirements of each client node for the block file, and there is no need to perform incremental deployment of the block file for the next cycle duration, that is, the replica deployment increment is 0.
[0094] Specifically, the present invention can use the following formula (2) to estimate the edge server download rate of the target hot block file within the target period;
[0095]
[0096] Among them, Q is the edge server download rate of the target hot block file within the target period, G is the number of copies corresponding to the target hot block file within the target period, and H0 is the number of edge server downloads of the target hot block file within the target period;
[0097] Specifically, the present invention can use the following formula (3) to determine the replica deployment increment of the next cycle length corresponding to the target hot block file. It should be noted that the replica deployment increment is the number of a hot block file that needs to be deployed on the edge server.
[0098]
[0099] Wherein, W is the replica deployment increment corresponding to the next cycle length of the marked hot block file.
[0100] It should be noted that the present invention can be Figure 1 The resource deployment method shown uses the block file download information of each client node to determine the resource identifier of at least one hot block file, and then determines the replica deployment increment of each hot block file in the next cycle length based on the downloaded information of each hot block file, so as to effectively ensure the equipment utilization, bandwidth utilization and resource utilization after the edge server deploys the hot block file, which can avoid excessive resource consumption caused by too many edge servers or too many hot block files deployed, as well as low equipment utilization, bandwidth utilization and resource utilization, and can avoid the problem of insufficient edge servers or a small number of hot block files deployed to meet the needs of end users.
[0101] The resource deployment method proposed in this embodiment can obtain the block file download information of at least one client node, and the block file download information of each client node includes the resource identifier of each block file downloaded by the client node within the target cycle duration, and the resource identifier of each block file includes the source server identifier and the file identifier; based on the block file download information of each client node, the resource identifier of at least one hot block file is determined from the resource identifier of each block file; from the block file download information of each client node, the downloaded information of each hot block file within the target cycle duration is obtained respectively, and the downloaded information includes the number of downloads from the central server and the number of downloads from the edge server; based on the downloaded information of each hot block file within the target cycle duration, the replica deployment increment corresponding to each hot block file for the next cycle duration is estimated. The present invention can utilize the block file download information of each client node to determine the resource identifier of at least one hot block file, and then determine the replica deployment increment of each hot block file in the next cycle length based on the downloaded information of each hot block file, so as to effectively ensure the equipment utilization rate, bandwidth utilization rate and resource utilization rate after the edge server deploys the hot block file, avoid excessive resource consumption caused by too many edge servers or too many hot block files deployed, and low equipment utilization rate, bandwidth utilization rate and resource utilization rate, and avoid the problem of insufficient edge servers or a small number of hot block files deployed to meet the needs of terminal users.
[0102] based on Figure 1 ,like Figure 2 As shown, this embodiment proposes a second resource deployment method. In this method, step S102 may include steps S1021 and S1022. Among them:
[0103] S1021, based on the block file download information of each client node, respectively counting the download information of each block file within the target cycle length;
[0104] Specifically, after obtaining the block file download information of each client node, the present invention can summarize and count the block file download information to obtain the download information of each block file within the target cycle time.
[0105] S1022: Based on the download information of each block file within the target period, determine the resource identifier of each hot block file from the resource identifiers of each block file.
[0106] Optional, such as Figure 3 As shown, in the third resource deployment method proposed in this embodiment, step S1022 may include steps S201, S202, S203 and S204; wherein:
[0107] S201, based on the downloaded information of each block file within the target cycle duration, respectively calculate the server download times of each block file, where the server download times are the sum of the central server download times and the edge server download times;
[0108] S202, determining the sum of the server download times of each block file as the total download times;
[0109] S203, sorting the server download times of each block file in descending order of the server download times;
[0110] S204, determining the resource identifiers of all the block files whose arrangement sequence numbers of server download times are not greater than i as the resource identifiers of the hot block files;
[0111] Among them, the sum of the server download times of each block file with an arrangement number not greater than i is N, the sum of the server download times of each block file with an arrangement number not greater than j is M, the value obtained by subtracting j from i is 1, N is not less than the download threshold, M is less than the download threshold, and the download threshold is the product of the total download times and a predefined coefficient.
[0112] In order to better illustrate the process of determining the resource identifier of the hot block file, the present invention proposes and illustrates it in conjunction with the following Example 1.
[0113] Example 1: The server download times of the first block file, the second block file, the third block file, the fourth block file and the fifth block file are 50, 100, 150, 200 and 80 respectively, and the download threshold is 0.5; when the present invention determines the resource identifier of the hot block file from the resource identifiers of the first block file, the second block file, the third block file, the fourth block file and the fifth block file, 50, 100, 150, 200 and 80 can be added to obtain a total download time of 580; then, the server download times of the first block file, the second block file, the third block file, the fourth block file and the fifth block file are arranged in order from large to small. , the arrangement order is determined to be: the fourth block file (server download times 200), the third block file (server download times 150), the second block file (server download times 100), the fifth block file (server download times 80) and the first block file (server download times 50); then, the total download times 580 is multiplied by the download threshold 0.5 to obtain 290. Since the server download times 200 of the fourth block file are lower than 290, and the sum of the server download times of the fourth block file and the third block file is 350, which is greater than 290, the resource identifiers of the fourth block file and the third block file can be determined as the resource identifiers of the hot block files.
[0114] It should be noted that, through steps S201 and S202, the present invention can effectively determine the resource identifier of the hot block file from the resource identifiers of each block file, thereby ensuring the recognition accuracy of the hot block file, thereby further ensuring the equipment utilization, bandwidth utilization and resource utilization after the edge server deploys the hot block file.
[0115] The resource deployment method proposed in this embodiment can effectively determine the resource identifier of the hot block file from the resource identifiers of each block file, ensure the recognition accuracy of the hot block file, and further ensure the equipment utilization, bandwidth utilization and resource utilization after the edge server deploys the hot block file.
[0116] This embodiment proposes a fourth resource deployment method. In this method, the above step S1043 may include:
[0117] S301, obtaining the download information of the target hot block file within the historical cycle duration; the historical cycle duration is continuous with the target cycle duration;
[0118] S302: Determine the flow growth rate of the target hot block file based on the download information of the target hot block file in the historical cycle duration and the target cycle duration.
[0119] Optionally, the historical cycle duration may be a cycle duration that is adjacent to the target cycle duration and is located in a cycle before the target cycle duration.
[0120] It should be noted that the present invention can determine the traffic growth rate of the target hot block file in the target cycle duration based on the downloaded information of the target hot block file in the historical cycle duration and the target cycle duration, so as to improve the accuracy of the traffic growth rate, thereby improving the equipment utilization, bandwidth utilization and resource utilization after the edge server deploys the hot block file.
[0121] Specifically, the present invention can determine the flow growth rate of the target hot block file according to the following formula (4):
[0122]
[0123] Among them, M1 is the number of times the target hot block file is downloaded by the central server within the previous cycle length of the target cycle length; H1 is the number of times the target hot block file is downloaded by the edge server within the target cycle length.
[0124] It is understandable that if P is 0, the present invention may not need to perform incremental replica deployment for hot block files, and the incremental replica deployment may be 0 at this time.
[0125] The resource deployment method proposed in this embodiment can determine the traffic growth rate of the target hot block file in the target cycle duration based on the downloaded information of the target hot block file in the historical cycle duration and the target cycle duration, so as to improve the accuracy of the traffic growth rate, thereby improving the equipment utilization, bandwidth utilization and resource utilization after the edge server deploys the hot block file.
[0126] and Figure 1 The method shown corresponds to Figure 4 As shown, this embodiment proposes a resource deployment device. The device may include: a first obtaining unit 101, a first determining unit 102, a second obtaining unit 103 and a predicting unit 104; wherein:
[0127] The first obtaining unit 101 is used to obtain the block file download information of at least one client node, where the block file download information of each client node includes the resource identifier of each block file downloaded by the client node within the target period, and the resource identifier of each block file includes a source server identifier and a file identifier;
[0128] A first determining unit 102 is configured to determine a resource identifier of at least one hot block file from resource identifiers of each block file based on the block file download information of each client node;
[0129] The second obtaining unit 103 is used to obtain the download information of each hot block file within the target period from the block file download information of each client node, and the download information includes the number of downloads from the central server and the number of downloads from the edge server;
[0130] The estimation unit 104 is configured to estimate the replica deployment increment of the next cycle duration corresponding to each hot block file based on the downloaded information of each hot block file within the target cycle duration.
[0131] It should be noted that the specific processing processes of the first obtaining unit 101, the first determining unit 102, the second obtaining unit 103 and the estimating unit 104 and the technical effects thereof can be referred to in the embodiments of the present invention. Figure 1 The relevant descriptions of steps S101 to S104 are not repeated here.
[0132] Optionally, the first determining unit 102 includes: a counting unit and a second determining unit;
[0133] A statistical unit, for respectively calculating the download information of each block file within a target period based on the block file download information of each client node;
[0134] The second determining unit is used to determine the resource identifier of each hot block file from the resource identifiers of each block file based on the downloaded information of each block file within the target period.
[0135] Optionally, the second determining unit includes: a calculating unit, a third determining unit, a sorting unit and a fourth determining unit; wherein:
[0136] A calculation unit, configured to calculate the server download times of each block file based on the download information of each block file within the target cycle time, where the server download times are the sum of the central server download times and the edge server download times;
[0137] A third determining unit, configured to determine the sum of the server download times of each block file as the total download times;
[0138] A sorting unit, used to sort the server download times of each block file in descending order of the server download times;
[0139] The fourth determination unit is used to determine the resource identifier of each block file whose server download count is not greater than i as the resource identifier of the hot block file; wherein the sum of the server download counts of each block file whose server download count is not greater than i is N, the sum of the server download counts of each block file whose server download count is not greater than j is M, the value obtained by subtracting j from i is 1, N is not less than the download threshold, M is less than the download threshold, and the download threshold is the product of the total download count and a predefined coefficient.
[0140] Optionally, the prediction unit 104 includes: a fifth determination unit, an estimation unit, a sixth determination unit and a seventh determination unit; wherein:
[0141] A fifth determining unit, configured to determine the downloaded information of a hot block file within a target period as the downloaded information of a target hot block file within a target period;
[0142] An estimation unit, used to estimate the number of downloads of the target hot block file by the central server in the next cycle and the download rate of the target hot block file by the edge server in the target cycle based on the downloaded information of the target hot block file in the target cycle;
[0143] A sixth determining unit, configured to determine a flow rate growth rate of a target hot block file;
[0144] The seventh determination unit is used to determine the replica deployment increment corresponding to the next cycle length of the target hot block file based on the number of downloads of the target hot block file by the central server in the next cycle length, the edge server download rate of the target hot block file in the target cycle, and the traffic growth rate of the target hot block file, and trigger the fifth determination unit until the replica deployment increment corresponding to the next cycle length of each hot block file is determined.
[0145] Optionally, the sixth determining unit includes: a third obtaining unit and an eighth determining unit; wherein:
[0146] The third obtaining unit is used to obtain the download information of the target hot block file within the historical cycle duration; the historical cycle duration is continuous with the target cycle duration;
[0147] The eighth determination unit is used to determine the flow growth rate of the target hot block file based on the downloaded information of the target hot block file in the historical cycle duration and the target cycle duration.
[0148] The resource deployment device proposed in this embodiment can obtain the block file download information of at least one client node, and the block file download information of each client node includes the resource identifier of each block file downloaded by the client node within the target cycle duration, and the resource identifier of each block file includes the source server identifier and the file identifier; based on the block file download information of each client node, the resource identifier of at least one hot block file is determined from the resource identifier of each block file; from the block file download information of each client node, the downloaded information of each hot block file within the target cycle duration is obtained respectively, and the downloaded information includes the number of downloads from the central server and the number of downloads from the edge server; based on the downloaded information of each hot block file within the target cycle duration, the replica deployment increment corresponding to each hot block file for the next cycle duration is estimated. The present invention can utilize the block file download information of each client node to determine the resource identifier of at least one hot block file, and then determine the replica deployment increment of each hot block file in the next cycle length based on the downloaded information of each hot block file, so as to effectively ensure the equipment utilization rate, bandwidth utilization rate and resource utilization rate after the edge server deploys the hot block file, avoid excessive resource consumption caused by too many edge servers or too many hot block files deployed, and low equipment utilization rate, bandwidth utilization rate and resource utilization rate, and avoid the problem of insufficient edge servers or a small number of hot block files deployed to meet the needs of terminal users.
[0149] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0150] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
Claims
1. A resource deployment method, characterized in that: include: Obtaining block file download information of at least one client node, wherein the block file download information of each client node includes resource identifiers of each block file downloaded by the client node within a target period, and the resource identifiers of each block file include a source server identifier and a file identifier; Based on the block file download information of each of the client nodes, determining a resource identifier of at least one hot block file from the resource identifiers of each of the block files; From the block file download information of each client node, respectively obtain the download information of each hot block file within the target cycle time, the download information including the number of downloads from the central server and the number of downloads from the edge server; Determine the downloaded information of one of the hot block files within the target cycle duration as the downloaded information of the target hot block file within the target cycle duration; Based on the downloaded information of the target hot segmented file within the target cycle duration, estimate the number of downloads of the target hot segmented file by the central server in the next cycle duration and the download rate of the target hot segmented file by the edge server in the target cycle; Determine the flow growth rate of the target hot block file; Determine a replica deployment increment for the next cycle duration corresponding to the target hot block file based on the number of downloads of the target hot block file by the central server for the next cycle duration, the download rate of the target hot block file by the edge server within the target cycle, and the traffic growth rate of the target hot block file; Return to the step of determining the downloaded information of one of the hot block files within the target cycle duration as the downloaded information of the target hot block file within the target cycle duration, until the replica deployment increment of the next cycle duration corresponding to each of the hot block files is determined.
2. The resource deployment method according to claim 1, characterized in that: The step of determining the resource identifier of at least one hot block file from the resource identifiers of the block files based on the block file download information of each client node includes: Based on the block file download information of each client node, respectively counting the download information of each block file within the target period; Based on the downloaded information of each of the block files within the target period duration, the resource identifier of each of the hot block files is determined from the resource identifiers of each of the block files.
3. The resource deployment method according to claim 2, characterized in that: The step of determining the resource identifier of each of the hot block files from the resource identifiers of each of the block files based on the downloaded information of each of the block files within the target cycle duration includes: Based on the downloaded information of each of the block files within the target period, the server download times of each of the block files are calculated respectively, where the server download times are the sum of the central server download times and the edge server download times; Determine the sum of the server download times of each of the block files as the total download times; The server download times of each of the block files are sorted in descending order according to the server download times, and the server download times are arranged in a sequence number not greater than i The resource identifiers of the respective block files are determined as the resource identifiers of the hot block files; Among them, the arrangement number is not greater than the i The sum of the server download times of each of the block files is N, and the arrangement sequence number is not greater than j The sum of the server download times of each of the block files is M, i Subtract the j The obtained value is 1, the N is not less than the download threshold, the M is less than the download threshold, and the download threshold is the product of the total number of downloads and a predefined coefficient.
4. The resource deployment method according to claim 1, characterized in that: The determining the flow rate growth rate of the target hot block file includes: Obtaining the download information of the target hot block file within a historical cycle duration; the historical cycle duration is continuous with the target cycle duration; The flow growth rate of the target hot block file is determined based on the downloaded information of the target hot block file in the historical period duration and the target period duration respectively.
5. A resource deployment device, characterized in that: include: A first obtaining unit, a first determining unit, a second obtaining unit and a predicting unit; wherein: The first obtaining unit is used to obtain the block file download information of at least one client node, the block file download information of each client node includes the resource identifier of each block file downloaded by the client node within the target period, and the resource identifier of each block file includes a source server identifier and a file identifier; The first determining unit is configured to determine a resource identifier of at least one hot block file from resource identifiers of each of the block files based on the block file download information of each of the client nodes; The second obtaining unit is used to obtain the download information of each of the hot block files within the target period from the block file download information of each of the client nodes, wherein the download information includes the number of downloads from the central server and the number of downloads from the edge server; The estimation unit is used to estimate the replica deployment increment of the next cycle duration corresponding to each of the hot block files based on the downloaded information of each of the hot block files within the target cycle duration; The prediction unit includes: a fifth determination unit, an estimation unit, a sixth determination unit and a seventh determination unit; wherein: The fifth determining unit is used to determine the downloaded information of one of the hot block files within the target cycle duration as the downloaded information of the target hot block file within the target cycle duration; The estimation unit is used to estimate the number of downloads of the target hot block file in the central server in the next cycle duration and the download rate of the target hot block file in the edge server in the target cycle based on the downloaded information of the target hot block file in the target cycle duration; The sixth determining unit is used to determine the flow rate growth rate of the target hot block file; The seventh determination unit is used to determine the replica deployment increment for the next cycle duration corresponding to the target hot block file based on the number of downloads of the target hot block file from the central server for the next cycle duration, the download rate of the target hot block file from the edge server within the target cycle, and the traffic growth rate of the target hot block file, and trigger the fifth determination unit until the replica deployment increment for the next cycle duration corresponding to each of the hot block files is determined.
6. The resource deployment device according to claim 5, characterized in that: The first determining unit includes: a statistical unit and a second determining unit; The statistical unit is used to count the download information of each of the block files within the target period based on the block file download information of each of the client nodes; The second determining unit is configured to determine the resource identifier of each of the hot block files from the resource identifiers of each of the block files based on the downloaded information of each of the block files within the target period.
7. The resource deployment device according to claim 6, characterized in that: The second determining unit includes: a calculation unit, a third determining unit, a sorting unit and a fourth determining unit; wherein: The calculation unit is used to calculate the server download times of each of the block files based on the download information of each of the block files within the target cycle time, where the server download times are the sum of the central server download times and the edge server download times; The third determining unit is used to determine the sum of the server download times of each of the block files as the total download times; The sorting unit is used to sort the server download times of each of the block files in descending order of the server download times; The fourth determining unit is used to arrange the server download times to be no greater than i The resource identifiers of the block files are all determined as the resource identifiers of the hot block files; wherein the arrangement sequence number is not greater than the i The sum of the server download times of each of the block files is N, and the arrangement sequence number is not greater than j The sum of the server download times of each of the block files is M, i Subtract the j The obtained value is 1, the N is not less than the download threshold, the M is less than the download threshold, and the download threshold is the product of the total number of downloads and a predefined coefficient.
8. The resource deployment device according to claim 5, characterized in that: The sixth determining unit includes: a third obtaining unit and an eighth determining unit; wherein: The third obtaining unit is used to obtain the download information of the target hot block file within a historical cycle duration; the historical cycle duration is continuous with the target cycle duration; The eighth determination unit is configured to determine the flow rate growth rate of the target hot block file based on the downloaded information of the target hot block file in the historical cycle duration and the target cycle duration respectively.
Citation Information
Patent Citations
Method, device and system for supplementing resource heat
CN105791427A