CN104426946B - Bulk-download data treating method and apparatus - Google Patents
Bulk-download data treating method and apparatus Download PDFInfo
- Publication number
- CN104426946B CN104426946B CN201310379099.6A CN201310379099A CN104426946B CN 104426946 B CN104426946 B CN 104426946B CN 201310379099 A CN201310379099 A CN 201310379099A CN 104426946 B CN104426946 B CN 104426946B
- Authority
- CN
- China
- Prior art keywords
- data item
- queue
- key assignments
- downloaded
- downloading
- 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.)
- Active
Links
Landscapes
- Information Transfer Between Computers (AREA)
Abstract
The invention discloses a kind of bulk-download data treating method and apparatus, the bulk-download data processing method includes: that multiple data item batches to be downloaded in original queue are added in downloading queue;According to sequence of each data item to be downloaded in original queue, the corresponding key assignments of each data item to be downloaded is stored in mapping table;The data item downloaded is completed in queue from being transferred in the downloading queue, and according to the sequence of key assignments in the mapping table, arranges sequence of the data item downloaded in the completion queue.The present invention establishes mapping table according to original queue, and according to the sequence of key assignments in mapping table, queue is completed in arrangement, makes to complete data item sequence and data item sequence consensus in original queue in queue, the succession of downloading front and back data item has been effectively ensured.
Description
Technical field
The present invention relates to technical field of data processing, are related specifically to bulk-download data treating method and apparatus.
Background technique
The intelligent terminals such as mobile phone, PAD, computer, Web TV by network download document, using etc. data when, can pass through
Following two mode.One kind being to provide single downloading mode, and this mode needs user one by one when downloading multiple data
Click downloading, frequent single down operation can undoubtedly make troubles to user.Another kind is to provide batch downloading mode, batch
Multiple data or each item data of entire queue disposably can all be added in downloading queue by amount downloading, are able to satisfy user and think
The demand of multiple data or entire queuing data is downloaded simultaneously, still, in batch downloading process, when the artificial change of user
When having descended load sequence, there may be differences for the sequence of queue sequence and former queue after the completion of downloading, are not easy to user and position original
Data then destroy the order of former data queue especially for some regular data.
Summary of the invention
The embodiment of the present invention provides a kind of bulk-download data treating method and apparatus, can guarantee that batch is downloaded orderly
Property.
The embodiment of the present invention proposes a kind of bulk-download data processing method, comprising steps of
Multiple data item batches to be downloaded in original queue are added in downloading queue;
According to sequence of each data item to be downloaded in original queue, the corresponding key assignments of each data item to be downloaded is deposited
It is stored in mapping table;
The data item downloaded is completed in queue from being transferred in the downloading queue, and according to key in the mapping table
The sequence of value arranges sequence of the data item downloaded in the completion queue.
The embodiment of the present invention also proposes a kind of bulk-download data processing unit, comprising:
Batch download module, for multiple data item batches to be downloaded in original queue to be added to downloading queue
In;
Key assignments mapping block will be each to be downloaded for the sequence according to each data item to be downloaded in original queue
The corresponding key assignments of data item is stored in mapping table;
Sorting module, for by the data item downloaded from be transferred in the downloading queue complete queue in, and according to
The sequence of key assignments in the mapping table arranges sequence of the data item downloaded in the completion queue.
The embodiment of the present invention is established mapping table, is stored in mapping table according to the sequence of data item to be downloaded in original queue
Key assignments and data item to be downloaded correspond, downloading data item is being transferred to completion from downloading queue by and sequence consensus
When queue, according to the sequence of the corresponding key assignments of downloading data item in the mapping table, downloading data item is completed in queue in arrangement
Sequence, make complete queue in data item sequence and data item sequence consensus in original queue, be effectively ensured downloading front and back number
According to the succession of item.
Detailed description of the invention
Fig. 1 is the flow chart of the first embodiment of bulk-download data processing method of the present invention;
Fig. 2 is the flow chart of the second embodiment of bulk-download data processing method of the present invention;
Fig. 3 is the flow chart of the 3rd embodiment of bulk-download data processing method of the present invention;
Fig. 4 is the flow chart of the fourth embodiment of bulk-download data processing method of the present invention;
Fig. 5 is the flow chart of the 5th embodiment of bulk-download data processing method of the present invention;
Fig. 6 is the flow chart of the sixth embodiment of bulk-download data processing method of the present invention;
Fig. 7 is the flow chart of the 7th embodiment of bulk-download data processing method of the present invention;
Fig. 8 is the structural schematic diagram of bulk-download data processing unit in the embodiment of the present invention;
Fig. 9 is the overall queue schematic diagram of bulk-download data processing in the embodiment of the present invention;
Figure 10 is the queue schematic diagram of the first embodiment of bulk-download data processing in the embodiment of the present invention;
Figure 11 is the queue schematic diagram of the second embodiment of bulk-download data processing in the embodiment of the present invention.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
As shown in FIG. 1, FIG. 1 is the flow charts of the first embodiment of bulk-download data processing method of the present invention.Please together
Referring to Fig. 9, the bulk-download data processing method that the present embodiment is mentioned, comprising:
Multiple data item batches to be downloaded in original queue are added in downloading queue by step S10;
In the present embodiment, multiple data item are stored on network server, these data item are according to specific rule row
Sequence, for example, according to modes such as renewal time sequencing, the initial sequence of data item title, data item sizes come the number that sorts
According to item, original queue is formed.Intelligent terminal is by the way that in network connection to server, user browses original team by intelligent terminal
Column, and select the data item for needing to download.When user, which has selected multiple data item batch, to download, intelligent terminal will choose to
Downloading data item batch is added in downloading queue, the data item to be downloaded of addition can be entire original list data item or
Partial data item in original list.
After data item to be downloaded addition, user can manually adjust the downloading order of data item to be downloaded in downloading queue,
For example, suspending some data item, or it is under high priority, or the certain data item of limitation that the downloading rank of some data item, which is arranged,
Speed is carried, the network speed for occupying other data item is avoided.In addition, intelligent terminal can also be with to the data item to be downloaded in downloading queue
It is not to download simultaneously, can be automatically adjusted according to current network speed situation, the downloading order for treating downloading data item, for example,
The data item fast for speed of download, intelligent terminal are adjusted to preferentially download, the data item slow for speed of download, intelligence
Terminal pause downloading, avoids the network speed for occupying other data item, after the completion of the downloading of the data item of high priority, then continues again
Downloading.
Step S20, it is according to sequence of each data item to be downloaded in original queue, each data item to be downloaded is corresponding
Key assignments be stored in mapping table;
Since the sequencing of data item downloading in downloading queue is adjustable, in order to avoid data in the queue after the completion of downloading
The sequence of the sequence and data item in original queue of item is inconsistent, and the present embodiment is added to downloading queue in data item to be downloaded
Meanwhile mapping table is established also according to the sequence of data item to be downloaded in original queue, it is stored in the mapping table respectively under
The corresponding key assignments of the data item of load.Key assignments can determine according to the identifier of data item to be downloaded, a key assignments and a data
Item corresponds.It is suitable in original queue according to each data item to be downloaded when intelligent terminal stores key assignments in the mapping table
Sequence arranges the sequence of each key assignments in the mapping table, the sequence of key assignments corresponding with data item and number in original queue in mapping table
According to the sequence consensus of item.
The data item downloaded is transferred to from downloading queue and completes in queue by step S30, and according to key in mapping table
The sequence of value arranges the data item downloaded and completes the sequence in queue.
After the completion of downloading the data item downloading in queue, intelligent terminal removes it from downloading queue, and has been added to
At in queue, at this point, the sequence consensus of the sequence and the data item of original queue for the data item completed in order to ensure downloading, mobile
Terminal searches corresponding key assignments, and the sequence according to key assignments in the mapping table according to the data item downloaded in the mapping table, comes
Downloading data item completes the sequence in queue for arrangement.Since the sequence of key assignments in mapping table is according to data in original queue
Sequence arranged, therefore, at this time the sequence for completing the data item in queue also with data item in original queue
The succession of downloading front and back data item has been effectively ensured in sequence consensus.
The present embodiment establishes mapping table, the key stored in mapping table according to the sequence of data item to be downloaded in original queue
Value is corresponded with data item to be downloaded, and sequence consensus, completes queue downloading data item to be transferred to from downloading queue
When, according to the sequence of the corresponding key assignments of downloading data item in the mapping table, the suitable of downloading data item is completed in queue in arrangement
Sequence makes to complete data item sequence and data item sequence consensus in original queue in queue, downloading front and back data item has been effectively ensured
Succession.
As shown in Fig. 2, Fig. 2 is the flow chart of the second embodiment of bulk-download data processing method of the present invention.This implementation
Example is described in detail the first embodiment for the step of completing queue of sorting based on embodiment illustrated in fig. 1, please with reference to
Figure 10, wherein step S30 includes:
Step S311 determines the corresponding key assignments Ki of data item Ti downloaded;
Step S312, inquiry is arranged in n-th before key assignments Ki key assignments Kj in the mapping table;
Step S313, find key value the corresponding data item Tj downloaded of Kj in completing queue;
The data item Ti downloaded is transferred to from downloading queue and completes in queue by step S314, and under being arranged in
After the data item Tj of load.
In the present embodiment, the initial value of n is 1, i.e., looks into the key assignments for being arranged in the previous position of key assignments Ki since mapping table
It askes.After getting key assignments Kj, the corresponding data item Tj of key assignments Kj has been searched whether in completing queue, due to Kj in the mapping table
Sequencing between Ki is consistent with the sequencing of Tj in original queue and Ti, therefore, will complete the data in queue
When order restoring, according to the sequencing of Kj and Ki, the data item Ti downloaded is arranged in the data item Tj that has downloaded it
Afterwards, make to complete data item sequence and data item sequence consensus in original queue in queue, effectively ensure downloading front and back data item
Succession.In addition, the present embodiment is particularly suitable for the data item of the progressive download in downloading queue, the data item row first downloaded
Be listed in front end, complete queue in find key value corresponding data item when it is more quick, further improve downloading data item
Sequence efficiency.
As shown in figure 3, Fig. 3 is the flow chart of the 3rd embodiment of bulk-download data processing method of the present invention.This implementation
Example is based on embodiment illustrated in fig. 2, after step S313 further include:
Step S315, when completing the data item Tj that has downloaded corresponding there is no key assignments Kj in queue, in the mapping table
Inquiry is arranged in (n+1)th before key assignments Ki key assignments Kg;
Step S316, find key value the corresponding data item Tg downloaded of Kg in completing queue;
The data item Ti downloaded is transferred to from downloading queue and completes in queue by step S317, and under being arranged in
After the data item Tg of load.
In the present embodiment, when downloading has not been completed in the corresponding data item Tj of key assignments Kj, it cannot be looked in completing queue
To data item Tj, at this point it is possible to which inquiry is arranged in the key assignments of the front two of key assignments Ki from mapping table, if in completing queue
Still the corresponding data item Tg of Kg is not found, then inquires the key assignments for being arranged in the front three of key assignments Ki, from mapping table with such
It pushes away, arranges nearest data item with Ki until finding key assignments in completing queue, and Ti is inserted into after the data item found,
Make to complete data item sequence and data item sequence consensus in original queue in queue, effectively ensures the suitable of downloading front and back data item
Sequence.In addition, if all key assignments before being arranged in key assignments Ki in Ergodic Maps table, all do not find correspondence completing queue
Data item, then explanation is arranged in the data item before data item Ti and does not complete downloading, can directly arrange data item Ti at this time
It is listed in the first place for completing queue, at other when preceding data item reaches, then rearward displacement.
As shown in figure 4, Fig. 4 is the flow chart of the fourth embodiment of bulk-download data processing method of the present invention.This implementation
Example is based on embodiment illustrated in fig. 2, after step S311 further include:
Step S318, when the position of key assignments Kj in the mapping table is the first, directly by the data item Ti downloaded under
Carry the first place for being transferred in queue and completing queue.
The present embodiment does not have extra key assignments in its front end for the key assignments of mapping table first place, is not suitable for above-described embodiment
In lookup mode, at this point, in order to shorten search the time, improve search efficiency first judge that key assignments Ki is before finding key value
No to be located at mapping table first place, for being located at the first key assignments, corresponding data item also is located at first place in original queue, then exists
It completes in queue, data item Ti can be directly arranged in the first place for completing queue, reduce search procedure, when shortening sequence
Between, further improve the sequence efficiency of downloading data item.
As shown in figure 5, Fig. 5 is the flow chart of the 5th embodiment of bulk-download data processing method of the present invention.This implementation
Example is described in detail the second embodiment of the step of completing queue of sorting based on embodiment illustrated in fig. 1, please with reference to
Figure 11, wherein step S30 includes:
Step S321 determines the corresponding key assignments Ki of data item Ti downloaded;
Step S322, inquiry is arranged in m after key assignments Ki key assignments Kj ' in the mapping table;
Step S323, find key value the corresponding data item Tj ' downloaded of Kj ' in completing queue;
The data item Ti downloaded is transferred to from downloading queue and completes in queue by step S324, and under being arranged in
Before the data item Tj ' of load.
In the present embodiment, the initial value of m is 1, i.e., looks into the key assignments for being arranged in the latter position of key assignments Ki since mapping table
It askes.After getting key assignments Kj ', the corresponding data item Tj ' of key assignments Kj ' has been searched whether in completing queue, due in mapping table
Sequencing between middle Kj ' and Ki is consistent with the sequencing of Tj in original queue and Ti, therefore, will complete in queue
When data item order restoring, according to the sequencing of Kj ' and Ki, the data item Ti downloaded is arranged in the data item downloaded
Before Tj ', makes to complete data item sequence and data item sequence consensus in original queue in queue, effectively ensure downloading front and back number
According to the succession of item.In addition, the present embodiment is particularly suitable for the data item of the backward downloading in downloading queue, the data first downloaded
It is arranged in rear end, when corresponding data item that finds key value in completing queue is more quick, further improves and has downloaded number
According to the sequence efficiency of item.
As shown in fig. 6, Fig. 6 is the flow chart of the sixth embodiment of bulk-download data processing method of the present invention.This implementation
Example is based on embodiment illustrated in fig. 5, after step S323 further include:
Step S325, when completing the data item Tj ' that has downloaded corresponding there is no key assignments Kj ' in queue, in mapping table
Middle inquiry is arranged in m+1 after key assignments Ki key assignments Kg ';
Step S326, find key value the corresponding data item Tg ' downloaded of Kg ' in completing queue;
The data item Ti downloaded is transferred to from downloading queue and completes in queue by step S327, and under being arranged in
Before the data item Tg ' of load.
It, cannot in completing queue when downloading has not been completed in the corresponding data item Tj ' of key assignments Kj ' in the present embodiment
Data item Tj ' is found, at this point it is possible to two after key assignments Ki key assignments are arranged in from inquiry in mapping table, if completing team
Still the corresponding data item Tg ' of Kg ' is not found in column, then is arranged in three after key assignments Ki key assignments from inquiry in mapping table,
And so on, nearest data item is arranged with Ki until finding key assignments in completing queue, and Ti is inserted into the data found
Before, makes to complete data item sequence and data item sequence consensus in original queue in queue, effectively ensure downloading front and back number
According to the succession of item.In addition, if all key assignments after being arranged in key assignments Ki in Ergodic Maps table, all do not have completing queue
Corresponding data item is found, then explanation is arranged in the unfinished downloading of data item after data item Ti, will can directly count at this time
It is shifted further along at other when preceding data item reaches according to the last bit that item Ti is arranged in completion queue.
As shown in fig. 7, Fig. 7 is the flow chart of the 7th embodiment of bulk-download data processing method of the present invention.This implementation
Example is based on embodiment illustrated in fig. 5, after step S321 further include:
Step S328, when the position of key assignments Kj in the mapping table is last bit, directly by the data item Ti downloaded under
Carry the last bit for being transferred in queue and completing queue.
The present embodiment is for the key assignments of mapping table last bit, and not extra key assignments, is not suitable for above-described embodiment in its back-end
In lookup mode, at this point, in order to shorten search the time, improve search efficiency first judge that key assignments Ki is before finding key value
No to be located at mapping table last bit, for being located at the key assignments of last bit, corresponding data item also is located at last bit in original queue, then exists
It completes in queue, data item Ti can be directly arranged in the last bit for completing queue, reduce search procedure, when shortening sequence
Between, further improve the sequence efficiency of downloading data item.
As shown in figure 8, Fig. 8 is the structural schematic diagram of bulk-download data processing unit in the embodiment of the present invention.Please together
Referring to Fig. 9, the bulk-download data processing unit that the embodiment of the present invention is mentioned, comprising:
Batch download module 10, for multiple data item batches to be downloaded in original queue to be added to downloading queue
In;
Key assignments mapping block 20 will be each to be downloaded for the sequence according to each data item to be downloaded in original queue
The corresponding key assignments of data item be stored in mapping table;
Sorting module 30 is completed in queue for the data item downloaded to be transferred to from downloading queue, and according to reflecting
The sequence of key assignments in firing table arranges the data item downloaded and completes the sequence in queue.
In the present embodiment, multiple data item are stored on network server, these data item are according to specific rule row
Sequence, for example, according to modes such as renewal time sequencing, the initial sequence of data item title, data item sizes come the number that sorts
According to item, original queue is formed.Intelligent terminal is by the way that in network connection to server, user browses original team by intelligent terminal
Column, and select the data item for needing to download.When user, which has selected multiple data item batch, to download, intelligent terminal will choose to
Downloading data item batch is added in downloading queue, the data item to be downloaded of addition can be entire original list data item or
Partial data item in original list.
After data item to be downloaded addition, user can manually adjust the downloading order of data item to be downloaded in downloading queue,
For example, suspending some data item, or it is under high priority, or the certain data item of limitation that the downloading rank of some data item, which is arranged,
Speed is carried, the network speed for occupying other data item is avoided.In addition, intelligent terminal can also be with to the data item to be downloaded in downloading queue
It is not to download simultaneously, can be automatically adjusted according to current network speed situation, the downloading order for treating downloading data item, for example,
The data item fast for speed of download, intelligent terminal are adjusted to preferentially download, the data item slow for speed of download, intelligence
Terminal pause downloading, avoids the network speed for occupying other data item, after the completion of the downloading of the data item of high priority, then continues again
Downloading.
Since the sequencing of data item downloading in downloading queue is adjustable, in order to avoid data in the queue after the completion of downloading
The sequence of the sequence and data item in original queue of item is inconsistent, and the present embodiment is added to downloading queue in data item to be downloaded
Meanwhile mapping table is established also according to the sequence of data item to be downloaded in original queue, it is stored in the mapping table respectively under
The corresponding key assignments of the data item of load.Key assignments can determine according to the identifier of data item to be downloaded, a key assignments and a data
Item corresponds.It is suitable in original queue according to each data item to be downloaded when intelligent terminal stores key assignments in the mapping table
Sequence arranges the sequence of each key assignments in the mapping table, the sequence of key assignments corresponding with data item and number in original queue in mapping table
According to the sequence consensus of item.
After the completion of downloading the data item downloading in queue, intelligent terminal removes it from downloading queue, and has been added to
At in queue, at this point, the sequence consensus of the sequence and the data item of original queue for the data item completed in order to ensure downloading, mobile
Terminal searches corresponding key assignments, and the sequence according to key assignments in the mapping table according to the data item downloaded in the mapping table, comes
Downloading data item completes the sequence in queue for arrangement.Since the sequence of key assignments in mapping table is according to data in original queue
Sequence arranged, therefore, at this time the sequence for completing the data item in queue also with data item in original queue
The succession of downloading front and back data item has been effectively ensured in sequence consensus.
The present embodiment establishes mapping table, the key stored in mapping table according to the sequence of data item to be downloaded in original queue
Value is corresponded with data item to be downloaded, and sequence consensus, completes queue downloading data item to be transferred to from downloading queue
When, according to the sequence of the corresponding key assignments of downloading data item in the mapping table, the suitable of downloading data item is completed in queue in arrangement
Sequence makes to complete data item sequence and data item sequence consensus in original queue in queue, downloading front and back data item has been effectively ensured
Succession.
Please with reference to Figure 10, in the first embodiment that queue is completed in sequence, sorting module 30 is used for:
Determine the corresponding key assignments Ki of data item Ti downloaded;
Inquiry is arranged in n-th before key assignments Ki key assignments Kj in the mapping table, wherein the initial value of n is 1;
Find key value the corresponding data item Tj downloaded of Kj in completing queue;
The data item Ti downloaded is transferred to from downloading queue and is completed in queue, and is arranged in the data item downloaded
After Tj.
In the present embodiment, the initial value of n is 1, i.e., looks into the key assignments for being arranged in the previous position of key assignments Ki since mapping table
It askes.After getting key assignments Kj, the corresponding data item Tj of key assignments Kj has been searched whether in completing queue, due to Kj in the mapping table
Sequencing between Ki is consistent with the sequencing of Tj in original queue and Ti, therefore, will complete the data in queue
When order restoring, according to the sequencing of Kj and Ki, the data item Ti downloaded is arranged in the data item Tj that has downloaded it
Afterwards, make to complete data item sequence and data item sequence consensus in original queue in queue, effectively ensure downloading front and back data item
Succession.In addition, the present embodiment is particularly suitable for the data item of the progressive download in downloading queue, the data item row first downloaded
Be listed in front end, complete queue in find key value corresponding data item when it is more quick, further improve downloading data item
Sequence efficiency.
Further, sorting module 30 is also used to:
When completing the data item Tj that has downloaded corresponding there is no key assignments Kj in queue, inquiry is arranged in the mapping table
(n+1)th key assignments Kg before key assignments Ki;
Find key value the corresponding data item Tg downloaded of Kg in completing queue;
The data item Ti downloaded is transferred to from downloading queue and is completed in queue, and is arranged in the data item downloaded
After Tg.
In the present embodiment, when downloading has not been completed in the corresponding data item Tj of key assignments Kj, it cannot be looked in completing queue
To data item Tj, at this point it is possible to which inquiry is arranged in the key assignments of the front two of key assignments Ki from mapping table, if in completing queue
Still the corresponding data item Tg of Kg is not found, then inquires the key assignments for being arranged in the front three of key assignments Ki, from mapping table with such
It pushes away, arranges nearest data item with Ki until finding key assignments in completing queue, and Ti is inserted into after the data item found,
Make to complete data item sequence and data item sequence consensus in original queue in queue, effectively ensures the suitable of downloading front and back data item
Sequence.In addition, if all key assignments before being arranged in key assignments Ki in Ergodic Maps table, all do not find correspondence completing queue
Data item, then explanation is arranged in the data item before data item Ti and does not complete downloading, can directly arrange data item Ti at this time
It is listed in the first place for completing queue, at other when preceding data item reaches, then rearward displacement.
Further, sorting module 30 is also used to:
When the position of key assignments Kj in the mapping table is the first, directly by the data item Ti downloaded from downloading queue transfer
Move to the first place for completing queue.
The present embodiment does not have extra key assignments in its front end for the key assignments of mapping table first place, is not suitable for above-described embodiment
In lookup mode, at this point, in order to shorten search the time, improve search efficiency first judge that key assignments Ki is before finding key value
No to be located at mapping table first place, for being located at the first key assignments, corresponding data item also is located at first place in original queue, then exists
It completes in queue, data item Ti can be directly arranged in the first place for completing queue, reduce search procedure, when shortening sequence
Between, further improve the sequence efficiency of downloading data item.
Please with reference to Figure 11, in the second embodiment that queue is completed in sequence, sorting module 30 is used for:
Determine the corresponding key assignments Ki of data item Ti downloaded;
Inquiry is arranged in m after key assignments Ki key assignments Kj ' in the mapping table, wherein the initial value of m is 1;
Find key value the corresponding data item Tj ' downloaded of Kj ' in completing queue;
The data item Ti downloaded is transferred to from downloading queue and is completed in queue, and is arranged in the data item downloaded
Before Tj '.
In the present embodiment, the initial value of m is 1, i.e., looks into the key assignments for being arranged in the latter position of key assignments Ki since mapping table
It askes.After getting key assignments Kj ', the corresponding data item Tj ' of key assignments Kj ' has been searched whether in completing queue, due in mapping table
Sequencing between middle Kj ' and Ki is consistent with the sequencing of Tj in original queue and Ti, therefore, will complete in queue
When data item order restoring, according to the sequencing of Kj ' and Ki, the data item Ti downloaded is arranged in the data item downloaded
Before Tj ', makes to complete data item sequence and data item sequence consensus in original queue in queue, effectively ensure downloading front and back number
According to the succession of item.In addition, the present embodiment is particularly suitable for the data item of the backward downloading in downloading queue, the data first downloaded
It is arranged in rear end, when corresponding data item that finds key value in completing queue is more quick, further improves and has downloaded number
According to the sequence efficiency of item.
Further, sorting module 30 is also used to:
When completing the data item Tj ' that has downloaded corresponding there is no key assignments Kj ' in queue, inquiry arrangement in the mapping table
The m+1 key assignments Kg ' after key assignments Ki;
Find key value the corresponding data item Tg ' downloaded of Kg ' in completing queue;
The data item Ti downloaded is transferred to from downloading queue and is completed in queue, and is arranged in the data item downloaded
Before Tg '.
It, cannot in completing queue when downloading has not been completed in the corresponding data item Tj ' of key assignments Kj ' in the present embodiment
Data item Tj ' is found, at this point it is possible to two after key assignments Ki key assignments are arranged in from inquiry in mapping table, if completing team
Still the corresponding data item Tg ' of Kg ' is not found in column, then is arranged in three after key assignments Ki key assignments from inquiry in mapping table,
And so on, nearest data item is arranged with Ki until finding key assignments in completing queue, and Ti is inserted into the data found
Before, makes to complete data item sequence and data item sequence consensus in original queue in queue, effectively ensure downloading front and back number
According to the succession of item.In addition, if all key assignments after being arranged in key assignments Ki in Ergodic Maps table, all do not have completing queue
Corresponding data item is found, then explanation is arranged in the unfinished downloading of data item after data item Ti, will can directly count at this time
It is shifted further along at other when preceding data item reaches according to the last bit that item Ti is arranged in completion queue.
Further, sorting module 30 is also used to:
When the position of key assignments Kj in the mapping table be last bit when, directly by the data item Ti downloaded from downloading queue transfer
Move to the last bit for completing queue.
The present embodiment is for the key assignments of mapping table last bit, and not extra key assignments, is not suitable for above-described embodiment in its back-end
In lookup mode, at this point, in order to shorten search the time, improve search efficiency first judge that key assignments Ki is before finding key value
No to be located at mapping table last bit, for being located at the key assignments of last bit, corresponding data item also is located at last bit in original queue, then exists
It completes in queue, data item Ti can be directly arranged in the last bit for completing queue, reduce search procedure, when shortening sequence
Between, further improve the sequence efficiency of downloading data item.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row
His property includes, so that the process, method, article or the device that include a series of elements not only include those elements, and
And further include other elements that are not explicitly listed, or further include for this process, method, article or device institute it is intrinsic
Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do
There is also other identical elements in the process, method of element, article or device.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side
Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases
The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art
The part contributed out can be embodied in the form of software products, which is stored in a storage medium
In (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal device (can be mobile phone, computer, clothes
Business device or the network equipment etc.) execute method described in each embodiment of the present invention.Specifically, batch described in Fig. 8 downloads number
It can store in the readable storage medium storing program for executing of the intelligent terminals such as mobile phone, tablet computer according to program instruction corresponding to processing unit,
And executed by least one processor therein, to realize bulk-download data processing method described in Fig. 1 to Fig. 7.
The above description is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all utilizations
Equivalent structure or equivalent flow shift made by description of the invention and accompanying drawing content is applied directly or indirectly in other correlations
Technical field, be included within the scope of the present invention.
Claims (10)
1. a kind of bulk-download data processing method, which is characterized in that comprising steps of
Multiple data item batches to be downloaded in original queue are added in downloading queue;
According to sequence of each data item to be downloaded in original queue, the corresponding key assignments of each data item to be downloaded is stored in
In mapping table;
The data item downloaded is completed in queue from being transferred in the downloading queue, and according to key assignments in the mapping table
Sequentially, sequence of the data item that arrangement has been downloaded in the completion queue.
2. bulk-download data processing method according to claim 1, which is characterized in that the data item that will have been downloaded
It is completed in queue from being transferred in the downloading queue, and according to the sequence of key assignments in the mapping table, arranges the number downloaded
Include: in the step of sequence completed in queue according to item
Determine the corresponding key assignments Ki of data item Ti downloaded;
In the mapping table, from closely to remote sequence, successively searches according at a distance from the key assignments Ki and be arranged in key assignments Ki
Each key assignments before;
After finding a key assignments every time, judge to whether there is the key assignments that current lookup arrives in the completion queue corresponding
The data item of downloading, until determine it is described complete queue in there are current lookup to the corresponding data item downloaded of key assignments,
Alternatively, until determining that there is no the corresponding data item downloaded of key assignments arbitrarily once found in the completion queue;
Determine in the completion queue there are current lookup to the key assignments corresponding data item downloaded when, number that will download
Be transferred in the completion queue according to item Ti from the downloading queue, and be arranged in key assignments that current lookup arrives it is corresponding under
After the data item of load;
When determining the data item downloaded corresponding there is no the key assignments arbitrarily once searched in the completion queue, it will download
Data item Ti be arranged in it is described complete queue first place.
3. bulk-download data processing method according to claim 2, which is characterized in that the data that the determination has been downloaded
After the step of Ti corresponding key assignments Ki further include:
When position of the key assignments Ki in the mapping table is the first, directly by the data item Ti downloaded from the downloading queue
In be transferred to complete queue first place.
4. bulk-download data processing method according to claim 1, which is characterized in that the data item that will have been downloaded
It is completed in queue from being transferred in the downloading queue, and according to the sequence of key assignments in the mapping table, arranges the number downloaded
Include: in the step of sequence completed in queue according to item
Determine the corresponding key assignments Ki of data item Ti downloaded;
In the mapping table, from closely to remote sequence, successively searches according at a distance from the key assignments Ki and be arranged in key assignments Ki
Each key assignments later;
After finding a key assignments every time, judge to whether there is the key assignments that current lookup arrives in the completion queue corresponding
The data item of downloading, until determine it is described complete queue in there are current lookup to the corresponding data item downloaded of key assignments,
Alternatively, until determining that there is no the corresponding data item downloaded of key assignments arbitrarily once found in the completion queue;
Determine in the completion queue there are current lookup to the key assignments corresponding data item downloaded when, number that will download
Be transferred in the completion queue according to item Ti from the downloading queue, and be arranged in key assignments that current lookup arrives it is corresponding under
Before the data item of load;
When determining the data item downloaded corresponding there is no the key assignments arbitrarily once searched in the completion queue, it will download
Data item Ti be arranged in it is described complete queue last bit.
5. bulk-download data processing method according to claim 4, which is characterized in that the data that the determination has been downloaded
After the step of Ti corresponding key assignments Ki further include:
When position of the key assignments Ki in the mapping table is last bit, directly by the data item Ti downloaded from the downloading queue
In be transferred to complete queue last bit.
6. a kind of bulk-download data processing unit characterized by comprising
Batch download module, for multiple data item batches to be downloaded in original queue to be added in downloading queue;
Key assignments mapping block, for the sequence according to each data item to be downloaded in original queue, by each data to be downloaded
The corresponding key assignments of item is stored in mapping table;
Sorting module, for completing in queue the data item downloaded from being transferred in the downloading queue, and according to described
The sequence of key assignments in mapping table arranges sequence of the data item downloaded in the completion queue.
7. bulk-download data processing unit according to claim 6, which is characterized in that the sorting module is used for:
Determine the corresponding key assignments Ki of data item Ti downloaded;
In the mapping table, from closely to remote sequence, successively searches according at a distance from the key assignments Ki and be arranged in key assignments Ki
Each key assignments before;
After finding a key assignments every time, judge to whether there is the key assignments that current lookup arrives in the completion queue corresponding
The data item of downloading, until determine it is described complete queue in there are current lookup to the corresponding data item downloaded of key assignments,
Alternatively, until determining that there is no the corresponding data item downloaded of key assignments arbitrarily once found in the completion queue;
Determine in the completion queue there are current lookup to the key assignments corresponding data item downloaded when, number that will download
Be transferred in the completion queue according to item Ti from the downloading queue, and be arranged in key assignments that current lookup arrives it is corresponding under
After the data item of load;
When determining the data item downloaded corresponding there is no the key assignments arbitrarily once searched in the completion queue, it will download
Data item Ti be arranged in it is described complete queue first place.
8. bulk-download data processing unit according to claim 7, which is characterized in that the sorting module is also used to:
When position of the key assignments Ki in the mapping table is the first, directly by the data item Ti downloaded from the downloading queue
In be transferred to complete queue first place.
9. bulk-download data processing unit according to claim 6, which is characterized in that the sorting module is used for:
Determine the corresponding key assignments Ki of data item Ti downloaded;
In the mapping table, from closely to remote sequence, successively searches according at a distance from the key assignments Ki and be arranged in key assignments Ki
Each key assignments later;
After finding a key assignments every time, judge to whether there is the key assignments that current lookup arrives in the completion queue corresponding
The data item of downloading, until determine it is described complete queue in there are current lookup to the corresponding data item downloaded of key assignments,
Alternatively, until determining that there is no the corresponding data item downloaded of key assignments arbitrarily once found in the completion queue;
Determine in the completion queue there are current lookup to the key assignments corresponding data item downloaded when, number that will download
Be transferred in the completion queue according to item Ti from the downloading queue, and be arranged in key assignments that current lookup arrives it is corresponding under
Before the data item of load;
When determining the data item downloaded corresponding there is no the key assignments arbitrarily once searched in the completion queue, it will download
Data item Ti be arranged in it is described complete queue last bit.
10. bulk-download data processing unit according to claim 9, which is characterized in that the sorting module is also used to:
When position of the key assignments Ki in the mapping table is last bit, directly by the data item Ti downloaded from the downloading queue
In be transferred to complete queue last bit.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310379099.6A CN104426946B (en) | 2013-08-27 | 2013-08-27 | Bulk-download data treating method and apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310379099.6A CN104426946B (en) | 2013-08-27 | 2013-08-27 | Bulk-download data treating method and apparatus |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104426946A CN104426946A (en) | 2015-03-18 |
CN104426946B true CN104426946B (en) | 2019-02-22 |
Family
ID=52974871
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310379099.6A Active CN104426946B (en) | 2013-08-27 | 2013-08-27 | Bulk-download data treating method and apparatus |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104426946B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109842673A (en) * | 2018-12-20 | 2019-06-04 | 北京奇艺世纪科技有限公司 | Picture downloads device and method, picture downloading accelerator and medium |
CN114443581B (en) * | 2022-04-11 | 2022-06-17 | 苏州浪潮智能科技有限公司 | Download control method, device, equipment and storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1710857A (en) * | 2004-06-18 | 2005-12-21 | 千橡寰宇科技发展(北京)有限公司 | Method and method for realizing document accelerated download |
CN1909557A (en) * | 2005-08-02 | 2007-02-07 | 中国移动通信集团公司 | Processing method for music download |
CN1941899A (en) * | 2005-09-30 | 2007-04-04 | 三星电子株式会社 | System and method for downloading contents |
CN101399738A (en) * | 2007-09-28 | 2009-04-01 | 华为技术有限公司 | Method for providing download recommendation service, structured peer-to-peer network and node therein |
CN101415258A (en) * | 2007-10-18 | 2009-04-22 | 中兴通讯股份有限公司 | Method for implementing download of mobile phone downloader |
CN101719936A (en) * | 2009-12-09 | 2010-06-02 | 成都市华为赛门铁克科技有限公司 | Method, device and cache system for providing file downloading service |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030195929A1 (en) * | 2002-04-15 | 2003-10-16 | Franke Michael Martin | Methods and system using secondary storage to store media data accessible for local area users |
US6973479B2 (en) * | 2002-05-01 | 2005-12-06 | Thales Avionics, Inc. | Method and system for configuration and download in a restricted architecture network |
US20060202749A1 (en) * | 2005-03-08 | 2006-09-14 | Skipper Willie J | Mpas |
-
2013
- 2013-08-27 CN CN201310379099.6A patent/CN104426946B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1710857A (en) * | 2004-06-18 | 2005-12-21 | 千橡寰宇科技发展(北京)有限公司 | Method and method for realizing document accelerated download |
CN1909557A (en) * | 2005-08-02 | 2007-02-07 | 中国移动通信集团公司 | Processing method for music download |
CN1941899A (en) * | 2005-09-30 | 2007-04-04 | 三星电子株式会社 | System and method for downloading contents |
CN101399738A (en) * | 2007-09-28 | 2009-04-01 | 华为技术有限公司 | Method for providing download recommendation service, structured peer-to-peer network and node therein |
CN101415258A (en) * | 2007-10-18 | 2009-04-22 | 中兴通讯股份有限公司 | Method for implementing download of mobile phone downloader |
CN101719936A (en) * | 2009-12-09 | 2010-06-02 | 成都市华为赛门铁克科技有限公司 | Method, device and cache system for providing file downloading service |
Also Published As
Publication number | Publication date |
---|---|
CN104426946A (en) | 2015-03-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9720949B2 (en) | Client-side partition-aware batching of records for insert operations | |
US20160253073A1 (en) | Method and apparatus for adding icon to interface of android system, and mobile terminal | |
CN108804188A (en) | Changing an interface skin method and device | |
CN106484858A (en) | Hot Contents method for pushing and device | |
CN105224532B (en) | Data processing method and device | |
CN106201224A (en) | The method and device that a kind of batch data processes | |
CN104021008A (en) | Information processing method and electronic devices | |
CN104199985A (en) | Custom search result top method and system as well as search server | |
CN104426946B (en) | Bulk-download data treating method and apparatus | |
CN110955478B (en) | Partition dynamic display method, device and equipment of data and readable storage medium | |
CN106528136A (en) | Widget-based display method and apparatus, and terminal device | |
CN104881206A (en) | File selecting processing method and device | |
CN107885543B (en) | Function management method and device of application program and intelligent terminal | |
CN105117247B (en) | A kind of display control method and device, electronic equipment | |
CN104392408B (en) | A kind of system and method showing image | |
CN103593423A (en) | Method and device for loading video file information in browser | |
CN110569440A (en) | Data query method and device, electronic equipment and storage medium | |
CN111726386A (en) | Application program sharing method, wearable device and computer storage medium | |
CN109309858A (en) | A kind of display methods, device, equipment and the medium of mutual exclusion icon | |
CN104618219A (en) | Cross-machine-room data synchronizing method and device | |
CN104777981A (en) | Information fast sharing method and device | |
CN115599801A (en) | Data query method, system, electronic equipment and storage medium | |
CN110874222A (en) | Template deployment method and device of smart television and server | |
EP2534586B1 (en) | Managing a navigation history | |
CN106294348B (en) | For the real-time sort method and device of real-time report data |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |