Data downloading method, device, computer equipment and storage medium

By using the greedy factor determination method on the data distribution end and selecting the target data slice and the target download source, the problem of high pressure on the data distribution end is solved, and fast and efficient data download and distribution is achieved.

CN115567515BActive Publication Date: 2025-06-06INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211155168.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-22
Publication Date
2025-06-06
Estimated Expiration
2042-09-22

AI Technical Summary

Technical Problem

In distributed data deployment, the data distribution end is under too much pressure when performing distributed data deployment, which affects the efficiency of the device downloading data from the data distribution end.

Method used

By determining the candidate greed factor based on the downloaded information of the remaining downloaded data slices of the local device, selecting the target data slices and the target download source, thereby achieving rapid data download and distribution.

Benefits of technology

This method can quickly realize the distribution and deployment of data, reduce the pressure on the data distribution server, improve download speed, and avoid the problem of affecting download efficiency due to scarce resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115567515B_ABST
    Figure CN115567515B_ABST
Patent Text Reader

Abstract

The present application relates to a data downloading method, device, equipment, medium and product. It relates to the field of computer technology. It can be used in the field of financial technology or other related fields. The method includes: determining the candidate greediness factor corresponding to the remaining downloaded data pieces according to the downloaded information of the remaining downloaded data pieces of the local device, determining the target data piece from the remaining downloaded data pieces according to the candidate greediness factor, and determining the target download source of the target data piece, downloading the target data piece from the target download source, and updating the remaining downloaded data pieces of the local device according to the target data piece, and then returning to perform the operation of determining the candidate greediness factor corresponding to the remaining downloaded data piece according to the downloaded information of the remaining downloaded data pieces of the local device, until there are no remaining downloaded data pieces. The use of this method can quickly realize the distribution and deployment of the same data to multiple devices, and reduce the pressure on the product distribution server.
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 data downloading method, device, computer equipment and storage medium. Background Art

[0002] With the development of computer technology, the demand for distributed data deployment is increasing. For example, newly developed software application products are distributed and deployed on different devices in multiple regions.

[0003] Currently, when deploying the same data on different devices in multiple regions, a dedicated server (i.e., data distribution terminal) usually provides data download services to each device in parallel through multiple threads. This method will cause excessive pressure on the data distribution terminal when performing distributed data deployment, thereby affecting the efficiency of each device downloading data from the data distribution terminal, and it is urgently needed to be improved. Summary of the invention

[0004] Based on this, it is necessary to provide a data downloading method, device, computer equipment and storage medium that can quickly distribute and deploy the same data to multiple devices and reduce the pressure on the product distribution server in response to the above technical problems.

[0005] In a first aspect, the present application provides a data downloading method. The method comprises:

[0006] Determine, according to the downloaded information of the remaining download data pieces of the local device, a candidate greed factor corresponding to the remaining download data pieces; wherein the candidate greed factor represents the rarity of the remaining download data pieces and the network loss rate of downloading the remaining download data pieces;

[0007] According to the candidate greedy factor, determine the target data piece from the remaining downloaded data pieces, and determine the target download source of the target data piece;

[0008] After downloading the target data piece from the target download source and updating the remaining download data pieces of the local device according to the target data piece, return to execute the operation of determining the candidate greedy factors corresponding to the remaining download data pieces according to the downloaded information of the remaining download data pieces of the local device until there are no remaining download data pieces.

[0009] In one embodiment, the downloaded information of the remaining downloaded data pieces includes:

[0010] The first device that has downloaded the remaining download data pieces, and the region identifier and network bandwidth occupancy rate of the first device.

[0011] In one embodiment, determining the candidate greediness factor corresponding to the remaining download data piece according to the downloaded information of the remaining download data piece of the local device includes:

[0012] Determining a scarcity indicator value of each remaining downloaded data piece according to the first device that has downloaded each remaining downloaded data piece;

[0013] Determining a network impairment rate of the first device according to the regional identifier of the local device and the regional identifier of the first device;

[0014] According to the scarcity index value of each remaining download data piece and the network loss rate and network bandwidth occupancy rate of the first device that has downloaded each remaining download data piece, a candidate greediness factor is determined when each remaining download data piece is downloaded by the corresponding first device.

[0015] In one embodiment, determining a target data piece from the remaining downloaded data pieces according to the candidate greediness factor, and determining a target download source of the target data piece, comprises:

[0016] Determine the target greediness factor corresponding to each remaining download data piece according to the size relationship between the candidate greediness factors corresponding to each remaining download data piece;

[0017] According to the size relationship between the target greed factors corresponding to the remaining downloaded data pieces, the target data piece is determined from the remaining downloaded data pieces, and the target download source of the target data piece is determined from the first device that has downloaded the target data piece.

[0018] In one embodiment, the method further comprises:

[0019] Initiating a download information acquisition request to the tracking server and / or the first device according to the data piece identifiers of the remaining download data pieces of the local device;

[0020] The downloaded information of the remaining downloaded data pieces fed back by the tracking server and / or the first device in response to the download information acquisition request is obtained.

[0021] In one embodiment, obtaining the downloaded information of the remaining downloaded data pieces fed back by the tracking server and / or the first device in response to the download information acquisition request includes:

[0022] Within a preset time period, the downloaded information of the remaining downloaded data pieces fed back by the tracking server and / or the first device in response to the download information acquisition request is obtained.

[0023] In one embodiment, after downloading the target data piece from the target download source, the method further includes:

[0024] The data slice identifier of the target data slice, the region identifier of the local device and the network bandwidth usage are uploaded to the tracking server.

[0025] In one of the embodiments, before determining the candidate greediness factor corresponding to the remaining downloaded data piece according to the downloaded information of the remaining downloaded data piece of the local device, the method further includes:

[0026] Determine a first download data piece of the data to be downloaded according to the fragment information of the data to be downloaded sent by the data distribution terminal, and download the first download data piece;

[0027] Determine the remaining download data pieces of the local device according to the fragment information and the first download data piece;

[0028] The data piece identifier of the first downloaded data piece, the region identifier of the local device and the network bandwidth occupancy rate are uploaded to the tracking server.

[0029] In one of the embodiments, the remaining download data slices and the downloaded data slices of the local device are all data slices after the data to be downloaded is divided, the first device and the local device both need to deploy the data to be downloaded, and the first device and the local device are deployed in different regions.

[0030] In a second aspect, the present application also provides a data download method. The method comprises:

[0031] Receiving a download information acquisition request sent by the second device, wherein the download information acquisition request is initiated according to a data slice identifier of a remaining download data slice of the second device;

[0032] Determine downloaded information of remaining download data pieces according to the download information acquisition request;

[0033] The downloaded information is fed back to the second device so that the second device can determine the candidate greediness factors corresponding to the remaining downloaded data pieces based on the downloaded information, determine the target data piece and the target download source based on the candidate greediness factors, and download the target data piece from the target download source; wherein the greediness factor represents the rarity of the remaining downloaded data pieces and the network loss rate of downloading the remaining downloaded data pieces.

[0034] In one of the embodiments, the downloaded information of the remaining downloaded data pieces includes: a first device that has downloaded the remaining downloaded data pieces, and a region identifier and a network bandwidth occupancy rate of the first device.

[0035] In one embodiment, determining downloaded information of remaining downloaded data pieces according to the download information acquisition request includes:

[0036] Determine the data slice identifiers of the remaining download data slices according to the download information acquisition request;

[0037] Downloaded information of remaining downloaded data slices is determined according to the data slice identifier and the data slice identifier of the downloaded data slice uploaded by the first device, the region identifier of the first device and the network bandwidth occupancy rate.

[0038] In one of the embodiments, the remaining download data slices and the downloaded data slices of the second device are both data slices after the data to be downloaded is divided, the first device and the second device both need to deploy the data to be downloaded, and the first device and the second device are deployed in different regions.

[0039] In a third aspect, the present application also provides a data downloading device. The device comprises:

[0040] A factor determination module is used to determine a candidate greed factor corresponding to the remaining download data piece according to the downloaded information of the remaining download data piece of the local device; wherein the candidate greed factor represents the rarity of the remaining download data piece and the network loss rate of downloading the remaining download data piece;

[0041] A data screening module, used to determine a target data piece from the remaining downloaded data pieces according to the candidate greed factor, and determine a target download source of the target data piece;

[0042] The download update module is used to download the target data piece from the target download source, and after updating the remaining download data pieces of the local device according to the target data piece, return to execute the operation of determining the candidate greedy factor corresponding to the remaining download data piece according to the downloaded information of the remaining download data piece of the local device until there are no remaining download data pieces.

[0043] In a fourth aspect, the present application also provides a data downloading device. The device comprises:

[0044] A request receiving module, configured to receive a download information acquisition request sent by a second device, wherein the download information acquisition request is initiated according to a data slice identifier of a remaining download data slice of the second device;

[0045] An information determination module, used to determine the downloaded information of the remaining download data pieces according to the download information acquisition request;

[0046] An information feedback module is used to feed back the downloaded information to the second device, so that the second device can determine the candidate greediness factors corresponding to the remaining downloaded data pieces according to the downloaded information, determine the target data piece and the target download source according to the candidate greediness factors, and download the target data piece from the target download source; wherein the greediness factor represents the rarity of the remaining downloaded data pieces and the network loss rate of downloading the remaining downloaded data pieces.

[0047] In a fifth aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:

[0048] Determine, according to the downloaded information of the remaining download data pieces of the local device, a candidate greed factor corresponding to the remaining download data pieces; wherein the candidate greed factor represents the rarity of the remaining download data pieces and the network loss rate of downloading the remaining download data pieces;

[0049] According to the candidate greedy factor, determine the target data piece from the remaining downloaded data pieces, and determine the target download source of the target data piece;

[0050] After downloading the target data piece from the target download source and updating the remaining download data pieces of the local device according to the target data piece, return to execute the operation of determining the candidate greedy factors corresponding to the remaining download data pieces according to the downloaded information of the remaining download data pieces of the local device until there are no remaining download data pieces.

[0051] In a sixth aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:

[0052] Receiving a download information acquisition request sent by the second device, wherein the download information acquisition request is initiated according to a data slice identifier of a remaining download data slice of the second device;

[0053] Determine downloaded information of remaining download data pieces according to the download information acquisition request;

[0054] The downloaded information is fed back to the second device so that the second device can determine the candidate greediness factors corresponding to the remaining downloaded data pieces based on the downloaded information, determine the target data piece and the target download source based on the candidate greediness factors, and download the target data piece from the target download source; wherein the greediness factor represents the rarity of the remaining downloaded data pieces and the network loss rate of downloading the remaining downloaded data pieces.

[0055] In a seventh aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0056] Determine, according to the downloaded information of the remaining download data pieces of the local device, a candidate greed factor corresponding to the remaining download data pieces; wherein the candidate greed factor represents the rarity of the remaining download data pieces and the network loss rate of downloading the remaining download data pieces;

[0057] According to the candidate greedy factor, determine the target data piece from the remaining downloaded data pieces, and determine the target download source of the target data piece;

[0058] After downloading the target data piece from the target download source and updating the remaining download data pieces of the local device according to the target data piece, return to execute the operation of determining the candidate greedy factors corresponding to the remaining download data pieces according to the downloaded information of the remaining download data pieces of the local device until there are no remaining download data pieces.

[0059] In an eighth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0060] Receiving a download information acquisition request sent by the second device, wherein the download information acquisition request is initiated according to a data slice identifier of a remaining download data slice of the second device;

[0061] Determine downloaded information of remaining download data pieces according to the download information acquisition request;

[0062] The downloaded information is fed back to the second device so that the second device can determine the candidate greediness factors corresponding to the remaining downloaded data pieces based on the downloaded information, determine the target data piece and the target download source based on the candidate greediness factors, and download the target data piece from the target download source; wherein the greediness factor represents the rarity of the remaining downloaded data pieces and the network loss rate of downloading the remaining downloaded data pieces.

[0063] In a ninth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0064] Determine, according to the downloaded information of the remaining download data pieces of the local device, a candidate greed factor corresponding to the remaining download data pieces; wherein the candidate greed factor represents the rarity of the remaining download data pieces and the network loss rate of downloading the remaining download data pieces;

[0065] According to the candidate greedy factor, determine the target data piece from the remaining downloaded data pieces, and determine the target download source of the target data piece;

[0066] After downloading the target data piece from the target download source and updating the remaining download data pieces of the local device according to the target data piece, return to execute the operation of determining the candidate greedy factors corresponding to the remaining download data pieces according to the downloaded information of the remaining download data pieces of the local device until there are no remaining download data pieces.

[0067] In a tenth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0068] Receiving a download information acquisition request sent by the second device, wherein the download information acquisition request is initiated according to a data slice identifier of a remaining download data slice of the second device;

[0069] Determine downloaded information of remaining download data pieces according to the download information acquisition request;

[0070] The downloaded information is fed back to the second device so that the second device can determine the candidate greediness factors corresponding to the remaining downloaded data pieces based on the downloaded information, determine the target data piece and the target download source based on the candidate greediness factors, and download the target data piece from the target download source; wherein the greediness factor represents the rarity of the remaining downloaded data pieces and the network loss rate of downloading the remaining downloaded data pieces.

[0071] The above-mentioned data downloading method, device, computer equipment and storage medium, for each device that needs to deploy the same data, determines the candidate greed factor that characterizes the rarity and network loss rate of the remaining download data pieces according to the downloaded information of the local remaining download data pieces, and determines the target data piece and its corresponding target download source from the remaining download data pieces based on the candidate greed factor, and then downloads the target data piece from the target download source and updates the remaining download data pieces, and then returns to perform the above operation again until there are no remaining download data pieces. When determining the download order of the remaining download data pieces, this scheme takes into account the rarity of each remaining download data piece and the network loss rate of downloading each remaining download data piece, so that the remaining download data pieces can be quickly downloaded to the local device, and avoids the situation that each device end preferentially downloads the popular data piece, resulting in the final remaining download data piece affecting the download efficiency due to scarce resources. Compared with the traditional method of downloading data through the parallel deployment of the data distribution end, the process of downloading data in this application does not require the participation of the data distribution end, and the data distribution end only needs to issue the fragment download task, which greatly reduces the pressure on the data distribution end. In addition, this method overcomes the problem of network bandwidth limitation at the data distribution end, fully utilizes the network conditions of each first device, and selects the first device with the fastest transmission rate in the current time range to download resources, thereby effectively improving the download speed. BRIEF DESCRIPTION OF THE DRAWINGS

[0072] Figure 1 An application environment diagram of a data downloading method in an embodiment;

[0073] Figure 2 A schematic diagram of a flow chart of a data downloading method in an embodiment;

[0074] Figure 3 A schematic diagram of a flow chart of a method for determining a greediness factor in one embodiment;

[0075] Figure 4A schematic diagram of a flow chart of a method for determining a target download source in one embodiment;

[0076] Figure 5 A schematic diagram of a flow chart of a downloaded information feedback method in one embodiment;

[0077] Figure 6 A schematic diagram of a flow chart of a method for deploying data to be downloaded in one embodiment;

[0078] Figure 7 is a flow chart of a data downloading method in another embodiment;

[0079] Figure 8 is a signaling diagram of a data downloading method in one embodiment;

[0080] Fig. 9 A structural diagram of a data downloading method in one embodiment;

[0081] Fig.10 is a structural block diagram of a data downloading device in one embodiment;

[0082] Fig.11 is a structural block diagram of a factor determination module in one embodiment;

[0083] Fig.12 is a structural block diagram of a data screening module in one embodiment;

[0084] Fig.13 is a structural block diagram of a data downloading device in one embodiment;

[0085] Fig.14 is a structural block diagram of a data downloading device in one embodiment;

[0086] Fig.15 is a structural block diagram of a data downloading device in one embodiment;

[0087] Fig.16 is a structural block diagram of an information determination module in one embodiment;

[0088] Fig.17 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0089] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0090] The data download method provided in the embodiment of the present application can be applied to Figure 1In the application environment shown. Among them, the data distribution server 102 communicates with each electronic device 104 in the distributed electronic device cluster through the network. Each electronic device 104 in the electronic device cluster can be an electronic device that needs to deploy the same data. The data storage system can store the data slices downloaded by each electronic device 104. The data storage system can be integrated on each electronic device 104, or it can be placed on the cloud or other network servers. Specifically, when each electronic device 104 needs to deploy the same data to be downloaded, the data distribution server 102 will slice the data to be downloaded, and send the slice information to each electronic device 104. Each electronic device 104 will complete the download of each data slice one by one based on the slice information. Specifically, each time the target data slice and the target download source are determined from the remaining downloaded data slices, the candidate greed factor corresponding to the remaining downloaded data slices is determined according to the downloaded information of the remaining downloaded data slices of the local device, and the target data slice is determined from the remaining downloaded data slices according to the candidate greed factor, and the target download source of the target data slice is determined, and the target data slice is downloaded from the target download source. It should be noted that, for each electronic device 104, as long as other electronic devices 104 have downloaded the target data piece, they can serve as candidate download sources for the electronic device 104 to download the target data piece, and the target download source is determined from these candidate download sources.

[0091] The following embodiments of this application are Figure 1 Any electronic device 104 in the distributed cluster is used as a local device (also called a second device), and other electronic devices except the local device can be used as first devices for introduction.

[0092] In one embodiment, Figure 2 As shown, a data download method is provided, which is applied to Figure 1 Taking any electronic device 104 (i.e., a local device) in the electronic device cluster as an example, the method includes the following steps:

[0093] S201, determining candidate greediness factors corresponding to the remaining download data pieces according to the downloaded information of the remaining download data pieces of the local device.

[0094] The data slices of this embodiment can be obtained by dividing the data to be deployed on the local device (i.e., the data to be downloaded) according to certain rules, and each piece of data after division can be used as a data slice. Optionally, the data to be downloaded can be a newly developed software application product, large file data, audio and video data, etc. The so-called remaining download data slices can be all other undownloaded data slices after removing the data slices that have been downloaded by the local device from all the data slices divided from the data to be downloaded. The number of remaining download data slices in this embodiment is at least one.

[0095] Among them, the downloaded information of the remaining downloaded data pieces is used to characterize the download status of the remaining downloaded data pieces by other devices that need to deploy the data to be downloaded. Specifically, the downloaded information of the remaining downloaded data pieces includes: the first device that has downloaded the remaining downloaded data pieces, and the regional identification and network bandwidth occupancy rate of the first device. The so-called network bandwidth occupancy rate refers to the efficiency of receiving or sending information per second by the bandwidth. The so-called regional identification can be an identification that characterizes the region to which the first device belongs. For example, if the device name of the first device is named based on regional information, the regional identification can be the device name of the first device, or can be obtained by parsing the device name based on the first device. For example, assuming that the naming rule of the first device is formulated based on the region and number, that is, a specific regional name is assigned to each region, and the server names of the region all start with the specific regional name, plus the device number of the region, then the name of the first device can be parsed by the regional name to obtain the regional identification of the first device. For example, if the device 1 located in Shanghai is named sh01, and the device 2 located in Shanghai is named sh02, then the regional name "sh" is parsed to obtain the regional identification of device 1 and device 2 as Shanghai.

[0096] Optionally, in this embodiment, there are many ways to obtain the downloaded information of the remaining downloaded data pieces, which are not limited to this. One possible implementation method may be that the local device interacts with the external device to obtain the downloaded information of the remaining downloaded data pieces from the external device. Another possible implementation method may be to search and obtain the downloaded information of the remaining downloaded data pieces in a file that records the download status of the data pieces maintained locally, and this embodiment does not limit this.

[0097] Among them, the candidate greed factor in this embodiment represents the rarity of the remaining downloaded data pieces and the network loss rate of downloading the remaining downloaded data pieces. The so-called rarity of the remaining downloaded data pieces represents the number of times the remaining downloaded data pieces have been downloaded. For any remaining downloaded data piece, the fewer times it has been downloaded, the higher the corresponding rarity index value. The so-called network loss rate of downloading the remaining downloaded data pieces refers to the network loss situation that needs to be considered when downloading the remaining downloaded data pieces from the data source. Generally, the farther the distance between the data source and the local device, the higher the corresponding network loss rate.

[0098] Optionally, in this embodiment, there are many ways to determine the candidate greediness factors corresponding to the remaining downloaded data pieces according to the downloaded information of the remaining downloaded data pieces of the local device, and there are no limitations on this. One achievable method may be to calculate the greediness factor based on the downloaded information, i.e., the first device that has downloaded the remaining downloaded data pieces, and the regional identification and network bandwidth occupancy of the first device, based on a preset calculation logic (such as a preset calculation formula). Another achievable method may be to determine the candidate greediness factor based on the downloaded information, i.e., the first device that has downloaded the remaining downloaded data pieces, and the regional identification and network bandwidth occupancy of the first device through a pre-trained neural network model. For example, the downloaded information is input into the trained neural network model, and the neural network model will parse the input downloaded information according to the pre-trained algorithm and output the corresponding candidate greediness factor.

[0099] It should be noted that the number of remaining download data pieces in this embodiment may be one or more, and for each remaining download data piece, the number of first devices that have downloaded the remaining download data piece may be one or more. This embodiment needs to calculate a set of candidate greediness factors for each first device corresponding to each remaining download data piece, that is, for each remaining download data piece, the number of first devices that have downloaded the remaining download data piece is the same as the number of candidate greediness factors corresponding to the remaining download data piece.

[0100] S202: Determine a target data piece from the remaining download data pieces according to the candidate greediness factor, and determine a target download source of the target data piece.

[0101] The target data piece may be a data piece selected from the remaining downloaded data pieces and required to be downloaded this time. The target download source may be a data source for downloading the target data piece this time. It should be noted that the target download source of this embodiment is selected from each first device that has downloaded the target data piece.

[0102] Optionally, in this embodiment, the method of determining the target data slice from the remaining downloaded data slices based on the candidate greediness factors can be to compare the candidate greediness factors of the remaining downloaded data slices, select the remaining downloaded data slice corresponding to the candidate greediness factor with the largest value as the target data slice, and select the first device corresponding to the candidate greediness factor with the largest value from all first devices that have downloaded the target data slice as the target download source of the target data.

[0103] S203, after downloading the target data piece from the target download source and updating the remaining download data pieces of the local device according to the target data piece, returns to execute the operation of determining the candidate greedy factors corresponding to the remaining download data pieces according to the downloaded information of the remaining download data pieces of the local device, until there are no remaining download data pieces.

[0104] Optionally, after determining the target download source and the target data slice, the local device may send a data download request to the target download source based on the data slice identifier of the target data slice. The target download source responds to the data download request, searches for the specific content of the target data slice corresponding to the data slice identifier, and feeds it back to the local device, so that the local device can download the target data slice from the target download source. Optionally, the target download source may also be a storage address that feeds back the specific content of the target data slice to the local device. After obtaining the storage address, the local device accesses the storage address to obtain the target data slice, so that the local device can download the target data slice from the target download source.

[0105] After the local device completes the data download operation of the target data slice this time, it needs to update the remaining download data slices of the local device according to the target data slice, that is, delete the target data slice that has been downloaded this time from the remaining download data slices, and use the remaining download data slices after deletion as the updated remaining download data slices. Then, it is determined whether the number of remaining download data slices is zero. If so, it means that all data has been downloaded and the download operation is stopped. If not, it returns to re-execute the operation of S201.

[0106] In the above data download method, for each device that needs to deploy the same data, according to the downloaded information of the remaining downloaded data pieces locally, a candidate greed factor characterizing the rarity and network loss rate of the remaining downloaded data pieces is determined, and based on the candidate greed factor, the target data piece and its corresponding target download source are determined from the remaining downloaded data pieces, and then the remaining downloaded data pieces are updated after the target data piece is downloaded from the target download source, and then the above operation is performed again until there are no remaining downloaded data pieces. When determining the download order of the remaining downloaded data pieces, this scheme takes into account the rarity of each remaining downloaded data piece and the network loss rate of downloading each remaining downloaded data piece, so that the remaining downloaded data pieces can be quickly downloaded to the local device, and avoids the situation where each device end preferentially downloads the popular data piece, resulting in the situation where the final remaining downloaded data piece affects the download efficiency due to scarce resources. Compared with the traditional method of downloading data through the parallel deployment of the data distribution end, the process of downloading data in this application does not require the participation of the data distribution end, and the data distribution end only needs to issue the fragment download task, which greatly reduces the pressure on the data distribution end. In addition, this method overcomes the problem of network bandwidth limitation at the data distribution end, fully utilizes the network conditions of each first device, and selects the first device with the fastest transmission rate in the current time range to download resources, thereby effectively improving the download speed.

[0107] It should be noted that the remaining downloaded data pieces of the local device and the downloaded data pieces of the local device all belong to the data pieces after the data to be downloaded is divided. The first device and the local device both need to deploy the data to be downloaded, and the first device and the local device are deployed in different regions. In other words, the local device and the first device are distributed in different regions, but need to deploy devices with the same data to be downloaded. Since each first device can also be used as a local device to implement the above solution, applying the above solution of the present application to the local device and the first device in this scenario can help the local device and the first device complete the deployment of the data to be downloaded faster.

[0108] In addition, in the above embodiment, in order to facilitate other devices that need to download the target data slice to quickly complete the download of the target data, after the local device downloads the target data slice from the target download source, it can also include: uploading the data slice identifier of the target data slice, the local device's regional identifier and the network bandwidth occupancy rate to the tracking server. Among them, the tracking server is also called a tracker server, which is a server for monitoring and calculating the download status of the data slice. The data slice identifier can be a unique identifier for locating a data slice, for example, it can be the number or name of the data slice. Specifically, after the local device downloads the target data slice from the target download source, according to the data slice identifier of the target data slice downloaded this time, the regional identifier of the local device and the network bandwidth occupancy rate, a download information upload request is generated and sent to the tracking server, so that the tracking server responds to the download information upload request and records the data slice identifier of the target data slice downloaded this time by the local device, the regional identifier of the local device and the network bandwidth occupancy rate. The advantage of this setting is that when the target data slice is included in the remaining downloaded data slices of other devices in the future, the specific download status of the local device downloading the target data slice is fed back to other devices, so that other devices can calculate the candidate greed factor. This makes it easier to assist other devices to quickly complete the data download operation of the remaining downloaded data pieces.

[0109] Figure 3 FIG. 1 is a flow chart of a method for determining a greedy factor in an embodiment. In the embodiment of the present application, whether the greedy factor is accurately determined directly affects the accuracy of determining the target data piece and the target download source, and further affects the data download efficiency. Figure 3 As shown, this embodiment provides an optional method for determining a greedy factor, including the following steps:

[0110] S301, determining a scarcity index value of each remaining downloaded data piece according to a first device that has downloaded each remaining downloaded data piece.

[0111] Optionally, the local device may count the total number of first devices that have downloaded each remaining download data piece based on the first device that has downloaded each remaining download data piece recorded in the downloaded information of the remaining download data piece. Specifically, in this embodiment, a counter may be maintained for each remaining download data piece on the local device side. For each remaining download data piece, each time a downloaded device about the remaining download data piece is received, the count value of the counter corresponding to the remaining download data piece is automatically increased by 1, and thus in this embodiment, the count value of the counter corresponding to each remaining download data piece may be used as the total number of first devices that have downloaded the remaining data piece.

[0112] For a remaining download data piece, the smaller the number of first devices that have downloaded the remaining download data piece, the higher the rarity of the remaining download data piece. Optionally, this embodiment can determine the rarity index value of each remaining download data piece according to the total number of first devices that have downloaded each remaining data piece by the following formula (1).

[0113]

[0114] Wherein, α represents the scarcity index value of the remaining downloaded data pieces; λ represents the total number of first devices that have downloaded the remaining data pieces.

[0115] S302: Determine a network loss rate of the first device according to the regional identifier of the local device and the regional identifier of the first device.

[0116] Optionally, there are many ways to determine the network loss rate of the first device according to the regional identification of the local device and the regional identification of the first device in this embodiment, and this is not limited. One possible implementation method is: according to the regional identification of the local device and the regional identification of the first device, determine the distance difference between the local device and the first device, and according to the relationship between the distance difference and the network loss rate (such as the derivation formula or mapping relationship between the distance difference and the network loss rate), determine the network loss rate for transmitting the remaining downloaded data pieces from the first device to the second device.

[0117] Another possible implementation method is to pre-count the loss rates of network transmission between different regions, and form a loss rate mapping relationship table, i.e., a loss rate table, based on the counted loss rates and their corresponding two regions. The loss rate table is stored on the local device side, and the local device can query and obtain the network loss rates corresponding to the two regional identifiers from the locally stored loss rate table based on the regional identifier of the local device and the regional identifier of the first device, and use it as the network loss rate of the first device.

[0118] Another possible implementation method is to pre-train a neural network model that can predict network loss rate, input the regional identifier of the local device and the regional identifier of the first device into the pre-trained neural network model, and the neural network model can output the predicted network loss rate of the first device based on the two input regional identifiers.

[0119] S303, determining a candidate greediness factor for each remaining download data piece when the corresponding first device downloads it, based on the rarity index value of each remaining download data piece and the network loss rate and network bandwidth occupancy rate of the first device that has downloaded each remaining download data piece.

[0120] Optionally, this embodiment can determine the candidate greediness factor of each remaining downloaded data piece when it is downloaded by the corresponding first device based on the following formula (2), according to the rarity index value of each remaining downloaded data piece, and the network loss rate and network bandwidth occupancy rate of the first device that has downloaded each remaining downloaded data piece.

[0121] p=α(1-β)(1-γ) (2)

[0122] Among them, α (α∈(0,1]) represents the scarcity index value of each remaining downloaded data piece, γ (γ∈[0,1]) represents the network loss rate of the first device, β (β∈[0,1]) represents the network bandwidth occupancy rate of the first device, and p represents the candidate greed factor.

[0123] In this embodiment, the rarity index of each remaining download data piece is determined based on the first device that has downloaded each remaining download data piece, the network loss rate of the first device is determined based on the local device and the regional identifier of the first device, and then the candidate greediness factor of each remaining download data piece is determined based on the rarity index value of the remaining download data piece, the network loss rate of the first device and the network bandwidth occupancy rate. This embodiment provides an optional method for determining the candidate greediness factor by comprehensively considering the rarity of the data piece and the status of the device that has downloaded the data piece, which provides a guarantee for the subsequent more accurate selection of the target data piece and the target download source, thereby better improving the download efficiency of the remaining download data piece.

[0124] Figure 4 FIG. 1 is a flow chart of a method for determining a target download source in an embodiment. In the embodiment of the present application, the accuracy of determining the target data piece and the target download source is the key to ensuring the efficiency and accuracy of data downloading. Figure 4 As shown, this embodiment provides an optional method for determining a target download source, including the following steps:

[0125] S401, determining a target greediness factor corresponding to each remaining downloaded data piece according to a size relationship between candidate greediness factors corresponding to each remaining downloaded data piece.

[0126] Specifically, this embodiment can obtain the optimal download plan for each remaining download data piece based on the candidate greedy factors of each remaining download data piece obtained by the greedy algorithm, that is, for each remaining download data piece, multiple candidate greedy factors of the remaining download data piece are compared, and the largest candidate greedy factor of the remaining download data piece is selected as the target greedy factor corresponding to the remaining download data piece.

[0127] S402, determining a target data piece from the remaining download data pieces according to the size relationship between the target greediness factors corresponding to the remaining download data pieces, and determining a target download source of the target data piece from the first device that has downloaded the target data piece.

[0128] Specifically, this embodiment can obtain the optimal download plan for each remaining download data piece according to the target greediness factor of each remaining download data piece, that is, compare the size relationship between the target greediness factors of each remaining download data piece, select the largest target greediness factor, and use the remaining download data piece corresponding to the largest target greediness factor as the target data piece, and select the first device corresponding to the target greediness factor from the first device that has downloaded the target data piece as the target download source of the target data piece.

[0129] In this embodiment, when determining the target data piece and target download source for each remaining download data piece, the candidate greediness factors of each remaining download data piece are first compared to determine the target greediness factor of each remaining download data piece, and then the target greediness factors of different remaining download data pieces are compared. This method can more quickly and accurately determine the target data piece with the largest greediness factor and its corresponding target download source, thereby providing a guarantee for the subsequent rapid completion of data downloads of all remaining download data pieces.

[0130] Figure 5 FIG. 1 is a flow chart of a method for feedback of downloaded information in an embodiment. In the embodiment of the present application, in order to obtain the downloaded information of the remaining downloaded data pieces more comprehensively and accurately, Figure 5 As shown, this embodiment provides an optional method for providing feedback of downloaded information, including the following steps:

[0131] S501: Initiate a download information acquisition request to a tracking server and / or a first device according to data piece identifiers of remaining download data pieces of a local device.

[0132] Optionally, in this embodiment, the local device may call the download information acquisition request generation logic according to the data slice identifiers of the remaining download data slices, generate a download information acquisition request including the data slice identifiers of the remaining download data slices, and then send the generated download information acquisition request to the server and / or the first device.

[0133] Specifically, in this embodiment, the download information acquisition request may be sent only to the tracking server; or the download information acquisition request may be sent only to the first device; or the download information acquisition request may be sent to both the tracking server and the first device. This is not limited. For example, the download information acquisition request may be sent to the tracking server first, and if the local device cannot interact with the tracking service, the download information acquisition request may be sent to the first device. The download information acquisition request may be sent to the first device first, and if the local device cannot interact with the first device, the download information acquisition request may be sent to the tracking server. The download information acquisition request may also be sent to both the tracking server and the first device at the same time.

[0134] S502: Obtain downloaded information of the remaining downloaded data pieces fed back by the tracking server and / or the first device in response to the download information acquisition request.

[0135] Optionally, after receiving the download information acquisition request, the tracking server and the first device will respond to the received download information acquisition request, determine the downloaded information about the remaining download data pieces, and feed it back to the local device. However, since the first device and the tracking server have different functions, the two determine the downloaded information of the remaining download data pieces in different ways.

[0136] Specifically, the tracking server may respond to the download information acquisition request in the following manner: according to the download information acquisition request, determine the data piece identifiers of the remaining download data pieces; according to the data piece identifiers and the data piece identifiers of the downloaded data pieces uploaded by each first device, the regional identifier of the first device and the network bandwidth occupancy rate, determine the downloaded information of the remaining download data pieces, and feed it back to the local server. The first device may respond to the download information acquisition request in the following manner: according to the download information acquisition request, determine whether there are data pieces that it has downloaded among the data pieces for which information needs to be obtained (i.e., the remaining download data pieces of the local device); if so, feed back the data piece identifiers of the data pieces that it has downloaded, its own regional identifier and the network bandwidth occupancy rate to the sender of the download information acquisition request (i.e., the local device).

[0137] Correspondingly, if the local device only obtains the downloaded information from the tracking server, the obtained downloaded information can be directly used for the subsequent calculation of the candidate greediness factor; if the downloaded information is only obtained from the first device, it is necessary to summarize the downloaded information obtained from different first devices, and according to the data slice identifiers in the downloaded information fed back by different first devices, combined with the first device corresponding to the data slice identifier, determine the first device that has downloaded each remaining data slice, and record it in the downloaded information. Then the subsequent operation of calculating the candidate greediness factor can be performed. If the local device obtains the downloaded information from both the tracking server and the first device, it can first process the downloaded information fed back by the first device in the above manner, and then merge and de-duplicate it with the downloaded information fed back by the tracking server to obtain the final downloaded information, and then perform the subsequent calculation of the candidate greediness factor.

[0138] In this embodiment, the downloaded information of the remaining downloaded data pieces is obtained by interacting with the tracking server and / or the first device, thereby improving the flexibility and accuracy of obtaining the downloaded information.

[0139] It should be noted that, since both the local device and the first device need to download the same data, there may be a situation where the remaining download data pieces of the other first devices are data pieces that have been downloaded by the local device. In other words, the local device may receive a download information acquisition request sent by the other first devices. At this time, the local device can respond to the download information acquisition request and determine whether the remaining download data pieces of the other first devices have been downloaded locally based on the data piece identifiers contained therein. If so, the data piece identifier of the locally downloaded data piece, the local region identifier, and the local network bandwidth occupancy rate are fed back to the other first devices.

[0140] Optionally, in order to avoid the situation where the download efficiency is affected due to the long waiting time for obtaining the downloaded information after the local device sends the download information acquisition request, the above embodiment can be further optimized by executing S502 to obtain the downloaded information of the remaining downloaded data pieces fed back by the tracking server and / or the first device in response to the download information acquisition request, that is, the downloaded information of the remaining downloaded data pieces fed back by the tracking server and / or the first device in response to the download information acquisition request is obtained within a preset time period. The preset time period can be determined according to actual needs or factors such as the amount of data downloaded, and is not limited to this.

[0141] Optionally, based on the above embodiment, this embodiment provides an optional method for locally deploying complete data to be downloaded, such as Figure 6 As shown, the data downloading method includes:

[0142] S601, determining a first download data piece of the data to be downloaded according to the segment information of the data to be downloaded sent by the data distribution terminal, and downloading the first download data piece.

[0143] Among them, the data distribution end can be the end responsible for deploying data for the device. For example, when a new software application is developed, the data distribution end (such as a data distribution server) is required to deploy the newly developed software application to devices in multiple different regions. The data to be downloaded can be the data that the data distribution end needs to deploy to the device end. For example, it can be a newly developed application program that needs to be deployed to devices in multiple different regions. The fragmentation information of the data to be downloaded can be the information of each fragment obtained after the data to be downloaded is fragmented according to certain rules. For example, it can be the fragment identification information of each fragment and the total number of fragments. Optionally, the fragmentation information of this embodiment can be a metadata file in the .torrent format. The first downloaded data fragment can be the first data fragment to be downloaded determined from the multiple data fragments divided by the data to be downloaded.

[0144] Optionally, when the data distribution end of this embodiment sends the data to be deployed to the device end, it will first perform fragmentation processing on the data to be downloaded based on certain fragmentation rules. For example, the data to be downloaded may be randomly divided into multiple data slices, or the data to be downloaded may be equally divided into several data slices, etc. Then, according to the relevant information of the divided data slices, such as the data slice identifier of each data slice and the total number of data slices, fragmentation information is generated and sent to all devices that need to deploy the data to be downloaded. The local device (i.e., the second device) and the first device involved in this embodiment are both devices that need to deploy the data to be downloaded. Taking the local device as an example, after receiving the fragmentation information of the data to be downloaded sent by the data distribution end, one can be selected from each divided data slice as the first download data slice according to the fragmentation information. For example, one can be randomly selected from multiple divided data slices as the first download data slice. It can also be based on a pre-set strategy to randomly select one from multiple data slices as the first download data slice.

[0145] Optionally, in this embodiment, the download source for downloading the first download data piece may be pre-set, for example, a data distribution terminal or other device storing the first download data piece. The local device may download the first download data piece from a pre-set download source.

[0146] S602: Determine the remaining download data pieces of the local device according to the segment information and the first download data piece.

[0147] Specifically, the local device can determine the data slice identifiers of all data slices that need to be downloaded based on the fragment information, then delete the data slice identifier of the first downloaded data slice from all the data slice identifiers, and use the data slices corresponding to the remaining data slice identifiers after the deletion as the remaining data slices that need to be downloaded, i.e., the remaining downloaded data slices.

[0148] S603: Upload the data piece identifier of the first downloaded data piece, the region identifier of the local device, and the network bandwidth occupancy rate to the tracking server.

[0149] Specifically, after completing the download operation of the first downloaded data piece, the local device may perform network communication with the tracking server, and upload the data piece identifier of the first downloaded data piece, the region identifier of the local device, and the network bandwidth occupancy rate to the tracking server.

[0150] S604: Determine candidate greediness factors corresponding to the remaining download data pieces according to the downloaded information of the remaining download data pieces of the local device.

[0151] The greed factor represents the rarity of the remaining downloaded data pieces and the network loss rate of downloading the remaining downloaded data pieces.

[0152] S605 , determining a target data piece from the remaining downloaded data pieces according to the candidate greediness factor, and determining a target download source of the target data piece.

[0153] S606, after downloading the target data piece from the target download source and updating the remaining download data pieces of the local device according to the target data piece, returns to execute the operation of determining the candidate greedy factors corresponding to the remaining download data pieces according to the downloaded information of the remaining download data pieces of the local device until there are no remaining download data pieces.

[0154] This embodiment provides a process in which after a data distribution terminal sends the fragment information of the data to be downloaded to the local device, the local device determines and downloads the first download data piece, determines the remaining download data pieces, and adjusts the order of the remaining download data pieces by considering the scarcity of the remaining download data pieces, as well as the network loss rate and network bandwidth occupancy rate of downloading the remaining download data pieces, and completes the download operation of all the remaining download data pieces, providing a new solution for the process of deploying the same data to be downloaded on different devices. This greatly improves the data download efficiency and reduces the pressure on the data distribution terminal.

[0155] In another embodiment, if Figure 7 As shown, a data download method is provided, and the method is applied to a tracking server as an example for explanation. Optionally, the tracking server can be Figure 1 The distribution server 102 is started and controlled. The following steps are included:

[0156] S701: Receive a download information acquisition request sent by a second device.

[0157] The download information acquisition request is initiated according to the data slice identifier of the remaining download data slice of the second device. Specifically, when the second device has remaining download data slices, it will initiate a download information acquisition request to the tracking server according to the data slice identifier of its remaining download data slice. Correspondingly, the tracking server will receive the download information acquisition request sent by the second device. It should be noted that the specific implementation method of the download information acquisition request sent by the second device to the tracking server has been introduced in the above embodiment and will not be repeated here.

[0158] In addition, it should be noted that the second device in this embodiment is the local device in the above embodiment.

[0159] S702, determining downloaded information of the remaining download data pieces according to the download information acquisition request;

[0160] The downloaded information includes the first device that has downloaded the remaining download data piece, as well as the region identifier and network bandwidth occupancy rate of the first device.

[0161] Optionally, since the download information acquisition request is initiated based on the data slice identifiers of the remaining download data slices of the second device, the download information acquisition request contains the data slice identifiers of the remaining download data slices. Therefore, the tracking server can extract the data slice identifiers of the remaining download data slices from the information contained in the download information acquisition request in response to the download information acquisition request, and then search for the downloaded information corresponding to the data slice identifier from the downloaded information of the data slices in the local tracking record as the downloaded information of the remaining data slices.

[0162] Optionally, an optional implementation method is: according to the download information acquisition request, determine the data piece identifier of the remaining downloaded data piece, and determine the downloaded information of the remaining downloaded data piece according to the data piece identifier and the data piece identifier of the downloaded data piece uploaded by the first device, the regional identifier of the first device and the network bandwidth occupancy rate. Specifically, the second device and the first device that needs to deploy the same data to be downloaded as the second device will upload the data piece identifier of the downloaded data piece, the regional identifier of the region to which it belongs, and its current network bandwidth occupancy rate to the tracking server each time the download of the data piece is completed. In other words, the tracking server locally records the data piece identifier of the downloaded data uploaded by the first device and the second device, as well as the regional identifier and the network bandwidth occupancy rate of the first device and the second device. At this time, since the download information acquisition request is initiated by the second device, the tracking server can compare the data slice identifiers of the remaining downloaded data slices with the data slice identifiers of the downloaded data uploaded by each first device recorded locally, and find the first device that has downloaded each remaining downloaded data slice, and then use the first device that has downloaded each remaining downloaded data slice, as well as the regional identifier and network bandwidth occupancy rate of each first device found as the downloaded information of the remaining downloaded data slices.

[0163] S703, feeding back the downloaded information to the second device, so that the second device can determine the candidate greediness factors corresponding to the remaining downloaded data pieces according to the downloaded information, determine the target data piece and the target download source according to the candidate greediness factors, and download the target data piece from the target download source.

[0164] The greed factor represents the rarity of the remaining downloaded data pieces and the network loss rate of downloading the remaining downloaded data pieces.

[0165] Specifically, after determining the downloaded information of the remaining downloaded data pieces, the tracking server will feed back the downloaded information to the second device that sends the download information acquisition request. After receiving the downloaded information, the second device will determine the candidate greediness factor corresponding to the remaining downloaded data pieces of the second device based on the downloaded information; determine the target data piece from the remaining downloaded data pieces based on the candidate greediness factor, and determine the target download source of the target data piece; download the target data piece from the target download source, and after updating the remaining downloaded data pieces of the local device based on the target data piece, return to execute the data piece identifier of the remaining downloaded data piece of the second device, and initiate the download information acquisition request to the tracking server until there are no remaining downloaded data pieces. It should be noted that the specific implementation method of the second device end determining the candidate greediness factor, determining the target data piece and the target download source, and then downloading the target data piece from the target download source has been introduced in the above embodiment and will not be repeated here.

[0166] In the above embodiment, the tracking server responds to the information acquisition request sent by the second device, determines the downloaded information of the remaining downloaded data pieces of the second device and feeds it back to the second device, so that the second device can determine the candidate greediness factors that characterize the rarity of the remaining downloaded data pieces and the network loss rate of downloading the remaining downloaded data pieces based on the downloaded information, and then determine the target data piece and the target download source based on the candidate greediness factors, and download the target data piece from the target download source.

[0167] In this embodiment, the second device obtains the downloaded information of the remaining downloaded data pieces by interacting with the tracking server to determine the candidate greed factors of the remaining downloaded data pieces, and determines the download order based on the candidate greed factors, so as to realize the rapid download of the remaining downloaded data pieces to the local device, and avoid the situation where each device end gives priority to downloading the popular data pieces, resulting in the final remaining downloaded data pieces affecting the download efficiency due to scarce resources. Compared with the traditional method of downloading data through the parallel deployment of the data distribution end, the process of downloading data in this application does not require the participation of the data distribution end. The data distribution end only needs to issue the fragment download task, which greatly reduces the pressure on the data distribution end. In addition, this method breaks through the problem that the data distribution end is limited by the network bandwidth, makes full use of the network conditions of each first device recorded by the tracking server, and selects the first device with the fastest transmission rate of the downloaded resources within the current time range for resource download, which effectively improves the download speed.

[0168] It should be noted that the remaining download data slices and the downloaded data slices of the second device are all data slices after the data to be downloaded is divided. The first device and the second device both need to deploy the data to be downloaded, and the first device and the second device are deployed in different regions.

[0169] In one embodiment, this embodiment provides an optional method for the second device to interact with the tracking server to implement the process of the second device downloading the data to be downloaded. Figure 8 As shown, the method comprises the following steps:

[0170] S801, the second device determines a first download data piece of the data to be downloaded according to the segmentation information of the data to be downloaded sent by the data distribution terminal, and downloads the first download data piece.

[0171] S802: The second device determines remaining download data pieces of the second device according to the fragment information and the first download data piece.

[0172] S803: The second device uploads the data piece identifier of the first downloaded data piece, the region identifier of the second device, and the network bandwidth occupancy rate to the tracking server.

[0173] S804: The second device initiates a download information acquisition request to the tracking server according to the data slice identifiers of the remaining download data slices of the second device.

[0174] S805: The tracking server receives a download information acquisition request sent by the second device.

[0175] S806: The tracking server determines the data piece identifiers of the remaining download data pieces according to the download information acquisition request.

[0176] S807, the tracking server determines the downloaded information of the remaining downloaded data slices according to the data slice identifier and the data slice identifier of the downloaded data slice uploaded by the first device, the region identifier of the first device and the network bandwidth occupancy rate.

[0177] S808: The tracking server feeds back the downloaded information to the second device.

[0178] S809: The second device obtains the downloaded information of the remaining downloaded data pieces fed back by the tracking server within a preset time period.

[0179] S810: The second device determines a scarcity indicator value of each remaining downloaded data piece according to the first device that has downloaded each remaining downloaded data piece in the downloaded information.

[0180] S811: The second device determines a network loss rate of the first device according to the regional identifier of the second device and the regional identifier of the first device.

[0181] S812, the second device determines a candidate greediness factor for each remaining downloaded data piece when the corresponding first device downloads it according to the rarity index value of each remaining downloaded data piece and the network loss rate and network bandwidth occupancy rate of the first device that has downloaded each remaining downloaded data piece.

[0182] S813: The second device determines a target greediness factor corresponding to each remaining downloaded data piece according to a size relationship between candidate greediness factors corresponding to each remaining downloaded data piece.

[0183] S814, the second device determines the target data piece from the remaining downloaded data pieces according to the size relationship between the target greedy factors corresponding to the remaining downloaded data pieces, and determines the target download source of the target data piece from the first device that has downloaded the target data piece.

[0184] S815, the second device downloads the target data slice from the target download source, and uploads the data slice identifier of the target data slice, the region identifier of the local device, and the network bandwidth occupancy rate to the tracking server.

[0185] S816: The second device updates the remaining downloaded data pieces of the second device according to the target data piece.

[0186] S817, the second device determines whether the number of remaining downloaded data pieces is zero, if so, executes S818, if not, executes S804.

[0187] S818: The second device completes the downloading operation of the data to be downloaded.

[0188] Combination Fig. 9 As shown, it is assumed that the data distribution end is a product distribution server, the data to be downloaded and deployed is a newly developed software application product, and the devices on which the software application product needs to be deployed include server shA01, server shB02, and server bjC01. The product distribution server slices the data of the software application product to obtain 4 data slices, namely slice 1 to slice 4. The product distribution server sends the slice information of slices 1-4 to server shA01, server shB02, and server bjC01.

[0189] Next, taking server shA01 as the local device (that is, the second device), server shB02 and server bjC01 as the first device as an example, server shA01 can use a random algorithm to determine fragment 4 as the first download data fragment, and download fragment 4 from the product distribution server. At the same time, based on the fragment information and fragment 4, fragments 1-3 are determined as the remaining download data fragments, and the fragment identifier of fragment 4, the regional identifier of server shA01 and the network bandwidth occupancy rate are uploaded to the tracking server.

[0190] After completing the download of segment 4, server shA01 determines that the remaining downloaded data segments include segments 1-3. At this time, it can interact with the tracking server to obtain the downloaded information of segments 1-3 from server shB02 and server bjC01, and then determine the candidate greedy factors of segments 1-3 based on the downloaded information of segments 1-3 and the following formula (3).

[0191]

[0192] Among them, p k is the candidate greed factor of the kth shard, λ k is the number of servers that have downloaded the kth shard, β i is the bandwidth occupancy of the i-th server that has downloaded the k-th segment, γ i is the network loss rate of the i-th server that has downloaded the k-th shard.

[0193] After calculating all candidate greed factors of fragment 1, fragment 2 and fragment 3 based on the above formula (3), select the fragment corresponding to the downloadable server with the largest greed factor and download it. At the same time, upload the fragment identifier of the downloaded fragment, the regional identifier of server shA01 and the network bandwidth occupancy rate to the tracking server. Then server shA01 will determine whether all fragments (i.e., fragment 1-fragment 4) have been downloaded. If not, return to the above method to continue downloading for the remaining downloaded fragments. Until all fragments 1-4 are downloaded to server shA01, the interactive download ends.

[0194] The specific process of the above S801-S818 can be found in the description of the above method embodiment. The implementation principle and technical effect are similar and will not be repeated here.

[0195] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0196] Based on the same inventive concept, the embodiment of the present application also provides a data download device for implementing the data download method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more data download device embodiments provided below can refer to the limitations on the data download method above, and will not be repeated here.

[0197] In one embodiment, Fig.10 As shown, a data downloading device 1 is provided, comprising: a factor determination module 10, a data screening module 11 and a downloading and updating module 12, wherein:

[0198] The factor determination module 10 is used to determine the candidate greediness factor corresponding to the remaining download data piece according to the downloaded information of the remaining download data piece of the local device; wherein the candidate greediness factor represents the rarity of the remaining download data piece and the network loss rate of downloading the remaining download data piece;

[0199] The data screening module 11 is used to determine the target data piece from the remaining download data pieces according to the candidate greediness factor, and determine the target download source of the target data piece;

[0200] The download update module 12 is used to download the target data piece from the target download source, and after updating the remaining download data pieces of the local device according to the target data piece, return to execute the operation of determining the candidate greedy factor corresponding to the remaining download data piece according to the downloaded information of the remaining download data piece of the local device until there are no remaining download data pieces.

[0201] In one embodiment, the downloaded information of the remaining downloaded data pieces includes: the first device that has downloaded the remaining downloaded data pieces, and the region identifier and network bandwidth occupancy rate of the first device.

[0202] In one embodiment, Fig.11 As shown, Fig.10 The factor determination module 10 in includes:

[0203] The index determination unit 101 is used to determine the scarcity index value of each remaining downloaded data piece according to the first device that has downloaded each remaining downloaded data piece;

[0204] The loss determination unit 102 is used to determine the network loss rate of the first device according to the regional identifier of the local device and the regional identifier of the first device;

[0205] The factor determination unit 103 is used to determine the candidate greediness factor of each remaining download data piece when the corresponding first device downloads it according to the scarcity index value of each remaining download data piece and the network loss rate and network bandwidth occupancy rate of the first device that has downloaded each remaining download data piece.

[0206] In one embodiment, Fig.12 As shown, Fig.10 The data screening module 11 in the embodiment includes:

[0207] A first determining unit 111 is used to determine a target greediness factor corresponding to each remaining downloaded data piece according to a size relationship between candidate greediness factors corresponding to each remaining downloaded data piece;

[0208] The second determining unit 112 is used to determine the target data piece from the remaining download data pieces according to the size relationship between the target greediness factors corresponding to the remaining download data pieces, and determine the target download source of the target data piece from the first device that has downloaded the target data piece.

[0209] In one embodiment, Fig.13 As shown, Fig.10 The data downloading device 1 shown further includes:

[0210] A request initiating module 13, configured to initiate a download information acquisition request to the tracking server and / or the first device according to the data piece identifiers of the remaining download data pieces of the local device;

[0211] The information acquisition module 14 is used to acquire the downloaded information of the remaining downloaded data pieces fed back by the tracking server and / or the first device in response to the download information acquisition request.

[0212] In one embodiment, Fig.13 The information acquisition module 14 is specifically used to obtain the downloaded information of the remaining downloaded data pieces fed back by the tracking server and / or the first device in response to the download information acquisition request within a preset time period.

[0213] In one embodiment, Fig.10 The download and update module 12 is also specifically used to upload the data piece identifier of the target data piece, the regional identifier of the local server and the network bandwidth occupancy rate to the tracking server.

[0214] In one embodiment, Fig.14 As shown, Fig.11 The data downloading device 1 shown further includes:

[0215] The initial download module 15 is used to determine the first download data piece of the data to be downloaded according to the fragmentation information of the data to be downloaded sent by the data distribution terminal, and download the first download data piece;

[0216] A data determination module 16, configured to determine remaining download data pieces of the local device according to the fragment information and the first download data piece;

[0217] The information uploading module 17 is used to upload the data piece identifier of the first downloaded data piece, the region identifier of the local device and the network bandwidth occupancy rate to the tracking server.

[0218] In one embodiment, the remaining download data pieces and the downloaded data pieces of the local device are all data pieces after the data to be downloaded is divided. Both the first device and the local device need to deploy the data to be downloaded, and the first device and the local device are deployed in different regions.

[0219] In one embodiment, Fig.15 As shown, a data download device 2 is provided, comprising: an acquisition request receiving module 20, a download information determining module 21 and a download information feedback module 22, wherein:

[0220] A request receiving module 20, configured to receive a download information acquisition request sent by a second device, wherein the download information acquisition request is initiated according to a data slice identifier of a remaining download data slice of the second device;

[0221] An information determination module 21, configured to determine downloaded information of remaining download data pieces according to a download information acquisition request;

[0222] The information feedback module 22 is used to feed back the downloaded information to the second device, so that the second device can determine the candidate greediness factors corresponding to the remaining downloaded data pieces based on the downloaded information, determine the target data piece and the target download source based on the candidate greediness factors, and download the target data piece from the target download source; wherein the greediness factor represents the rarity of the remaining downloaded data pieces and the network loss rate of downloading the remaining downloaded data pieces.

[0223] In one embodiment, the downloaded information of the remaining downloaded data pieces includes: the first device that has downloaded the remaining downloaded data pieces, and the region identifier and network bandwidth occupancy rate of the first device.

[0224] In one embodiment, Fig.16 As shown, Fig.15 The information determination module 21 includes:

[0225] An identifier determining unit 211 determines the data slice identifiers of the remaining download data slices according to the download information acquisition request;

[0226] The information determining unit 212 determines the downloaded information of the remaining downloaded data slices according to the data slice identifier and the data slice identifier of the downloaded data slice uploaded by the first device, the region identifier of the first device and the network bandwidth occupancy rate.

[0227] In one embodiment, the remaining download data slices and the downloaded data slices of the second device both belong to the data slices after the data to be downloaded is divided. The first device and the second device both need to deploy the data to be downloaded, and the first device and the second device are deployed in different regions.

[0228] Each module in the above data download device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.

[0229] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Fig.17As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data slices. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a data download method is implemented.

[0230] Those skilled in the art will understand that Fig.17 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.

[0231] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0232] According to the downloaded information of the remaining download data pieces of the local server, the candidate greedy factors corresponding to the remaining download data pieces are determined; wherein the greedy factors represent the rarity of the remaining download data pieces and the network loss rate of downloading the remaining download data pieces; according to the candidate greedy factors, the target data piece is determined from the remaining download data pieces, and the target download source of the target data piece is determined; after downloading the target data piece from the target download source and updating the remaining download data pieces of the local server according to the target data piece, the operation of determining the candidate greedy factors corresponding to the remaining download data pieces according to the downloaded information of the remaining download data pieces of the local server is returned until there are no remaining download data pieces.

[0233] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0234] A download information acquisition request sent by a second server is received, wherein the download information acquisition request is initiated according to a data piece identifier of a remaining download data piece of the second server; downloaded information of the remaining download data piece is determined according to the download information acquisition request; the downloaded information is fed back to the second server, so that the second server can determine a candidate greediness factor corresponding to the remaining download data piece according to the downloaded information, determine a target data piece and a target download source according to the candidate greediness factor, and download the target data piece from the target download source; wherein the greediness factor represents the rarity of the remaining download data piece and the network loss rate of downloading the remaining download data piece.

[0235] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0236] According to the downloaded information of the remaining download data pieces of the local server, the candidate greedy factors corresponding to the remaining download data pieces are determined; wherein the greedy factors represent the rarity of the remaining download data pieces and the network loss rate of downloading the remaining download data pieces; according to the candidate greedy factors, the target data piece is determined from the remaining download data pieces, and the target download source of the target data piece is determined; after downloading the target data piece from the target download source and updating the remaining download data pieces of the local server according to the target data piece, the operation of determining the candidate greedy factors corresponding to the remaining download data pieces according to the downloaded information of the remaining download data pieces of the local server is returned until there are no remaining download data pieces.

[0237] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0238] A download information acquisition request sent by a second server is received, wherein the download information acquisition request is initiated according to a data piece identifier of a remaining download data piece of the second server; downloaded information of the remaining download data piece is determined according to the download information acquisition request; the downloaded information is fed back to the second server, so that the second server can determine a candidate greediness factor corresponding to the remaining download data piece according to the downloaded information, determine a target data piece and a target download source according to the candidate greediness factor, and download the target data piece from the target download source; wherein the greediness factor represents the rarity of the remaining download data piece and the network loss rate of downloading the remaining download data piece.

[0239] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:

[0240] According to the downloaded information of the remaining download data pieces of the local server, the candidate greedy factors corresponding to the remaining download data pieces are determined; wherein the greedy factors represent the rarity of the remaining download data pieces and the network loss rate of downloading the remaining download data pieces; according to the candidate greedy factors, the target data piece is determined from the remaining download data pieces, and the target download source of the target data piece is determined; after downloading the target data piece from the target download source and updating the remaining download data pieces of the local server according to the target data piece, the operation of determining the candidate greedy factors corresponding to the remaining download data pieces according to the downloaded information of the remaining download data pieces of the local server is returned until there are no remaining download data pieces.

[0241] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:

[0242] A download information acquisition request sent by a second server is received, wherein the download information acquisition request is initiated according to a data piece identifier of a remaining download data piece of the second server; downloaded information of the remaining download data piece is determined according to the download information acquisition request; the downloaded information is fed back to the second server, so that the second server can determine a candidate greediness factor corresponding to the remaining download data piece according to the downloaded information, determine a target data piece and a target download source according to the candidate greediness factor, and download the target data piece from the target download source; wherein the greediness factor represents the rarity of the remaining download data piece and the network loss rate of downloading the remaining download data piece.

[0243] It should be noted that the download information involved in this application (including but not limited to data to be downloaded, data segments, downloaded information of data segments, regional identifiers, etc.) are all information and data fully authorized by all parties.

[0244] 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 computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0245] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0246] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be construed as limiting the scope of the present application. It should be noted that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A data downloading method, It is characterized in that The method comprises: Determine, according to the downloaded information of the remaining downloaded data pieces of the local device, a candidate greediness factor corresponding to the remaining downloaded data pieces; wherein the candidate greediness factor represents the rarity of the remaining downloaded data pieces and the network loss rate of downloading the remaining downloaded data pieces; the downloaded information of the remaining downloaded data pieces includes: the first device that has downloaded the remaining downloaded data pieces, and the regional identification and network bandwidth occupancy rate of the first device; Determine a target data piece from the remaining downloaded data pieces according to the candidate greediness factor, and determine a target download source of the target data piece; After downloading the target data piece from the target download source and updating the remaining download data pieces of the local device according to the target data piece, return to execute the operation of determining the candidate greedy factor corresponding to the remaining download data piece according to the downloaded information of the remaining download data piece of the local device until there are no remaining download data pieces.

2. The method according to claim 1, It is characterized in that The step of determining, based on the downloaded information of the remaining downloaded data pieces of the local device, the candidate greediness factors corresponding to the remaining downloaded data pieces comprises: Determining a scarcity indicator value of each remaining downloaded data piece according to the first device that has downloaded each remaining downloaded data piece; Determining a network impairment rate of the first device according to the regional identifier of the local device and the regional identifier of the first device; According to the scarcity index value of each remaining download data piece, and the network loss rate and network bandwidth occupancy rate of the first device that has downloaded each remaining download data piece, a candidate greediness factor is determined when each remaining download data piece is downloaded by the corresponding first device.

3. The method according to claim 1, It is characterized in that The step of determining a target data piece from the remaining downloaded data pieces according to the candidate greediness factor, and determining a target download source of the target data piece, comprises: Determine the target greediness factor corresponding to each remaining download data piece according to the size relationship between the candidate greediness factors corresponding to each remaining download data piece; According to the size relationship between the target greed factors corresponding to the remaining downloaded data pieces, a target data piece is determined from the remaining downloaded data pieces, and a target download source of the target data piece is determined from the first device that has downloaded the target data piece.

4. The method according to claim 1, It is characterized in that The method further comprises: Initiating a download information acquisition request to the tracking server and / or the first device according to the data piece identifiers of the remaining download data pieces of the local device; Obtain the downloaded information of the remaining downloaded data pieces fed back by the tracking server and / or the first device in response to the download information acquisition request.

5. The method according to claim 4, It is characterized in that The obtaining of the downloaded information of the remaining downloaded data pieces fed back by the tracking server and / or the first device in response to the download information obtaining request includes: Within a preset time period, the downloaded information of the remaining downloaded data pieces fed back by the tracking server and / or the first device in response to the download information acquisition request is obtained.

6. The method according to claim 1, It is characterized in that After downloading the target data piece from the target download source, the method further includes: The data slice identifier of the target data slice, the region identifier of the local device and the network bandwidth occupancy rate are uploaded to the tracking server.

7. The method according to claim 1, It is characterized in that Before determining the candidate greediness factors corresponding to the remaining downloaded data pieces according to the downloaded information of the remaining downloaded data pieces of the local device, the method further includes: Determine a first download data piece of the data to be downloaded according to the piece information of the data to be downloaded sent by the data distribution terminal, and download the first download data piece; Determine the remaining download data pieces of the local device according to the segment information and the first download data piece; The data piece identifier of the first downloaded data piece, the region identifier of the local device and the network bandwidth occupancy rate are uploaded to the tracking server.

8. The method according to any one of claims 1 to 7, It is characterized in that The remaining download data pieces and the downloaded data pieces of the local device are all data pieces after the data to be downloaded is divided. Both the first device and the local device need to deploy the data to be downloaded, and the first device and the local device are deployed in different regions.

9. A data downloading method, It is characterized in that The method comprises: Receiving a download information acquisition request sent by a second device, wherein the download information acquisition request is initiated according to a data slice identifier of a remaining download data slice of the second device; Determining downloaded information of the remaining downloaded data pieces according to the download information acquisition request; the downloaded information of the remaining downloaded data pieces includes: a first device that has downloaded the remaining downloaded data pieces, and a regional identifier and a network bandwidth occupancy rate of the first device; The downloaded information is fed back to the second device so that the second device can determine the candidate greediness factors corresponding to the remaining downloaded data pieces according to the downloaded information, determine the target data piece and the target download source according to the candidate greediness factors, and download the target data piece from the target download source; wherein the greediness factor represents the rarity of the remaining downloaded data pieces and the network loss rate for downloading the remaining downloaded data pieces.

10. The method according to claim 9, It is characterized in that The step of determining the downloaded information of the remaining downloaded data pieces according to the download information acquisition request includes: Determining data slice identifiers of the remaining download data slices according to the download information acquisition request; The downloaded information of the remaining downloaded data pieces is determined according to the data piece identifier and the data piece identifier of the downloaded data piece uploaded by the first device, the regional identifier of the first device and the network bandwidth occupancy rate.

11. The method according to claim 9 or 10, It is characterized in that The remaining download data slices and the downloaded data slices of the second device both belong to the data slices after the data to be downloaded is divided. The first device and the second device both need to deploy the data to be downloaded, and the first device and the second device are deployed in different regions.

12. A data downloading device, It is characterized in that The device comprises: A factor determination module is used to determine a candidate greed factor corresponding to the remaining download data piece according to the downloaded information of the remaining download data piece of the local device; wherein the candidate greed factor represents the rarity of the remaining download data piece and the network loss rate of downloading the remaining download data piece; the downloaded information of the remaining download data piece includes: a first device that has downloaded the remaining download data piece, and a regional identifier and a network bandwidth occupancy rate of the first device; A data screening module, used to determine a target data piece from the remaining downloaded data pieces according to the candidate greediness factor, and determine a target download source of the target data piece; A download update module is used to download the target data piece from the target download source, and after updating the remaining download data pieces of the local device according to the target data piece, return to execute the operation of determining the candidate greedy factor corresponding to the remaining download data piece according to the downloaded information of the remaining download data piece of the local device until there are no remaining download data pieces.

13. A data downloading device, It is characterized in that The device comprises: A request receiving module, configured to receive a download information acquisition request sent by a second device, wherein the download information acquisition request is initiated according to a data slice identifier of a remaining download data slice of the second device; An information determination module, configured to determine the downloaded information of the remaining downloaded data pieces according to the download information acquisition request; the downloaded information of the remaining downloaded data pieces includes: a first device that has downloaded the remaining downloaded data pieces, and a regional identifier and a network bandwidth occupancy rate of the first device; An information feedback module is used to feed back the downloaded information to the second device, so that the second device can determine the candidate greediness factors corresponding to the remaining downloaded data pieces according to the downloaded information, determine the target data piece and the target download source according to the candidate greediness factors, and download the target data piece from the target download source; wherein the greediness factor represents the rarity of the remaining downloaded data pieces and the network loss rate for downloading the remaining downloaded data pieces.

14. A computer device comprising a memory and a processor, wherein the memory stores a computer program. It is characterized in that When the processor executes the computer program, the steps of the method according to any one of claims 1 to 11 are implemented.

15. A computer-readable storage medium having a computer program stored thereon, It is 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 11 are implemented.

16. A computer program product comprising a computer program, It is 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 11 are implemented.

Citation Information

Patent Citations

  • Downloading method and device

    CN101635742A

  • Method and device for downloading resource file

    US20210194951A1