The content of the invention
In view of the above problems, it is an object of the present invention to provide it is a kind of by mobile terminal perform document down loading method device and be
System, helps the faster more stable download file of user and reduces flow waste.
According to an aspect of the present invention, there is provided a kind of document down loading method, including:
Creating and corresponding offline downloading task is created after performing the first downloading task and be sent to offline download service
Device, first downloading task are used to indicate that mobile terminal downloads file from destination server;
When file download completion message and unfinished the first downloading task that offline download server is returned is received, wound
Build for the second downloading task from the offline download server acquisition file to be downloaded;And
Based on the first downloading task and the second downloading task that are created, according to the mode that multi-source is downloaded, while from target
Server and offline download server do not complete the content downloaded in continuing to obtain file to be downloaded.
Wherein, in the case of restarting after the first downloading task is aborted, methods described also includes:
When the destination server supports breakpoint transmission, downloaded based on the first downloading task for being created and second and appointed
Business, according to the mode that multi-source is downloaded, while continuing to obtain in file to be downloaded not from destination server and offline download server
The content downloaded is completed, or
When the destination server does not support breakpoint transmission, based on the second downloading task for being created, from offline download
Server does not complete the content downloaded in continuing to obtain file to be downloaded.
On the other hand, the present invention also provides a kind of file downloading device, including:
First downloading task creating unit, for creating the first downloading task, first downloading task is used to indicate to move
Dynamic terminal downloads file from destination server;
File download unit, comes from destination server downloading object file for performing the first downloading task;
Offline downloading task creating unit, for after creating and performing the first downloading task, create it is corresponding it is offline under
Load task is simultaneously sent to offline download server,;
Second downloading task creating unit, for receiving the file download completion message that offline download server is returned
And first downloading task when not completing, create for the second download of the file to be downloaded is obtained from offline download server
Task,
The file download unit is additionally configured to after the second downloading task is created, and is appointed based on the first download for being created
Business and the second downloading task, according to the mode that multi-source is downloaded, while continuing to obtain from destination server and offline download server
The content downloaded is not completed in file to be downloaded.
Wherein, in the case of restarting after the first downloading task is aborted,
The file download unit is configured to when the destination server supports breakpoint transmission, based on for being created
One downloading task and the second downloading task, according to the mode that multi-source is downloaded, while from destination server and offline download server
The content downloaded is not completed in continuing to obtain file to be downloaded, or
The file download unit is configured to when the destination server does not support breakpoint transmission, based on what is created
Second downloading task, continues to obtain from offline download server the content that download is not completed in file to be downloaded.
Wherein, described device also includes:
File download completion message creating unit, for, after mobile terminal completes to download the file to be downloaded, creating
File download completion message is built, the file download completion message is used to indicate that the offline download server deletion is described offline
File after downloading task and the download;And
File download completion message transmitting element, completes for sending the file download to the offline download server
Message.
On the other hand, the present invention also provides a kind of file download system, including:
File downloading device, for creating and creating corresponding offline downloading task after performing the first downloading task concurrent
Offline download server is sent to, first downloading task is used to indicate that mobile terminal downloads file from destination server, is connecing
Receive file download completion message that offline download server returns and when the first downloading task is not completed, create for from offline
Download server obtains the second downloading task of the file to be downloaded, and, based on the first downloading task for being created and
Second downloading task, according to the mode that multi-source is downloaded, while continue acquisition from destination server and offline download server treating down
The content downloaded is not completed in published article part;
Destination server, downloads content for providing to the file downloading device according to first downloading task;
Offline download server, for according to the offline downloading task and second downloading task under the file
Carry and offer download content is provided.
From above-mentioned technical proposal as can be seen that the present invention is also created when creating and downloading the task of file from destination server
Offline downloading task, thus can file download from destination server do not complete and download offline complete when, while from
Destination server and offline download server do not complete the content downloaded in continuing to obtain file to be downloaded, so as to avoid flow wave
Take and sustainedly and stably can download file, improve user's downloading experience.
Specific embodiment
The specific embodiment of the present invention is described in detail below with reference to accompanying drawing.
The problem for wasting flow and downloading stability difference of downloading is restarted for prior art, the present invention is provided under a kind of file
Support method.The method creates corresponding mourning in silence by after the first downloading task starts, automatically in offline download server
Offline downloading task, and after the completion of offline downloading task of mourning in silence, create the second downloading task, offline download service will be stored in
The file that the public interim download space of device has been downloaded as the second loading source, according to the mode that multi-source is downloaded, while from described
Destination server and the offline download server do not complete the content downloaded in continuing to obtain file to be downloaded, so as to avoid stream
Amount wastes and sustainedly and stably can download file, improves user's downloading experience.
In order to illustrate a kind of document down loading method performed by mobile terminal of present invention offer, Fig. 1 is shown according to this
A kind of first handling process of the document down loading method performed by mobile terminal of inventive embodiments.
As shown in figure 1, a kind of document down loading method performed by mobile terminal that the present invention is provided includes:
S10, creating and creating after performing the first downloading task corresponding offline downloading task and be sent to offline download
Server, first downloading task are used to indicate that mobile terminal downloads file from destination server;
S20, receiving file download completion message that offline download server returns and the first downloading task is not completed
When, create for the second downloading task from the offline download server acquisition file to be downloaded;
S30, based on the first downloading task and the second downloading task for being created, according to the mode that multi-source is downloaded, at the same from
Destination server and offline download server do not complete the content downloaded in continuing to obtain file to be downloaded.
The present invention be can be seen that according to Fig. 1 schemes to further create when creating and downloading the task of file from destination server
Offline downloading task, thus can file download from destination server do not complete and download offline complete when, while from mesh
Mark server and offline download server do not complete the content downloaded in continuing to obtain file to be downloaded, so as to avoid flow from wasting
With can sustainedly and stably download file, improve user's downloading experience.
Fig. 2 shows a kind of second processing stream of the document down loading method performed by mobile terminal according to embodiments of the present invention
Journey.
As shown in Fig. 2 a kind of document down loading method performed by mobile terminal that the present invention is provided includes:
S110:Mobile terminal receive user download request, downloads in mobile terminal locally created first according to download request
Task.
What mobile terminal was created is to ask to download the first downloading task of file to destination server.
S120:Mobile terminal creates the mourn in silence offline downloading task corresponding with the first downloading task.
According to the download request of first downloading task from destination server download file while, according to described first
The download request of downloading task, establishment are mourned in silence offline download request accordingly, and are sent to offline download server, it is described from
The mourn in silence offline downloading task corresponding with the first downloading task is created in line download server.
Wherein, establishment the mourn in silence offline downloading task corresponding with the first downloading task in the offline download server
Including:The offline download server downloads the file into public affairs from the destination server according to the offline download request of mourning in silence
In common interim offline download space or offline download space.
Wherein, the offline downloading task of mourning in silence does not need user to arrange manually, create, and is transparent for a user.
S130:In the first downloading task(Locally-downloaded task)Under normal operation, whether judgement mourns in silence offline downloading task
Complete, if so, into step S140, if it is not, entering step S150, continue offline downloading task of mourning in silence, until completing.
S140:Create the second downloading task, according to multi-source download mode, while from the destination server and it is described from
Line download server does not complete the content downloaded in continuing to obtain file to be downloaded.Into step S160.
Under first downloading task normal operating condition, mobile terminal receives from the offline download server feedback
Offline downloading task completion message, create the second downloading task, using the file for being stored in offline download server as
Second loading source, according to the mode that multi-source is downloaded, while continuing to obtain from the destination server and the offline download server
The content downloaded is not completed in taking file to be downloaded.
Wherein, the mode downloaded according to multi-source, while from the destination server and the offline download server
The content downloaded is not completed in continuing to obtain file to be downloaded to refer to:According to HTTP or File Transfer Protocol simultaneously from the destination service
Device and the offline download server do not complete the content downloaded in continuing to obtain file to be downloaded.
S150:Continue offline downloading task of mourning in silence, until completing, return again to step S140.
S160:When restarting after the first downloading task is aborted, mobile terminal judges the destination server
Whether breakpoint transmission is supported, if so, into step S170, if it is not, entering step S200.
Wherein, judge whether the destination server supports that breakpoint transmission includes:Judge whether downloaded content is supported to refer to
Pin is moved, and such as type of download is FTP, then tested using REST100;Can use if type of download is HTTP
The Seek functions test of CInternetFile.It is successfully tested and passes through, then illustrates that destination server supports breakpoint transmission.
S170:The second downloading task that there is offline service device is continued to determine whether, if so, into step 180, if it is not,
Into step 190.
S180:In the case of destination server is supported breakpoint transmission and there is the second downloading task of offline service device, press
According to the mode that multi-source is downloaded, while under continuing not completing in acquisition file to be downloaded from destination server and offline download server
The content of load, into step S240.
S190:When destination server is supported breakpoint transmission but be there is no second downloading task of offline service device,
Then continue from the destination server to obtain do not complete in file to be downloaded the content downloaded in breakpoint transmission mode.
S200:Second downloading task is checked for, if so, into step S210, if it is not, entering step
S220。
S210:When destination server does not support breakpoint transmission but there is the second downloading task of offline service device, then with
Resume mode and continue to obtain from the offline download server content that download is not completed in file to be downloaded, into step 240.
S220:When destination server does not support that breakpoint transmission does not have the second downloading task of offline service device yet, then
Prompting user can use " offline downloading mode download file ", obtain user and use " offline downloading mode download file " request
Afterwards, into step S230.
S230:Process to offline downloading task is determined according to user identity.Into step S240.
In the step, current download user identity is judged, if login account, then will take positioned at offline the download
In business, the offline downloading task of public interim offline download space is transferred to the corresponding offline download space of user account;
If being not logged in account, then user is guided to carry out account login or account registration, when user's Successful login or note
After volume, the offline downloading task of the public interim offline download space in the offline download service is transferred to into user account
Corresponding offline download space.
Wherein, the offline download space is associated with user account, and user can be checked and newly-built/volume in space page
Offline downloading task is collected, when changing occurs in task situation, user can be pointed out, allowed user grasped according to suggestion content accordingly
Make, such as after the completion of the offline downloading task in off-line space, then point out user continue to download file.
As a kind of preferred scheme, if the offline download space active volume is held less than file to be downloaded
Amount, then temporarily lift offline download space capacity for user, it is ensured that public interim download space in the offline download server
Offline downloading task can be successfully moved to the offline download space.
It should be noted that, it may not be necessary to step S230.
S240:After the completion of first downloading task, downloading task completion message is sent to described offline by mobile terminal
Offline downloading task and its corresponding download file of mourning in silence is deleted by download server, the offline download server.
As a kind of preferred scheme, after the first downloading task is complete to be deleted, downloading task is deleted into message and is sent
To the offline download server, the offline download server is by offline downloading task and its corresponding lower published article of mourning in silence
Part is deleted.
Fig. 3 is the structural representation of the file downloading device according to the embodiment of the present invention;
As shown in figure 3, a kind of file downloading device, including:First downloading task creating unit 301, file download unit
302nd, offline downloading task creating unit 303, the second downloading task creating unit 304.
First downloading task creating unit 301, for creating the first downloading task, first downloading task is used to indicate
Mobile terminal downloads file from destination server;
File download unit 302, comes from destination server downloading object file for performing the first downloading task;
Offline downloading task creating unit 303, it is corresponding offline for, after creating and performing the first downloading task, creating
Downloading task is simultaneously sent to offline download server;
Second downloading task creating unit 304, for completing in the file download for receiving offline download server return
When message and unfinished the first downloading task, create for the second of the file to be downloaded is obtained from offline download server
Downloading task;
The file download unit 302 is additionally configured to after the second downloading task is created, based under first for being created
Load task and the second downloading task, according to the mode that multi-source is downloaded, while continuing from destination server and offline download server
The content downloaded is not completed in obtaining file to be downloaded.
Further, in the case of restarting after the first downloading task is aborted,
The file download unit 302 is configured to when the destination server supports breakpoint transmission, based on being created
The first downloading task and the second downloading task, according to the mode that multi-source is downloaded, while from destination server and offline downloading clothes
Business device does not complete the content downloaded in continuing to obtain file to be downloaded, or,
The file download unit 302 is configured to when the destination server does not support breakpoint transmission, based on being created
The second downloading task built, continues to obtain from offline download server the content that download is not completed in file to be downloaded.
Further, shown file downloading device also includes:File download completion message creating unit 305, file download
Completion message transmitting element 306.
File download completion message creating unit 305, for after mobile terminal completes to download the file to be downloaded,
Establishment file downloads completion message, the file download completion message be used to indicating the offline download server delete it is described from
File after line downloading task and the download;And
File download completion message transmitting element 306, for sending the file download to the offline download server
Completion message.
Fig. 4 is the structural representation of mobile terminal of the present invention.
As shown in figure 4, mobile terminal 40 includes file downloading device 30, the concrete structure ginseng of the file downloading device 30
Plus shown in Fig. 3.
Fig. 5 is the structural representation of the file download system of the present invention.
As shown in figure 5, file download system includes:File downloading device 30, destination server 50, offline download server
60。
File downloading device 30, for creating and creating corresponding offline downloading task simultaneously after performing the first downloading task
Offline download server is sent to, first downloading task is used to indicate that mobile terminal downloads file from destination server,
Receive file download completion message that offline download server returns and when the first downloading task is not completed, create for from from
Line download server obtains the second downloading task of the file to be downloaded, and, based on the first downloading task for being created
With the second downloading task, according to the mode that multi-source is downloaded, while continue acquisition from destination server and offline download server treating
The content downloaded is not completed in downloading file;
Destination server 50, downloads content for providing to the file downloading device according to first downloading task;
Offline download server 60, for according to the offline downloading task and second downloading task to the file
Download apparatus is provided downloads content.
Specifically, destination server 50, receive the download request that the file downloading device 30 in mobile terminal sends, are the
One downloading task provides original download content;
Offline download server 60, receive that the file downloading device 30 in mobile terminal sends mourn in silence offline download please
Ask, and create offline downloading task of mourning in silence, provide download content for the second downloading task according to download request.
In sum, a kind of document down loading method of present invention offer, apparatus and system, are creating and are performing the first download
Corresponding offline downloading task is created after task and offline download server is sent to, first downloading task is used to indicate to move
Dynamic terminal downloads file from destination server;Receiving the file download completion message and first that offline download server is returned
When downloading task is not completed, create for the second downloading task from the offline download server acquisition file to be downloaded;
And based on the first downloading task and the second downloading task for being created, according to the mode that multi-source is downloaded, while from destination service
Device and offline download server do not complete the content downloaded in continuing to obtain file to be downloaded.
In the case that the present invention is restarted after the first downloading task is aborted, support in the destination server
During breakpoint transmission, based on the first downloading task and the second downloading task that are created, according to the mode that multi-source is downloaded, while from mesh
Mark server and offline download server do not complete the content downloaded in continuing to obtain file to be downloaded, and take in the target
When business device does not support breakpoint transmission, based on the second downloading task for being created, continue to obtain to be downloaded from offline download server
The content downloaded is not completed in file.
Therefore, motion of the invention can solve that existing speed of download is slow, need to open again after the downloading task exception of part
The problem for beginning to download, so as to avoiding flow from wasting and can sustainedly and stably downloading file, provides the user preferably lower carrier
Test.
Technical scheme is described in an illustrative manner above with reference to accompanying drawing.But, those skilled in the art should
Work as understanding, for the technical scheme proposed by the invention described above, can be each to make on the basis of without departing from present invention
Plant and improve.