CN110224863A - A kind of file accelerates method for down loading and device - Google Patents

A kind of file accelerates method for down loading and device Download PDF

Info

Publication number
CN110224863A
CN110224863A CN201910431637.9A CN201910431637A CN110224863A CN 110224863 A CN110224863 A CN 110224863A CN 201910431637 A CN201910431637 A CN 201910431637A CN 110224863 A CN110224863 A CN 110224863A
Authority
CN
China
Prior art keywords
downloaded
gateway
file
download
thread
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.)
Pending
Application number
CN201910431637.9A
Other languages
Chinese (zh)
Inventor
唐满
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Taima Information Network Technology Co Ltd
Original Assignee
Taima Information Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Taima Information Network Technology Co Ltd filed Critical Taima Information Network Technology Co Ltd
Priority to CN201910431637.9A priority Critical patent/CN110224863A/en
Publication of CN110224863A publication Critical patent/CN110224863A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0896Bandwidth or capacity management, i.e. automatically increasing or decreasing capacities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]

Landscapes

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

Abstract

A kind of file provided by the invention accelerates method for down loading and device, the method comprise the steps that obtaining the available gateway of electronic equipment;According to the current data flow of each gateway, each remaining available bandwidth of the gateway is determined;According to each remaining available bandwidth of gateway, downloading wire number of passes is determined for the electronic equipment;File to be downloaded is downloaded by the download thread of each gateway.The present invention solves the problems, such as that bandwidth usage present in the downloading of current multiple gateway is unreasonable, bandwidth-hogging resource.

Description

A kind of file accelerates method for down loading and device
Technical field
The present invention relates to network communication technology fields, accelerate method for down loading and device in particular to a kind of file.
Background technique
With the development of mobile internet, data traffic requirement amount is increasing, especially the arrival in 4G epoch, more pushes The development of data service.But due to the limitation of mobile terminal, i.e., a gateway can only be used to carry out data in synchronization Transmission.Such as in the state that mobile network and WiFi are opened simultaneously, operating system default carries out data downloading using WiFi, remaining Gateway can not then carry out data downloading.
It is 10 times of the 4G epoch or more in the growth of upcoming 5G Age of Technology, mobile bandwidth.In data downloading, We need more efficiently to utilize bandwidth.And currently, the form for generalling use multiple gateway goes to make full use of bandwidth, guarantee file It is quick-downloading.
Although current multiple gateway downloading can play certain acceleration, that there is bandwidth usages is unreasonable, The problem of bandwidth-hogging resource.
Summary of the invention
In view of this, a kind of file of being designed to provide of the embodiment of the present invention accelerates method for down loading and device, solve The problem of bandwidth usage is unreasonable, bandwidth-hogging resource present in multiple gateway downloading at present.
In a first aspect, the application is provided the following technical solutions by an embodiment:
A kind of file acceleration method for down loading, comprising:
Obtain the available gateway of electronic equipment;According to the current data flow of each gateway, each net is determined Close remaining available bandwidth;According to each remaining available bandwidth of gateway, downloading wire number of passes is determined for the electronic equipment; File to be downloaded is downloaded by the download thread of each gateway.
Preferably, described according to each remaining available bandwidth of gateway, download thread is determined for the electronic equipment Number, comprising:
The fragment size of the single thread of each gateway is set;According to each remaining available bandwidth of gateway with The fragment size of the single thread of each gateway determines the downloading wire number of passes.
It is preferably, described that file to be downloaded is downloaded by the download thread of each gateway, comprising:
According to the fragment size of the single thread of each gateway, it is big that corresponding fragment is obtained from the file to be downloaded Small file section is downloaded;Wherein, file section is the segmentation in the file to be downloaded.
Preferably, the fragment size of the single thread according to each gateway, is obtained from the file to be downloaded The file section of corresponding fragment size is taken to be downloaded, comprising:
Obtain the maximum transmission unit of each gateway;It is descending according to the maximum transmission unit, successively according to each The fragment size of the single thread of the gateway, the file section that corresponding fragment size is obtained from the file to be downloaded carry out down It carries.
Preferably, the fragment size of the single thread according to each gateway, is obtained from the file to be downloaded After taking the file section of corresponding fragment size to be downloaded, further includes:
When there is idle download thread, new file section is obtained from the non-download part of residue of the file to be downloaded And continue to be downloaded by the download thread of presently described free time, wherein the size of the new file section and the free time The corresponding fragment size of download thread is identical.
Preferably, the fragment size of the single thread according to each gateway, is obtained from the file to be downloaded After taking the file section of corresponding fragment size to be downloaded, further includes:
It is never complete when there is idle download thread and the file to be downloaded is assigned completely to the download thread At the maximum file section of the remaining download of acquisition in the download thread of downloading;From the maximum file section of the remaining download It is middle to be segmented out one section of new file section;Using the download thread of the free time, the new file section is downloaded.
It is preferably, described that file to be downloaded is downloaded by the download thread of each gateway, comprising:
The file to be downloaded is segmented according to the downloading wire number of passes, obtains subfile, wherein described to be downloaded The segments of file is identical as the downloading wire number of passes;Each subfile in the file to be downloaded is distributed to the downloading Thread is downloaded.
Preferably, each subfile by the file to be downloaded, which is distributed to the download thread, is downloaded it Afterwards, further includes:
When there is idle download thread, it is maximum that remaining download is obtained from the download thread of unfinished downloading Subfile;One section of new subfile is segmented out from the maximum subfile of the remaining download;Using under the free time Thread is carried, the new subfile is downloaded.
Second aspect, based on the same inventive concept, the application are provided the following technical solutions by an embodiment:
A kind of file acceleration download apparatus, comprising:
Gateway obtains module, for obtaining the available gateway of electronic equipment;Bandwidth determination module, for according to each described The current data flow of gateway determines each remaining available bandwidth of the gateway;Thread Count determining module, for according to each The remaining available bandwidth of gateway determines downloading wire number of passes for the electronic equipment;Download module, for passing through each gateway The download thread file to be downloaded is downloaded.
The third aspect, based on the same inventive concept, the application are provided the following technical solutions by an embodiment:
A kind of computer readable storage medium, is stored thereon with computer program, and the computer program is held by processor It is performed the steps of when row
Obtain the available gateway of electronic equipment;According to the current data flow of each gateway, each net is determined Close remaining available bandwidth;According to each remaining available bandwidth of gateway, downloading wire number of passes is determined for the electronic equipment; File to be downloaded is downloaded by the download thread of each gateway.
One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:
A kind of file provided by the invention accelerates method for down loading, obtains the available gateway of electronic equipment first, is utilized more The Parallel download of gateway, improves download efficiency;Then it according to the current data flow of each gateway, determines each described The remaining available bandwidth of gateway, so that it may guarantee that each gateway is not in seize necessity when file to be downloaded is downloaded Program or user's designated program required bandwidth when running, avoid interfering other programs while improving Parallel download efficiency Operation;Further according to each remaining available bandwidth of gateway, downloading wire number of passes is determined for the electronic equipment, is avoided down The repetition of download thread is opened and closed during load, saves local computing resource;Finally, by each gateway it is described under Thread is carried to be downloaded file to be downloaded.The present invention solve bandwidth usage present in the downloading of current multiple gateway it is unreasonable, The problem of bandwidth-hogging resource.
To enable the above objects, features and advantages of the present invention to be clearer and more comprehensible, preferred embodiment is cited below particularly, and cooperate Appended attached drawing, is described in detail below.
Detailed description of the invention
In order to illustrate the technical solution of the embodiments of the present invention more clearly, below will be to needed in the embodiment attached Figure is briefly described, it should be understood that the following drawings illustrates only certain embodiments of the present invention, therefore is not construed as pair The restriction of range for those of ordinary skill in the art without creative efforts, can also be according to this A little attached drawings obtain other relevant attached drawings.
Fig. 1 is the flow chart that a kind of file that first embodiment of the invention provides accelerates method for down loading;
Fig. 2 is the specific implementation flow chart of step S30 in first embodiment of the invention;
Fig. 3 is the specific implementation flow chart of step S40 in second embodiment of the invention;
Fig. 4 is the specific implementation flow chart of step S40 in third embodiment of the invention;
Fig. 5 is the functional block diagram that one of fourth embodiment of the invention file accelerates download apparatus;
Fig. 6 is the functional block diagram of one of fourth embodiment of the invention computer readable storage medium.
Specific embodiment
Below in conjunction with attached drawing in the embodiment of the present invention, technical solution in the embodiment of the present invention carries out clear, complete Ground description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.Usually exist The component of the embodiment of the present invention described and illustrated in attached drawing can be arranged and be designed with a variety of different configurations herein.Cause This, is not intended to limit claimed invention to the detailed description of the embodiment of the present invention provided in the accompanying drawings below Range, but it is merely representative of selected embodiment of the invention.Based on the embodiment of the present invention, those skilled in the art are not doing Every other embodiment obtained under the premise of creative work out, shall fall within the protection scope of the present invention.
It should also be noted that similar label and letter indicate similar terms in following attached drawing, therefore, once a certain Xiang Yi It is defined in a attached drawing, does not then need that it is further defined and explained in subsequent attached drawing.Meanwhile of the invention In description, term " first ", " second " etc. are only used for distinguishing description, are not understood to indicate or imply relative importance.
First embodiment
Fig. 1 is please referred to, a kind of file acceleration method for down loading is provided in the present embodiment, Fig. 1 shows the process of this method Figure, which comprises
Step S10: the available gateway of electronic equipment is obtained;
Step S20: according to the current data flow of each gateway, the remaining available band of each gateway is determined It is wide;
Step S30: according to each remaining available bandwidth of gateway, downloading wire number of passes is determined for the electronic equipment;
Step S40: file to be downloaded is downloaded by the download thread of each gateway.
In step slo, electronic equipment can be that mobile phone, tablet computer, smartwatch, laptop etc. are removable to be set It is standby, it is also possible to the terminal devices such as desktop computer, router, server host, with no restriction.Each electronic equipment can be gathered around simultaneously There are multiple gateways, such as: WIFI, CMWAP (China Mobile Wireless Access Point), CMNET (China Mobile Network) etc..In general, it is carried out when electronic equipment carries out file download only with a gateway, It is difficult to also be far from reaching the read-write bottleneck of storage equipment so that the speed of download of file to be downloaded reaches maximum in this way.Therefore, It preferably will acquire all available gateways of electronic equipment in the present embodiment, and enable the corresponding downloading association of each available gateway View is downloaded, and specific downloading mode is detailed in subsequent step.
When electronic equipment connects network, often there are multiple necessary programs and need to carry out networking operation or user Specified certain softwares are just in networking operation, and often the uploading or downloading there is data of the software of networking operation.But at present Usually necessary bandwidth is also seized when downloading file to be downloaded in present file download mode, causes part soft The case where packet loss or disconnection network connection of part data upload or downloading;For this, solution general at present is to pass through people The maximum speed of work setting downloading is solved, and this mode pole is not intelligent, and when in face of multiple gateway downloading, can not Targetedly guarantee the corresponding downloading speed limiting of each gateway.The data packetloss problem for still be easy to causeing necessary program to run.
Such as: there is A gateways, B gateway for certain equipment, pass through A, B gateway respectively there are different programs and carry out internet Access.And it is simple at this time by limit speed of download can only guarantee to limit total network bandwidth, being can not be targetedly Carry out the limitation of bandwidth respectively to A, B gateway.At this point, be easy for that the bandwidth of one of A, B gateway is caused to be unable to fully utilize, And just will appear in another gateway and seize bandwidth required for necessary program operation (when downloading file to be downloaded), make this Necessary program there is a situation where packet loss or can not network in network transmission.
For this, by the current data flow according to each gateway in step S20, determining that each gateway is remaining can With bandwidth, so that it may guarantee when file to be downloaded is downloaded, be not in seize necessary program or the operation of user's designated program When required bandwidth.
Such as:
It, can be to passing through in two current gateways in the case where there is WIFI and CMNET data network in the electronic device The data traffic of network request counted, obtain the speed of current data flow, such as WIFI corresponds to 1M/s, CMNET Data network corresponds to 0M/s.Then, network is carried out using each gateway access network server respectively to test the speed, that is, may know that every The maximum network speed of a gateway, if WIFI corresponds to 5M/s, CMNET data network corresponds to 2M/s;WIFI so just can be obtained to work as Preceding supported maximum speed of download is 4M/s, and the corresponding maximum speed of download of CMNET data network is 2M/s.
Step S30: according to each remaining available bandwidth of gateway, downloading wire number of passes is determined for the electronic equipment.
In step s 30, total downloading wire number of passes of electronic equipment is determined before downloading file, can avoid the continuous of new thread Open or close the problem of leading to the wasting of resources.That is, it is whole that fixed Thread Count completion can be used in the present embodiment The downloading task of a file to be downloaded.
Referring to Fig. 2, providing following specific embodiment to step S30 in the present embodiment:
Step S311: the fragment size of the single thread of each gateway of setting.
Wherein, the fragment size of single thread can be freely arranged, with no restriction.The bandwidth according to workable for reality It is set;Such as workable bandwidth is bigger, the fragment size of single thread is with regard to settable bigger.
The fragment size of the corresponding thread of multiple gateways may be the same or different;Such as the higher net of available bandwidth Closing corresponding fragment size can be greater than the lower gateway of available bandwidth, and there are biggish in the avoidable lower gateway of available bandwidth File section avoids multiple file declustering, saves resource, improves download efficiency.
Step S312: according to the fragment of each remaining available bandwidth of gateway and the single thread of each gateway Size determines the downloading wire number of passes.
The downloading wire number of passes thereby determined that can guarantee the abundant use of remaining available bandwidth.Wherein, same gateway The summation of the corresponding fragment size of per thread is the corresponding remaining available bandwidth of the gateway.
Further, in the present embodiment, in step S40, by the download thread of each gateway to file to be downloaded It is downloaded, comprising:
According to the fragment size of the single thread of each gateway, the file of corresponding fragment size is obtained from file to be downloaded Section is downloaded;Wherein, file section is the segmentation in the file to be downloaded.
For example, the size of a file to be downloaded is 500M, 5 40M is shared in two gateways (fragment size is 40M) Thread, then (can also be obtained, not done from the other positions of file to be downloaded from the initial position of file to be downloaded Limitation;Splicing is carried out after the completion of downloading can restore complete file to be downloaded) segmentation that carries out every 40M, it is divided into 5 40M's File section and a remaining file to be downloaded (500M-5*40M), using this 5 download threads to the file section of 5 40M into Row downloading.The downloading mode can avoid carrying out the secondary fractionation of file to be downloaded at local (electronic equipment), save local Computing resource ensure that download efficiency.
It further, should be by such as when carrying out file section acquisition in order to guarantee the maximum transmitted efficiency of Parallel download Under type carries out:
Firstly, obtaining maximum transmission unit maximum transmission unit (the Maximum Transmission of each gateway Unit, MTU), the size of maximum transmission unit indicates the bearing capacity of data packet.
Then, descending according to maximum transmission unit, successively according to the fragment size of the single thread of each gateway, from The file section that corresponding fragment size is obtained in file to be downloaded is downloaded.I.e. the bigger gateway of maximum transmission unit carries out preferential Obtain file section, it is ensured that higher efficiency of transmission, while the number being fragmented in file download process is reduced as far as possible.
Further, after the step s 40, further includes:
When there is idle download thread, from the non-download part of residue of file to be downloaded obtain new file section and after It is continuous to be downloaded by current download thread, wherein corresponding with the download thread of current idle point of the size of the new file section Piece size is identical, and the step is recyclable to be executed, until completing the downloading of file to be downloaded.When ensure that Parallel download, multithreading Make full use of, avoid thread from wasting, improve speed of download.
Second embodiment
Fig. 1 and Fig. 3 are please referred to, a kind of file acceleration method for down loading is provided in the present embodiment, method includes:
Step S10: the available gateway of electronic equipment is obtained;
Step S20: according to the current data flow of each gateway, the remaining available band of each gateway is determined It is wide;
Step S30: according to each remaining available bandwidth of gateway, downloading wire number of passes is determined for the electronic equipment;
Step S40: file to be downloaded is downloaded by the download thread of each gateway.
Step S10-S30 can refer to first embodiment execution in the present embodiment.
Referring to Fig. 3, different from the first embodiment, in the present embodiment, step S40: pass through the institute of each gateway Download thread is stated to be downloaded file to be downloaded, comprising:
The file to be downloaded: being segmented by step S411 according to the downloading wire number of passes, obtains subfile, wherein The segments of the file to be downloaded is identical as the downloading wire number of passes.For example, when total download thread has N number of, text to be downloaded The subfile obtained after part segmentation should also be as being N number of.
Step S412: each subfile in the file to be downloaded is distributed to the download thread and is downloaded.
Multiple subfiles are splitted the file by the file fragmentation mode in present embodiment, and the number of subfile is under It is identical to carry Thread Count, ensure that each download thread is used for the downloading of file to be downloaded.
Further, when each subfile in file to be downloaded is distributed to download thread be downloaded after, also wrap It includes:
1, when there is idle download thread, it is maximum that remaining download is obtained from the download thread of unfinished downloading Subfile;Wherein, remaining download indicates that subfile does not complete the part of downloading also.
2, one section of new subfile is segmented out from the maximum subfile of remaining download;Be specifically segmented when Wait, can intercept forward a segment length from the tail portion of subfile, for example, interception subfile unfinished download part 1/2, will cut This obtained is 1/2 as new subfile (specific length with no restrictions, such as 2/3,1/4 etc.).Avoid certain a part Subfile occur that download time is too long, and there is the idle problem of download thread, improve download efficiency.
3, using idle download thread, new subfile is downloaded;And the above-mentioned step 2 of execution recycled, until Complete the downloading of file to be downloaded.
3rd embodiment
Fig. 1 and Fig. 4 are please referred to, a kind of file acceleration method for down loading is provided in the present embodiment, method includes:
Step S10: the available gateway of electronic equipment is obtained;
Step S20: according to the current data flow of each gateway, the remaining available band of each gateway is determined It is wide;
Step S30: according to each remaining available bandwidth of gateway, downloading wire number of passes is determined for the electronic equipment;
Step S40: file to be downloaded is downloaded by the download thread of each gateway.
Step S10-S30 can refer to first embodiment execution in the present embodiment.
Referring to Fig. 4, different from the first embodiment, in the step S40 of the present embodiment, i.e., according to each described The fragment size of the single thread of gateway, the file section that corresponding fragment size is obtained from the file to be downloaded are downloaded it Afterwards, further includes:
Step S421: when download thread and the file to be downloaded that the free time occur are assigned completely to the download thread When, the maximum file section of remaining download is obtained from the download thread of unfinished downloading.
There are two kinds of situations in step S421: 1, file to be downloaded is too small, can not be according to the fragment size of download thread Get the corresponding file section of each download thread, that is to say, that file to be downloaded can not be divided into sufficient amount of file Section.2, file to be downloaded is assigned in downloading process to each download thread completely.
For both of these case, if continuing to be downloaded in the way of first embodiment, it is bound to gradually appear multiple Idle thread, it is further to improve Parallel download efficiency the case where waste in order to avoid this thread, in the present embodiment The downloading mode of second embodiment can be applied in first embodiment after step S421.That is subsequent step S422-S423.
Step S422: one section of new file section is segmented out from the maximum file section of the remaining download;Specifically into When row segmentation, a segment length, such as interception subfile can be intercepted forward from the tail portion of the maximum file section of remaining download Unfinished download part 1/2, interception is obtained this 1/2 as new subfile (specific length with no restrictions, such as 2/ 3,1/4 etc.).It avoids the file section of certain a part from the problem that download time is too long and download thread is idle occur, improves Download efficiency.
Step S423: using the download thread of the free time, the new file section is downloaded;And the execution recycled Above-mentioned steps S422, until completing the downloading of file to be downloaded.
In conclusion a kind of file provided by the invention accelerates method for down loading, the available gateway of electronic equipment is obtained first, The Parallel download of multiple gateway is utilized, improves download efficiency;Then it according to the current data flow of each gateway, determines Each remaining available bandwidth of the gateway, so that it may guarantee that each gateway is not in when file to be downloaded is downloaded Required bandwidth when necessary program or the operation of user's designated program is seized, avoids interfering while improving Parallel download efficiency The operation of other programs;Further according to each remaining available bandwidth of gateway, downloading wire number of passes is determined for the electronic equipment, It avoids in downloading process and the repetition of download thread is opened and closed, save local computing resource;Finally, passing through each gateway The download thread file to be downloaded is downloaded.The present invention solves bandwidth usage present in current multiple gateway downloading The problem of unreasonable, bandwidth-hogging resource.
Fourth embodiment
Referring to Fig. 5, providing a kind of file acceleration download apparatus 300 in the present embodiment, described device 300 includes:
Gateway obtains module 301, for obtaining the available gateway of electronic equipment;
Bandwidth determination module 302 determines that each gateway is surplus for the current data flow according to each gateway Remaining available bandwidth;
Thread Count determining module 303, for being that the electronic equipment is true according to each remaining available bandwidth of gateway Fix load Thread Count;
Download module 304, for being downloaded by the download thread of each gateway to file to be downloaded.
As an alternative embodiment, the Thread Count determining module 303, is also used to:
The fragment size of the single thread of each gateway is set;
According to the fragment size of each remaining available bandwidth of gateway and the single thread of each gateway, determine The downloading wire number of passes.
As an alternative embodiment, the download module 304, is also used to:
According to the fragment size of the single thread of each gateway, it is big that corresponding fragment is obtained from the file to be downloaded Small file section is downloaded;Wherein, file section is the segmentation in the file to be downloaded.
As an alternative embodiment, the download module 304, is also used to:
Obtain the maximum transmission unit of each gateway;
Descending according to the maximum transmission unit, the fragment successively according to the single thread of each gateway is big Small, the file section that corresponding fragment size is obtained from the file to be downloaded is downloaded.
As an alternative embodiment, the download module 304, is also used to:
In the fragment size according to the single thread of each gateway, corresponding fragment is obtained from the file to be downloaded After the file section of size is downloaded, when there is idle download thread, do not downloaded from the residue of the file to be downloaded Part obtains new file section and continues to be downloaded by the download thread of presently described free time, wherein the new file section Size fragment size corresponding with the download thread of the free time it is identical.
As an alternative embodiment, the download module 304, is also used to:
In the fragment size of the single thread according to each gateway, obtains and correspond to from the file to be downloaded After the file section of fragment size is downloaded,
It is never complete when there is idle download thread and the file to be downloaded is assigned completely to the download thread At the maximum file section of the remaining download of acquisition in the download thread of downloading;
One section of new file section is segmented out from the maximum file section of the remaining download;
Using the download thread of the free time, the new file section is downloaded.
As an alternative embodiment, the download module 304, is also used to:
The file to be downloaded is segmented according to the downloading wire number of passes, obtains subfile, wherein described to be downloaded The segments of file is identical as the downloading wire number of passes;
Each subfile in the file to be downloaded is distributed to the download thread and is downloaded.
As an alternative embodiment, the download module 304, is also used to:
After each subfile by the file to be downloaded is distributed to the download thread and is downloaded, when When there is idle download thread, the maximum subfile of remaining download is obtained from the download thread of unfinished downloading;
One section of new subfile is segmented out from the maximum subfile of the remaining download;
Using the download thread of the free time, the new subfile is downloaded.
5th embodiment
Based on the same inventive concept, as shown in fig. 6, present embodiments providing a kind of computer readable storage medium 500, On be stored with computer program 511, computer program 511 performs the steps of when being executed by processor
Obtain the available gateway of electronic equipment;
According to the current data flow of each gateway, each remaining available bandwidth of the gateway is determined;
According to each remaining available bandwidth of gateway, downloading wire number of passes is determined for the electronic equipment;
File to be downloaded is downloaded by the download thread of each gateway.
In the specific implementation process, when computer program 511 is executed by processor, first embodiment, second may be implemented Embodiment, 3rd embodiment, any embodiment in fourth embodiment, details are not described herein.
In several embodiments provided herein, it should be understood that disclosed device and method can also pass through Other modes are realized.The apparatus embodiments described above are merely exemplary, for example, flow chart and block diagram in attached drawing Show the device of multiple embodiments according to the present invention, the architectural framework in the cards of method and computer program product, Function and operation.In this regard, each box in flowchart or block diagram can represent the one of a module, section or code Part, a part of the module, section or code, which includes that one or more is for implementing the specified logical function, to be held Row instruction.It should also be noted that function marked in the box can also be to be different from some implementations as replacement The sequence marked in attached drawing occurs.For example, two continuous boxes can actually be basically executed in parallel, they are sometimes It can execute in the opposite order, this depends on the function involved.It is also noted that every in block diagram and or flow chart The combination of box in a box and block diagram and or flow chart can use the dedicated base for executing defined function or movement It realizes, or can realize using a combination of dedicated hardware and computer instructions in the system of hardware.
In addition, each functional module in each embodiment of the present invention can integrate one independent portion of formation together Point, it is also possible to modules individualism, an independent part can also be integrated to form with two or more modules.
If the method function in the present invention is realized in the form of software function module and as independent product pin It sells or in use, can store in a computer readable storage medium.Based on this understanding, technical side of the invention Substantially the part of the part that contributes to existing technology or the technical solution can be with the shape of software product in other words for case Formula embodies, which is stored in a storage medium, including some instructions are used so that a calculating Machine equipment (can be personal computer, server or the network equipment etc.) executes each embodiment the method for the present invention All or part of the steps.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic or disk etc. are various can store journey The medium of sequence code.It should be noted that, in this document, relational terms such as first and second and the like are used merely to one A entity or operation with another entity or operate distinguish, without necessarily requiring or implying these entities or operation it Between there are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant are intended to Cover non-exclusive inclusion, so that the process, method, article or equipment for including a series of elements not only includes those Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or setting Standby intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that There is also other identical elements in the process, method, article or apparatus that includes the element.
The foregoing is only a preferred embodiment of the present invention, is not intended to restrict the invention, for the skill of this field For art personnel, the invention may be variously modified and varied.All within the spirits and principles of the present invention, made any to repair Change, equivalent replacement, improvement etc., should all be included in the protection scope of the present invention.It should also be noted that similar label and letter exist Similar terms are indicated in following attached drawing, therefore, once being defined in a certain Xiang Yi attached drawing, are then not required in subsequent attached drawing It is further defined and explained.
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any Those familiar with the art in the technical scope disclosed by the present invention, can easily think of the change or the replacement, and should all contain Lid is within protection scope of the present invention.Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. a kind of file accelerates method for down loading characterized by comprising
Obtain the available gateway of electronic equipment;
According to the current data flow of each gateway, each remaining available bandwidth of the gateway is determined;
According to each remaining available bandwidth of gateway, downloading wire number of passes is determined for the electronic equipment;
File to be downloaded is downloaded by the download thread of each gateway.
2. the method according to claim 1, wherein described according to each remaining available bandwidth of gateway, Downloading wire number of passes is determined for the electronic equipment, comprising:
The fragment size of the single thread of each gateway is set;
According to the fragment size of each remaining available bandwidth of gateway and the single thread of each gateway, determine described in Downloading wire number of passes.
3. according to the method described in claim 2, it is characterized in that, described treated down by the download thread of each gateway Published article part is downloaded, comprising:
According to the fragment size of the single thread of each gateway, corresponding fragment size is obtained from the file to be downloaded File section is downloaded;Wherein, file section is the segmentation in the file to be downloaded.
4. according to the method described in claim 3, it is characterized in that, the fragment of the single thread according to each gateway Size, the file section that corresponding fragment size is obtained from the file to be downloaded are downloaded, comprising:
Obtain the maximum transmission unit of each gateway;
It is descending according to the maximum transmission unit, successively according to the fragment size of the single thread of each gateway, from The file section that corresponding fragment size is obtained in the file to be downloaded is downloaded.
5. according to the method described in claim 3, it is characterized in that, the fragment of the single thread according to each gateway Size, after being downloaded from the file section for obtaining corresponding fragment size in the file to be downloaded, further includes:
When there is idle download thread, from the non-download part of residue of the file to be downloaded obtain new file section and after It is continuous to be downloaded by the download thread of presently described free time, wherein the downloading of the size of the new file section and the free time The corresponding fragment size of thread is identical.
6. according to the method described in claim 3, it is characterized in that, the fragment of the single thread according to each gateway Size, after being downloaded from the file section for obtaining corresponding fragment size in the file to be downloaded, further includes:
When there is idle download thread and the file to be downloaded is assigned completely to the download thread, under not completing The maximum file section of remaining download is obtained in the download thread carried;
One section of new file section is segmented out from the maximum file section of the remaining download;
Using the download thread of the free time, the new file section is downloaded.
7. method according to claim 1 or 2, which is characterized in that the download thread pair by each gateway File to be downloaded is downloaded, comprising:
The file to be downloaded is segmented according to the downloading wire number of passes, obtains subfile, wherein the file to be downloaded Segments it is identical as the downloading wire number of passes;
Each subfile in the file to be downloaded is distributed to the download thread and is downloaded.
8. the method according to the description of claim 7 is characterized in that each subfile by the file to be downloaded point It is assigned to after the download thread is downloaded, further includes:
When there is idle download thread, the maximum son of remaining download is obtained from the download thread of unfinished downloading File;
One section of new subfile is segmented out from the maximum subfile of the remaining download;
Using the download thread of the free time, the new subfile is downloaded.
9. a kind of file accelerates download apparatus characterized by comprising
Gateway obtains module, for obtaining the available gateway of electronic equipment;
Bandwidth determination module, for the current data flow according to each gateway, determining that each gateway is remaining can Use bandwidth;
Thread Count determining module, for determining downloading for the electronic equipment according to each remaining available bandwidth of gateway Thread Count;
Download module, for being downloaded by the download thread of each gateway to file to be downloaded.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program It is performed the steps of when being executed by processor
Obtain the available gateway of electronic equipment;
According to the current data flow of each gateway, each remaining available bandwidth of the gateway is determined;
According to each remaining available bandwidth of gateway, downloading wire number of passes is determined for the electronic equipment;
File to be downloaded is downloaded by the download thread of each gateway.
CN201910431637.9A 2019-05-22 2019-05-22 A kind of file accelerates method for down loading and device Pending CN110224863A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910431637.9A CN110224863A (en) 2019-05-22 2019-05-22 A kind of file accelerates method for down loading and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910431637.9A CN110224863A (en) 2019-05-22 2019-05-22 A kind of file accelerates method for down loading and device

Publications (1)

Publication Number Publication Date
CN110224863A true CN110224863A (en) 2019-09-10

Family

ID=67818143

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910431637.9A Pending CN110224863A (en) 2019-05-22 2019-05-22 A kind of file accelerates method for down loading and device

Country Status (1)

Country Link
CN (1) CN110224863A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110769524A (en) * 2019-09-26 2020-02-07 维沃移动通信有限公司 Multi-network access method and terminal equipment
CN114338651A (en) * 2021-12-27 2022-04-12 中电金信软件有限公司 File transmission method and device, electronic equipment and readable storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6430591B1 (en) * 1997-05-30 2002-08-06 Microsoft Corporation System and method for rendering electronic images
CN101079709A (en) * 2006-06-15 2007-11-28 腾讯科技(深圳)有限公司 Single-node-to-multi-node concurrent download system and method
CN105490966A (en) * 2014-09-17 2016-04-13 联想(北京)有限公司 Method for dynamically sharing network bandwidth and electronic equipment
CN105873022A (en) * 2015-12-07 2016-08-17 乐视移动智能信息技术(北京)有限公司 Downloading method and device for mobile terminal
CN106161524A (en) * 2015-04-03 2016-11-23 中国移动通信集团上海有限公司 A kind of resource downloading method based on distributed resource node and device
CN106961454A (en) * 2016-01-08 2017-07-18 广州优视网络科技有限公司 Document down loading method, device and terminal device
CN107786583A (en) * 2016-08-24 2018-03-09 中兴通讯股份有限公司 A kind of document down loading method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6430591B1 (en) * 1997-05-30 2002-08-06 Microsoft Corporation System and method for rendering electronic images
CN101079709A (en) * 2006-06-15 2007-11-28 腾讯科技(深圳)有限公司 Single-node-to-multi-node concurrent download system and method
CN105490966A (en) * 2014-09-17 2016-04-13 联想(北京)有限公司 Method for dynamically sharing network bandwidth and electronic equipment
CN106161524A (en) * 2015-04-03 2016-11-23 中国移动通信集团上海有限公司 A kind of resource downloading method based on distributed resource node and device
CN105873022A (en) * 2015-12-07 2016-08-17 乐视移动智能信息技术(北京)有限公司 Downloading method and device for mobile terminal
CN106961454A (en) * 2016-01-08 2017-07-18 广州优视网络科技有限公司 Document down loading method, device and terminal device
CN107786583A (en) * 2016-08-24 2018-03-09 中兴通讯股份有限公司 A kind of document down loading method and device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110769524A (en) * 2019-09-26 2020-02-07 维沃移动通信有限公司 Multi-network access method and terminal equipment
CN114338651A (en) * 2021-12-27 2022-04-12 中电金信软件有限公司 File transmission method and device, electronic equipment and readable storage medium
CN114338651B (en) * 2021-12-27 2024-06-18 中电金信软件有限公司 File transmission method, device, electronic equipment and readable storage medium

Similar Documents

Publication Publication Date Title
US11297601B2 (en) Resource allocation method and orchestrator for network slicing in the wireless access network
US20200364098A1 (en) Event driving method and apparatus
CN109067890A (en) A kind of CDN node edge calculations system based on docker container
CN104521198A (en) System and method for virtual ethernet interface binding
CN104054056A (en) Method and apparatus for network and storage-aware virtual machine placement
CN111552550A (en) Task scheduling method, device and medium based on GPU (graphics processing Unit) resources
CN109697120A (en) Method, electronic equipment for application migration
CN110224863A (en) A kind of file accelerates method for down loading and device
CN109040230A (en) Method for down loading, device, equipment/terminal/server and the storage medium of file
CN110166507A (en) More resource regulating methods and device
CN108023756A (en) The upgrade method and device of a kind of virtual switch
CN109684000A (en) APP data display method, device, equipment and computer readable storage medium
CN101925051B (en) A kind of mobile terminal and method for down loading thereof
CN112925634A (en) Heterogeneous resource scheduling method and system
CN109800074A (en) Task data concurrently executes method, apparatus and electronic equipment
WO2018103565A1 (en) Methods and systems for data transmission
US20140215035A1 (en) Distribution of application components among devices
US20210176302A1 (en) Apparatus and method for establishing connection and clat aware affinity (caa)-based scheduling in multi-core processor
CN108958808A (en) Method for starting terminal and device, terminal and storage medium
CN113747554B (en) Method and device for task scheduling and resource allocation of edge computing network
CN116841720A (en) Resource allocation method, apparatus, computer device, storage medium and program product
CN109271254A (en) Method, electronic equipment and the medium risen using process tune
CN109152021A (en) A kind of method and device of determining downlink control channel time domain resource
CN112422457B (en) Message processing method and device and computer storage medium
CN112988417A (en) Message processing method and device, electronic equipment and computer readable medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20190910

RJ01 Rejection of invention patent application after publication