CN111782151A - Download management method and device - Google Patents

Download management method and device Download PDF

Info

Publication number
CN111782151A
CN111782151A CN202010632018.9A CN202010632018A CN111782151A CN 111782151 A CN111782151 A CN 111782151A CN 202010632018 A CN202010632018 A CN 202010632018A CN 111782151 A CN111782151 A CN 111782151A
Authority
CN
China
Prior art keywords
download
block
data
downloading
blocks
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010632018.9A
Other languages
Chinese (zh)
Inventor
陈天宇
梁波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhuhai Kingsoft Online Game Technology Co Ltd
Original Assignee
Zhuhai Kingsoft Online Game Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhuhai Kingsoft Online Game Technology Co Ltd filed Critical Zhuhai Kingsoft Online Game Technology Co Ltd
Priority to CN202010632018.9A priority Critical patent/CN111782151A/en
Publication of CN111782151A publication Critical patent/CN111782151A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0614Improving the reliability of storage systems
    • G06F3/0616Improving the reliability of storage systems in relation to life time, e.g. increasing Mean Time Between Failures [MTBF]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/061Improving I/O performance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/064Management of blocks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0656Data buffering arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1074Peer-to-peer [P2P] networks for supporting data block transmission mechanisms
    • H04L67/1078Resource delivery mechanisms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application provides a download management method and device. The download management method comprises the following steps: storing the downloading block obtained by the BT downloading mode into a data block; checking whether a download block in the data block is missing; when any download block of the data blocks is missing, downloading the missing download block of the data blocks again in an HTTP download mode; and when the download block in the data block is complete, storing the data block into a local storage space. According to the download management method and device provided by the embodiment, the obtained data blocks are complete and continuous, and the complete and continuous data blocks are stored in the preset cache and then are written into the local storage space together, so that the possibility of random writing when the data blocks are written into the local storage space is reduced, computer hardware equipment is protected, the data writing time is shortened, and the service life of the computer hardware equipment is prolonged.

Description

Download management method and device
Technical Field
The present application relates to the field of internet technologies, and in particular, to a download management method and apparatus.
Background
With the popularization of the internet, the demand of people for network resources is increasing, and downloading resources from the internet becomes the most common way. Bittorrent (BT) and hypertext transfer protocol (HTTP) are currently popular download technologies for the internet.
When downloading in a BT mode, a BT client analyzes a torrent file to obtain a Tracker address, and then is connected with a Tracker server. The Tracker server responds to the request of the downloader and provides the downloader with the IP of other downloaders (including the publisher). The downloader connects to other downloaders, and according to the torrent file, both inform the other party of the already existing blocks, respectively, and then exchange data with each other.
In the existing BT downloading mode, a BT protocol virtually divides a file to be downloaded into blocks with equal sizes, and a downloader needs to obtain a corresponding tornt file first and then downloads the file by using BT client software. This also means that if the torrent file acquired by the user is missing, the data to be downloaded may be incomplete, which may result in a failure in downloading, and the data acquired by the BT download may result in data being randomly written into the disk, which may shorten the service life of the hardware device.
Disclosure of Invention
In view of this, embodiments of the present application provide a download management method and apparatus, a computing device, and a computer-readable storage medium, so as to solve technical defects in the prior art.
The embodiment discloses a download management method, which comprises the following steps:
downloading by a BT (bit rate protocol) mode to obtain a data block, wherein the data block comprises a plurality of continuous downloading blocks, and the downloading blocks are data units obtained by the BT downloading mode;
checking whether a download block in the data blocks is missing;
when any download block of the data blocks is missing, downloading the missing download block of the data blocks again in an HTTP download mode;
and when the download block in the data block is complete, storing the data block into a local storage space.
Further, the data block comprises a plurality of consecutive download blocks, and the method further comprises:
and the complete download data is composed of a plurality of data blocks.
Further, the data block downloaded by the BT mode is stored in a preset cache space.
Further, when checking whether the download block in the data blocks is missing, the integrity comparison between the downloaded data block and the corresponding resource data block is performed to determine whether the download block in the data blocks is missing.
Further, whether the downloading in the data block is missing or not is checked, and whether the downloading in the data block is missing or not is determined in a mode that whether the downloading of the downloading block in the data block is overtime or not is checked.
Further, the download block carries identification information.
Further, the downloading of the missing download block in the data block using the HTTP downloading method includes:
generating a corresponding HTTP new request according to the identification information of the missing download block;
and sending the generated HTTP new request to a server to download the missing download blocks in the data blocks.
Further, the method for determining that the downloading of the missing download blocks by the BT download fails by checking whether the downloading of the download blocks in the data blocks is overtime includes:
when any download block is downloaded in a BT download mode, heartbeat information is sent to the download block;
if the downloading block does not reply to the heartbeat information within the preset time interval, determining that the downloading of the missing downloading block is over time by the BT mode and the downloading of the downloading block is not successful, and failing to download by the BT mode.
Further, when the data block is complete, storing the data block into a local storage space includes:
and when the download block in the data block is complete, storing the data block in a preset cache space into a local storage space.
The embodiment discloses a download management device, which comprises:
the downloading module is configured to download a data block in a BT mode, wherein the data block comprises a plurality of continuous downloading blocks;
a detection module configured to check whether a download block of the data blocks is missing;
the completion module is configured to use an HTTP downloading mode to download the missing download blocks in the data blocks again under the condition that any one download block of the data blocks is missing;
and the storage module is configured to store the data blocks into the local storage space under the condition that the download blocks in the data blocks are complete.
The present application also provides a computing device comprising a memory, a processor, and computer instructions stored on the memory and executable on the processor, wherein the processor implements the steps of a download management method as described above when executing the instructions.
The present application also provides a computer readable storage medium storing computer instructions that, when executed by a processor, implement the steps of a download management method as described above.
According to the download management method and device, whether the download block in the data block is lost or not is checked, the fact that the obtained data block is complete and continuous is guaranteed, the complete and continuous data block is written into the preset cache and then is written into the local storage space, the possibility of random writing when the data block is written into the local storage space is reduced, computer hardware equipment is protected, data writing time is shortened, and the service life of the computer hardware equipment is prolonged.
Secondly, by the BT and HTTP cooperative downloading method and device, the fact that data blocks are completely and continuously acquired when a user carries out a downloading task can be guaranteed, downloading smoothness is improved, the situation that the downloading task fails due to the fact that downloading data are incomplete is avoided, the smoothness of the downloading task is guaranteed, and network resources are saved.
Drawings
FIG. 1 is a schematic diagram of a computing device according to an example of the present application;
FIG. 2 is a flowchart illustrating steps of a download management method according to an embodiment of the present application;
FIG. 3 is a flowchart illustrating steps of a download management method according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a download management apparatus according to an embodiment of the present application.
Detailed Description
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application. This application is capable of implementation in many different ways than those herein set forth and of similar import by those skilled in the art without departing from the spirit of this application and is therefore not limited to the specific implementations disclosed below.
The terminology used in the description of the one or more embodiments is for the purpose of describing the particular embodiments only and is not intended to be limiting of the description of the one or more embodiments. As used in one or more embodiments of the present specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used in one or more embodiments of the present specification refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It will be understood that, although the terms first, second, etc. may be used herein in one or more embodiments to describe various information, these information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, a first can also be referred to as a second and, similarly, a second can also be referred to as a first without departing from the scope of one or more embodiments of the present description. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
First, the noun terms to which one or more embodiments of the present invention relate are explained.
MD 5: the core of MD5 is the algorithm that maps raw data of arbitrary length to 128bit data (MD5, messagestalgorithm).
BT: bitstream (BT, BitTorrent) consisting of three parts: a torrent file format, a communication protocol between the peer and Tracker servers, and a communication protocol between the peers.
HTTP: HyperText transfer protocol (HyperTextTransferProtocol), is an application layer protocol for distributed, collaborative, and hypermedia information systems.
Tortent file: the seed file of the BT download protocol may store metadata for a set of files. The file is essentially a text file and comprises two parts, namely Tracker information and file information. The Tracker information mainly includes addresses of Tracker servers required in BT downloading and settings for the Tracker servers, the file information is generated according to calculation of target files, and calculation results are encoded according to Bencode rules in a BitTorrent protocol.
Tracker: refers to a program running on a server that can track how many people are downloading the same file at the same time.
In the present application, a download management method, a computing device, and a computer-readable storage medium are provided, which are described in detail one by one in the following embodiments.
Fig. 1 is a block diagram illustrating a configuration of a computing device 100 according to an embodiment of the present specification. The components of the computing device 100 include, but are not limited to, memory 110 and processor 120. The processor 120 is coupled to the memory 110 via a bus 130 and a database 150 is used to store data.
Computing device 100 also includes access device 140, access device 140 enabling computing device 100 to communicate via one or more networks 160. Examples of such networks include the Public Switched Telephone Network (PSTN), a Local Area Network (LAN), a Wide Area Network (WAN), a Personal Area Network (PAN), or a combination of communication networks such as the internet. Access device 140 may include one or more of any type of network interface (e.g., a Network Interface Card (NIC)) whether wired or wireless, such as an IEEE802.11 Wireless Local Area Network (WLAN) wireless interface, a worldwide interoperability for microwave access (Wi-MAX) interface, an ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a bluetooth interface, a Near Field Communication (NFC) interface, and so forth.
In one embodiment of the present description, the above-described components of computing device 100 and other components not shown in FIG. 1 may also be connected to each other, such as by a bus. It should be understood that the block diagram of the computing device architecture shown in FIG. 1 is for purposes of example only and is not limiting as to the scope of the description. Those skilled in the art may add or replace other components as desired.
Computing device 100 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., tablet, personal digital assistant, laptop, notebook, netbook, etc.), a mobile phone (e.g., smartphone), a wearable computing device (e.g., smartwatch, smartglasses, etc.), or other type of mobile device, or a stationary computing device such as a desktop computer or PC. Computing device 100 may also be a mobile or stationary server.
Wherein the processor 120 may perform the steps of the method shown in fig. 2. Fig. 2 is a schematic flowchart illustrating a BT download node management method according to an embodiment of the present application, including steps S201 to S204.
Step S201: and obtaining the data block in a BT downloading mode.
Specifically, the data block includes a plurality of consecutive download blocks, and the download blocks are data units obtained by a BT download method.
For example, the data block a1 includes download blocks a1, a2, a3, a4, and a5, which are arranged in the order of a1 to a5, where the download blocks a1 to a5 are data units obtained by BT download.
Step S202: checking whether a download block in the data blocks is missing.
Specifically, integrity comparison is performed on the download blocks in the data blocks through the MD5 algorithm.
For example, the data block a1 includes download blocks a1, a2, a3, a4 and a5, and the download blocks are arranged in sequence from a1 to a 5; when the data block contains all the downloading blocks, the data block can be regarded as complete;
the download block condition in the data block further comprises: the arrangement sequence of the download blocks is not arranged according to the original arrangement mode, for example, the download blocks are arranged according to a1, a3, a5, a4 and a2 and still regarded as the data blocks are complete;
step S203: and if the download blocks in the data blocks are missing, downloading the missing download blocks in the data blocks again by using an HTTP download mode.
Specifically, the download block carries identification information.
Specifically, a corresponding HTTP new request is generated according to the identification information of the missing download block.
Further, the generated HTTP new request is sent to a server to download the missing download blocks in the data blocks.
Wherein, the downloading block missing in the data block is divided into two situations: downloading blocks are overtime downloading and missing downloading blocks are downloading.
When a certain download block does not reply to the heartbeat package within a preset time interval during downloading, judging that the download block is overtime, and the download block cannot be downloaded in a BT (bit rate BT) download mode;
for example, the data block B1 is composed of download blocks B1, B2, B3, and B4 arranged in sequence, where the download block B2 does not reply to the heartbeat packet within a preset time interval, it is determined that the download block B2 is downloading a timeout, the download block B2 with the downloading timeout is downloaded by opening a new HTTP download link, and the download block B2 with the single downloading completed is stored in the data block B1 in the sequence of B1, B2, B3, and B4;
after downloading of a certain data block is finished, comparing the data block with a source file, if a missing downloading block in the data block is found, judging that the data block is incomplete, and downloading the missing downloading block by opening a new HTTP downloading link to complete the data block;
for example, the data block C1 is composed of download blocks C1, C2, C3 and C4 arranged in sequence, and when the MD5 algorithm is compared with the original file, the download blocks C1 and C4 are found to be missing, so that the data block C1 is found to be missing, the missing download block C1 and the download block C4 are downloaded by starting a new HTTP download link, and the download blocks C1 and C4 which are downloaded separately are stored into the data block C1 in the sequence of C1, C2, C3 and C4.
And step S204, storing the data block into a local storage space.
Further, the local storage space includes, but is not limited to, storage devices such as a local disk, a removable hard disk, and a usb disk.
Specifically, when the data block is complete, the data block is stored in a local storage space from a preset cache space.
According to the download management method provided by the embodiment, the data acquisition is complete when the user carries out the download task, the condition that the download task fails due to incomplete download data is avoided, the smoothness of the download task is ensured, and network resources are saved.
As shown in fig. 3, an embodiment of the present application discloses a download management method, which includes steps S301 to S309.
Step S301: and starting to download the obtained data block by using a BT (bit rate) downloading mode.
Specifically, the data block includes a plurality of consecutive download blocks, and the download blocks are data units obtained by a BT download method.
Step S302: and storing the downloaded data block into a preset cache space.
And the preset cache space is formatted and cleared after the downloading task is finished.
Step S303: checking whether the download block in the data block is complete.
Specifically, the incomplete downloading block described in this embodiment is divided into two cases, that is, downloading block downloading timeout and downloading block data missing.
When any download block is downloaded in a BT (bit rate) download mode, heartbeat information is sent to the download block, if the download block does not reply to the heartbeat information within a preset time interval, the download block is determined to be overtime when the download failure of the missing download block is determined in the BT mode, and the download block cannot be downloaded in the BT download mode;
after any data block is downloaded in a BT (bit stream) downloading mode, comparing the data block with a source file, judging that the data block is incomplete if a downloading block is missing in the data block, and downloading the missing downloading block by opening a new HTTP (hyper text transport protocol) downloading link to complete the data block;
further, the downloaded blocks are integrity-compared using the MD5 algorithm.
Step S304: and (4) performing complete downloading on the missing downloading blocks by using an HTTP downloading mode.
Specifically, a complementary downloading is carried out on the missing downloading blocks by using an HTTP downloading mode, wherein a corresponding HTTP new request is generated according to the identification information of the missing downloading blocks;
and sending the generated HTTP new request to a server to download the missing download blocks in the data blocks.
Step S305: and judging whether the complete data block is continuous or not.
Specifically, the complete data block is compared with the source file through the MD5 algorithm;
for example, the complete data block D1 includes download blocks D1, D2, D3, D4, and after the data block D1 is downloaded, the download blocks are arranged in the order D2, D1, D4, D3, and the data block D2 corresponding to the complete data block D1 in the source file includes download blocks D1, D2, D3, D4, and the arrangement order is D1, D2, D3, D4; in the comparison process, if the arrangement order of the download blocks in the data block D1 is found to be inconsistent with the arrangement order of the download blocks in the corresponding data block D2, it is determined that the data block D1 is a discontinuous data block, and step S306 is performed on the data block D1.
Step S306: the non-contiguous data blocks are ordered.
According to the example shown in step S305, if the arrangement order of the download blocks D1, D2, D3 and D4 in the data block D1 is not consistent with the arrangement order of the download blocks D1, D2, D3 and D4 in the data block D2 corresponding to the data block D in the source file, the download block arrangement order in the data block D1 is sorted according to the arrangement order of the download blocks in the source file corresponding to the data block D2, so that the download blocks in the data block D1 are ensured to be the same as the download block arrangement order in the data block D2.
Step S307: and judging whether all the data blocks are completely downloaded.
Specifically, if all the data blocks are completely downloaded, step S307 is performed, and if all the data blocks are completely downloaded, step S301 is returned to continue to perform the downloading task and execute the method described in this embodiment until all the data blocks are completely downloaded.
For example, the source file E includes data blocks X, Y, and Z, after the downloading is completed, by detecting that the download file E1 lacks the data block X, it is determined that all the data blocks are not downloaded completely, and at this time, the step S301 is returned to download the missing data block X again until all the data blocks in the source file E are downloaded completely.
Step S308: and obtaining a complete download file and storing the complete download file in a preset cache space.
Step S309: and storing the obtained download file into a local storage space.
Specifically, the obtained downloaded file is complete and continuous, and the complete and continuous file is stored in the local storage space from the cache space, so that the random writing possibility is greatly reduced, and the service life of the computing hardware equipment is prolonged.
According to the download management method provided by the embodiment, the obtained data blocks are complete and continuous, and the complete and continuous data blocks are stored in the preset cache and then are written into the local storage space together, so that the possibility of random writing when the data blocks are written into the local storage space is reduced, computer hardware equipment is protected, the data writing time is shortened, and the service life of the computer hardware equipment is prolonged.
Secondly, by the BT and HTTP cooperative downloading method and device, the fact that data blocks are completely and continuously acquired when a user carries out a downloading task can be guaranteed, downloading smoothness is improved, the situation that the downloading task fails due to the fact that downloading data are incomplete is avoided, the smoothness of the downloading task is guaranteed, and network resources are saved.
The present embodiment provides a download management apparatus, referring to fig. 4, including:
a downloading module 401 configured to obtain a data block by downloading in a BT manner, where the data block includes a plurality of consecutive downloading blocks;
a detecting module 402 configured to check whether a download block of the data blocks is missing;
a completion module 403, configured to, when any one of the download blocks of the data block is missing, re-download the missing download block in the data block by using an HTTP download manner;
a storage module 404 configured to: and when the download block in the data block is complete, storing the data block into a local storage space.
Further, the download module 401 is configured to:
and storing the data block in a preset cache space.
Further, the detection module 402 is configured to:
and comparing the integrity of the downloaded data blocks with the integrity of the corresponding resource data blocks to determine whether the downloaded data blocks in the data blocks are missing.
Further, the detection module 402 is configured to:
and determining whether the download blocks in the data blocks are missing by checking whether the download of the download blocks in the data blocks is overtime.
Further, the completion module 403 is configured to:
and opening a new link in an HTTP downloading mode to download the missing download blocks in the data blocks again.
Further, the detection module 402 is configured to:
when any download block is downloaded in a BT download mode, heartbeat information is sent to the download block;
and if the downloading block does not reply to the heartbeat information within the preset time interval, determining that the missing downloading block fails to be downloaded in a BT downloading mode.
Further, the storage module 404 is configured to:
when the download block in the data block is complete, judging the continuity of the downloaded data block;
and storing the data blocks in the cache space into a local storage space under the condition that the downloaded data blocks are determined to be continuous.
Through the download management device provided by the embodiment, the obtained data blocks are complete and continuous, and the complete and continuous data blocks are stored in the preset cache and then are written into the local storage space together, so that the possibility of random writing when the data blocks are written into the local storage space is reduced, computer hardware equipment is protected, the data writing time is shortened, and the service life of the computer hardware equipment is prolonged. Secondly, through a download management device, the fact that the data blocks obtained by a user are complete and continuous when the user carries out a download task can be guaranteed, the download smoothness is improved, the situation that the download task fails due to incomplete download data is avoided, the smoothness of the download task is guaranteed, and network resources are saved.
The present embodiment also provides a computer readable storage medium storing computer instructions which, when executed by a processor, implement the steps of a download management method as described above.
The above is an illustrative scheme of a computer-readable storage medium of the present embodiment. It should be noted that the technical solution of the storage medium belongs to the same concept as the technical solution of the above-mentioned download management method, and details that are not described in detail in the technical solution of the storage medium can be referred to the description of the technical solution of the above-mentioned download management method.
The computer instructions comprise computer program code which may be in the form of source code, object code, an executable file or some intermediate form, or the like. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
It should be noted that, for the sake of simplicity, the above-mentioned method embodiments are described as a series of acts or combinations, but those skilled in the art should understand that the present application is not limited by the described order of acts, as some steps may be performed in other orders or simultaneously according to the present application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
The preferred embodiments of the present application disclosed above are intended only to aid in the explanation of the application. Alternative embodiments are not exhaustive and do not limit the invention to the precise embodiments described. Obviously, many modifications and variations are possible in light of the above teaching. The embodiments were chosen and described in order to best explain the principles of the application and the practical application, to thereby enable others skilled in the art to best understand and utilize the application. The application is limited only by the claims and their full scope and equivalents.

Claims (10)

1. A method for download management, the method comprising:
downloading the data block in a bit stream BT mode to obtain a data block, wherein the data block comprises a plurality of continuous downloading blocks;
checking whether a download block in the data blocks is missing;
when any download block of the data blocks is missing, downloading the missing download block of the data blocks to a server again by using a hypertext transfer protocol (HTTP) download mode;
and when the download block in the data block is complete, storing the data block into a local storage space.
2. The method of claim 1, wherein downloading the obtained data block via BT download comprises:
and storing the data block in a preset cache space.
3. The method of claim 1, wherein checking whether a download block of the data blocks is missing comprises:
and comparing the integrity of the downloaded data blocks with the integrity of the corresponding resource data blocks to determine whether the downloaded data blocks in the data blocks are missing.
4. The method of claim 1, wherein checking whether a download block of the data blocks is missing comprises:
and determining whether the download blocks in the data blocks are missing by checking whether the download of the download blocks in the data blocks is overtime.
5. The method of claim 3 or 4, wherein the download block carries identification information;
downloading the missing download blocks in the data blocks to the server again by using an HTTP download mode, wherein the downloading comprises the following steps:
generating a corresponding HTTP new request according to the identification information of the missing download block;
and sending the generated HTTP new request to a server to download the missing download blocks in the data blocks.
6. The method of claim 4, wherein the method for determining that the downloading of the missing download block by the BT download fails by checking whether the downloading of the download block in the data block is timed out comprises:
when any download block is downloaded in a BT download mode, heartbeat information is sent to the download block;
and if the downloading block does not reply to the heartbeat information within the preset time interval, determining that the missing downloading block fails to be downloaded in a BT downloading mode.
7. The method of claim 2, wherein storing the data block in the local storage space when the download block of the data block is complete comprises:
when the download block in the data block is complete, judging the continuity of the downloaded data block;
and storing the data blocks in the cache space into a local storage space under the condition that the downloaded data blocks are determined to be continuous.
8. A download management apparatus, the apparatus comprising:
the downloading module is configured to download a data block in a bit stream BT mode, wherein the data block comprises a plurality of continuous downloading blocks;
a detection module configured to check whether a download block of the data blocks is missing;
the completion module is configured to use a hypertext transfer protocol (HTTP) downloading mode to download the missing download blocks in the data blocks again under the condition that any download block of the data blocks is missing;
and the storage module is configured to store the data blocks into the local storage space under the condition that the download blocks in the data blocks are complete.
9. A computing device comprising a memory, a processor, and computer instructions stored on the memory and executable on the processor, wherein the processor implements the steps of the method of any one of claims 1-7 when executing the instructions.
10. A computer-readable storage medium storing computer instructions, which when executed by a processor, perform the steps of the method of any one of claims 1 to 7.
CN202010632018.9A 2020-07-03 2020-07-03 Download management method and device Pending CN111782151A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010632018.9A CN111782151A (en) 2020-07-03 2020-07-03 Download management method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010632018.9A CN111782151A (en) 2020-07-03 2020-07-03 Download management method and device

Publications (1)

Publication Number Publication Date
CN111782151A true CN111782151A (en) 2020-10-16

Family

ID=72758908

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010632018.9A Pending CN111782151A (en) 2020-07-03 2020-07-03 Download management method and device

Country Status (1)

Country Link
CN (1) CN111782151A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101635737A (en) * 2008-07-25 2010-01-27 阿里巴巴集团控股有限公司 Downloading method, system, P2P server and client
CN102438031A (en) * 2011-03-11 2012-05-02 奇智软件(北京)有限公司 Transmission resuming downloading method and system
US20140195643A1 (en) * 2012-03-16 2014-07-10 Tencent Technology (Shenzhen) Company Limited Offline download method and system
CN104735154A (en) * 2011-03-11 2015-06-24 北京奇虎科技有限公司 Continuously transferring downloading method and system
CN107317828A (en) * 2016-04-26 2017-11-03 腾讯科技(深圳)有限公司 Document down loading method and device
CN111343504A (en) * 2020-05-21 2020-06-26 腾讯科技(深圳)有限公司 Video processing method, video processing device, computer equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101635737A (en) * 2008-07-25 2010-01-27 阿里巴巴集团控股有限公司 Downloading method, system, P2P server and client
CN102438031A (en) * 2011-03-11 2012-05-02 奇智软件(北京)有限公司 Transmission resuming downloading method and system
CN104735154A (en) * 2011-03-11 2015-06-24 北京奇虎科技有限公司 Continuously transferring downloading method and system
US20140195643A1 (en) * 2012-03-16 2014-07-10 Tencent Technology (Shenzhen) Company Limited Offline download method and system
CN107317828A (en) * 2016-04-26 2017-11-03 腾讯科技(深圳)有限公司 Document down loading method and device
CN111343504A (en) * 2020-05-21 2020-06-26 腾讯科技(深圳)有限公司 Video processing method, video processing device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
US11501533B2 (en) Media authentication using distributed ledger
CN107294729B (en) Communication method and device between different nodes in block chain
CN108270874B (en) Application program updating method and device
JP2013504280A (en) Efficient service discovery for peer-to-peer network equipment
US20140082154A1 (en) File sharing method, terminal and relay server
CN102271165B (en) Device and method for sharing and managing resources searched on Internet
US9100380B2 (en) File download method, device and system
US20140143339A1 (en) Method, apparatus, and system for resource sharing
EP4216130A1 (en) Transaction repeat checking method and apparatus, and device and medium
CN103067919B (en) Connection establishment method and authentication method between computing device and mobile device
CN112486074A (en) Data processing system, method and device
CN103905516A (en) Data sharing method and corresponding server and terminal
CN114222168A (en) Resource scheduling method and system
CN103685332A (en) File transfer method, client, server and system
CN106303577B (en) Download the method and device of Streaming Media
CN111371963B (en) Image processing method and apparatus, storage medium, and electronic device
US7979490B2 (en) Method for combatting the illicit distribution of protected material and computer system for carrying out said method
CN111782151A (en) Download management method and device
CN112637351B (en) File downloading method and device
US20100036935A1 (en) Method for reacting to the broadcast of a file in a p2p network
CN105207977A (en) TCP data packet processing method and device
CN110519656B (en) Self-adaptive streaming media playing method, system and server
CN116360809A (en) Remote firmware upgrading method, system and medium for embedded intelligent terminal
CN112688948B (en) Object processing method and device
WO2022134830A1 (en) Method and apparatus for processing block node data, computer device, and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20201016

RJ01 Rejection of invention patent application after publication