Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

File download method and apparatus

A file download and file technology, applied in the field of network communication, can solve problems such as thread stuck or suspended animation, slow download speed, long execution time, etc., to reduce download time, improve download speed, and optimize resources.

Inactive Publication Date: 2018-03-09
ZTE CORP
View PDF3 Cites 11 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0006] (1), the method of downloading by the mode of file stream reading and writing, downloading speed is very slow, takes a long time, is not suitable for downloading of large files, and the phenomenon of ANR (application not responding) appears easily;
[0007] (2), DownloadManager (download manager) appears in API9 (Application Programming Interface) and later Android versions, the download principle is simple, but there are also problems of slow download speed and low performance;
[0009] The disadvantage of this solution is: it is possible that the length of the file is not enough to be equally distributed to each thread, and some threads will have heavy tasks and take a long time to execute, resulting in a long overall download time; it may also occur that the execution speed of each thread is not Equally, some threads are very fast and have already finished executing, but need to wait for the slowest thread. In actual projects, we have encountered that the file has not been able to be downloaded because of a thread freeze or suspended animation. The situation makes the overall download time longer, the download speed is slow, and even the download task cannot be completed.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • File download method and apparatus
  • File download method and apparatus
  • File download method and apparatus

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0065] In order to make the technical problems, technical solutions and advantages to be solved by the present invention clearer, the following will describe in detail with reference to the drawings and specific embodiments. In the following description, specific details, such as specific configurations and components, are provided only to assist in a comprehensive understanding of the embodiments of the present invention. Accordingly, those of ordinary skill in the art should recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted for clarity and conciseness.

[0066] refer to figure 1 , the present invention provides a kind of file downloading method, comprises the following steps:

[0067] Step 1: Send a download request to the server;

[0068] Step 2: receiving an identifier of whether the file to...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention provides a file download method and apparatus. The file download method comprises the steps of sending a download request to a server; receiving an identifier indicating whether a to-be-downloaded file supports multi-thread download returned from the server according to the download request; and if the identifier returned from the server indicates that the to-be-downloaded file supports multi-thread download, starting multiple threads to download the to-be-downloaded file. According to the file download method, the download time of the to-be-downloaded file is shortened, and fewer idle thread resources are wasted.

Description

technical field [0001] The invention relates to the technical field of network communication, in particular to a file downloading method and device. Background technique [0002] In the actual project, it is found that the speed and performance of downloading files using the native download technology of the android operating system are not satisfactory. [0003] At present, there are mainly three mainstream download methods for Android that are used more: [0004] (1), the reading and writing mode download of file stream, the InputStream (input stream) that connects URL (Uniform Resource Locator) reads data while writing in the local memory file of Android; (2), use the DownloadManager that Android comes with (Download Manager) realizes downloading; (3), multi-thread downloading technology. [0005] The main defects of these three mainstream download methods are as follows: [0006] (1), the method of downloading by the mode of file stream reading and writing, downloadin...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): H04L29/08G06F9/52
CPCG06F9/52H04L67/06H04L67/60H04L65/40
Inventor 艾东梅
Owner ZTE CORP
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products