File pre-distribution method and device, computer equipment and storage medium

By combining multiple aggregation algorithms to process file access information, generate and fuse aggregate data to determine the file pre-distribution list, the problem that a single algorithm in the prior art is difficult to meet the file pre-distribution in different scenarios is solved, and a more general and efficient file pre-distribution method is realized.

CN120067052APending Publication Date: 2025-05-30BEIJING KINGSOFT CLOUD NETWORK TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311607041.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-28
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

The existing file pre-distribution method relies on a single algorithm to allocate popular files to edge nodes, which is difficult to meet the file pre-distribution requirements in different scenarios.

Method used

By obtaining file access information within the preset time period and multiple preset aggregation algorithms corresponding to each resource file, the access parameters of the resource file are aggregated separately, aggregated data under different preset aggregation algorithms are generated, and these data are fused to determine the file predistribution list. Finally, the resource file is distributed to the corresponding target node according to the number to be distributed in the predistribution list.

Benefits of technology

It realizes more comprehensive and accurate file pre-distribution results, improves the universality of file pre-distribution methods, and can meet file pre-distribution requirements in different scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120067052A_ABST
    Figure CN120067052A_ABST
Patent Text Reader

Abstract

The invention relates to a file pre-distribution method and device, computer equipment and a storage medium. The method comprises the following steps: acquiring file access information in a preset time period and a plurality of preset aggregation algorithms corresponding to each resource file, and performing aggregation processing on access parameters of the resource files by adopting the plurality of preset aggregation algorithms corresponding to the resource files to obtain aggregation data corresponding to different preset aggregation algorithms, and fusing the aggregation data corresponding to different preset aggregation algorithms, determining a file pre-distribution list based on a fusion result, and issuing the resource files to a target node according to a to-be-distributed number in the file pre-distribution list, thereby completing pre-distribution of the resource files to edge nodes. Based on the method, multiple aggregation algorithms are combined in the file pre-distribution process to allocate the resource files for the edge nodes, a more comprehensive and more accurate pre-distribution result can be obtained, and therefore the file pre-distribution requirements in different scenes can be met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular, to a method, device, computer device, and storage medium for file pre-distribution. Background Art

[0002] With the development of the Internet, more and more users use the Internet to obtain the required files. In order to quickly respond to the file access requests of a large number of users, edge nodes in the content distribution network are used to provide file request services for users. However, before the edge nodes provide file request services for users, it is necessary to download the files to the edge nodes in advance, so that when users access the edge nodes, the files can be directly returned without having to re-request the files required by the users from the source, thereby improving the request response speed and reducing the occupancy rate of device resources when the edge nodes return to the source.

[0003] However, the existing file pre-distribution method allocates files to edge nodes according to a single algorithm, which is difficult to meet the pre-allocation requirements for files in different scenarios. Summary of the Invention

[0004] The present application provides a method, device, computer device, and storage medium for file pre-distribution to solve the problem that the existing file pre-distribution method of allocating popular files to edge nodes according to a single algorithm is difficult to meet the pre-allocation requirements for popular files in different scenarios.

[0005] In a first aspect, the present application provides a method for file pre-distribution, including:

[0006] Obtain file access information within a preset time period, where the file access information includes access parameters of multiple resource files;

[0007] Obtain multiple preset aggregation algorithms corresponding to each of the resource files;

[0008] Respectively perform aggregation processing on the access parameters of the resource files according to each preset aggregation algorithm corresponding to the resource files to generate aggregation data of the target access parameter under different preset aggregation algorithms, where the target access parameter is any one of the access parameters of the resource file;

[0009] Based on the fusion result of the multiple aggregation data corresponding to the resource files, determine a file pre-distribution list, where the file pre-distribution list includes the quantity of the resource files to be distributed and the target nodes to receive the resource files, and the target nodes are any edge nodes;

[0010] Distribute the resource files to the corresponding number of the target nodes according to the quantity to be distributed in the file pre-distribution list.

[0011] Second aspect, the present application provides a file pre-distribution device, the device includes:

[0012] An information acquisition module, configured to acquire file access information within a preset time period, where the file access information includes access parameters of a plurality of resource files;

[0013] An algorithm acquisition module, configured to acquire a plurality of preset aggregation algorithms corresponding to each of the resource files;

[0014] A data aggregation module, configured to respectively perform aggregation processing on the access parameters of the resource files according to each preset aggregation algorithm corresponding to the resource files, and generate aggregation data of the target access parameter under different preset aggregation algorithms, where the target access parameter is any one of the access parameters of the resource files;

[0015] A list generation module, configured to determine a file pre-distribution list based on a fusion result of a plurality of aggregation data corresponding to the resource files, where the file pre-distribution list includes the number of resource files to be distributed and target nodes to receive the resource files, and the target nodes are any edge nodes;

[0016] A file distribution module, configured to distribute the resource files to the corresponding number of target nodes according to the number of resource files to be distributed in the file pre-distribution list.

[0017] Third aspect, the present application provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where when the processor executes the computer program, the steps of the above file pre-distribution method are implemented.

[0018] Fourth aspect, the present application further provides a computer storage medium, storing computer executable instructions, where the computer executable instructions are used to execute the above file pre-distribution method.

[0019] The above technical solutions provided by the embodiments of the present application have the following advantages compared with the prior art: For the method provided by the embodiments of the present application, file access information within a preset time period and multiple preset aggregation algorithms corresponding to each resource file are obtained. The access parameters of the resource files are respectively aggregated by the multiple preset aggregation algorithms corresponding to the resource files to obtain aggregation data corresponding to different preset aggregation algorithms. Then, the aggregation data corresponding to different preset aggregation algorithms are fused, and a file pre-distribution list is determined based on the fusion result. The file pre-distribution list includes the number of resource files to be distributed and the target nodes for receiving the resource files to be received. The target nodes include at least any one edge node. The resource files are distributed to the target nodes according to the number of resource files to be distributed in the file pre-distribution list, thereby completing the pre-distribution of the resource files to the edge nodes. Based on the above method, multiple aggregation algorithms are combined in the file pre-distribution process to allocate resource files to edge nodes, and a more comprehensive and accurate pre-distribution result can be obtained. Furthermore, the generality of the file pre-distribution method can be improved, so as to meet the file pre-allocation requirements in different scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The accompanying drawings herein are incorporated into the specification and form a part of the specification, showing embodiments consistent with the present invention and used together with the specification to explain the principles of the present invention.

[0021] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the accompanying drawings required for use in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, other drawings can also be obtained based on these drawings without creative efforts.

[0022] One or more embodiments are exemplarily illustrated by the pictures in the corresponding accompanying drawings. These exemplary illustrations do not limit the embodiments. Elements with the same reference numerals in the drawings are represented as similar elements, unless otherwise stated, and the drawings in the figures do not constitute a proportional limitation.

[0023] Figure 1 It is an application environment diagram of a file pre-distribution method provided by the embodiments of the present application;

[0024] Figure 2 It is a flowchart of a file pre-distribution method provided by the embodiments of the present application;

[0025] Figure 3 It is a flowchart of a file pre-distribution method provided by the embodiments of the present application;

[0026] Figure 4 It is a flowchart of a file pre-distribution method provided by the embodiments of the present application;

[0027] Figure 5 Schematic flowchart of a file pre - distribution method provided by an embodiment of the present application;

[0028] Figure 6 Effect diagram of time - series statistics of the number of file accesses provided by an embodiment of the present application;

[0029] Figure 7 Effect diagram of time - series statistics of the number of file accesses provided by an embodiment of the present application;

[0030] Figure 8 Schematic flowchart of a file pre - distribution method provided by an embodiment of the present application;

[0031] Figure 9 Schematic flowchart of a file pre - distribution method provided by an embodiment of the present application;

[0032] Figure 10 Schematic flowchart of a file pre - distribution method provided by an embodiment of the present application;

[0033] Figure 11 Block diagram of the structure of a file pre - distribution device provided by an embodiment of the present application;

[0034] Figure 12 Internal structure diagram of a computer device provided by an embodiment of the present application. Detailed implementation manners

[0035] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Apparently, the described embodiments are some, but not all, of the embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the protection scope of the present application.

[0036] The following disclosure provides many different embodiments or examples for implementing different structures of the present invention. To simplify the disclosure of the present invention, components and settings of specific examples are described below. Of course, they are merely examples and are not intended to limit the present invention. In addition, the present invention may repeat reference numerals and / or letters in different examples. This repetition is for the purpose of simplification and clarity and does not in itself indicate the relationship between the various embodiments and / or settings discussed.

[0037] Figure 1 Application environment diagram of the file pre - distribution method in one embodiment. Refer to Figure 1, the file pre-distribution method is applied to a file pre-distribution system. The file pre-distribution system includes a client 110, an edge node 120, and a node server 130 that are communicatively connected to each other. The client 110 can be specifically implemented by a terminal, and the terminal can be specifically a desktop terminal or a mobile terminal. The mobile terminal can be specifically at least one of a mobile phone, a tablet computer, a laptop computer, etc. The edge node 120 can be specifically a CDN node or a home node (ECN, Edge Content Network). The home node is a router or a set-top box, etc., provided by an ordinary user's home using idle bandwidth to provide a download service. The CDN node is a node in a content distribution network. The CDN node refers to a network node with fewer intermediate links from the final user access, having better response capabilities and connection speeds to the finally accessed users. The CDN node can be used as a cache server to provide data services. The node server 130 can be implemented by an independent server or a server cluster composed of multiple servers. The node server 130 specifically includes an ECN scheduling system and a file pre-distribution device.

[0038] Referring to Figure 1 , the scheduling process of the client 110 for the resource file includes:

[0039] 1. The user requests to obtain the resource file from the CDN node through the client 110;

[0040] 2. The CDN node determines that the user can use the ECN node and then requests the address information of the available ECN node from the ECN scheduling system;

[0041] 3. The ECN scheduling system searches for and allocates the address information of a suitable ECN node and returns it to the CDN node;

[0042] 4. The CDN node redirects the client 110 to the ECN node in the way of HTTP 302 according to the address information of the ECN node;

[0043] 5. The client 110 reconnects to the ECN node to download the required resource file.

[0044] Referring to Figure 1 , the file pre-distribution process includes:

[0045] 6. The ECN scheduling system pushes the file access information to the file pre-distribution device;

[0046] 7. The ECN node regularly obtains the file download list from the file pre-distribution device and downloads each resource file in the file download list to the ECN node for storage;

[0047] 8. After the ECN node finishes downloading the resource file, it reports the newly added file data to the ECN scheduling system to inform the ECN scheduling system of the storage status of the resource file on the ECN node.

[0048] In one embodiment, Figure 2 is a schematic flowchart of a file pre-distribution method in one embodiment. Referring to Figure 2 , a file pre-distribution method is provided. In this embodiment, the method is mainly illustrated by applying it to the file pre-distribution device in the node server 130 above. The file pre-distribution method specifically includes the following steps: Figure 1 The file pre-distribution method specifically includes the following steps:

[0049] Step S210, obtain file access information within a preset time period, where the file access information includes access parameters of multiple resource files.

[0050] Specifically, the preset time period can be custom-set according to the actual application scenario, such as 1 hour, 5 hours, one day, one week, one month, etc. File access information from multiple different data sources can be obtained. The file access information includes access parameters such as the file identifier of the resource file, the access time, the access source identifier (IP), the access status, the number of accesses, and the access bandwidth. The access status is used to indicate whether the call to the resource file is successful, and the access status is either access successful or access failed.

[0051] Step S220, obtain multiple preset aggregation algorithms corresponding to each of the resource files.

[0052] Specifically, obtain multiple preset aggregation algorithms that are pre-configured for each resource file in advance from the background configuration. The preset aggregation algorithms include at least one logical operation such as summation, cumulative count, average, median, variance, etc. Different resource files can correspond to the same or different preset aggregation algorithms.

[0053] Step S230, respectively perform aggregation processing on the access parameters of the resource file according to each preset aggregation algorithm corresponding to the resource file to generate aggregation data of the target access parameter under different preset aggregation algorithms, where the target access parameter is any one of the access parameters of the resource file.

[0054] Specifically, when the access parameters of the same resource file are aggregated and calculated according to different preset aggregation algorithms, aggregation data corresponding to different preset aggregation algorithms will be obtained. By using multiple different preset aggregation algorithms to perform aggregation processing on the access parameters of the same resource file, the analysis dimension of the access parameters is increased, and the comprehensiveness and accuracy of the analysis of the access parameters are improved.

[0055] Step S240: Determine a file pre-distribution list based on the fusion result of multiple aggregation data corresponding to the resource file. The file pre-distribution list includes the quantity of the resource file to be distributed and the target nodes to receive the resource file, where the target nodes are any edge nodes 120.

[0056] Specifically, aggregating the aggregation data obtained for the same resource file under different preset aggregation algorithms, and determining the quantity of the resource file to be distributed and the target nodes to receive the resource file based on the fusion result includes more information about the access parameters, improving the comprehensiveness and accuracy of the analysis of the access parameters. In this embodiment, the edge node 120 is an ECN node.

[0057] Step S250: Distribute the resource file to the corresponding quantity of the target nodes according to the quantity of the resource file to be distributed in the file pre-distribution list.

[0058] Specifically, the quantity of the resource file to be distributed is equal to the number of the target nodes, that is, each target node is used to receive one resource file. Distribute the resource file to the target nodes with the quantity to be distributed according to the file pre-distribution list, and let the target nodes download and obtain the resource file, so as to complete the pre-distribution of the resource file, so that the target nodes can directly provide the access service of the resource file for the client 110 in the future, without the need to request the file required by the user through the origin. Compared with allocating resource files to the edge nodes 120 under a single algorithm, combining multiple aggregation algorithms to allocate resource files to the edge nodes 120 in the file pre-distribution process can obtain a more comprehensive and accurate pre-distribution result, and further improve the generality of this file pre-distribution method, so as to meet the requirements for file pre-allocation in different scenarios.

[0059] In one embodiment, as Figure 3 shown, the aggregating the access parameters of the resource file respectively according to the respective preset aggregation algorithms corresponding to the resource file to generate the aggregation data of the target access parameters under different preset aggregation algorithms includes:

[0060] Step S231: Aggregate the target access parameters respectively according to different preset aggregation algorithms corresponding to the target access parameters of the resource file to generate the aggregation data of the target access parameters under different preset aggregation algorithms, where the target access parameter is any access parameter of the resource file; or,

[0061] Step S232: Aggregate the corresponding access parameters respectively according to the preset aggregation algorithms corresponding to the different access parameters of the resource file to generate the aggregation data of the different access parameters of the resource file under the corresponding preset aggregation algorithms.

[0062] Specifically, aggregating the target access parameters according to different preset aggregation algorithms corresponding to the target access parameters of the resource file means that different preset aggregation algorithms are pre-configured for the same access parameter of the resource file. The same access parameter is respectively aggregated using different preset aggregation algorithms to obtain the aggregated data of the access parameter under different preset aggregation algorithms. Aggregating the same access parameter using multiple different aggregation algorithms and then using the aggregated data obtained in this aggregation method for data fusion can improve the aggregation accuracy of the same access parameter.

[0063] Aggregating the corresponding access parameters according to the preset aggregation algorithms respectively corresponding to different access parameters of the resource file means that a preset aggregation algorithm is pre-configured for each different access parameter of the resource file. Each access parameter of the resource file is respectively aggregated using the preset aggregation algorithm corresponding to each access parameter to obtain the aggregated data of different access parameters of the resource file processed according to their respective corresponding preset aggregation algorithms. Formulating corresponding preset aggregation algorithms for different access parameters and aggregating according to the preset aggregation algorithms corresponding to each access parameter to meet the personalized aggregation requirements of each access parameter. Then using the aggregated data obtained in this aggregation method for data fusion can increase the analysis dimension of the access situation of the resource file, thereby improving the comprehensiveness and accuracy of the analysis of the access situation of the resource file.

[0064] In one embodiment, as Figure 4 shown, the step of respectively aggregating the corresponding access parameters according to the preset aggregation algorithms respectively corresponding to different access parameters of the resource file to generate the aggregated data of different access parameters of the resource file under the corresponding preset aggregation algorithms includes:

[0065] Step S2321: Aggregating the access times according to the preset aggregation algorithm corresponding to the access times of the resource file to obtain the aggregated data corresponding to the access times of the resource file;

[0066] Step S2322: Aggregating the access bandwidth according to the preset aggregation algorithm corresponding to the access bandwidth of the resource file to obtain the aggregated data corresponding to the access bandwidth of the resource file, where the access parameter is the access times or the access bandwidth.

[0067] Specifically, the access parameter is specifically the number of accesses or the access bandwidth. Therefore, aggregating and processing are respectively performed according to the preset aggregation algorithms corresponding to the different access parameters of the resource files, including aggregating and processing according to the preset aggregation algorithm corresponding to the number of accesses of the resource file, and aggregating and processing according to the preset aggregation algorithm corresponding to the access bandwidth of the resource file. The aggregation processes for the number of accesses and the access bandwidth do not have a sequential execution order, that is, the aggregation and processing can be first performed according to the preset aggregation algorithm corresponding to the number of accesses of the resource file, or the aggregation and processing can be first performed according to the preset aggregation algorithm corresponding to the access bandwidth of the resource file.

[0068] The aggregation data corresponding to the number of accesses of the resource file can reflect the access persistence, access stability, and access popularity of the resource file, while the aggregation data corresponding to the access bandwidth of the resource file can reflect the bandwidth occupancy rate, bandwidth occupancy frequency, etc. of the resource file, and the access frequency of the resource file can also be reflected by the bandwidth occupancy frequency. By fusing the aggregation data of the number of accesses and the aggregation data of the access bandwidth, the access situation of the resource file can be understood more accurately, so as to accurately control the number of resource files to be distributed subsequently according to the accurate access situation, avoiding waste of bandwidth resources caused by too many resource files to be distributed, or the client 110 being unable to obtain the resource file in time by accessing the edge node 120 due to too few resource files to be distributed.

[0069] In one embodiment, as Figure 5 shown, aggregating and processing the number of accesses according to the preset aggregation algorithm corresponding to the number of accesses of the resource file to obtain the aggregation data corresponding to the number of accesses of the resource file, that is, step S2321 includes:

[0070] Step S23211, determining the access persistence of each resource file based on the number of accesses of each resource file in each time window within a preset time period in the file access information;

[0071] Step S23212, sorting in descending order according to the access persistence all the resource files with an access persistence greater than or equal to the preset persistence to generate a list of popular files;

[0072] Step S23213, determining the access variance, average access number of each popular file, and the time difference between the access moment when the access number of each popular file is at a peak and the current moment based on the number of accesses of each resource file in each time window within a preset time period in the list of popular files, where the popular file is any one of the resource files in the list of popular files;

[0073] Step S23214: Aggregate the average access times of the popular files in sequence according to the first aggregation method corresponding to the access variance of the popular files and the second aggregation method corresponding to the time difference, to obtain the aggregated data corresponding to the access times of the popular files.

[0074] Specifically, as Figure 6 shown, if the popular file list is determined only by sorting the total access times of each resource file within a preset time period, when the access times (Req) of most resource files are the same or close within the preset time period, it is impossible to distinguish the popular files. For example: The file list sorted in descending order of the total access times is {file 1 , file 2 ,..., file m ,..., file n}, and its corresponding total access time sequence is {pv 1 , pv 2 ,..., pv m ,..., pv n}. Starting from file m , the access times corresponding to the access are 1. Since the list is sorted, the access times from pv m to pv n are all 1. Since 1 access is already the minimum access time, it is impossible to distinguish the popularity from file m to file n . If file m to file n occupy most of the files, it will cause the file pre-distribution to not be implemented properly.

[0075] To accurately screen out the popular files, the preset time period is equally divided into multiple time windows, as Figure 7As shown in the figure, the number of time windows within a preset time period is denoted as N. The file access information also includes the number of accesses to each resource file within each time window in the preset time period. Based on the number of accesses to each resource file within each time window in the preset time period, the access status of each resource file within each time window is determined. If the number of accesses to a resource file within a time window is 0, it is determined that the access status of the resource file within that time window is not accessed, and this access status is denoted as 0; if the number of accesses to a resource file within a time window is not 0, it is determined that the access status of the resource file within that time window is accessed, and this access status is denoted as 1. In this way, the number of resource files with an access status of accessed within each time window (equivalent to the number with an access status of 1) is counted. The ratio between the number of resource files with an access status of accessed within each time window and the number of time windows is determined as the access duration of the resource file. The access duration is used to reflect the persistence of access to the resource file. The greater the access duration of the resource file, the greater the access demand for the resource file and the higher the access popularity; the smaller the access duration of the resource file, the smaller the access demand for the resource file and the lower the access popularity.

[0076] Based on the resource files with an access duration greater than or equal to the preset duration, they are sorted in descending order. The resource files with an access duration less than the preset duration are cold files and do not need to be pre-distributed. Therefore, the aggregated data corresponding to the number of accesses to the resource files with an access duration less than the preset duration is empty data, and this empty data can continue to be fused with the aggregated data corresponding to the access bandwidth of the same resource file, which is equivalent to determining the file to-be-distributed list only based on the aggregated data corresponding to the access bandwidth of the resource file.

[0077] After sorting the resource files with an access duration greater than or equal to the preset duration in descending order, a list of popular files is formed. Each resource file in the list of popular files is regarded as a popular file. Then, according to the number of accesses to each popular file within each time window in the preset time period, the access variance, average number of accesses, and the time difference between the access moment when the access number of the popular file reaches the peak and the current moment of each popular file are calculated. The access variance is used to reflect the stability of access to the popular file within the preset time period. The greater the access variance, the worse the access stability of the popular file, and the first aggregation method corresponding to the access variance is to weaken the average number of accesses, and the greater the weakening intensity; the smaller the access variance, the better the access stability of the popular file, and the first aggregation method corresponding to the access variance is to weaken the average number of accesses, and the smaller the weakening intensity. The weakening intensity is determined by the weakening coefficient corresponding to the access variance value.

[0078] The larger the time difference between the access time when the number of accesses to a popular file reaches the peak within a preset time period and the current time, the more time the popular file has a low access volume within the preset time period, and the popular file has a low access volume in the time period close to the current time. To avoid the peak value from raising the average number of accesses, which in turn leads to a relatively large number of distribution quantities corresponding to the higher average number of accesses, resulting in waste of storage of the resource file and increased distribution bandwidth costs. That is, the above situation will lead to distortion in the statistics of the distribution quantity. Therefore, it is necessary to weaken the average number of accesses in this situation, so as to reduce the distribution quantity corresponding to the average number of accesses. That is, the second aggregation method corresponding to the time difference at this time is to weaken the average number of accesses, and the weakening strength is determined according to the weakening coefficient corresponding to the time difference value.

[0079] The smaller the time difference between the access time when the number of accesses to a popular file reaches the peak within a preset time period and the current time, the higher the access volume of the popular file in the time period close to the current time, indicating that the current popularity of the popular file is relatively high. To meet the access needs of most users for the popular file, the average number of accesses to the popular file is enhanced, so as to increase the distribution quantity corresponding to the average number of accesses, and to expand the coverage range of the popular file at the edge node 120. That is, the second aggregation method corresponding to the time difference at this time is to enhance the average number of accesses, and the enhancement strength is also determined according to the enhancement coefficient corresponding to the time difference value.

[0080] In one embodiment, as Figure 8 shown, determining the file pre-distribution list based on the fusion result of multiple aggregation data corresponding to the resource file includes:

[0081] Step S241, performing a fusion process on the multiple aggregation data corresponding to the resource file according to a preset fusion algorithm to obtain the fusion data corresponding to the resource file;

[0082] Step S242, performing a normalization process on the fusion data according to a preset normalization method to obtain the file pre-distribution list.

[0083] Specifically, the preset fusion algorithm includes at least one logical operation such as summation, cumulative count, average calculation, median calculation, variance calculation, etc. and at least one conditional function. The conditional function can specifically be a conditional judgment function (IF, IFS), conditional summation function, query function, interval calculation function, extraction function, remainder function, etc. The multiple aggregated data corresponding to the resource file are fused according to the preset fusion algorithm to obtain the fused data corresponding to the resource file, and then the fused data is normalized according to the preset normalization method, that is, the fused data is converted into the quantity to be distributed, and the target nodes of the resource file to be received are determined, so as to obtain the file pre-distribution list. Fusing the aggregated data obtained by multiple preset aggregation algorithms based on the preset fusion algorithm can increase the analysis dimension of the access situation of the resource file, thereby improving the comprehensiveness and accuracy of the analysis of the access situation of the resource file.

[0084] In one embodiment, as Figure 9 shown, the step of normalizing the fused data according to the preset normalization method to obtain the file pre-distribution list includes:

[0085] Step S2421, determining the product of the preset coefficient and the corresponding value of the fused data as the quantity to be distributed of the resource file;

[0086] Step S2422, splitting the quantity to be distributed according to the preset ratio corresponding to different node types to obtain the node quantities corresponding to different node types;

[0087] Step S2423, selecting the corresponding number of edge nodes 120 as the target nodes according to the node quantities corresponding to each node type;

[0088] Step S2424, forming the file pre-distribution list according to the quantity to be distributed of the resource file and the target nodes to receive the resource file.

[0089] Specifically, the preset coefficient can be a value greater than 1 or a value greater than 0 and less than 1. When the preset coefficient is greater than 1, the preset coefficient is used to amplify the corresponding value of the fused data; when the preset coefficient is greater than 0 and less than 1, the preset coefficient is used to reduce the corresponding value of the fused data. The product of the preset coefficient and the corresponding value of the fused data is determined as the quantity to be distributed of the resource file.

[0090] The quantity to be distributed is the total number of distributions of the resource file. For the edge nodes 120 of different node types, it is necessary to split the quantity to be distributed. Specifically, the quantity to be distributed is split according to the preset ratio of the node type. The node type specifically includes the node attribute type of the edge node 120 and the region type to which the edge node 120 belongs. The preset ratio of the node type is determined by the node weight corresponding to the node attribute type and the region weight. For example, the quantity to be distributed is 100, the region weight of area A is 0.2, the region weight of area B is 0.3, the region weight of area C is 0.5, the node weight of the D node attribute type is 0.6, and the node weight of the E node attribute type is 0.4. Therefore, the number of D-type edge nodes 120 in area A as target nodes is 0.2 * 0.6 * 100 = 12, the number of E-type edge nodes 120 in area A as target nodes is 0.2 * 0.4 * 100 = 8, the number of D-type edge nodes 120 in area B as target nodes is 0.3 * 0.6 * 100 = 18, the number of E-type edge nodes 120 in area B as target nodes is 0.3 * 0.4 * 100 = 12, the number of D-type edge nodes 120 in area C as target nodes is 0.5 * 0.6 * 100 = 30, and the number of E-type edge nodes 120 in area C as target nodes is 0.5 * 0.4 * 100 = 20. That is, the preset ratio is (0.2 * 0.6) : (0.2 * 0.4) : (0.3 * 0.6) : (0.3 * 0.4) : (0.5 * 0.6) : (0.5 * 0.4). Taking this as an example, the number of nodes corresponding to each node type can be obtained.

[0091] After determining the number of nodes corresponding to each node type, edge nodes 120 with the number of nodes under each node type can be randomly selected as target nodes, or edge nodes 120 with the number of nodes can be sequentially selected according to the descending order of the service capabilities of each edge node 120 under the same node type. The node parameters corresponding to the service capabilities include response speed, whether the running state is idle, available storage space, etc. According to the quantity to be distributed and multiple target nodes corresponding to the quantity to be distributed, a file pre-distribution list is formed, that is, each popular resource file corresponds to a file pre-distribution list.

[0092] In one embodiment, as Figure 10 shown, the distributing the resource file to the corresponding number of the target nodes according to the quantity to be distributed in the file pre-distribution list includes:

[0093] Step S251, actively distributing the resource file to the corresponding number of the target nodes according to the quantity to be distributed in the file pre-distribution list; or,

[0094] Step S252, when receiving the file download request of the target node regularly, form a file download list corresponding to the target node according to all the file pre-distribution lists related to the target node within a preset time period, and return the file download list to the target node, so that the target node downloads each resource file in the file download list.

[0095] Specifically, the file pre-distribution device can actively distribute resource files to the corresponding number of target nodes according to the number of files to be distributed in the file pre-distribution list, or after the target node actively sends a file download request to the file pre-distribution device, the file pre-distribution device then integrates all the file pre-distribution lists related to the target node within a preset time period into a file download list corresponding to the target node. That is, the file pre-distribution list related to the target node only indicates a popular file allocated to the target node, while all the file pre-distribution lists related to the target node can be used to know all the popular files that the target node needs to download. That is, the file download list contains all the popular files that the target node needs to download within a preset time period. The target node downloads the popular files in sequence according to the file download list, so as to realize that the target node regularly downloads the latest popular files allocated by the file pre-distribution device for it.

[0096] Figures 2 - 5 、 Figures 8 - 10 is a schematic flowchart of a file pre-distribution method in an embodiment. It should be understood that although Figures 2 - 5 、 Figures 8 - 10 the steps in the flowchart are shown in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, Figures 2 - 5 、 Figures 8 - 10 at least a part of the steps in

[0097] In an embodiment, as Figure 11 shown, a file pre-distribution device is provided, including:

[0098] An information acquisition module 310, configured to acquire file access information within a preset time period, where the file access information includes access parameters of multiple resource files;

[0099] An algorithm acquisition module 320, configured to acquire a plurality of preset aggregation algorithms corresponding to each of the resource files;

[0100] A data aggregation module 330, configured to perform aggregation processing on the access parameters of the resource files respectively according to each of the preset aggregation algorithms corresponding to the resource files, to generate aggregated data of the target access parameters under different preset aggregation algorithms, where the target access parameter is any one of the access parameters of the resource file;

[0101] A list generation module 340, configured to determine a file pre-distribution list based on a fusion result of a plurality of aggregated data corresponding to the resource files, where the file pre-distribution list includes the quantity of the resource files to be distributed and target nodes to receive the resource files, and the target nodes are any one of the edge nodes 120;

[0102] A file distribution module 350, configured to distribute the resource files to the corresponding quantity of the target nodes according to the quantity of the resource files to be distributed in the file pre-distribution list.

[0103] In one embodiment, the data aggregation module 330 is further configured to:

[0104] Perform aggregation processing on the target access parameter respectively according to different preset aggregation algorithms corresponding to the target access parameter of the resource file, to generate aggregated data of the target access parameter under different preset aggregation algorithms, where the target access parameter is any one of the access parameters of the resource file; or,

[0105] Perform aggregation processing on the corresponding access parameters respectively according to the preset aggregation algorithms corresponding to different access parameters of the resource file, to generate aggregated data of different access parameters of the resource file under the corresponding preset aggregation algorithms.

[0106] In one embodiment, the data aggregation module 330 is further configured to:

[0107] Perform aggregation processing on the access times according to the preset aggregation algorithm corresponding to the access times of the resource file, to obtain aggregated data corresponding to the access times of the resource file;

[0108] Perform aggregation processing on the access bandwidth according to the preset aggregation algorithm corresponding to the access bandwidth of the resource file, to obtain aggregated data corresponding to the access bandwidth of the resource file, where the access parameter is the access times or the access bandwidth.

[0109] In one embodiment, the data aggregation module 330 is further configured to:

[0110] Determine the access duration of each of the resource files based on the number of accesses of each of the resource files in each time window within a preset time period in the file access information;

[0111] Arrange in descending order of access duration each of the resource files with an access duration greater than or equal to a preset duration to generate a list of popular files;

[0112] Based on the number of accesses of each of the resource files in each time window within a preset time period in the list of popular files, determine the access variance, average number of accesses of each popular file, and the time difference between the access moment when the access number of each popular file is at a peak and the current moment, where the popular file is any one of the resource files in the list of popular files;

[0113] Successively perform aggregation processing on the average number of accesses of the popular files according to a first aggregation method corresponding to the access variance of the popular files and a second aggregation method corresponding to the time difference to obtain aggregation data corresponding to the number of accesses of the popular files.

[0114] In one embodiment, the list generation module 340 is further configured to:

[0115] Perform fusion processing on multiple aggregation data corresponding to the resource files according to a preset fusion algorithm to obtain fusion data corresponding to the resource files;

[0116] Perform standardization processing on the fusion data according to a preset standardization method to obtain the file pre-distribution list.

[0117] In one embodiment, the list generation module 340 is further configured to:

[0118] Determine the product of a preset coefficient and the corresponding value of the fusion data as the number of copies to be distributed of the resource file;

[0119] Split the number of copies to be distributed according to a preset ratio corresponding to different node types to obtain the number of nodes corresponding to different node types;

[0120] Select the corresponding number of edge nodes 120 as the target nodes according to the number of nodes corresponding to each node type;

[0121] Form the file pre-distribution list according to the number of copies to be distributed of the resource file and the target nodes to receive the resource file.

[0122] In one embodiment, the file distribution module 350 is further configured to:

[0123] Proactively distribute the resource files to the corresponding number of the target nodes according to the number of files to be distributed in the file pre-distribution list; or,

[0124] When periodically receiving a file download request from the target node, form a file download list corresponding to the target node according to all the file pre-distribution lists related to the target node within a preset time period, and return the file download list to the target node, so that the target node downloads each resource file in the file download list.

[0125] As Figure 12 shown, an embodiment of the present application provides a computer device, including a processor 711, a communication interface 712, a memory 713, and a communication bus 714. Among them, the processor 711, the communication interface 712, and the memory 713 complete communication with each other through the communication bus 714;

[0126] The memory 713 is used to store a computer program;

[0127] The processor 711, when executing the program stored on the memory 713, implements the file pre-distribution method provided by any one of the foregoing method embodiments.

[0128] Those skilled in the art can understand that Figure 12 the structure shown in

[0129] is only a block diagram of some structures related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements. Figure 12 In one embodiment, the file pre-distribution device provided by the present application can be implemented in the form of a computer program, and the computer program can run on a computer device as Figure 11 shown. Each program module constituting the file pre-distribution device can be stored in the memory of the computer device. For example,

[0130] Figure 12 the computer device shown in Figure 11The information acquisition module 310 in the file pre-distribution device shown executes to acquire file access information within a preset time period, where the file access information includes access parameters of multiple resource files. The computer device can execute, through the algorithm acquisition module 320, to acquire multiple preset aggregation algorithms corresponding to each of the resource files. The computer device can execute, through the data aggregation module 330, to perform aggregation processing on the access parameters of the resource files respectively according to each preset aggregation algorithm corresponding to the resource files, and generate aggregation data of the target access parameter under different preset aggregation algorithms, where the target access parameter is any one of the access parameters of the resource files. The computer device can execute, through the list generation module 340, to determine a file pre-distribution list based on the fusion result of the multiple aggregation data corresponding to the resource files, where the file pre-distribution list includes the number of resource files to be distributed and the target nodes to receive the resource files, and the target nodes are any edge nodes 120. The computer device can execute, through the file distribution module 350, to distribute the resource files to the corresponding number of the target nodes according to the number of resource files to be distributed in the file pre-distribution list.

[0131] An embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the file pre-distribution method provided in any one of the foregoing method embodiments.

[0132] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0133] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the essence of the above technical solution, or the part that contributes to the related technology, can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0134] It should be understood that the terms used herein are for the purpose of describing particular example embodiments only and are not intended to be limiting. Unless the context clearly dictates otherwise, the singular forms "a", "an", and "the" as used herein may also include the plural forms. The terms "comprising", "including", "containing", and "having" are inclusive and thus specify the presence of stated features, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, steps, operations, elements, components, and / or combinations thereof. The method steps, processes, and operations described herein are not to be construed as necessarily requiring their performance in the particular order described or illustrated, unless an execution order is explicitly stated. It should also be understood that additional or alternative steps may be used.

[0135] The above are only specific embodiments of the present invention, enabling those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be obvious to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to these embodiments shown herein, but rather to the broadest scope consistent with the principles and novel features claimed herein.

Claims

1. A file pre-distribution method, characterized in that, the method includes: obtaining file access information within a preset time period, where the file access information includes access parameters of multiple resource files; obtaining multiple preset aggregation algorithms corresponding to each of the resource files; respectively performing aggregation processing on the access parameters of the resource files according to each preset aggregation algorithm corresponding to the resource files to generate aggregation data of the target access parameter under different preset aggregation algorithms, where the target access parameter is any one of the access parameters of the resource file; determining a file pre-distribution list based on the fusion result of the multiple aggregation data corresponding to the resource files, where the file pre-distribution list includes the quantity of the resource files to be distributed and target nodes to receive the resource files, and the target nodes are any edge nodes; distributing the resource files to the corresponding quantity of the target nodes according to the quantity of the resource files to be distributed in the file pre-distribution list.

2. The method according to claim 1, characterized in that, the step of respectively performing aggregation processing on the access parameters of the resource files according to each preset aggregation algorithm corresponding to the resource files to generate aggregation data of the target access parameter under different preset aggregation algorithms includes: respectively performing aggregation processing on the target access parameter according to different preset aggregation algorithms corresponding to the target access parameter of the resource file to generate aggregation data of the target access parameter under different preset aggregation algorithms, where the target access parameter is any one of the access parameters of the resource file; or, respectively performing aggregation processing on the corresponding access parameters according to the preset aggregation algorithms corresponding to different access parameters of the resource file to generate aggregation data of different access parameters of the resource file under the corresponding preset aggregation algorithms.

3. The method according to claim 2, characterized in that, the step of respectively performing aggregation processing on the corresponding access parameters according to the preset aggregation algorithms corresponding to different access parameters of the resource file to generate aggregation data of different access parameters of the resource file under the corresponding preset aggregation algorithms includes: performing aggregation processing on the access times according to the preset aggregation algorithm corresponding to the access times of the resource file to obtain aggregation data corresponding to the access times of the resource file; performing aggregation processing on the access bandwidth according to the preset aggregation algorithm corresponding to the access bandwidth of the resource file to obtain aggregation data corresponding to the access bandwidth of the resource file, where the access parameter is the access time or the access bandwidth.

4. The method according to claim 3, characterized in that, the step of performing aggregation processing on the access times according to the preset aggregation algorithm corresponding to the access times of the resource file to obtain aggregation data corresponding to the access times of the resource file includes: determining the access duration of each of the resource files based on the access times of each of the resource files in each time window within the preset time period in the file access information; sorting in descending order the resource files with an access duration greater than or equal to a preset duration according to the access duration to generate a list of popular files; Based on the access times of each of the resource files in the popular file list within each time window during a preset time period, determine the access variance, average access times of each popular file, and the time difference between the access moment when the access times of each popular file reach the peak and the current moment, where the popular file is any one of the resource files in the popular file list; Sequentially perform aggregation processing on the average access times of the popular files according to the first aggregation method corresponding to the access variance of the popular files and the second aggregation method corresponding to the time difference, to obtain the aggregated data corresponding to the access times of the popular files.

5. The method according to claim 1, characterized in that, the determining the file pre-distribution list based on the fusion result of the multiple aggregated data corresponding to the resource file includes: Performing fusion processing on the multiple aggregated data corresponding to the resource file according to a preset fusion algorithm to obtain the fused data corresponding to the resource file; Performing standardization processing on the fused data according to a preset standardization method to obtain the file pre-distribution list.

6. The method according to claim 5, characterized in that, the performing standardization processing on the fused data according to a preset standardization method to obtain the file pre-distribution list includes: Determining the quantity to be distributed of the resource file as the product of a preset coefficient and the corresponding value of the fused data; Splitting the quantity to be distributed according to the preset ratio corresponding to different node types to obtain the node quantities corresponding to different node types; Selecting the corresponding number of edge nodes as the target nodes according to the node quantities corresponding to each node type; Forming the file pre-distribution list according to the quantity to be distributed of the resource file and the target nodes to receive the resource file.

7. The method according to claim 1, characterized in that, the distributing the resource file to the corresponding number of the target nodes according to the quantity to be distributed in the file pre-distribution list includes: Proactively distributing the resource file to the corresponding number of the target nodes according to the quantity to be distributed in the file pre-distribution list; or, When regularly receiving a file download request from the target node, forming a file download list corresponding to the target node according to all the file pre-distribution lists related to the target node within a preset time period, and returning the file download list to the target node, so that the target node downloads each resource file in the file download list.

8. A file pre-distribution device, characterized in that, the device includes: An information acquisition module, configured to acquire file access information within a preset time period, where the file access information includes access parameters of multiple resource files; An algorithm acquisition module, configured to acquire multiple preset aggregation algorithms corresponding to each of the resource files; A data aggregation module, configured to perform aggregation processing on the access parameters of the resource file according to each preset aggregation algorithm corresponding to the resource file respectively, and generate aggregation data of the target access parameter under different preset aggregation algorithms, where the target access parameter is any one of the access parameters of the resource file; A list generation module, configured to determine a file pre-distribution list based on the fusion result of multiple aggregation data corresponding to the resource file, where the file pre-distribution list includes the number of resource files to be distributed and the target nodes to receive the resource file, and the target node is any one of the edge nodes; A file distribution module, configured to distribute the resource file to the corresponding number of target nodes according to the number of resource files to be distributed in the file pre-distribution list.

9. A computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, when the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium, on which a computer program is stored, characterized in that, when the computer program is executed by the processor, the steps of the method according to any one of claims 1 to 7 are implemented.