CN104426946A - Method and device for bulk download data processing - Google Patents
Method and device for bulk download data processing Download PDFInfo
- Publication number
- CN104426946A CN104426946A CN201310379099.6A CN201310379099A CN104426946A CN 104426946 A CN104426946 A CN 104426946A CN 201310379099 A CN201310379099 A CN 201310379099A CN 104426946 A CN104426946 A CN 104426946A
- Authority
- CN
- China
- Prior art keywords
- queue
- data item
- downloaded
- key assignments
- download
- 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
Links
Abstract
The invention discloses a method and a device for bulk download data processing. The bulk download data processing method comprises: adding a plurality of to-be-downloaded data items in an original queue to a download queue in a bulk manner; according to the sequence of the to-be-downloaded data items in the original queue, storing the key value corresponding to each to-be-downloaded data item in a mapping table; transferring downloaded data items from the download queue to a finished queue, and according to the sequence of the key values in the mapping table, arranging the sequence of the downloaded data items in the finished queue. The method establishes the mapping table according to the original queue, and according to the sequence of the key values in the mapping table, the finished queue is arranged, so that the sequence of the data items in the finished queue are consistent with the sequence of the data items in the original queue, thereby effectively ensuring sequence of the data items before and after downloading.
Description
Technical field
The present invention relates to technical field of data processing, be related specifically to bulk-download data processing method and device.
Background technology
When the intelligent terminals such as mobile phone, PAD, computer, Web TV are by data such as web download document, application, by following two kinds of modes.One is to provide single downloading mode, and this mode is when downloading multiple data, and need user's click one by one to download, single down operation can make troubles to user undoubtedly frequently.Another kind is to provide batch downloading mode, batch is downloaded and can be downloaded in queue according to all adding to by disposable each item number by multiple data or whole queue, the demand that user wants to download multiple data or whole queuing data simultaneously can be met, but, in batch downloading process, when year order is descended in change that user is artificial, the order of the queue sequence after having downloaded and former queue may there are differences, be not easy to user and locate former data, particularly for some regular data, then destroy the order of former data queue.
Summary of the invention
The embodiment of the present invention provides a kind of bulk-download data processing method and device, can ensure the order that batch is downloaded.
The embodiment of the present invention proposes a kind of bulk-download data processing method, comprises step:
Being added into by data item batch multiple to be downloaded in original queue downloads in queue;
According to the order of each data item to be downloaded in original queue, key assignments corresponding for each data item to be downloaded is stored in mapping table;
The data item downloaded to be transferred in queue from described download queue, and according to the order of key assignments in described mapping table, to have arranged the data item downloaded in the described order completed in queue.
The embodiment of the present invention also proposes a kind of bulk-download data processing unit, comprising:
Batch download module, downloads in queue for being added into by the data item batch multiple to be downloaded in original queue;
Key assignments mapping block, for according to the order of each data item to be downloaded in original queue, is stored in mapping table by key assignments corresponding for each data item to be downloaded;
Order module, for the data item downloaded being transferred in queue from described download queue, and according to the order of key assignments in described mapping table, has arranged the data item downloaded in the described order completed in queue.
The embodiment of the present invention is according to the order of data item to be downloaded in original queue, set up mapping table, the key assignments stored in mapping table and data item one_to_one corresponding to be downloaded, and sequence consensus, when downloading data item has been transferred to queue from download queue, according to the key assignments order in the mapping table of downloading data item correspondence, arrange the order of downloading data item in queue, make data item order and data item sequence consensus in original queue in queue, effectively ensure that the succession of data item before and after downloading.
Accompanying drawing explanation
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 4th 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 6th 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 representation 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 process in the embodiment of the present invention;
Figure 10 is the queue schematic diagram of the first embodiment of bulk-download data process in the embodiment of the present invention;
Figure 11 is the queue schematic diagram of the second embodiment of bulk-download data process in the embodiment of the present invention.
The realization of the object of the invention, functional characteristics and advantage will in conjunction with the embodiments, are described further with reference to accompanying drawing.
Embodiment
Should be appreciated that specific embodiment described herein only in order to explain the present invention, be not intended to limit the present invention.
As shown in Figure 1, Fig. 1 is the flow chart of the first embodiment of bulk-download data processing method of the present invention.Please with reference to Fig. 9, the bulk-download data processing method that the present embodiment is mentioned, comprising:
Step S10, is added into the data item batch multiple to be downloaded in original queue and downloads in queue;
In the present embodiment, the webserver stores multiple data item, these data item according to specific rule compositor, such as, according to update time sequencing, data item title the mode such as initial order, data item size carry out sorting data item, formed original queue.Intelligent terminal is connected on server by network, and user browses original queue by intelligent terminal, and selects the data item needing download.When user have selected multiple data item batch download time, the data item to be downloaded chosen batch is added into by intelligent terminal to be downloaded in queue, and the data item to be downloaded of interpolation can be the partial data item in the data item of whole original list or original list.
After data item to be downloaded is added, user manually can adjust the downloading order downloading data item to be downloaded in queue, such as, suspend certain data item, or the download rank arranging certain data item is high priority, or limit the speed of download of some data item, avoid the network speed taking other data item.In addition, intelligent terminal may not be the data item to be downloaded downloaded in queue to be downloaded simultaneously, can according to current network speed situation, and the downloading order treating downloading data item adjusts automatically, such as, for the data item that speed of download is fast, intelligent terminal is adjusted to preferential download, for the data item that speed of download is slow, intelligent terminal suspends to be downloaded, avoid the network speed taking other data item, after the data item of high priority has been downloaded, more again continue to download.
Step S20, according to the order of each data item to be downloaded in original queue, is stored in mapping table by key assignments corresponding for each data item to be downloaded;
Adjustable owing to downloading the sequencing that in queue, data item is downloaded, in the queue after having downloaded, the order of data item is inconsistent with the order of data item in original queue, the present embodiment is while data item to be downloaded adds download queue to, also set up mapping table according to data item to be downloaded order in original queue, in this mapping table, store the key assignments that each data item to be downloaded is corresponding.Key assignments can be determined according to the identifier of data item to be downloaded, a key assignments and a data item one_to_one corresponding.When intelligent terminal stores key assignments in the mapping table, according to the order of each data item to be downloaded in original queue, arrange each key assignments order in the mapping table, the order of key assignments corresponding with data item in mapping table and the sequence consensus of data item in original queue.
Step S30, has been transferred to the data item downloaded in queue from download queue, and according to the order of key assignments in mapping table, arranges the data item downloaded and complete the order in queue.
After the data item downloaded in queue has been downloaded, it removes by intelligent terminal from download queue, and added in queue, now, in order to ensure the sequence consensus of the order of the data item downloaded with the data item of original queue, mobile terminal, according to the data item downloaded, searches corresponding key assignments in the mapping table, and according to key assignments order in the mapping table, arrange downloading data item and complete the order in queue.Because the order of key assignments in mapping table carries out arranging according to the order of data item in original queue, therefore, now the order completing the data item in queue also with the sequence consensus of data item in original queue, effectively ensure that the succession of data item before and after downloading.
The present embodiment is according to the order of data item to be downloaded in original queue, set up mapping table, the key assignments stored in mapping table and data item one_to_one corresponding to be downloaded, and sequence consensus, when downloading data item has been transferred to queue from download queue, according to the key assignments order in the mapping table of downloading data item correspondence, arrange the order of downloading data item in queue, make data item order and data item sequence consensus in original queue in queue, effectively ensure that the succession of data item before and after downloading.
As shown in Figure 2, Fig. 2 is the flow chart of the second embodiment of bulk-download data processing method of the present invention.The present embodiment is based on embodiment illustrated in fig. 1, and describe in detail the first embodiment of the step of queue of having sorted, please with reference to Figure 10, wherein, step S30 comprises:
Step S311, determines the key assignments Ki that the data item Ti that downloaded is corresponding;
Step S312, inquires about the key assignments Kj of before being arranged in key assignments Ki n-th in the mapping table;
Step S313, completes in queue the data item Tj downloaded corresponding to the Kj that finds key value;
Step S314, has been transferred to the data item Ti downloaded in queue from download queue, and after being arranged in the data item Tj downloaded.
In the present embodiment, the initial value of n is 1, inquires about namely be arranged in the key assignments of the last position of key assignments Ki from mapping table.After getting key assignments Kj, complete in queue the data item Tj searching and whether have key assignments Kj corresponding, because the sequencing in the mapping table between Kj and Ki is consistent with the sequencing of Tj and Ti in original queue, therefore, when the data item order restoring that will complete in queue, according to the sequencing of Kj and Ki, after the data item Ti downloaded is arranged in the data item Tj downloaded, make data item order and data item sequence consensus in original queue in queue, effectively ensure that the succession of data item before and after downloading.In addition, the present embodiment is particularly useful in the data item downloading progressive download in queue, and the data item first downloaded is arranged in front end, more quick when completing in queue the data item finding key value corresponding, further increases the sequence efficiency of downloading data item.
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.The present embodiment based on embodiment illustrated in fig. 2, also comprises after step S313:
Step S315, when complete in queue there is not the data item Tj downloaded corresponding to key assignments Kj time, in the mapping table inquiry be arranged in key assignments Ki before the key assignments Kg of (n+1)th;
Step S316, completes in queue the data item Tg downloaded corresponding to the Kg that finds key value;
Step S317, has been transferred to the data item Ti downloaded in queue from download queue, and after being arranged in the data item Tg downloaded.
In the present embodiment, when the data item Tj that key assignments Kj is corresponding does not also complete download, complete in queue and can not find data item Tj, now, the key assignments of the front two being arranged in key assignments Ki can be inquired about from mapping table, if still do not find the data item Tg that Kg is corresponding completing in queue, then from mapping table, inquiry is arranged in the key assignments of the front three of key assignments Ki, by that analogy, until find key assignments and Ki to arrange nearest data item completing in queue, and after Ti being inserted into the data item found, data item order and data item sequence consensus in original queue in queue are made, effectively ensure that the succession of data item before and after downloading.In addition, if be arranged in all key assignments before key assignments Ki in Ergodic Maps table, all do not find corresponding data item completing queue, then illustrate that the data item before being arranged in data item Ti does not all complete download, now directly data item Ti can be arranged in the first place of queue, when other arrive in front data item, then to backward shift.
As shown in Figure 4, Fig. 4 is the flow chart of the 4th embodiment of bulk-download data processing method of the present invention.The present embodiment based on embodiment illustrated in fig. 2, also comprises after step S311:
Step S318, when key assignments Kj position is in the mapping table the first, has directly been transferred to the first place of queue from download queue by the data item Ti downloaded.
The present embodiment is for the key assignments of mapping table first place, unnecessary key assignments is not had in its front end, mode is searched in inapplicable above-described embodiment, now, in order to shorten the time of searching, improve search efficiency, before finding key value, first judge whether this key assignments Ki is positioned at mapping table first place, for being positioned at the first key assignments, the data item of its correspondence is also positioned at first place in original queue, then complete in queue, directly data item Ti can be arranged in the first place of queue, decrease search procedure, shorten sorting time, further increase 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.The present embodiment is based on embodiment illustrated in fig. 1, and describe in detail the second embodiment of the step of queue of having sorted, please with reference to Figure 11, wherein, step S30 comprises:
Step S321, determines the key assignments Ki that the data item Ti that downloaded is corresponding;
Step S322, inquires about the key assignments Kj ' of m position after being arranged in key assignments Ki in the mapping table;
Step S323, completes in queue the data item Tj ' downloaded corresponding to the Kj ' that finds key value;
Step S324, has been transferred to the data item Ti downloaded in queue from download queue, and before being arranged in the data item Tj ' downloaded.
In the present embodiment, the initial value of m is 1, inquiry the key assignments of after being namely arranged in key assignments Ki from mapping table.After getting key assignments Kj ', complete in queue the data item Tj ' searching and whether have key assignments Kj ' corresponding, because the sequencing in the mapping table between Kj ' and Ki is consistent with the sequencing of Tj and Ti in original queue, therefore, when the data item order restoring that will complete in queue, according to the sequencing of Kj ' and Ki, before the data item Ti downloaded is arranged in the data item Tj ' downloaded, make data item order and data item sequence consensus in original queue in queue, effectively ensure that the succession of data item before and after downloading.In addition, the present embodiment is particularly useful for downloading the data item that in queue, backward is downloaded, and the data item first downloaded is arranged in rear end, more quick when completing in queue the data item finding key value corresponding, further increases the sequence efficiency of downloading data item.
As shown in Figure 6, Fig. 6 is the flow chart of the 6th embodiment of bulk-download data processing method of the present invention.The present embodiment based on embodiment illustrated in fig. 5, also comprises after step S323:
Step S325, when completing in queue the data item Tj ' downloaded that there is not key assignments Kj ' correspondence, inquires about the key assignments Kg ' of m+1 position after being arranged in key assignments Ki in the mapping table;
Step S326, completes in queue the data item Tg ' downloaded corresponding to the Kg ' that finds key value;
Step S327, has been transferred to the data item Ti downloaded in queue from download queue, and before being arranged in the data item Tg ' downloaded.
In the present embodiment, when the data item Tj ' that key assignments Kj ' is corresponding does not also complete download, complete in queue and can not find data item Tj ', now, the key assignments of after being arranged in key assignments Ki two can be inquired about from mapping table, if complete in queue the data item Tg ' still not finding Kg ' corresponding, from mapping table, then inquire about the key assignments of after being arranged in key assignments Ki three, by that analogy, until find key assignments and Ki to arrange nearest data item completing in queue, and before Ti being inserted into the data item found, data item order and data item sequence consensus in original queue in queue are made, effectively ensure that the succession of data item before and after downloading.In addition, if be arranged in all key assignments after key assignments Ki in Ergodic Maps table, all do not find corresponding data item completing queue, then illustrate that the data item after being arranged in data item Ti does not all complete download, now directly data item Ti can be arranged in the last position of queue, when other arrive in front data item, then shift forward.
As shown in Figure 7, Fig. 7 is the flow chart of the 7th embodiment of bulk-download data processing method of the present invention.The present embodiment based on embodiment illustrated in fig. 5, also comprises after step S321:
Step S328, when key assignments Kj position is in the mapping table last position, has directly been transferred to the last position of queue from download queue by the data item Ti downloaded.
The present embodiment is for the key assignments of position, mapping table end, there is no unnecessary key assignments in its back-end, mode is searched in inapplicable above-described embodiment, now, in order to shorten the time of searching, improve search efficiency, before finding key value, first judge whether this key assignments Ki is positioned at position, mapping table end, for the key assignments being positioned at last position, the data item of its correspondence is also positioned at last position in original queue, then complete in queue, directly data item Ti can be arranged in the last position of queue, decrease search procedure, shorten sorting time, further increase the sequence efficiency of downloading data item.
As shown in Figure 8, Fig. 8 is the structural representation of bulk-download data processing unit in the embodiment of the present invention.Please with reference to Fig. 9, the bulk-download data processing unit that the embodiment of the present invention is mentioned, comprising:
Batch download module 10, downloads in queue for being added into by the data item batch multiple to be downloaded in original queue;
Key assignments mapping block 20, for according to the order of each data item to be downloaded in original queue, is stored in mapping table by key assignments corresponding for each data item to be downloaded;
Order module 30, for the data item downloaded being transferred in queue from download queue, and according to the order of key assignments in mapping table, having arranged the data item downloaded and having completed the order in queue.
In the present embodiment, the webserver stores multiple data item, these data item according to specific rule compositor, such as, according to update time sequencing, data item title the mode such as initial order, data item size carry out sorting data item, formed original queue.Intelligent terminal is connected on server by network, and user browses original queue by intelligent terminal, and selects the data item needing download.When user have selected multiple data item batch download time, the data item to be downloaded chosen batch is added into by intelligent terminal to be downloaded in queue, and the data item to be downloaded of interpolation can be the partial data item in the data item of whole original list or original list.
After data item to be downloaded is added, user manually can adjust the downloading order downloading data item to be downloaded in queue, such as, suspend certain data item, or the download rank arranging certain data item is high priority, or limit the speed of download of some data item, avoid the network speed taking other data item.In addition, intelligent terminal may not be the data item to be downloaded downloaded in queue to be downloaded simultaneously, can according to current network speed situation, and the downloading order treating downloading data item adjusts automatically, such as, for the data item that speed of download is fast, intelligent terminal is adjusted to preferential download, for the data item that speed of download is slow, intelligent terminal suspends to be downloaded, avoid the network speed taking other data item, after the data item of high priority has been downloaded, more again continue to download.
Adjustable owing to downloading the sequencing that in queue, data item is downloaded, in the queue after having downloaded, the order of data item is inconsistent with the order of data item in original queue, the present embodiment is while data item to be downloaded adds download queue to, also set up mapping table according to data item to be downloaded order in original queue, in this mapping table, store the key assignments that each data item to be downloaded is corresponding.Key assignments can be determined according to the identifier of data item to be downloaded, a key assignments and a data item one_to_one corresponding.When intelligent terminal stores key assignments in the mapping table, according to the order of each data item to be downloaded in original queue, arrange each key assignments order in the mapping table, the order of key assignments corresponding with data item in mapping table and the sequence consensus of data item in original queue.
After the data item downloaded in queue has been downloaded, it removes by intelligent terminal from download queue, and added in queue, now, in order to ensure the sequence consensus of the order of the data item downloaded with the data item of original queue, mobile terminal, according to the data item downloaded, searches corresponding key assignments in the mapping table, and according to key assignments order in the mapping table, arrange downloading data item and complete the order in queue.Because the order of key assignments in mapping table carries out arranging according to the order of data item in original queue, therefore, now the order completing the data item in queue also with the sequence consensus of data item in original queue, effectively ensure that the succession of data item before and after downloading.
The present embodiment is according to the order of data item to be downloaded in original queue, set up mapping table, the key assignments stored in mapping table and data item one_to_one corresponding to be downloaded, and sequence consensus, when downloading data item has been transferred to queue from download queue, according to the key assignments order in the mapping table of downloading data item correspondence, arrange the order of downloading data item in queue, make data item order and data item sequence consensus in original queue in queue, effectively ensure that the succession of data item before and after downloading.
Please with reference to Figure 10, in the first embodiment of queue of having sorted, order module 30 for:
Determine the key assignments Ki that the data item Ti that downloaded is corresponding;
Inquire about the key assignments Kj of before being arranged in key assignments Ki n-th in the mapping table, wherein, the initial value of n is 1;
Complete in queue the data item Tj downloaded corresponding to the Kj that finds key value;
The data item Ti downloaded has been transferred in queue from download queue, and after being arranged in the data item Tj downloaded.
In the present embodiment, the initial value of n is 1, inquires about namely be arranged in the key assignments of the last position of key assignments Ki from mapping table.After getting key assignments Kj, complete in queue the data item Tj searching and whether have key assignments Kj corresponding, because the sequencing in the mapping table between Kj and Ki is consistent with the sequencing of Tj and Ti in original queue, therefore, when the data item order restoring that will complete in queue, according to the sequencing of Kj and Ki, after the data item Ti downloaded is arranged in the data item Tj downloaded, make data item order and data item sequence consensus in original queue in queue, effectively ensure that the succession of data item before and after downloading.In addition, the present embodiment is particularly useful in the data item downloading progressive download in queue, and the data item first downloaded is arranged in front end, more quick when completing in queue the data item finding key value corresponding, further increases the sequence efficiency of downloading data item.
Further, order module 30 also for:
When complete in queue there is not the data item Tj downloaded corresponding to key assignments Kj time, in the mapping table inquiry be arranged in key assignments Ki before the key assignments Kg of (n+1)th;
Complete in queue the data item Tg downloaded corresponding to the Kg that finds key value;
The data item Ti downloaded has been transferred in queue from download queue, and after being arranged in the data item Tg downloaded.
In the present embodiment, when the data item Tj that key assignments Kj is corresponding does not also complete download, complete in queue and can not find data item Tj, now, the key assignments of the front two being arranged in key assignments Ki can be inquired about from mapping table, if still do not find the data item Tg that Kg is corresponding completing in queue, then from mapping table, inquiry is arranged in the key assignments of the front three of key assignments Ki, by that analogy, until find key assignments and Ki to arrange nearest data item completing in queue, and after Ti being inserted into the data item found, data item order and data item sequence consensus in original queue in queue are made, effectively ensure that the succession of data item before and after downloading.In addition, if be arranged in all key assignments before key assignments Ki in Ergodic Maps table, all do not find corresponding data item completing queue, then illustrate that the data item before being arranged in data item Ti does not all complete download, now directly data item Ti can be arranged in the first place of queue, when other arrive in front data item, then to backward shift.
Further, order module 30 also for:
When key assignments Kj position is in the mapping table the first, directly the data item Ti downloaded is transferred to from download queue the first place of queue.
The present embodiment is for the key assignments of mapping table first place, unnecessary key assignments is not had in its front end, mode is searched in inapplicable above-described embodiment, now, in order to shorten the time of searching, improve search efficiency, before finding key value, first judge whether this key assignments Ki is positioned at mapping table first place, for being positioned at the first key assignments, the data item of its correspondence is also positioned at first place in original queue, then complete in queue, directly data item Ti can be arranged in the first place of queue, decrease search procedure, shorten sorting time, further increase the sequence efficiency of downloading data item.
Please with reference to Figure 11, in the second embodiment of queue of having sorted, order module 30 for:
Determine the key assignments Ki that the data item Ti that downloaded is corresponding;
Inquire about the key assignments Kj ' of m position after being arranged in key assignments Ki in the mapping table, wherein, the initial value of m is 1;
Complete in queue the data item Tj ' downloaded corresponding to the Kj ' that finds key value;
The data item Ti downloaded has been transferred in queue from download queue, and before being arranged in the data item Tj ' downloaded.
In the present embodiment, the initial value of m is 1, inquiry the key assignments of after being namely arranged in key assignments Ki from mapping table.After getting key assignments Kj ', complete in queue the data item Tj ' searching and whether have key assignments Kj ' corresponding, because the sequencing in the mapping table between Kj ' and Ki is consistent with the sequencing of Tj and Ti in original queue, therefore, when the data item order restoring that will complete in queue, according to the sequencing of Kj ' and Ki, before the data item Ti downloaded is arranged in the data item Tj ' downloaded, make data item order and data item sequence consensus in original queue in queue, effectively ensure that the succession of data item before and after downloading.In addition, the present embodiment is particularly useful for downloading the data item that in queue, backward is downloaded, and the data item first downloaded is arranged in rear end, more quick when completing in queue the data item finding key value corresponding, further increases the sequence efficiency of downloading data item.
Further, order module 30 also for:
When completing in queue the data item Tj ' downloaded that there is not key assignments Kj ' correspondence, inquire about the key assignments Kg ' of m+1 position after being arranged in key assignments Ki in the mapping table;
Complete in queue the data item Tg ' downloaded corresponding to the Kg ' that finds key value;
The data item Ti downloaded has been transferred in queue from download queue, and before being arranged in the data item Tg ' downloaded.
In the present embodiment, when the data item Tj ' that key assignments Kj ' is corresponding does not also complete download, complete in queue and can not find data item Tj ', now, the key assignments of after being arranged in key assignments Ki two can be inquired about from mapping table, if complete in queue the data item Tg ' still not finding Kg ' corresponding, from mapping table, then inquire about the key assignments of after being arranged in key assignments Ki three, by that analogy, until find key assignments and Ki to arrange nearest data item completing in queue, and before Ti being inserted into the data item found, data item order and data item sequence consensus in original queue in queue are made, effectively ensure that the succession of data item before and after downloading.In addition, if be arranged in all key assignments after key assignments Ki in Ergodic Maps table, all do not find corresponding data item completing queue, then illustrate that the data item after being arranged in data item Ti does not all complete download, now directly data item Ti can be arranged in the last position of queue, when other arrive in front data item, then shift forward.
Further, order module 30 also for:
When key assignments Kj position is in the mapping table last position, directly the data item Ti downloaded is transferred to from download queue the last position of queue.
The present embodiment is for the key assignments of position, mapping table end, there is no unnecessary key assignments in its back-end, mode is searched in inapplicable above-described embodiment, now, in order to shorten the time of searching, improve search efficiency, before finding key value, first judge whether this key assignments Ki is positioned at position, mapping table end, for the key assignments being positioned at last position, the data item of its correspondence is also positioned at last position in original queue, then complete in queue, directly data item Ti can be arranged in the last position of queue, decrease search procedure, shorten sorting time, further increase the sequence efficiency of downloading data item.
It should be noted that, in this article, term " comprises ", " comprising " or its any other variant are intended to contain comprising of nonexcludability, thus make to comprise the process of a series of key element, method, article or device and not only comprise those key elements, but also comprise other key elements clearly do not listed, or also comprise by the intrinsic key element of this process, method, article or device.When not more restrictions, the key element limited by statement " comprising ... ", and be not precluded within process, method, article or the device comprising this key element and also there is other identical element.
The invention described above embodiment sequence number, just to describing, does not represent the quality of embodiment.
Through the above description of the embodiments, those skilled in the art can be well understood to the mode that above-described embodiment method can add required general hardware platform by software and realize, hardware can certainly be passed through, but in a lot of situation, the former is better execution mode.Based on such understanding, technical scheme of the present invention can embody with the form of software product the part that prior art contributes in essence in other words, this computer software product is stored in a storage medium (as ROM/RAM, magnetic disc, CD), comprising some instructions in order to make a station terminal equipment (can be mobile phone, computer, server, or the network equipment etc.) perform method described in each embodiment of the present invention.Particularly, the program command corresponding to bulk-download data processing unit described in Fig. 8 can be stored in the readable storage medium storing program for executing of the intelligent terminal such as mobile phone, panel computer, and performed by least one processor wherein, to realize the bulk-download data processing method described in Fig. 1 to Fig. 7.
The foregoing is only the preferred embodiments of the present invention; not thereby the scope of the claims of the present invention is limited; every utilize specification of the present invention and accompanying drawing content to do equivalent structure or equivalent flow process conversion; or be directly or indirectly used in other relevant technical fields, be all in like manner included in scope of patent protection of the present invention.
Claims (14)
1. a bulk-download data processing method, is characterized in that, comprises step:
Being added into by data item batch multiple to be downloaded in original queue downloads in queue;
According to the order of each data item to be downloaded in original queue, key assignments corresponding for each data item to be downloaded is stored in mapping table;
The data item downloaded to be transferred in queue from described download queue, and according to the order of key assignments in described mapping table, to have arranged the data item downloaded in the described order completed in queue.
2. bulk-download data processing method according to claim 1, it is characterized in that, described the data item downloaded is transferred in queue from described download queue, and according to the order of key assignments in described mapping table, arrange the data item downloaded and comprise in the step of the described order completed in queue:
Determine the key assignments Ki that the data item Ti that downloaded is corresponding;
In described mapping table, inquire about the key assignments Kj of before being arranged in key assignments Ki n-th, wherein, the initial value of n is 1;
The data item Tj downloaded corresponding to the Kj that finds key value is completed in queue described;
The data item Ti downloaded has been transferred in queue from described download queue, and after being arranged in the data item Tj downloaded.
3. bulk-download data processing method according to claim 2, is characterized in that, also comprises after the described step completing in queue the data item Tj downloaded corresponding to the Kj that finds key value:
When described complete in queue there is not the data item Tj downloaded corresponding to described key assignments Kj time, in described mapping table inquiry be arranged in key assignments Ki before the key assignments Kg of (n+1)th;
The data item Tg downloaded corresponding to the Kg that finds key value is completed in queue described;
The data item Ti downloaded has been transferred in queue from described download queue, and after being arranged in the data item Tg downloaded.
4. bulk-download data processing method according to claim 2, is characterized in that, also comprises after the step of the key assignments Ki that the described data item Ti determining to have downloaded is corresponding:
When the position of key assignments Kj in described mapping table is the first, directly the data item Ti downloaded is transferred to from described download queue the first place of queue.
5. bulk-download data processing method according to claim 1, it is characterized in that, described the data item downloaded is transferred in queue from described download queue, and according to the order of key assignments in described mapping table, arrange the data item downloaded and comprise in the step of the described order completed in queue:
Determine the key assignments Ki that the data item Ti that downloaded is corresponding;
In described mapping table, inquire about the key assignments Kj ' of m position after being arranged in key assignments Ki, wherein, the initial value of m is 1;
The data item Tj ' downloaded corresponding to the Kj ' that finds key value is completed in queue described;
The data item Ti downloaded has been transferred in queue from described download queue, and before being arranged in the data item Tj ' downloaded.
6. bulk-download data processing method according to claim 5, is characterized in that, also comprises after the described step completing in queue the data item Tj ' downloaded corresponding to the Kj ' that finds key value:
When described complete in queue there is not the data item Tj ' downloaded corresponding to described key assignments Kj ' time, in described mapping table inquiry be arranged in key assignments Ki after the key assignments Kg ' of m+1 position;
The data item Tg ' downloaded corresponding to the Kg ' that finds key value is completed in queue described;
The data item Ti downloaded has been transferred in queue from described download queue, and before being arranged in the data item Tg ' downloaded.
7. bulk-download data processing method according to claim 5, is characterized in that, also comprises after the step of the key assignments Ki that the described data item Ti determining to have downloaded is corresponding:
When the position of key assignments Kj in described mapping table is last position, directly the data item Ti downloaded is transferred to from described download queue the last position of queue.
8. a bulk-download data processing unit, is characterized in that, comprising:
Batch download module, downloads in queue for being added into by the data item batch multiple to be downloaded in original queue;
Key assignments mapping block, for according to the order of each data item to be downloaded in original queue, is stored in mapping table by key assignments corresponding for each data item to be downloaded;
Order module, for the data item downloaded being transferred in queue from described download queue, and according to the order of key assignments in described mapping table, has arranged the data item downloaded in the described order completed in queue.
9. bulk-download data processing unit according to claim 8, is characterized in that, described order module is used for:
Determine the key assignments Ki that the data item Ti that downloaded is corresponding;
In described mapping table, inquire about the key assignments Kj of before being arranged in key assignments Ki n-th, wherein, the initial value of n is 1;
The data item Tj downloaded corresponding to the Kj that finds key value is completed in queue described;
The data item Ti downloaded has been transferred in queue from described download queue, and after being arranged in the data item Tj downloaded.
10. bulk-download data processing unit according to claim 9, is characterized in that, described order module also for:
When described complete in queue there is not the data item Tj downloaded corresponding to described key assignments Kj time, in described mapping table inquiry be arranged in key assignments Ki before the key assignments Kg of (n+1)th;
The data item Tg downloaded corresponding to the Kg that finds key value is completed in queue described;
The data item Ti downloaded has been transferred in queue from described download queue, and after being arranged in the data item Tg downloaded.
11. bulk-download data processing unit according to claim 9, is characterized in that, described order module also for:
When the position of key assignments Kj in described mapping table is the first, directly the data item Ti downloaded is transferred to from described download queue the first place of queue.
12. bulk-download data processing unit according to claim 8, it is characterized in that, described order module is used for:
Determine the key assignments Ki that the data item Ti that downloaded is corresponding;
In described mapping table, inquire about the key assignments Kj ' of m position after being arranged in key assignments Ki, wherein, the initial value of m is 1;
The data item Tj ' downloaded corresponding to the Kj ' that finds key value is completed in queue described;
The data item Ti downloaded has been transferred in queue from described download queue, and before being arranged in the data item Tj ' downloaded.
13. bulk-download data processing unit according to claim 12, is characterized in that, described order module also for:
When described complete in queue there is not the data item Tj ' downloaded corresponding to described key assignments Kj ' time, in described mapping table inquiry be arranged in key assignments Ki after the key assignments Kg ' of m+1 position;
The data item Tg ' downloaded corresponding to the Kg ' that finds key value is completed in queue described;
The data item Ti downloaded has been transferred in queue from described download queue, and before being arranged in the data item Tg ' downloaded.
14. bulk-download data processing unit according to claim 12, is characterized in that, described order module also for:
When the position of key assignments Kj in described mapping table is last position, directly the data item Ti downloaded is transferred to from described download queue the last position of queue.
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 true CN104426946A (en) | 2015-03-18 |
CN104426946B 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) |
Cited By (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 |
CN114443581A (en) * | 2022-04-11 | 2022-05-06 | 苏州浪潮智能科技有限公司 | Download control method, device, equipment and storage medium |
Citations (9)
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 |
CN1710857A (en) * | 2004-06-18 | 2005-12-21 | 千橡寰宇科技发展(北京)有限公司 | Method and method for realizing document accelerated download |
US20060010438A1 (en) * | 2002-05-01 | 2006-01-12 | 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 |
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 |
-
2013
- 2013-08-27 CN CN201310379099.6A patent/CN104426946B/en active Active
Patent Citations (9)
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 |
US20060010438A1 (en) * | 2002-05-01 | 2006-01-12 | Thales Avionics, Inc. | Method and system for configuration and download in a restricted architecture network |
CN1710857A (en) * | 2004-06-18 | 2005-12-21 | 千橡寰宇科技发展(北京)有限公司 | Method and method for realizing document accelerated download |
US20060202749A1 (en) * | 2005-03-08 | 2006-09-14 | Skipper Willie J | Mpas |
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 |
Cited By (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 |
CN114443581A (en) * | 2022-04-11 | 2022-05-06 | 苏州浪潮智能科技有限公司 | Download control method, device, equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN104426946B (en) | 2019-02-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP2557490B1 (en) | Method and apparatus for adding an icon to a home interface of an android operating system | |
US20110093478A1 (en) | Filter hints for result sets | |
EP3333733A1 (en) | Method and device for use in parallel execution of terminal database | |
CN104182404A (en) | Method and device for realizing shortcut operations of browser, browser and mobile terminal | |
CN104516887A (en) | Webpage data search method, device and system | |
CN108255952B (en) | Data loading method and device, storage medium and electronic equipment | |
CN103136227A (en) | Method and device capable of generating list | |
CN104461702A (en) | Business processing method and business processing device | |
CN104796351A (en) | Network data downloading method and device | |
CN104808889A (en) | Page switching method and electronic equipment | |
CN103647756A (en) | Advertisement broadcasting method, server, client and system | |
WO2014198028A1 (en) | Identifying and structuring related data | |
CN104778267A (en) | Searching and index updating method and device | |
CN103795758B (en) | Content-browsing, generation and exchange method, content-browsing terminal, server and system | |
CN110471947B (en) | Query method based on distributed search engine, server and storage medium | |
CN106161656B (en) | Interface jumping method and device | |
CN104484413A (en) | Method and device for obtaining searching results | |
CN104426946A (en) | Method and device for bulk download data processing | |
CN106598375B (en) | Method and device for presenting application content of intelligent terminal and intelligent terminal | |
CN105511849A (en) | Method, device and system for application program display | |
CN102663070B (en) | Method and system for supporting browser application | |
CN110770720B (en) | Resource searching method and related products | |
CN105095161B (en) | Method and device for displaying rich text information | |
CN105867913A (en) | Desktop icon sorting method and device | |
CN103440281A (en) | Method, device and equipment for acquiring download file |
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 |