File pre-distribution method, device, computer equipment and storage medium
By receiving the reporting data matching of family nodes, it is waiting to be downloaded and saved the relationship, and the problem of unreasonable distribution of the existing technical documents is solved, the efficient and adaptive document distribution has been realized, and the user experience and storage space utilization rate is improved.
Patent Information
- Application Number
- CN202110882715.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-02
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2041-08-02
AI Technical Summary
The prior art does not consider the specific needs and actual situation of the home node when updating the home node file, resulting in unpractical file distribution, poor experience, and may cause waste of storage space.
By receiving the reporting data of the family node, it is matched according to its running status to be downloaded and preserved the associated relationship. When the family node initiates a file to pick up the request, find and send the corresponding download address.
The document distribution is realized according to the actual situation of the family node, which improves the adaptation of distribution and user experience, and avoids the unreasonable waste of the storage space.
Smart Images

Figure CN113590539B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of cloud computing technology, and in particular to a file pre-distribution method, device, computer equipment and storage medium. Background Art
[0002] A home node is a router or set-top box that uses idle bandwidth to provide download services for ordinary user families. A home node can download new files through the network, or update the stored files to obtain the latest resource files. In the prior art, for the update of home node files, the node files are usually pushed to the home node regularly, and the home node can choose whether to download them. However, this file distribution method does not take into account the needs and specific actual conditions of the home node itself. For home nodes, it is less practical and has a poor experience. In addition, the operation method of directly distributing files to home nodes will also cause the storage space of home nodes to be occupied unnecessarily, resulting in an unnecessary waste of the storage space of home nodes. Summary of the invention
[0003] In order to solve the above technical problems, the present application provides a file pre-distribution method, apparatus, computer device and storage medium.
[0004] In a first aspect, the present application provides a file pre-distribution method, which is applied to a scheduling system, comprising:
[0005] receiving reported data of a target home node, wherein the reported data is used to indicate an operating state of the target home node;
[0006] According to the reported data of the target home node, matching a corresponding file to be downloaded for the target home node;
[0007] Saving the association relationship between the target home node and the file to be downloaded, wherein the scheduling system saves the association relationship between each home node and the matched hotspot file;
[0008] When receiving the file pull request of the target home node, the to-be-downloaded file associated with the target home node is searched, and the download address of the to-be-downloaded file is sent to the target home node.
[0009] In a second aspect, the present application provides a file pre-distribution method, which is applied to a home node, comprising:
[0010] Sending reported data to a scheduling system, wherein the reported data is used to indicate the operating status of the target home node, and the scheduling system is used to match the corresponding file to be downloaded for the target home node according to the reported data, and save the association relationship between the target home node and the file to be downloaded;
[0011] When the target home node meets the file pulling condition, sending a file pulling request to the scheduling system;
[0012] Receive the download address of the file to be downloaded fed back by the scheduling system.
[0013] In a third aspect, the present application provides a file pre-distribution device, comprising:
[0014] A data receiving module, used to receive reported data of a target home node, wherein the reported data is used to indicate the operating status of the target home node;
[0015] A file matching module, configured to match a corresponding file to be downloaded for the target home node according to the reported data of the target home node;
[0016] A file association module, used for saving the association relationship between the target home node and the file to be downloaded in the scheduling system, wherein the scheduling system saves the association relationship between each home node and the matched hotspot file;
[0017] The file distribution module is used to search the to-be-downloaded file associated with the target home node in the scheduling system when receiving a file pull request from the target home node, and send the download address of the to-be-downloaded file to the target home node.
[0018] In a fourth aspect, the present application further provides a file pre-distribution device, comprising:
[0019] A data uploading module, used for sending reported data to the scheduling system, wherein the reported data is used for indicating the operation status of the target home node, and the scheduling system is used for matching the corresponding file to be downloaded for the target home node according to the reported data, and saving the association relationship between the target home node and the file to be downloaded;
[0020] A file request module, configured to send a file pull request to the scheduling system when the target home node meets the file pull condition;
[0021] The file download module is used to receive the download address of the file to be downloaded fed back by the scheduling system.
[0022] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the following steps are implemented:
[0023] receiving reported data of a target home node, wherein the reported data is used to indicate an operating state of the target home node;
[0024] According to the reported data of the target home node, matching a corresponding file to be downloaded for the target home node;
[0025] The scheduling system stores the association relationship between the target home node and the file to be downloaded, wherein the scheduling system stores the association relationship between each home node and the matched hotspot file;
[0026] When receiving the file pull request of the target home node, the scheduling system searches for the file to be downloaded that is associated with the target home node, and sends the download address of the file to be downloaded to the target home node.
[0027] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:
[0028] receiving reported data of a target home node, wherein the reported data is used to indicate an operating state of the target home node;
[0029] According to the reported data of the target home node, matching a corresponding file to be downloaded for the target home node;
[0030] The scheduling system stores the association relationship between the target home node and the file to be downloaded, wherein the scheduling system stores the association relationship between each home node and the matched hotspot file;
[0031] When receiving the file pull request of the target home node, the scheduling system searches for the file to be downloaded that is associated with the target home node, and sends the download address of the file to be downloaded to the target home node.
[0032] The above-mentioned file pre-distribution method, device, computer equipment and storage medium receive the reported data of the target home node, determine the operating status of the target home node according to the reported data, and then match the corresponding to-be-downloaded file for the target home node according to the reported data of the target home node, that is, match the hot files in the specified area for the target home node, and save the association relationship between the target home node and the to-be-downloaded file. When receiving the file pull request of the target home node, the scheduling system searches for the to-be-downloaded file associated with the target home node, and sends the download address of the to-be-downloaded file to the target home node.
[0033] In this way, the corresponding files to be downloaded are matched according to the reported data of the target home node itself, and the association relationship between the files to be downloaded and the files to be downloaded is saved. When the target home node actively initiates a file pull request, the files to be downloaded associated with the target home node are sent to the target home node. This not only takes into account the situation of the target home node itself, but also distributes the files to the target home node according to the active needs of the target home node, so that the files can be distributed flexibly according to the needs of the target home node, without wasting the storage space of the target home node. At the same time, the distributed files are also matched with the target home node, with a higher degree of adaptability, and the experience of the target home node is significantly improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0035] In order to more clearly illustrate the embodiments of the present invention 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, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0036] Figure 1 An application environment diagram of a file pre-distribution method in an embodiment;
[0037] Figure 2 A schematic diagram of a process flow of a file pre-distribution method in an embodiment;
[0038] Figure 3 is a flowchart of a file pre-distribution method in another embodiment;
[0039] Figure 4 is a structural block diagram of a file pre-distribution device in an embodiment;
[0040] Figure 5is a structural block diagram of a file pre-distribution device in another embodiment;
[0041] Figure 6 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0042] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0043] Figure 1 FIG. 1 is an application environment diagram of a file pre-distribution method in an embodiment. Figure 1 The file pre-distribution method is applied to a file pre-distribution system. The file pre-distribution system includes a home node 110 and a scheduling system 120. The home node 110 and the scheduling system 120 are connected via a network. The home node 110 is a router or a set-top box that uses idle bandwidth to provide download services for ordinary user families. The scheduling system 120 can be implemented using an independent server or a server cluster consisting of multiple servers.
[0044] In one embodiment, Figure 2 A schematic diagram of a file pre-distribution method in an embodiment, referring to Figure 2 , provides a file pre-distribution method. This embodiment mainly applies this method to the above Figure 1 Taking the scheduling system 120 in the example as an example, the file pre-distribution method specifically includes the following steps:
[0045] Step S210: receiving reported data of a target home node, wherein the reported data is used to indicate the operating status of the target home node.
[0046] Step S220: Match the corresponding file to be downloaded for the target home node according to the reported data of the target home node.
[0047] The reported data may include the operating data of the target home node, which may be used to indicate the operating status of the target home node. The scheduling system may receive the reported data uploaded by the target home node to determine the operating status of the target home node according to the uploaded data, and match the corresponding file to be downloaded for the target home node in the file set according to the reported data of the target home node. The file set may store multiple hotspot files in a specified area.
[0048] In one embodiment, before step S220, the method further includes: generating a hotspot list corresponding to a specified area according to a time period, wherein the hotspot list records a network address corresponding to a hotspot file and the number of visits to the network address generated in the specified area; integrating all hotspot lists corresponding to multiple time periods within a target period to obtain a file set, wherein the number of visits to the network address recorded in the file set is the sum of the number of visits to the same network address recorded in multiple time periods, and the multiple time periods are consecutive time periods within the target period.
[0049] The scheduling system included in the server can provide a corresponding access interface (API) for users to search for node files. The node file has a corresponding network address (URL). When the user needs to find the node file, it is necessary to access the network address corresponding to the node file. Therefore, the number of visits pv corresponding to each network address can be counted every certain time period. For example, the number of visits PV to each network address can be counted once a minute and stored. Furthermore, the number of visits to each network address in the specified area can be obtained to generate a hot spot list corresponding to the specified area. Among them, the hot spot list records the network address and the number of visits to the network address generated in the specified area.
[0050] Furthermore, the access count PV obtained by the above-mentioned statistics based on a certain time period can be cumulatively calculated according to a preset statistical window. A target period can be set, for example, set to 5 minutes, which means that all hotspot lists generated within these 5 minutes can be integrated every 5 minutes to calculate the cumulative total of the access counts of each network address within these 5 minutes, and the corresponding statistical list can be obtained, and then the corresponding file set can be determined based on this statistical list. For example, the access count of each network address is counted once every one minute, and then the 5 consecutively counted access counts are accumulated every 5 minutes to determine the total number of access counts of each network address within these 5 minutes, and the corresponding statistical list can be obtained. Therefore, the access count of the network address recorded in the file set is the sum of the access counts of the same network address recorded in multiple time periods, and the multiple time periods are continuous time periods within the target period. The reason why the above-mentioned statistical method is used instead of directly accumulating 5 minutes and counting the number of visits to each network address within these 5 minutes at one time is that when the above-mentioned statistical method is used, the number of visits determined in each minute is calculated based on the statistical results of the previous minute, and the statistical data is more real-time and more accurate.
[0051] In one embodiment, when generating a file set, the network addresses whose business types match the specified type can be integrated in all hotspot lists corresponding to multiple time periods within the target period to obtain the corresponding file set. Among them, the network address has a corresponding business type, the specified type is the business type corresponding to the target period, and the number of accesses to the network address recorded in the statistical list is the sum of the number of accesses to the same network address recorded in multiple time periods belonging to the same business type. Further, the network address has a corresponding business type, and the business types corresponding to different network addresses may be different. For network addresses of different business types, different target periods can be used for statistics and integration. For example, the target period corresponding to the video type can be set longer, while the target period corresponding to the real-time news type can be set shorter. Therefore, when integrating all hotspot lists corresponding to multiple time periods within the target period, the network addresses whose business types match the specified type corresponding to the target period can be integrated in all hotspot lists corresponding to the target period, and the corresponding file set can be generated. The number of accesses to the network address recorded in the file set refers to the sum of the number of accesses to the same network address recorded in multiple time periods belonging to the same business type.
[0052] In one embodiment, step S220 includes: determining the status information of the home node according to the reported data of the target home node; and searching for a file to be downloaded that matches the status information of the target home node.
[0053] After the target home node reports its own operating data to the server, the server can determine the status information of the home node based on the reported data of the target home node. Then, the file to be downloaded that matches the status information of the target home node can be searched in the file collection. Further, in one embodiment, the attribute dimension includes the available storage space of the node, the node rating, and the region where the node is located. In other words, when searching for the file to be downloaded that matches the status information of the target home node in the file collection, the parameters such as the available storage space of the node, the node rating, and the region where the node is located can be taken into account.
[0054] Search the file collection for the file to be downloaded that matches the status information of the target home node, including:
[0055] Perform weighted summation on the attribute values and weights of each attribute dimension in the multiple attribute dimensions in the reported data, and use the node rating corresponding to the numerical interval where the weighted summation result in the multiple numerical intervals is located as the node rating of the target family node, wherein each numerical interval in the multiple numerical intervals corresponds to a node rating, and the higher the node rating, the better the running status of the family node;
[0056] Among them, the reported data may include data of multiple attribute dimensions such as the CPU speed, memory size, network speed, and jitter frequency of the home node. Furthermore, for the attribute dimensions of the multiple nodes contained in the reported data, the attribute value of each attribute dimension and the weight of the attribute dimension may be weighted and summed, and the node rating corresponding to the numerical interval where the result of the weighted sum in the multiple numerical intervals is located may be used as the node rating of the target home node, in this way, the node rating of the target home node may be determined. Among them, each numerical interval in the multiple numerical intervals corresponds to a node rating, and the higher the node rating, the better the operating status of the home node.
[0057] Search the file collection for a file to be downloaded whose size is not larger than the available storage space of the target home node, whose file hotspot area is the same as the node area of the target home node, and whose required node rating is not higher than the node rating of the target home node.
[0058] Search the file collection for a file whose size is not larger than the available storage space of the target home node, so that when the target home node downloads the file, it has enough storage space to store the file to be downloaded, and the file hotspot area of the file is the same as the area where the target home node is located, that is, combining the access popularity of the file in the area where the node is located, assign it to the popular file with a large number of visits in the area where the node is located, that is, combining the actual situation in the area where the node is located to assign it a suitable file, to avoid randomly assigning files to the node that do not have much access demand for users in the area where the node is located, and occupying the node's storage space for no reason. It is also required that the node rating required by the file is not higher than the node rating of the target home node, indicating that the service capacity of the target home node can meet the requirements for file downloading.
[0059] Step S230, saving the association relationship between the target home node and the file to be downloaded, wherein the scheduling system saves the association relationship between each home node and the matched hotspot file.
[0060] Step S240, when receiving a file pull request from a target home node, searching for a file to be downloaded that is associated with the target home node, and sending the download address of the file to be downloaded to the target home node.
[0061] Specifically, the scheduling system stores the association between each home node and the matched hotspot file. After determining the file to be downloaded corresponding to the target home node, the scheduling system can store the association between the target home node and the file to be downloaded. Thus, when receiving a file pull request from the target home node, the server can search the scheduling system for the file to be downloaded associated with the target home node according to the file pull request, and can send the download address of the file to be downloaded to the target home node, so that the target home node can download the corresponding file according to the download address.
[0062] In one embodiment, the designated area includes N home nodes, and the N home nodes include the target home node. After step S220, the method further includes: when the number of home nodes stored in the scheduling system and having an association relationship with the file to be downloaded reaches M, re-matching the corresponding hotspot file for the target home node in the file collection according to the reported data of the target home node, wherein the number of home nodes stored in the scheduling system and having an association relationship with the re-matched hotspot file does not reach M, and the integer M is less than the integer N. Step S230 includes: when the number of home nodes stored in the scheduling system and having an association relationship with the file to be downloaded does not reach M, the scheduling system saves the association relationship between the target home node and the file to be downloaded.
[0063] The designated area may include N home nodes, and the target home node belongs to one of the N home nodes. The scheduling system may store the association between each target home node and the file to be downloaded corresponding to the target home node. At the same time, different target home nodes may have an association with the same file to be downloaded, that is, the same file to be downloaded may be downloaded and used by multiple home nodes. In this case, the number of downloads of the same file to be downloaded may be limited. Then, when there are multiple home nodes that can download the file to be downloaded, in order to avoid all home nodes from starting to download the file to be downloaded, the number of home nodes that download the file to be downloaded may be limited, so that some home nodes may not download the file, thereby saving the storage space of some home nodes and avoiding invalid occupation of the storage space of the home nodes. Therefore, when the number of home nodes that have an association with the file to be downloaded stored in the scheduling system reaches M, the corresponding hotspot file may be re-matched for the target home node in the file set according to the reported data of the target home node, so that the target home node downloads other hotspot files, avoiding multiple home nodes in the designated area from storing the same hotspot file in a single manner.
[0064] The above-mentioned file pre-distribution method receives the reported data of the target home node, determines the operating status of the target home node according to the reported data, and then matches the corresponding to-be-downloaded file for the target home node in the file collection according to the reported data of the target home node, that is, matches the hotspot file in the specified area for the target home node, and saves the association relationship between the target home node and the to-be-downloaded file. When receiving the file pull request of the target home node, the scheduling system searches for the to-be-downloaded file associated with the target home node, and sends the download address of the to-be-downloaded file to the target home node. In this way, the corresponding to-be-downloaded file is matched for the target home node according to its own reported data, and the association relationship between it and the to-be-downloaded file is saved. When the target home node actively initiates a file pull request, the file to be downloaded associated with the target home node will be sent to the target home node. This not only takes into account the situation of the target home node itself, but also distributes the file to the target home node according to the active needs of the target home node. This allows for flexible file distribution based on the needs of the target home node without wasting the storage space of the target home node. At the same time, the distributed files are also matched with the target home node, with a higher degree of adaptability, and the experience of the target home node is significantly improved.
[0065] In one embodiment, Figure 3 A schematic diagram of a file pre-distribution method in an embodiment, referring to Figure 3 , and also provides a file pre-distribution method. The file pre-distribution method specifically includes the following steps:
[0066] Step S310, sending the reported data to the scheduling system, wherein the reported data is used to indicate the operating status of the target home node, and the scheduling system is used to match the corresponding file to be downloaded for the target home node according to the reported data, and save the association relationship between the target home node and the file to be downloaded.
[0067] The reported data may include the operating data of the target home node, which can be used to indicate the operating status of the target home node. The target home node can actively send its own reported data to the scheduling system. After receiving the reported data uploaded by the target home node, the server can determine the operating status of the target home node based on the uploaded data, and the scheduling system of the server can match the corresponding file to be downloaded for the target home node in the file collection based on the reported data of the target home node. Among them, the file collection stores multiple hot files in a specified area, and can also store the association relationship between the target home node and the file to be downloaded. Furthermore, when searching for a file to be downloaded that matches the status information of the target home node, parameters such as the node's available storage space, node rating, and the area where the node is located can be taken into account.
[0068] In one embodiment, searching for a file to be downloaded that matches the state information of a target home node includes:
[0069] Perform weighted summation on the attribute values and weights of each attribute dimension in the multiple attribute dimensions in the reported data, and use the node rating corresponding to the numerical interval where the weighted summation result in the multiple numerical intervals is located as the node rating of the target family node, wherein each numerical interval in the multiple numerical intervals corresponds to a node rating, and the higher the node rating, the better the running status of the family node;
[0070] Among them, the reported data may include data of multiple attribute dimensions such as the CPU speed, memory size, network speed, and jitter frequency of the home node. Furthermore, for the attribute dimensions of the multiple nodes contained in the reported data, the attribute value of each attribute dimension and the weight of the attribute dimension may be weighted and summed, and the node rating corresponding to the numerical interval where the result of the weighted sum in the multiple numerical intervals is located may be used as the node rating of the target home node, in this way, the node rating of the target home node may be determined. Among them, each numerical interval in the multiple numerical intervals corresponds to a node rating, and the higher the node rating, the better the operating status of the home node.
[0071] Search the file collection for a file to be downloaded whose size is not larger than the available storage space of the target home node, whose file hotspot area is the same as the node area of the target home node, and whose required node rating is not higher than the node rating of the target home node.
[0072] Search the file collection for a file whose size is not larger than the available storage space of the target home node, so that when the target home node downloads the file, it has enough storage space to store the file, and the file hotspot area of the file is the same as the area where the target home node is located, that is, combined with the access popularity of the file in the area where the node is located, it allocates the popular file with large access volume in the area where the node is located, that is, combined with the actual situation in the area where the node is located, it allocates the appropriate file to it, avoiding the file randomly allocated to the node that has no more access demand for users in the area where the node is located, and occupying the node's storage space unnecessarily. It is also required that the node rating required by the file is not higher than the node rating of the target home node, indicating that the service capacity of the target home node can meet the requirements for file downloading.
[0073] Step S320: When the target home node meets the file pulling condition, a file pulling request is sent to the scheduling system.
[0074] In this embodiment, the file pulling conditions specifically include that the available storage space of the target home node is greater than or equal to the space threshold, and the target home node reaches the request time for periodically generating file pulling requests, that is, the target home node determines whether to pull the file based on its own storage status, and only requests the scheduling system to pull the hot file when the target home node can continue to cache, wherein the space threshold is used to indicate the minimum space required to download a file.
[0075] Step S330: receiving the download address of the file to be downloaded fed back by the scheduling system.
[0076] In this embodiment, the file to be downloaded refers to a hotspot file allocated to the target home node by the scheduling system according to the reported data of the target home node, and the download address refers to a link address for downloading the hotspot file.
[0077] The scheduling system stores the association between each home node and the matched hotspot file. After determining the file to be downloaded corresponding to the target home node, the association between the target home node and the file to be downloaded can be saved. When the target home node meets the file pull condition, the target home node can send a file pull request to the scheduling system. After the scheduling system receives the file pull request from the target home node, the scheduling system can search the scheduling system for the file to be downloaded that is associated with the target home node according to the file pull request, and can send the download address of the file to be downloaded to the target home node, so that the target home node can download the corresponding file according to the download address. Among them, the file pull condition can be that the target home node still has available storage space, or that the current operating status of the target home node is good, etc.
[0078] In one embodiment, after step S330, the method further includes: downloading the corresponding file to be downloaded according to the download address; when the file to be downloaded is successfully downloaded, feeding back a notification of successful download of the file to be downloaded to the scheduling system, so that the scheduling system updates the hot spot list corresponding to the specified area according to the received notification, wherein the hot spot list records the network address corresponding to the hot spot file and the number of visits to the network address generated in the specified area.
[0079] The target home node can download the file to be downloaded according to the download address of the file to be downloaded fed back by the scheduling system. After the target home node successfully downloads the file to be downloaded, it can feed back a notification of successful download of the file to be downloaded to the scheduling system to inform the scheduling system that the target home node has successfully downloaded the file to be downloaded. After receiving the notification fed back by the target home node, the scheduling system can update the hotspot list corresponding to the designated area where the target home node is located, so that the target home node can obtain the network address corresponding to the hotspot file recorded in the latest hot list when sending a file pull request next time. The hotspot list corresponding to the designated area records the network address corresponding to the hotspot file and the number of visits to the network address generated in the designated area.
[0080] In one embodiment, after step S320, the method further includes: receiving a request failure notification, wherein the request failure notification is used to indicate that the scheduling system has not matched the corresponding file to be downloaded for the target home node.
[0081] After the target home node sends a file pull request to the scheduling system, if the file pull fails, the scheduling system will receive a request failure notification, which indicates that the scheduling system has not found a file to be downloaded that matches the target home node after receiving the file pull request sent by the target home node. That is, it indicates that the target home node has failed to pull the popular file.
[0082] In the above-mentioned file pre-distribution method, the target home node can actively send the reported data to the scheduling system. The scheduling system can match the corresponding files to be downloaded for the target home node in the file collection according to the operating status of the target home node, and save the association between the target home node and the files to be downloaded in the scheduling system. When the target home node meets the file pulling conditions, the target home node can send a file pulling request to the scheduling system, and then receive the download address of the file to be downloaded fed back by the scheduling system to download the file to be downloaded. In this method, not only the situation of the target home node itself is taken into account, but also the file will be distributed to the target home node according to the active needs of the target home node, so that the file distribution can be flexibly carried out according to the needs of the target home node, without wasting the storage space of the target home node. At the same time, the distributed files are also matched with the target home node, with higher adaptability, and the experience of the target home node is also significantly improved.
[0083] Figure 2-3 FIG. 1 is a flowchart of a method for pre-distributing files in one embodiment. It should be understood that although Figure 2-3The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2-3 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0084] In one embodiment, Figure 4 As shown, a file pre-distribution device is provided, comprising:
[0085] The data receiving module 410 is used to receive the reported data of the target home node, wherein the reported data is used to indicate the operating status of the target home node.
[0086] The file matching module 420 is used to match the corresponding to-be-downloaded file for the target home node according to the reported data of the target home node.
[0087] The file association module 430 is used to save the association relationship between the target home node and the file to be downloaded, wherein the scheduling system saves the association relationship between each home node and the matched hot spot file.
[0088] The file distribution module 440 is used to search for the to-be-downloaded file associated with the target home node in the scheduling system when receiving a file pull request from the target home node, and send the download address of the to-be-downloaded file to the target home node.
[0089] In one embodiment, the file matching module 420 is further used to determine the status information of the target home node according to the reported data of the target home node; and to search for the file to be downloaded that matches the status information of the target home node.
[0090] In one embodiment, the attribute dimensions include the available storage space of the node, the node rating, and the region where the node is located. The file matching module 420 is also used to: search for files to be downloaded that match the status information of the target home node: perform weighted summation on the attribute values of each attribute dimension on multiple attribute dimensions in the reported data and the weights of the attribute dimensions, and use the node rating corresponding to the numerical interval where the result of the weighted summation in multiple numerical intervals is located as the node rating of the target home node, wherein each numerical interval in the multiple numerical intervals corresponds to a node rating, and the higher the node rating, the better the operating status of the home node; search for files to be downloaded whose file size is not larger than the available storage space of the target home node, whose file hotspot area is the same as the region where the node of the target home node is located, and whose required node rating is not higher than the node rating of the target home node.
[0091] In one embodiment, the designated area includes N home nodes, and the N home nodes include the target home node. The file matching module 420 is also used to re-match the corresponding hotspot file for the target home node based on the reported data of the target home node when the number of home nodes stored in the scheduling system that have an association relationship with the file to be downloaded reaches M, wherein the number of home nodes stored in the scheduling system that have an association relationship with the re-matched hotspot file does not reach M, and the integer M is less than the integer N. The file association module 430 is also used to save the association relationship between the target home node and the file to be downloaded when the number of home nodes stored in the scheduling system that have an association relationship with the file to be downloaded does not reach M.
[0092] In one embodiment, the file matching module 420 is also used to generate a hot spot list corresponding to a specified area according to a time period, wherein the hot spot list records the network address corresponding to the hot spot file and the number of visits to the network address generated in the specified area; all hot spot lists corresponding to multiple time periods within the target time period are integrated to obtain a file set, wherein the number of visits to the network address recorded in the file set is the sum of the number of visits to the same network address recorded in multiple time periods, and the multiple time periods are consecutive time periods within the target time period.
[0093] In one embodiment, Figure 5 As shown, a file pre-distribution device is also provided, comprising:
[0094] The data upload module 510 is used to send reported data to the scheduling system, wherein the reported data is used to indicate the operating status of the target home node. The scheduling system is used to match the corresponding file to be downloaded for the target home node based on the reported data, and save the association relationship between the target home node and the file to be downloaded.
[0095] The file request module 520 is used to send a file pull request to the scheduling system when the target home node meets the file pull condition.
[0096] The file download module 530 is used to receive the download address of the file to be downloaded fed back by the scheduling system.
[0097] In one embodiment, the file download module 530 is also used to download the corresponding file to be downloaded according to the download address; when the file to be downloaded is successfully downloaded, a notification of successful download of the file to be downloaded is fed back to the scheduling system, so that the scheduling system updates the hot spot list corresponding to the specified area according to the received notification, wherein the hot spot list records the network address corresponding to the hot spot file and the number of visits to the network address generated in the specified area.
[0098] In one embodiment, the file download module 530 is further used to receive a request failure notification, wherein the request failure notification is used to indicate that the scheduling system has not matched the corresponding file to be downloaded for the target home node.
[0099] Figure 6 The internal structure diagram of a computer device in one embodiment is shown. The computer device may specifically be Figure 1 The home node 110 (or the scheduling system 120) in FIG. Figure 6 As shown, the computer device includes a processor, a memory, a network interface, an input device and a display screen connected through a system bus. Among them, the memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and may also store a computer program. When the computer program is executed by the processor, the processor can implement the file pre-distribution method. The internal memory may also store a computer program. When the computer program is executed by the processor, the processor can execute the file pre-distribution method. The display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device may be a touch layer covered on the display screen, or a button, trackball or touchpad provided on the housing of the computer device, or an external keyboard, touchpad or mouse, etc.
[0100] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure 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 certain components, or have a different arrangement of components.
[0101] In one embodiment, the file pre-distribution device provided by the present application can be implemented in the form of a computer program. The computer program can be Figure 6The computer device shown in the figure is run. The memory of the computer device can store various program modules constituting the file pre-distribution device, such as: Figure 4 The data receiving module 410, the file matching module 420, the file association module 430 and the file distribution module 440 are shown. The computer program composed of various program modules enables the processor to execute the steps of the file pre-distribution method of each embodiment of the present application described in this specification.
[0102] Figure 6 The computer device shown can be Figure 4 The data receiving module 410 in the file pre-distribution device shown executes the step of receiving the reported data of the target home node, wherein the reported data is used to indicate the operating status of the target home node. The computer device may execute the step of matching the corresponding file to be downloaded for the target home node according to the reported data of the target home node through the file matching module 420. The computer device may execute the step of the scheduling system saving the association relationship between the target home node and the file to be downloaded through the file association module 430, wherein the scheduling system saves the association relationship between each home node and the matched hot spot file. The computer device may execute the step of searching the scheduling system for the file to be downloaded associated with the target home node when receiving the file pull request of the target home node through the file distribution module 440, and sending the download address of the file to be downloaded to the target home node.
[0103] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the method described in any one of the above embodiments is implemented when the processor executes the computer program.
[0104] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method described in any one of the above embodiments is implemented.
[0105] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0106] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article 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, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0107] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may 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 the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A file pre-distribution method, characterized in that: Applied to a dispatching system, the method comprises: receiving reported data of a target home node, wherein the reported data is used to indicate an operating state of the target home node; According to the reported data of the target home node, matching a corresponding file to be downloaded for the target home node; Saving the association relationship between the target home node and the file to be downloaded, wherein the scheduling system saves the association relationship between each home node and the matched hotspot file; Upon receiving a file pull request from the target home node, searching for the file to be downloaded that is associated with the target home node, and sending the download address of the file to be downloaded to the target home node; The matching a corresponding file to be downloaded for the target home node according to the reported data of the target home node includes: Determining the status information of the target home node according to the reported data of the target home node; The file to be downloaded that matches the status information of the target home node is searched in a file collection, wherein the file collection stores a plurality of hot files in a specified area.
2. The method according to claim 1, characterized in that: The attribute dimension includes the available storage space of the node, the node rating, and the region where the node is located. The searching the file to be downloaded that matches the status information of the target home node in the file collection includes at least one of the following: Performing a weighted summation on the attribute values of each attribute dimension and the weight of the attribute dimension in the reported data, and taking the node rating corresponding to the numerical interval where the result of the weighted summation in the multiple numerical intervals is located as the node rating of the target home node, wherein each numerical interval in the multiple numerical intervals corresponds to a node rating, and a higher node rating indicates a better operating status of the home node; Search the file to be downloaded in the file collection, the file size of which is not larger than the available storage space of the target home node, the file hotspot area is the same as the node area of the target home node, and the required node rating is not higher than the node rating of the target home node.
3. The method according to claim 1, characterized in that: The designated area includes N home nodes, and the N home nodes include the target home node, wherein: After matching the corresponding file to be downloaded for the target home node according to the reported data of the target home node, the method further includes: when the number of home nodes stored in the scheduling system and having an association relationship with the file to be downloaded reaches M, re-matching the corresponding hotspot file for the target home node according to the reported data of the target home node, wherein the number of home nodes stored in the scheduling system and having an association relationship with the re-matched hotspot file does not reach M, and the integer M is less than the integer N; Saving the association relationship between the target home node and the file to be downloaded includes: when the number of home nodes that have an association relationship with the file to be downloaded saved in the scheduling system does not reach M, saving the association relationship between the target home node and the file to be downloaded in the scheduling system.
4. The method according to claim 1, characterized in that: Before searching the file set for the file to be downloaded that matches the status information of the target home node, the method further includes: Generate a hotspot list corresponding to the designated area according to a time period, wherein the hotspot list records a network address corresponding to a hotspot file and a number of visits to the network address generated in the designated area; All the hot spot lists corresponding to multiple time periods within the target time period are integrated to obtain the file set, wherein the number of access times of the network address recorded in the file set is the sum of the number of access times of the same network address recorded in the multiple time periods, and the multiple time periods are continuous time periods within the target time period.
5. A file pre-distribution method, characterized in that: Applied to a home node, the method comprises: Sending reported data to a scheduling system, wherein the reported data is used to indicate the operating status of a target home node, and the scheduling system is used to determine the status information of the target home node according to the reported data, and search for a file to be downloaded that matches the status information of the target home node in a file collection, wherein the file collection stores a plurality of hotspot files in a specified area, and stores an association relationship between the target home node and the file to be downloaded; When the target home node meets the file pulling condition, sending a file pulling request to the scheduling system; Receive the download address of the file to be downloaded fed back by the scheduling system.
6. The method according to claim 5, characterized in that After receiving the download address of the file to be downloaded fed back by the scheduling system, the method further includes: Download the corresponding file to be downloaded according to the download address; When the file to be downloaded is downloaded successfully, a notification of successful downloading of the file to be downloaded is fed back to the scheduling system, so that the scheduling system updates the hot spot list corresponding to the designated area according to the received notification, wherein the hot spot list records the network address corresponding to the hot spot file and the number of visits to the network address generated in the designated area.
7. The method according to claim 5, characterized in that After sending the file pull request to the scheduling system, the method further includes: A request failure notification is received, wherein the request failure notification is used to indicate that the scheduling system has not matched a corresponding file to be downloaded for the target home node.
8. A file pre-distribution device, characterized in that: The device comprises: A data receiving module, used to receive reported data of a target home node, wherein the reported data is used to indicate the operating status of the target home node; A file matching module, used for matching a corresponding file to be downloaded for the target home node according to the reported data of the target home node, wherein the file collection stores a plurality of hot files in a specified area; A file association module, used for saving the association relationship between the target home node and the file to be downloaded in the scheduling system, wherein the scheduling system saves the association relationship between each home node and the matched hotspot file; A file distribution module is used to search the scheduling system for the file to be downloaded that is associated with the target home node when receiving the file pull request of the target home node, and send the download address of the file to be downloaded to the target home node; The file matching module is also used for: Determining the status information of the target home node according to the reported data of the target home node; The file to be downloaded that matches the status information of the target home node is searched in a file collection, wherein the file collection stores a plurality of hot files in a specified area.
9. A file pre-distribution device, characterized in that: The device comprises: a data uploading module, used for sending reported data to the dispatching system, wherein the reported data is used for indicating the running status of the target home node, the dispatching system is used for determining the status information of the target home node according to the reported data, searching for a file to be downloaded that matches the status information of the target home node in a file collection, the file collection storing a plurality of hot files in a specified area, and storing an association relationship between the target home node and the file to be downloaded in the dispatching system; A file request module, configured to send a file pull request to the scheduling system when the target home node meets the file pull condition; The file download module is used to receive the download address of the file to be downloaded fed back by the scheduling system.
10. A computer device comprising a memory, a processor, and a computer program stored in 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.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Data distribution method and system
CN111355798A
Video resource pushing method, video resource pushing device and storage medium
CN111767430A