CN111193777A - File downloading method and device based on breakpoint continuous transmission and storage medium - Google Patents

File downloading method and device based on breakpoint continuous transmission and storage medium Download PDF

Info

Publication number
CN111193777A
CN111193777A CN201911290787.9A CN201911290787A CN111193777A CN 111193777 A CN111193777 A CN 111193777A CN 201911290787 A CN201911290787 A CN 201911290787A CN 111193777 A CN111193777 A CN 111193777A
Authority
CN
China
Prior art keywords
downloading
file
task
download
downloaded
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.)
Granted
Application number
CN201911290787.9A
Other languages
Chinese (zh)
Other versions
CN111193777B (en
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.)
Foshan Oushennuo Yunshang Technology Co ltd
Foshan Oceano Ceramics Co Ltd
Original Assignee
Foshan Oushennuo Yunshang Technology Co ltd
Foshan Oceano Ceramics 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 Foshan Oushennuo Yunshang Technology Co ltd, Foshan Oceano Ceramics Co Ltd filed Critical Foshan Oushennuo Yunshang Technology Co ltd
Priority to CN201911290787.9A priority Critical patent/CN111193777B/en
Publication of CN111193777A publication Critical patent/CN111193777A/en
Application granted granted Critical
Publication of CN111193777B publication Critical patent/CN111193777B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a file downloading method based on breakpoint continuous transmission, which directly acquires a current downloading starting position from a log file in a system by a file when the inspiration of a downloading task is not the first starting, and then generates a downloading file request according to the current downloading starting position, thereby sending the downloading file request to a server and acquiring a data packet returned by the server, realizing the downloading of the file, and solving the problems of resource waste, low downloading efficiency and the like caused by starting downloading from the beginning when each downloading task is started in the prior art. The invention also provides a file downloading device and a storage medium based on the breakpoint continuous transmission.

Description

File downloading method and device based on breakpoint continuous transmission and storage medium
Technical Field
The invention relates to the field of computer information processing, in particular to a file downloading method and device based on breakpoint continuous transmission and a storage medium.
Background
At present, a general downloading task in the prior art needs to be downloaded from a file header when restarting. However, the downloading task is often suspended or interrupted due to bad network conditions or other reasons, and when the downloading task is restarted, the downloading task needs to be restarted from the file header, which causes problems of resource waste, low downloading efficiency and the like.
Disclosure of Invention
In order to overcome the defects of the prior art, one of the objectives of the present invention is to provide a file downloading method based on breakpoint resuming, which can solve the problems of resource waste, low downloading efficiency, and the like caused by the fact that a file needs to be downloaded from the beginning every time the file is started in the prior art.
The second objective of the present invention is to provide a file downloading device based on breakpoint resuming, which can solve the problems of resource waste and low downloading efficiency caused by downloading from the beginning every time a file is started in the prior art.
The invention also aims to provide a storage medium, which can solve the problems of resource waste, low downloading efficiency and the like caused by the fact that files need to be downloaded from the beginning every time the files are started in the prior art.
One of the purposes of the invention is realized by adopting the following technical scheme:
a file downloading method based on breakpoint resuming comprises the following steps:
an interruption step: when a download interruption instruction is received after a download task is started, acquiring the download progress, the download speed and the download remaining time of the download task, and calculating the size of a file downloaded by the download task when the download interruption instruction is received and the corresponding download ending position according to the download progress, the download speed and the download remaining time and storing the size and the corresponding download ending position in a system;
a judging step: judging whether the downloading task is started for the first time when the downloading task is started; if yes, executing a downloading step; if not, executing a breakpoint acquisition step;
a breakpoint acquisition step: acquiring the size of a file downloaded by the download task according to the download task, matching the size of the downloaded file in a system to obtain a corresponding download ending position, and obtaining the current download starting position of the download task according to the corresponding download ending position;
a breakpoint resuming step: obtaining the current downloading progress of the downloading task and the total size of the file according to the current downloading starting position of the downloading task, generating a file downloading request and executing the downloading step;
a downloading step: continuously sending a file downloading request to the server and receiving a data packet returned by the server; when receiving a data packet returned by the server each time, calculating the downloading progress, the downloading speed and the remaining downloading time of the file; until the file is downloaded.
Further, the interrupting step further comprises: storing the size of the file downloaded by the downloading task and the corresponding downloading ending position in a log file of the system when a downloading interruption instruction is received; the log file stores the size of the downloaded file and the corresponding downloading end position when the downloading task is interrupted each time;
the breakpoint acquisition step further includes: and matching to obtain a corresponding downloading end position from a log file of the system according to the size of the downloaded file.
Further, the interrupting step includes:
a file size obtaining step: acquiring the current file size of a file downloaded by the downloading task in the system;
and a downloading progress calculating step: calculating the current downloading progress of the downloading task according to the current file size of the file downloaded by the downloading task and the total size of the file;
a download position calculation step: obtaining the downloading ending position of the downloading task according to the current downloading progress of the downloading task;
a breakpoint storage step: and storing the size of the file downloaded by the downloading task and the corresponding downloading end position in a system.
Further, the breakpoint resuming step further includes: and writing the current downloading progress of the downloading task, the current downloading starting position of the downloading task and the total size of the file into a Range parameter of a request header of a file downloading request.
Further, the downloading progress is calculated according to the size of the downloaded file in the system and the total size of the file.
Further, the judging step includes: when the file downloaded by the downloading task does not exist in the system, the downloading task is started for the first time; and when the file downloaded by the downloading task exists in the system, the downloading task is not started for the first time.
Further, the judging step further includes: when the downloading task is started for the first time, encoding the file downloaded by the downloading task and storing the encoded file in a system;
the file downloading method further comprises the verification step: when the downloading of the file is finished, acquiring the code of the downloaded file, judging whether the code is consistent with the code of the file stored in the system or not, and if so, quitting or finishing the downloading; if not, restarting the downloading task.
The second purpose of the invention is realized by adopting the following technical scheme:
a file downloading device based on breakpoint continuous transmission comprises a memory and a processor, wherein a file downloading program which can run on the processor is stored in the memory, the file downloading program is a computer program, and the processor executes the file downloading program to realize the steps of the file downloading method based on breakpoint continuous transmission.
The third purpose of the invention is realized by adopting the following technical scheme:
a storage medium, which is a computer-readable storage medium, and on which a file downloading program is stored, the file downloading program being a computer program, and the file downloading program, when executed by a processor, implementing the steps of a file downloading method based on breakpoint resume as one of the objects of the present invention.
Compared with the prior art, the invention has the beneficial effects that:
the invention selects the download starting position by judging whether the download task is the first starting judgment result; that is, when the downloading task is not started for the first time, the downloading starting position and the downloading progress when the file is required to be continuously downloaded at present are obtained according to the size of the file downloaded by the downloading task in the system, and then the downloading task is continuously downloaded from the breakpoint interrupted for the previous time, so that the problems of resource waste, low downloading efficiency and the like caused by re-downloading from the file header when the downloading task is started each time in the prior art are solved, the downloading efficiency is greatly improved, and the flow and the network resources are saved.
Drawings
FIG. 1 is a flowchart of a file downloading method based on breakpoint resuming according to the present invention;
fig. 2 is a flowchart of step S5;
fig. 3 is a block diagram of a file downloading device based on breakpoint resuming provided in the present invention.
In the figure: 11. a memory; 12. a processor; 13. a communication bus; 14. a network interface.
Detailed Description
The present invention will be further described with reference to the accompanying drawings and the detailed description, and it should be noted that any combination of the embodiments or technical features described below can be used to form a new embodiment without conflict.
Example one
In order to solve the problem that a file must be downloaded from the beginning when a downloading task is restarted after being suspended or interrupted in the prior art, the invention provides a file downloading method based on breakpoint continuous transmission, which can directly acquire the size of the downloaded file in a system to obtain the starting position of the file downloading when the downloading is continued when the downloading task is restarted, and then the file is downloaded from the starting position of the file downloading, so that the downloading from the beginning as in the prior art is avoided, the downloading efficiency is greatly improved, and the resources are saved at the same time. Meanwhile, in order to conveniently and rapidly find the starting position of the downloaded file, the invention also carries out corresponding processing on the breakpoint position.
As shown in fig. 1, a file downloading method based on breakpoint resuming includes:
step S1, when the download task is started, judging whether the download task is started for the first time; if so, go to step S2, otherwise, go to step S4.
And judging whether the downloading task is started for the first time or not can be realized by searching whether a file required to be downloaded by the downloading task exists in the system or not. That is to say: when the downloading task is started for the first time, it indicates that the downloading task has not downloaded any data, i.e. there is no corresponding file in the system. When the downloading task is not started for the first time, the downloading task is described to have downloaded part of the data of the file before, that is, the corresponding file exists in the system.
When the downloading task is started for the first time:
the file downloading method comprises step S2, continuously sending a request for downloading the file to the server, and receiving a data packet returned by the server. When downloading a file, a corresponding data package is requested from the server by sending a download file request to the server. Since each file may include one or more data packets, during the process of downloading the file, a request for downloading the file is continuously sent to the server and the data packets returned by the server are obtained.
Step S3, when receiving the data packet returned by the server, calculating the downloading progress, downloading speed and remaining downloading time of the file, and judging whether the file is downloaded completely; if not, continuing to execute step S2 to continue downloading the file; if yes, ending or exiting.
When a file downloading request is made, in order to ensure that the server can return a corresponding data packet, the downloading progress of the downloading task and the total size of the file are written into the Range parameter of the request header of the file downloading request every time the file downloading request is generated. The method comprises the steps that a data packet returned by a server is received each time a file downloading request is sent, so that the downloading progress and the downloading speed are recorded each time the data packet returned by the server is received, the data such as the residual downloading time and the like are calculated, whether the file is downloaded completely is judged, and if yes, the file is finished or quitted; if not, the file downloading request is continuously sent.
Wherein, the download progress is the size of the downloaded file/the total size of the file. That is, the size of the currently downloaded file is a proportion of the total size of the file.
The residual downloading time can be estimated according to the downloading speed and the downloading progress.
Wherein, the file downloading can be judged according to the downloading progress after the file downloading is finished. For example, the downloading progress reaches 100%, which indicates that the file downloading is completed.
When the downloading task is not started for the first time, the file downloading method comprises the following steps:
step S4, obtaining the size of the file downloaded by the download task according to the download task, matching the size of the downloaded file from the system to obtain a corresponding download ending position, and obtaining the current download starting position of the download task according to the corresponding download ending position.
Preferably, in order to ensure that the download ending position is found quickly, the download ending position is stored in a log file of the system and is matched with the size of the downloaded file. That is, the size of the file downloaded by the download task and the corresponding download ending position are stored by the log file of the system.
When the downloading task is started, and when the downloading task receives a downloading interruption instruction due to network interruption or other external reasons, the downloading task can be quickly downloaded after the next starting.
And step S6, obtaining the current downloading progress of the downloading task and the total size of the file according to the current downloading starting position of the downloading task, generating a downloading file request and executing step S2.
At this time, when the request for downloading the file is generated, the current downloading progress of the downloading task, the current downloading starting position of the downloading task and the total size of the file are written into the Range parameter of the request header of the file downloading request, so that the server returns the data packet starting from the current downloading starting position.
Furthermore, the invention stores the download ending position and the size of the downloaded file in the log file of the system, when the download task is started again, the size of the downloaded file can be obtained from the system, and then the download ending position is directly obtained from the log file in a matching way, wherein the download ending position is the starting position of the download task continuing to download. That is to say, the starting position of the continuous downloading is directly obtained from the log file, the continuous downloading can be directly started without any calculation, and the downloading starting efficiency is greatly improved.
That is, the present invention further includes:
step S5, when a download interruption instruction is received after the download task is started, acquiring the download progress, the download speed and the download remaining time of the download task, and calculating the size of the file downloaded by the download task and the corresponding download ending position when the download interruption instruction is received according to the download progress, the download speed and the download remaining time to store the size and the corresponding download ending position in the log file in the system.
The invention stores the downloading task by combining the log file in the system, and can quickly find out the position of the starting of downloading from the log file when starting, thereby greatly improving the efficiency.
Further, as shown in fig. 2, the step S5 further includes: and step S51, obtaining the current file size of the file downloaded by the downloading task from the system.
And after receiving the downloading interruption instruction, acquiring the current file size of the file downloaded by the downloading task.
And step S52, calculating the current downloading progress of the downloading task according to the current file size of the files downloaded by the downloading task and the total size of the files.
And step S53, obtaining the downloading end position when the downloading task is interrupted currently according to the current downloading progress of the downloading task.
Step S54, storing the size of the file downloaded by the download task and the corresponding download ending position in a log file of the system.
Further, when the download is restarted after the download is interrupted, the data packet may be lost, and the file download may not be performed. Such as a line error when inquiring about the download start position, etc. Therefore, in order to avoid the above problem, that is, in step S1:
and when the downloading task is judged to be started for the first time, encoding the file downloaded by the downloading task and storing the file in the system.
Further, the file downloading method includes step S7, after the file is downloaded, acquiring the code of the downloaded file and comparing it with the code pre-stored in the system, and when the two codes are consistent, the downloaded file is considered to be correct, and the downloading is exited; if the two files are not consistent, the downloaded files are indicated to be in error, and the files can be downloaded again.
Example two
The invention provides a file downloading device based on breakpoint continuous transmission. As shown in fig. 3, an internal structure of a file downloading device based on breakpoint resuming according to an embodiment of the present invention is schematically illustrated.
In this embodiment, a file downloading device based on breakpoint resuming may be a PC (personal computer), or may also be a terminal device such as a smart phone, a tablet computer, or a portable computer. The file downloading device based on breakpoint resuming at least comprises: a processor 12, a communication bus 13, a network interface 14, and a memory 11.
The memory 11 includes at least one type of readable storage medium, which includes a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, and the like. The memory 11 may be an internal storage unit of a breakpoint-based file downloading device in some embodiments, for example, a hard disk of the breakpoint-based file downloading device. The memory 11 may also be an external storage device of a file downloading apparatus based on breakpoint resuming in other embodiments, such as a plug-in hard disk provided on the file downloading apparatus based on breakpoint resuming, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and so on. Further, the memory 11 may also include both an internal storage unit of a file downloading apparatus based on breakpoint resuming and an external storage device. The memory 11 may be used not only to store application software installed in a file downloading apparatus based on breakpoint resuming and various types of data, such as codes of a file downloading program, but also to temporarily store data that has been output or is to be output.
The processor 12 may be a Central Processing Unit (CPU), a controller, a microcontroller, a microprocessor or other data Processing chip in some embodiments, and is used for executing program codes stored in the memory 11 or Processing data, such as executing a file downloading program.
The communication bus 13 is used to realize connection communication between these components.
The network interface 14 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface), and is generally used to establish a communication link between the file downloading apparatus based on breakpoint transmission and other electronic devices.
Optionally, the file downloading device based on breakpoint resuming may further include a user interface, where the user interface may include a Display (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface may further include a standard wired interface and a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable for displaying information processed in a file download device based on breakpoint resuming and for displaying a visual user interface.
Fig. 3 shows only one breakpoint resume-based file downloading apparatus having components 11-14 and a file downloading program, and those skilled in the art will appreciate that the structure shown in fig. 3 does not constitute a limitation of a breakpoint resume-based file downloading apparatus, and may include fewer or more components than those shown, or some components in combination, or a different arrangement of components.
In the embodiment of the file downloading device based on breakpoint resuming shown in fig. 3, a file downloading program is stored in the memory 11; the processor 12 implements the following steps when executing the file downloading program stored in the memory 11:
an interruption step: when a download interruption instruction is received after a download task is started, acquiring the download progress, the download speed and the download remaining time of the download task, and calculating the size of a file downloaded by the download task when the download interruption instruction is received and the corresponding download ending position according to the download progress, the download speed and the download remaining time and storing the size and the corresponding download ending position in a system;
a judging step: judging whether the downloading task is started for the first time when the downloading task is started; if yes, executing a downloading step; if not, executing a breakpoint acquisition step;
a breakpoint acquisition step: acquiring the size of a file downloaded by the download task according to the download task, matching the size of the downloaded file in a system to obtain a corresponding download ending position, and obtaining the current download starting position of the download task according to the corresponding download ending position;
a breakpoint resuming step: obtaining the current downloading progress of the downloading task and the total size of the file according to the current downloading starting position of the downloading task, generating a file downloading request and executing the downloading step;
a downloading step: continuously sending a file downloading request to the server and receiving a data packet returned by the server; when receiving a data packet returned by the server each time, calculating the downloading progress, the downloading speed and the remaining downloading time of the file; until the file is downloaded.
Further, the interrupting step further comprises: storing the size of the file downloaded by the downloading task and the corresponding downloading ending position in a log file of the system when a downloading interruption instruction is received; the log file stores the size of the downloaded file and the corresponding downloading end position when the downloading task is interrupted each time;
the breakpoint acquisition step further includes: and matching to obtain a corresponding downloading end position from a log file of the system according to the size of the downloaded file.
Further, the interrupting step includes:
a file size obtaining step: acquiring the current file size of a file downloaded by the downloading task in the system;
and a downloading progress calculating step: calculating the current downloading progress of the downloading task according to the current file size of the file downloaded by the downloading task and the total size of the file;
a download position calculation step: obtaining the downloading ending position of the downloading task according to the current downloading progress of the downloading task;
a breakpoint storage step: and storing the size of the file downloaded by the downloading task and the corresponding downloading end position in a system.
Further, the breakpoint resuming step further includes: and writing the current downloading progress of the downloading task, the current downloading starting position of the downloading task and the total size of the file into a Range parameter of a request header of a file downloading request.
Further, the downloading progress is calculated according to the size of the downloaded file in the system and the total size of the file.
Further, the judging step includes: when the file downloaded by the downloading task does not exist in the system, the downloading task is started for the first time; and when the file downloaded by the downloading task exists in the system, the downloading task is not started for the first time.
Further, the judging step further includes: when the downloading task is started for the first time, encoding the file downloaded by the downloading task and storing the encoded file in a system;
the processor 12 implements the following steps when executing the file downloading program stored in the memory 11: a checking step: when the downloading of the file is finished, acquiring the code of the downloaded file, judging whether the code is consistent with the code of the file stored in the system or not, and if so, quitting or finishing the downloading; if not, restarting the downloading task.
EXAMPLE III
A storage medium, the storage medium being a computer-readable storage medium having stored thereon a file downloading program, the file downloading program being a computer program, which when executed by a processor, performs the steps of:
an interruption step: when a download interruption instruction is received after a download task is started, acquiring the download progress, the download speed and the download remaining time of the download task, and calculating the size of a file downloaded by the download task when the download interruption instruction is received and the corresponding download ending position according to the download progress, the download speed and the download remaining time and storing the size and the corresponding download ending position in a system;
a judging step: judging whether the downloading task is started for the first time when the downloading task is started; if yes, executing a downloading step; if not, executing a breakpoint acquisition step;
a breakpoint acquisition step: acquiring the size of a file downloaded by the download task according to the download task, matching the size of the downloaded file in a system to obtain a corresponding download ending position, and obtaining the current download starting position of the download task according to the corresponding download ending position;
a breakpoint resuming step: obtaining the current downloading progress of the downloading task and the total size of the file according to the current downloading starting position of the downloading task, generating a file downloading request and executing the downloading step;
a downloading step: continuously sending a file downloading request to the server and receiving a data packet returned by the server; when receiving a data packet returned by the server each time, calculating the downloading progress, the downloading speed and the remaining downloading time of the file; until the file is downloaded.
Further, the interrupting step further comprises: storing the size of the file downloaded by the downloading task and the corresponding downloading ending position in a log file of the system when a downloading interruption instruction is received; the log file stores the size of the downloaded file and the corresponding downloading end position when the downloading task is interrupted each time;
the breakpoint acquisition step further includes: and matching to obtain a corresponding downloading end position from a log file of the system according to the size of the downloaded file.
Further, the interrupting step includes:
a file size obtaining step: acquiring the current file size of a file downloaded by the downloading task in the system;
and a downloading progress calculating step: calculating the current downloading progress of the downloading task according to the current file size of the file downloaded by the downloading task and the total size of the file;
a download position calculation step: obtaining the downloading ending position of the downloading task according to the current downloading progress of the downloading task;
a breakpoint storage step: and storing the size of the file downloaded by the downloading task and the corresponding downloading end position in a system.
Further, the breakpoint resuming step further includes: and writing the current downloading progress of the downloading task, the current downloading starting position of the downloading task and the total size of the file into a Range parameter of a request header of a file downloading request.
Further, the downloading progress is calculated according to the size of the downloaded file in the system and the total size of the file.
Further, the judging step includes: when the file downloaded by the downloading task does not exist in the system, the downloading task is started for the first time; and when the file downloaded by the downloading task exists in the system, the downloading task is not started for the first time.
Further, the judging step further includes: when the downloading task is started for the first time, encoding the file downloaded by the downloading task and storing the encoded file in a system;
the file downloading program realizes the following steps when being executed by a processor: a checking step: when the downloading of the file is finished, acquiring the code of the downloaded file, judging whether the code is consistent with the code of the file stored in the system or not, and if so, quitting or finishing the downloading; if not, restarting the downloading task.
The above embodiments are only preferred embodiments of the present invention, and the protection scope of the present invention is not limited thereby, and any insubstantial changes and substitutions made by those skilled in the art based on the present invention are within the protection scope of the present invention.

Claims (9)

1. A file downloading method based on breakpoint resuming is characterized in that the file downloading method comprises the following steps:
an interruption step: when a download interruption instruction is received after a download task is started, acquiring the download progress, the download speed and the download remaining time of the download task, and calculating the size of a file downloaded by the download task when the download interruption instruction is received and the corresponding download ending position according to the download progress, the download speed and the download remaining time and storing the size and the corresponding download ending position in a system;
a judging step: judging whether the downloading task is started for the first time when the downloading task is started; if yes, executing a downloading step; if not, executing a breakpoint acquisition step;
a breakpoint acquisition step: acquiring the size of a file downloaded by the download task according to the download task, matching the size of the downloaded file in a system to obtain a corresponding download ending position, and obtaining the current download starting position of the download task according to the corresponding download ending position;
a breakpoint resuming step: obtaining the current downloading progress of the downloading task and the total size of the file according to the current downloading starting position of the downloading task, generating a file downloading request and executing the downloading step;
a downloading step: continuously sending a file downloading request to the server and receiving a data packet returned by the server; when receiving a data packet returned by the server each time, calculating the downloading progress, the downloading speed and the remaining downloading time of the file; until the file is downloaded.
2. The method for downloading a file based on breakpoint resuming according to claim 1, wherein the step of interrupting further comprises: storing the size of the file downloaded by the downloading task and the corresponding downloading ending position in a log file of the system when a downloading interruption instruction is received; the log file stores the size of the downloaded file and the corresponding downloading end position when the downloading task is interrupted each time;
the breakpoint acquisition step further includes: and matching to obtain a corresponding downloading end position from a log file of the system according to the size of the downloaded file.
3. The file downloading method based on breakpoint resuming according to claim 1, wherein the interrupting step includes:
a file size obtaining step: acquiring the current file size of a file downloaded by the downloading task in the system;
and a downloading progress calculating step: calculating the current downloading progress of the downloading task according to the current file size of the file downloaded by the downloading task and the total size of the file;
a download position calculation step: obtaining the downloading ending position of the downloading task according to the current downloading progress of the downloading task;
a breakpoint storage step: and storing the size of the file downloaded by the downloading task and the corresponding downloading end position in a system.
4. The method for downloading a file based on breakpoint resuming according to claim 3, wherein the breakpoint resuming step further includes: and writing the current downloading progress of the downloading task, the current downloading starting position of the downloading task and the total size of the file into a Range parameter of a request header of a file downloading request.
5. The method as claimed in claim 1, wherein the download progress is calculated according to the size of the downloaded file and the total size of the downloaded file.
6. The method for downloading a file based on breakpoint resuming according to claim 1, wherein the determining step includes: when the file downloaded by the downloading task does not exist in the system, the downloading task is started for the first time; and when the file downloaded by the downloading task exists in the system, the downloading task is not started for the first time.
7. The method for downloading a file based on breakpoint resuming according to claim 1, wherein the determining step further includes: when the downloading task is started for the first time, encoding the file downloaded by the downloading task and storing the encoded file in a system;
the file downloading method further comprises the verification step: when the downloading of the file is finished, acquiring the code of the downloaded file, judging whether the code is consistent with the code of the file stored in the system or not, and if so, quitting or finishing the downloading; if not, restarting the downloading task.
8. A file downloading device based on breakpoint resuming comprises a memory and a processor, wherein a file downloading program which can run on the processor is stored on the memory, the file downloading program is a computer program, and the file downloading device is characterized in that: the steps of the file downloading program when executed by the processor implement a file downloading method based on breakpoint resuming according to any one of claims 1-7.
9. A storage medium which is a computer-readable storage medium having stored thereon a file downloading program, the file downloading program being a computer program, characterized in that: the file downloading program realizes the steps of the file downloading method based on breakpoint resuming according to any one of claims 1-7 when being executed by a processor.
CN201911290787.9A 2019-12-13 2019-12-13 File downloading method and device based on breakpoint continuous transmission and storage medium Active CN111193777B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911290787.9A CN111193777B (en) 2019-12-13 2019-12-13 File downloading method and device based on breakpoint continuous transmission and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911290787.9A CN111193777B (en) 2019-12-13 2019-12-13 File downloading method and device based on breakpoint continuous transmission and storage medium

Publications (2)

Publication Number Publication Date
CN111193777A true CN111193777A (en) 2020-05-22
CN111193777B CN111193777B (en) 2021-02-05

Family

ID=70709208

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911290787.9A Active CN111193777B (en) 2019-12-13 2019-12-13 File downloading method and device based on breakpoint continuous transmission and storage medium

Country Status (1)

Country Link
CN (1) CN111193777B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111951130A (en) * 2020-08-19 2020-11-17 重庆市合川区公安局 Data evidence obtaining analysis method and system of electronic equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103227812A (en) * 2013-03-19 2013-07-31 青岛海信宽带多媒体技术有限公司 Downloading method and device supporting breakpoint resuming in intelligent equipment
CN104301342A (en) * 2013-07-17 2015-01-21 北京齐尔布莱特科技有限公司 Method for downloading file in breakpoint way
CN104363271A (en) * 2014-10-28 2015-02-18 广东欧珀移动通信有限公司 File breakpoint resuming method and device
CN105187564A (en) * 2015-10-14 2015-12-23 中科宇图天下科技有限公司 Method for breakpoint resuming of mobile phone side file
US20160072874A1 (en) * 2006-12-19 2016-03-10 International Business Machines Corporation Managing file downloads
CN109587232A (en) * 2018-11-28 2019-04-05 陕西天诚软件有限公司 Document breakpoint transmission method based on iOS network
CN110336871A (en) * 2019-07-01 2019-10-15 江苏满运软件科技有限公司 A kind of document handling method, device, storage medium and electronic equipment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160072874A1 (en) * 2006-12-19 2016-03-10 International Business Machines Corporation Managing file downloads
CN103227812A (en) * 2013-03-19 2013-07-31 青岛海信宽带多媒体技术有限公司 Downloading method and device supporting breakpoint resuming in intelligent equipment
CN104301342A (en) * 2013-07-17 2015-01-21 北京齐尔布莱特科技有限公司 Method for downloading file in breakpoint way
CN104363271A (en) * 2014-10-28 2015-02-18 广东欧珀移动通信有限公司 File breakpoint resuming method and device
CN105187564A (en) * 2015-10-14 2015-12-23 中科宇图天下科技有限公司 Method for breakpoint resuming of mobile phone side file
CN109587232A (en) * 2018-11-28 2019-04-05 陕西天诚软件有限公司 Document breakpoint transmission method based on iOS network
CN110336871A (en) * 2019-07-01 2019-10-15 江苏满运软件科技有限公司 A kind of document handling method, device, storage medium and electronic equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111951130A (en) * 2020-08-19 2020-11-17 重庆市合川区公安局 Data evidence obtaining analysis method and system of electronic equipment
CN111951130B (en) * 2020-08-19 2024-01-30 重庆市合川区公安局 Data evidence obtaining analysis method and system of electronic equipment

Also Published As

Publication number Publication date
CN111193777B (en) 2021-02-05

Similar Documents

Publication Publication Date Title
CN110086658B (en) Interface switching method and device and computer readable storage medium
CN111782492B (en) Page first screen loading duration testing method and device, computer equipment and medium
CN109660639B (en) Data uploading method, device, system and medium
CN109729386B (en) Video file playing starting method and system, electronic equipment and storage medium
CN105279001A (en) Software remote upgrading method for network terminal devices
CN104978253A (en) Target file checking method and apparatus
CN110888843A (en) Cross-host sparse file copying method, device, equipment and storage medium
CN111193777B (en) File downloading method and device based on breakpoint continuous transmission and storage medium
CN110944034A (en) Webpage end breakpoint resume method and device, electronic equipment and storage medium
CN108196975B (en) Data verification method and device based on multiple checksums and storage medium
CN112422604B (en) File uploading method, device and system and computer equipment
CN104049998B (en) The processing method of upgrade package, device and equipment in a kind of android system
CN101146111A (en) A file download method and device
CN110399166B (en) ME Nonce value saving method, device, equipment and storage medium
CN104836820A (en) Method and system for client interaction, and client terminals
US11146571B2 (en) Data transmission method, apparatus, terminal device, and medium
CN116243949A (en) Software upgrading method and device, embedded equipment and storage medium
CN116095064A (en) File downloading method, computer equipment and storage medium
CN106326310B (en) Resource encryption updating method for mobile phone client software
CN111291207B (en) Picture storage method, device and server
CN110069493B (en) Data processing method, device, computer equipment and storage medium
CN111143293B (en) Metadata acquisition method, device, equipment and computer readable storage medium
CN108111561B (en) Data downloading method and equipment thereof
EP2768206A1 (en) Download management method and device based on android browser
CN112948654A (en) Webpage crawling method and device and computer equipment

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
GR01 Patent grant
GR01 Patent grant