CN107959700A - The method and cloud storage gateway that adaptive document is downloaded - Google Patents

The method and cloud storage gateway that adaptive document is downloaded Download PDF

Info

Publication number
CN107959700A
CN107959700A CN201610905570.4A CN201610905570A CN107959700A CN 107959700 A CN107959700 A CN 107959700A CN 201610905570 A CN201610905570 A CN 201610905570A CN 107959700 A CN107959700 A CN 107959700A
Authority
CN
China
Prior art keywords
file
sections
target
slices
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
Application number
CN201610905570.4A
Other languages
Chinese (zh)
Other versions
CN107959700B (en
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.)
China Telecom Corp Ltd
Original Assignee
China Telecom Corp 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 China Telecom Corp Ltd filed Critical China Telecom Corp Ltd
Priority to CN201610905570.4A priority Critical patent/CN107959700B/en
Publication of CN107959700A publication Critical patent/CN107959700A/en
Application granted granted Critical
Publication of CN107959700B publication Critical patent/CN107959700B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters

Landscapes

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

Abstract

The present invention discloses method and the cloud storage gateway that a kind of adaptive document is downloaded.This method includes:Asked in response to the file download of user terminal, obtain the file size of target downloading file;Judge whether the file size of target downloading file is more than predetermined threshold;If the file size of target downloading file is more than predetermined threshold, slicing treatment is carried out to target downloading file;Parallel download file section style of writing part of going forward side by side is assembled, and the target downloading file after assembly is fed back to user terminal.File in excess of the quota, according to network speed and cloud storage gateway thread pool idle thread quantity, is carried out Dynamic Slicing, multi-threaded parallel download is carried out afterwards, so as to improve the speed of download of file by the present invention by real time monitoring network speed.

Description

The method and cloud storage gateway that adaptive document is downloaded
Technical field
The present invention relates to field of cloud calculation, method and cloud storage gateway that more particularly to a kind of adaptive document is downloaded.
Background technology
At present, it is that single thread is downloaded that cloud storage gateway downloads file from publicly-owned cloud storage.There are problems with for this method:
1) when single file is more than 100M, download is time-consuming longer, can not meet that user has access to file and wanted less than 15S Ask;
2) cloud storage gateway deployment is connected by Internet public networks between customer side, and publicly-owned cloud storage, big net Quality cannot be guaranteed that, according to practical experience, hundred mega broadband, often occurs the situation of 400K downloading rates, speed at this time is more It is to endure, seriously hampers public cloud storage Entry Firm application.
The content of the invention
In view of above technical problem, a kind of method downloaded the present invention provides adaptive document and cloud storage gateway, will File in excess of the quota carries out Dynamic Slicing, and multi-threaded parallel is downloaded, and improves the speed of download of file.
According to an aspect of the present invention, there is provided a kind of method that adaptive document is downloaded, including:
Asked in response to the file download of user terminal, obtain the file size of target downloading file;
Judge whether the file size of target downloading file is more than predetermined threshold;
If the file size of target downloading file is more than predetermined threshold, slicing treatment is carried out to target downloading file;
Parallel download file section style of writing part of going forward side by side is assembled, and the target downloading file after assembly is fed back to user's end End.In one embodiment of the invention, it is described that target downloading file progress slicing treatment is included:
Obtain real-time network speed;
Read idle thread number in cloud storage gateway thread pool;
Number of sections is determined according to the file size of real-time network speed, idle line number of passes and target downloading file;
Slicing treatment is carried out to target downloading file according to the number of sections.
In one embodiment of the invention, it is described according to real-time network speed, idle line number of passes and target downloading file File size determine that number of sections includes:
Theory is determined according to the file size F of real-time network speed S, predetermined most long download time t and target downloading file Number of slices value I0;
Target idle thread number N1 is obtained according to idle line number of passes N;
Number of sections I is determined according to theoretical number of slices value I0 and target idle thread number N1.In the reality of the present invention Apply in example, the file size F according to real-time network speed S, predetermined most long download time t and target downloading file determines to manage Include by number of slices value I0:According to formula
Determine theory number of slices value I0, wherein,Expression pairValue round up.The one of the present invention It is described to be included according to idle line number of passes N acquisitions target idle thread number N1 in a embodiment:
According to formula
Determine target idle thread number N1, wherein,Represent to carry out downward rounding to the value of N × 90%.
In one embodiment of the invention, it is described to be determined according to theoretical number of slices value I0 and target idle thread number N1 Number of sections I includes:
If theory number of slices value I0 is less than target idle thread number N1, using theoretical number of slices value I0 as number of slices Measure I;
If theory number of slices value I0 is not less than target idle thread number N1, using target idle thread number N1 as section Quantity I.
In one embodiment of the invention, Parallel download file section style of writing part assembly of going forward side by side includes:
The number of sections cut into slices according to file after slicing treatment, cuts into slices file and carries out and to download;
After the completion of All Files section is downloaded, cutting into slices to file, it is assembled to carry out file.
According to another aspect of the present invention, there is provided the cloud storage gateway that a kind of adaptive document is downloaded, including file size Acquisition module, file size judgment module, file section module and download module, wherein:
File size acquisition module, for the file download request in response to user terminal, obtains target downloading file File size;
Whether file size judgment module, the file size for judging target downloading file are more than predetermined threshold;
File section module, for the judging result according to file size judgment module, in the file of target downloading file In the case that size is more than predetermined threshold, slicing treatment is carried out to target downloading file;
Download module, it is assembled for Parallel download file section style of writing part of going forward side by side, and by the target downloading file after assembly Feed back to user terminal.
In one embodiment of the invention, file section module includes wire-speed detection unit, thread pool monitoring unit, cuts Piece number obtainment unit and slicing treatment unit, wherein:
Wire-speed detection unit, for obtaining real-time network speed;
Thread pool monitoring unit, for reading idle thread number in cloud storage gateway thread pool;
Number of sections acquiring unit, for the file according to real-time network speed, idle line number of passes and target downloading file Size determines number of sections;
Slicing treatment unit, for carrying out slicing treatment to target downloading file according to the number of sections.
In one embodiment of the invention, number of sections acquiring unit includes theoretical quantity acquisition submodule, score Journey acquisition submodule and number of sections acquisition submodule, wherein:
Theoretical quantity acquisition submodule, for being downloaded according to real-time network speed S, predetermined most long download time t and target The file size F of file determines theoretical number of slices value I0;
Subject thread acquisition submodule, for obtaining target idle thread number N1 according to idle line number of passes N;
Number of sections acquisition submodule, for determining to cut into slices according to theoretical number of slices value I0 and target idle thread number N1 Quantity I.
In one embodiment of the invention, theoretical quantity acquisition submodule is used for according to formula
Determine theory number of slices value I0, wherein,Expression rounds up function.
In one embodiment of the invention, subject thread acquisition submodule is used for according to formula
Determine target idle thread number N1, wherein,Represent downward bracket function.
In one embodiment of the invention, number of sections acquisition submodule is used to be less than mesh in theoretical number of sections value I0 In the case of marking idle line number of passes N1, using theoretical number of slices value I0 as number of sections I;And in theoretical number of sections value I0 In the case of not less than target idle thread number N1, using target idle thread number N1 as number of sections I.
In one embodiment of the invention, download module includes Parallel download unit and file assembled rigid unit, wherein:
Parallel download unit, for according to after slicing treatment file cut into slices number of sections, to file cut into slices carry out and to Download;
File assembled rigid unit, after the completion of being downloaded in All Files section, cutting into slices to file, it is assembled to carry out file.
The present invention is by real time monitoring network speed, according to network speed and cloud storage gateway thread pool idle line number of passes Amount, carries out Dynamic Slicing by file in excess of the quota, carries out multi-threaded parallel download afterwards, so as to improve the download speed of file Degree.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing There is attached drawing needed in technology description to be briefly described, it should be apparent that, drawings in the following description are only this Some embodiments of invention, for those of ordinary skill in the art, without creative efforts, can be with Other attached drawings are obtained according to these attached drawings.
Fig. 1 is the schematic diagram of method one embodiment that adaptive document of the present invention is downloaded.
Fig. 2 is the schematic diagram for carrying out slicing treatment in one embodiment of the invention to target downloading file.
Fig. 3 be one embodiment of the invention in Parallel download file section go forward side by side style of writing part assembly schematic diagram.
Fig. 4 is the schematic diagram that number of sections determines method in one embodiment of the invention.
Fig. 5 is the schematic diagram of cloud storage gateway one embodiment that adaptive document of the present invention is downloaded.
Fig. 6 is the schematic diagram of file slice module block in one embodiment of the invention.
Fig. 7 is the schematic diagram of number of sections acquiring unit in one embodiment of the invention.
Fig. 8 is the schematic diagram of file slice module block in one embodiment of the invention.
Embodiment
Below in conjunction with the attached drawing in the embodiment of the present invention, the technical solution in the embodiment of the present invention is carried out clear, complete Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, instead of all the embodiments.Below Description only actually at least one exemplary embodiment is illustrative, is never used as to the present invention and its application or makes Any restrictions.Based on the embodiments of the present invention, those of ordinary skill in the art are not making creative work premise Lower all other embodiments obtained, belong to the scope of protection of the invention.
Unless specifically stated otherwise, the component and positioned opposite, the digital table of step otherwise illustrated in these embodiments Do not limited the scope of the invention up to formula and numerical value.
At the same time, it should be appreciated that for the ease of description, the size of the various pieces shown in attached drawing is not according to reality Proportionate relationship draw.
It may be not discussed in detail for technology, method and apparatus known to person of ordinary skill in the relevant, but suitable In the case of, the technology, method and apparatus should be considered as authorizing part for specification.
In shown here and discussion all examples, any occurrence should be construed as merely exemplary, without It is as limitation.Therefore, the other examples of exemplary embodiment can have different values.
It should be noted that:Similar label and letter represents similar terms in following attached drawing, therefore, once a certain Xiang Yi It is defined, then it need not be further discussed in subsequent attached drawing in a attached drawing.
It is found by the applicant that:The cloud of existing multithreading burst uploads method for down loading and system when file download, high in the clouds root According to information dynamic matching, and multiple circuits are provided and are downloaded, can undoubtedly increase public cloud storage end load under this pattern.
Fig. 1 is the schematic diagram of method one embodiment that adaptive document of the present invention is downloaded.Preferably, the present embodiment can be by The cloud storage gateway that adaptive document is downloaded performs.This method comprises the following steps:
Step 1, asked in response to the file download of user terminal, obtain the file size of target downloading file.
Step 2, judge whether the file size of target downloading file is more than predetermined threshold.
Step 3, if the file size of target downloading file is more than predetermined threshold, target downloading file is carried out at section Reason.
In one embodiment of the invention, it is described to publishing papers under target as shown in Fig. 2, in the step 3 of Fig. 1 embodiments The step of part progress slicing treatment, can include:
Step 31, data packet periodically is sent to specified public cloud storage site, it is publicly-owned to specifying to obtain cloud storage gateway The real-time network speed of cloud storage website.
Step 32, the idle line number of passes (1-100) in cloud storage gateway thread pool is read in real time.Cloud storage passes through thread Pond response user's request, the general maximum idle line number of passes of acquiescence is 100.
Step 33, determined according to factors such as the file sizes of real-time network speed, idle line number of passes and target downloading file Number of sections, the download time that each file is cut into slices in principle are less than 8s.
Step 34, slicing treatment is carried out to target downloading file according to the number of sections.
Step 4, Parallel download file section style of writing part of going forward side by side is assembled, and the target downloading file after assembly is fed back to use Family terminal.
In one embodiment of the invention, as shown in figure 3, in the step 4 of Fig. 1 embodiments, the Parallel download file Section go forward side by side style of writing part assembly step can include:
Step 41, the number of sections cut into slices according to file after slicing treatment, receives the download URL after file section (Uniform Resource Locator, universal resource locator), cuts into slices file and carries out and to download.
Step 42, after the completion of All Files section is downloaded, cutting into slices to file, it is assembled to carry out file.
The method downloaded based on the adaptive document that the above embodiment of the present invention provides, for the cloud of existing multithreading burst The technical problem of public cloud storage end load can be increased in file download by uploading method for down loading and system, pass through real-time monitoring net Network speed, according to network speed and cloud storage gateway thread pool idle thread quantity, file in excess of the quota is cut into Mobile state Piece, carries out multi-threaded parallel download, so as to improve the speed of download of file, improves the utilization rate of public-network bandwidth afterwards, promotees The application being stored in into public cloud in enterprise.
The above embodiment of the present invention improves the file download pattern of existing cloud storage gateway, fully improves public-network bandwidth Utilization rate, greatly improves file downloading speed under the Internet model, promotes the application that public cloud is stored in enterprise.
In one embodiment of the invention, the method can also include:If the file size of target downloading file is not More than predetermined threshold, then slicing treatment is not carried out to target downloading file, directly download the target downloading file, and feed back to User terminal.
Such as:If file is less than 1M, it is not necessary that cuts into slices, gateway outlet bandwidth is substantially 100,000,000 public networks, can Ensure to download in 8S and finish.
In one particular embodiment of the present invention, predetermined threshold could be provided as 10M.
In the above embodiment of the present invention, the size and user file size distribution of predetermined threshold have relation.Predetermined threshold It can be adjusted according to user's practical effect dynamic.
In the case where default egress bandwidth is all 100,000,000 public networks, if user based on big file, when being shown to file It is not very high that effect property, which requires, then predetermined threshold can be arranged to 50M.
If user is medical industry, big file is few, and it is higher to have access to timeliness, predetermined threshold can be set 10M.
Fig. 4 is the schematic diagram that number of sections determines method in one embodiment of the invention.As shown in figure 4, Fig. 2 embodiments Step 33 may comprise steps of:
Step 331, according to real-time network speed S, the file size F of predetermined most long download time t and target downloading file Determine theory number of slices value I0.
In one embodiment of the invention, step 331 can include:According to formula (1)
Determine theory number of slices value I0, wherein,Expression pairValue round up, it follows that theoretical The value range of number of slices value I0 is the integer more than or equal to 1.
In one embodiment of the invention, it can be 8s to make a reservation for most long download time t.According to user's use habit, surpass Cross 15S and complete display, user's speed of sensation is slow, and gateway is needed to complete file download and transmitted to user, because this time takes half, is striven Taking to control in 8 seconds download time.
Step 332, target idle thread number N1 is obtained according to idle line number of passes N.
In one particular embodiment of the present invention, step 332 can include:According to formula (2)
Determine target idle thread number N1, wherein,Represent to carry out downward rounding to the value of N × 90%.
Home server resource is limited, and Thread Count can not possibly infinitely expand.According to industry experience, idle line number of passes N is usual Value is less than 100.
Target idle thread number N1 takes the 90% of idle line number of passes N, is the request in order to stay a little surpluses to respond other users. If current idle Thread Count N is 100, target idle thread number N1 is 90.The value range of target idle thread number N1 is 1- 90。
Step 333, number of sections I is determined according to theoretical number of slices value I0 and target idle thread number N1.
In one embodiment of the invention, step 333 can include:Take theoretical number of slices value I0 and target idle line The minimum value of both number of passes N1 is as number of sections I.
In another embodiment of the invention, step 333 can include:It is idle that if theoretical number of slices value I0 is less than target Thread Count N1, then using theoretical number of slices value I0 as number of sections I;If theory number of slices value I0 is not less than target idle line Number of passes N1, then using target idle thread number N1 as number of sections I.
The adaptive document block cutting method of the above embodiment of the present invention, is deposited when user downloads cloud by cloud storage gateway requests When storing up file on resource pool, in the case where file exceedes setting limit, according to cloud storage gateway to corresponding cloud storage pond The multi-factor comprehensives such as the idle thread pond quantity of network speed and cloud storage gateway consider determine file number of sections, afterwards according to Number of sections carries out Dynamic Slicing and multithreading and to download, and thus the above embodiment of the present invention is not increasing high in the clouds load In the case of, achieve the optimal effectiveness of file download;The above embodiment of the present invention improves the utilization rate of public-network bandwidth, greatly carries File downloading speed under high the Internet model, promotes the application that public cloud is stored in enterprise.
Fig. 5 is the schematic diagram of cloud storage gateway one embodiment that adaptive document of the present invention is downloaded.As shown in figure 5, institute The cloud storage gateway for stating adaptive document download is cut including file size acquisition module 51, file size judgment module 52, file Piece module 53 and download module 54, wherein:
File size acquisition module 51, for the file download request in response to user terminal, obtains target downloading file File size.
Whether file size judgment module 52, the file size for judging target downloading file are more than predetermined threshold.
In the above embodiment of the present invention, the size and user file size distribution of predetermined threshold have relation.Predetermined threshold It can be adjusted according to user's practical effect dynamic.
In the case where default egress bandwidth is all 100,000,000 public networks, if user based on big file, when being shown to file It is not very high that effect property, which requires, then predetermined threshold can be arranged to 50M.
If user is medical industry, big file is few, and it is higher to have access to timeliness, predetermined threshold can be set 10M.
File section module 53, for the judging result according to file size judgment module 52, in target downloading file In the case that file size is more than predetermined threshold, slicing treatment is carried out to target downloading file.
Download module 54, style of writing part assembly of going forward side by side of cutting into slices for Parallel download file, and will publish papers under the target after assembly Part feeds back to user terminal.
In one embodiment of the invention, download module 54 can be also used for sentencing according to file size judgment module 52 It is disconnected to directly download the target downloading file as a result, in the case where the file size of mark download file is not more than predetermined threshold, And feed back to user terminal.
The cloud storage gateway downloaded based on the adaptive document that the above embodiment of the present invention provides, passes through real time monitoring network Speed, according to network speed and cloud storage gateway thread pool idle thread quantity, Dynamic Slicing is carried out by file in excess of the quota, Multi-threaded parallel download is carried out afterwards, so as to improve the speed of download of file.The above embodiment of the present invention also improves public network The utilization rate of bandwidth, promotes the application that public cloud is stored in enterprise.
Fig. 6 is the schematic diagram of file slice module block in one embodiment of the invention.As shown in fig. 6, the file of Fig. 5 embodiments Module 53 of cutting into slices can include wire-speed detection unit 531, thread pool monitoring unit 532, number of sections acquiring unit 533 and section Processing unit 534, wherein:
Wire-speed detection unit 531, sends data packet, to obtain cloud storage net for timing to specified public cloud storage site Close the real-time network speed of specified public cloud storage site.
Thread pool monitoring unit 532, for reading the idle line number of passes in cloud storage gateway thread pool.
Number of sections acquiring unit 533, for the text according to real-time network speed, idle line number of passes and target downloading file The factors such as part size determine number of sections.
Slicing treatment unit 534, for carrying out slicing treatment to target downloading file according to the number of sections.
Fig. 7 is the schematic diagram of number of sections acquiring unit in one embodiment of the invention.As shown in fig. 7, Fig. 6 embodiments Number of sections acquiring unit 533 can include theoretical quantity acquisition submodule 5331, subject thread acquisition submodule 5332 and cut Piece quantity acquisition submodule 5333,
Wherein:
Theoretical quantity acquisition submodule 5331, for according to real-time network speed S, predetermined most long download time t and target The file size F for downloading file determines theoretical number of slices value I0.
In one embodiment of the invention, theoretical quantity acquisition submodule 5331 specifically can be used for according to formula (1) Determine theory number of slices value I0, in formula (1),Expression pairValue round up.
Subject thread acquisition submodule 5332, for obtaining target idle thread number N1 according to idle line number of passes N.
In one embodiment of the invention, subject thread acquisition submodule 5332 specifically can be used for according to formula (2) Determine target idle thread number N1, wherein,Represent to carry out downward rounding to the value of N × 90%.
Number of sections acquisition submodule 5333, for being determined according to theoretical number of slices value I0 and target idle thread number N1 Number of sections I.
In one embodiment of the invention, number of sections acquisition submodule 5333 specifically can be used in theoretical number of slices In the case that value I0 is less than target idle thread number N1, using theoretical number of slices value I0 as number of sections I;And in theory In the case that number of slices value I0 is not less than target idle thread number N1, using target idle thread number N1 as number of sections I.
Fig. 8 is the schematic diagram of file slice module block in one embodiment of the invention.As shown in figure 8, the download of Fig. 5 embodiments Module 54 can include Parallel download unit 541 and file assembled rigid unit 542, wherein:
Parallel download unit 541, for according to after slicing treatment file cut into slices number of sections, receive file section after URL is downloaded, cuts into slices and carries out and to download to file.
File assembled rigid unit 542, after the completion of being downloaded in All Files section, cutting into slices to file, it is assembled to carry out file.
The above embodiment of the present invention, when user downloads file on cloud storage resource pool by cloud storage gateway requests, In the case where file exceedes setting limit, according to the network speed and cloud storage gateway of cloud storage gateway to corresponding cloud storage pond The multi-factor comprehensive such as idle thread pond quantity consider to determine file number of sections, carry out Dynamic Slicing according to number of sections afterwards And multithreading and to download, thus the above embodiment of the present invention can obtain file in the case where not increasing high in the clouds load The optimal effectiveness of download;The above embodiment of the present invention also improves the utilization rate of public-network bandwidth, greatly improves the Internet model Lower file downloading speed, promotes the application that public cloud is stored in enterprise.
File size acquisition module 51 described above, file size judgment module 52, file section module 53, under Carry the grade functional unit of module 54 can be implemented as perform function described herein general processor, programmable logic control Device (PLC) processed, digital signal processor (DSP), application-specific integrated circuit (ASIC), field programmable gate array (FPGA) or its His programmable logic device, discrete gate either transistor logic, discrete hardware components or it is any appropriately combined.
So far, the present invention is described in detail.In order to avoid the design of the masking present invention, it is public that this area institute is not described Some details known.Those skilled in the art as described above, can be appreciated how to implement technology disclosed herein completely Scheme.
One of ordinary skill in the art will appreciate that hardware can be passed through by realizing all or part of step of above-described embodiment To complete, relevant hardware can also be instructed to complete by program, the program can be stored in a kind of computer-readable In storage medium, storage medium mentioned above can be read-only storage, disk or CD etc..
Description of the invention provides for the sake of example and description, and is not exhaustively or by the present invention It is limited to disclosed form.Many modifications and variations are obvious for the ordinary skill in the art.Select and retouch State embodiment and be to more preferably illustrate the principle of the present invention and practical application, and those of ordinary skill in the art is managed The solution present invention is so as to design the various embodiments with various modifications suitable for special-purpose.

Claims (10)

1. a kind of method that adaptive document is downloaded, it is characterised in that including:
Asked in response to the file download of user terminal, obtain the file size of target downloading file;
Judge whether the file size of target downloading file is more than predetermined threshold;
If the file size of target downloading file is more than predetermined threshold, slicing treatment is carried out to target downloading file;
Parallel download file section style of writing part of going forward side by side is assembled, and the target downloading file after assembly is fed back to user terminal.
2. according to the method described in claim 1, it is characterized in that, described include target downloading file progress slicing treatment:
Obtain real-time network speed;
Read idle thread number in cloud storage gateway thread pool;
Number of sections is determined according to the file size of real-time network speed, idle line number of passes and target downloading file;
Slicing treatment is carried out to target downloading file according to the number of sections.
It is 3. according to the method described in claim 2, it is characterized in that, described according to real-time network speed, idle line number of passes and mesh The file size that mark downloads file determines that number of sections includes:
Theoretical section is determined according to the file size F of real-time network speed S, predetermined most long download time t and target downloading file Quantitative value I0;
Target idle thread number N1 is obtained according to idle line number of passes N;
Number of sections I is determined according to theoretical number of slices value I0 and target idle thread number N1.
4. according to the method described in claim 3, it is characterized in that, it is described according to real-time network speed S, predetermined most long download when Between the file size F of t and target downloading file determine that theoretical number of slices value I0 includes:
According to formula
Determine theory number of slices value I0, wherein,Expression pairValue round up;
It is described to be included according to idle line number of passes N acquisitions target idle thread number N1:
According to formula
Determine target idle thread number N1, wherein,Represent to carry out downward rounding to the value of N × 90%;
It is described to determine that number of sections I includes according to theoretical number of slices value I0 and target idle thread number N1:
If theory number of slices value I0 is less than target idle thread number N1, using theoretical number of slices value I0 as number of sections I;
If theory number of slices value I0 is not less than target idle thread number N1, using target idle thread number N1 as number of sections I。
5. according to the described method of any one of claim 1-4, it is characterised in that the Parallel download file is cut into slices and carried out File assembly includes:
The number of sections cut into slices according to file after slicing treatment, cuts into slices file and carries out and to download;
After the completion of All Files section is downloaded, cutting into slices to file, it is assembled to carry out file.
6. the cloud storage gateway that a kind of adaptive document is downloaded, it is characterised in that including file size acquisition module, file size Judgment module, file section module and download module, wherein:
File size acquisition module, asks for the file download in response to user terminal, obtains the file of target downloading file Size;
Whether file size judgment module, the file size for judging target downloading file are more than predetermined threshold;
File section module, for the judging result according to file size judgment module, in the file size of target downloading file In the case of more than predetermined threshold, slicing treatment is carried out to target downloading file;
Download module, style of writing part assembly of going forward side by side of cutting into slices for Parallel download file, and the target downloading file after assembly is fed back To user terminal.
7. cloud storage gateway according to claim 6, it is characterised in that file section module include wire-speed detection unit, Thread pool monitoring unit, number of sections acquiring unit and slicing treatment unit, wherein:
Wire-speed detection unit, for obtaining real-time network speed;
Thread pool monitoring unit, for reading idle thread number in cloud storage gateway thread pool;
Number of sections acquiring unit, for the file size according to real-time network speed, idle line number of passes and target downloading file Determine number of sections;
Slicing treatment unit, for carrying out slicing treatment to target downloading file according to the number of sections.
8. cloud storage gateway according to claim 7, it is characterised in that number of sections acquiring unit includes theoretical quantity and obtains Submodule, subject thread acquisition submodule and number of sections acquisition submodule are taken, wherein:
Theoretical quantity acquisition submodule, for according to real-time network speed S, predetermined most long download time t and target downloading file File size F determine theoretical number of slices value I0;
Subject thread acquisition submodule, for obtaining target idle thread number N1 according to idle line number of passes N;
Number of sections acquisition submodule, for determining number of sections according to theoretical number of slices value I0 and target idle thread number N1 I。
9. cloud storage gateway according to claim 8, it is characterised in that
Theoretical quantity acquisition submodule is used for according to formula
Determine theory number of slices value I0, wherein,Expression pairValue round up;
Subject thread acquisition submodule is used for according to formula
Determine target idle thread number N1, wherein,Represent to carry out downward rounding to the value of N × 90%;
Number of sections acquisition submodule is used to, in the case where theoretical number of sections value I0 is less than target idle thread number N1, to manage By number of slices value I0 as number of sections I;And it is not less than the feelings of target idle thread number N1 in theoretical number of sections value I0 Under condition, using target idle thread number N1 as number of sections I.
10. the cloud storage gateway according to any one of claim 6-9, it is characterised in that under download module is included parallel Carrier unit and file assembled rigid unit, wherein:
Parallel download unit, for the number of sections cut into slices according to file after slicing treatment, cuts into slices file and carries out and to download;
File assembled rigid unit, after the completion of being downloaded in All Files section, cutting into slices to file, it is assembled to carry out file.
CN201610905570.4A 2016-10-18 2016-10-18 Self-adaptive file downloading method and cloud storage gateway Active CN107959700B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610905570.4A CN107959700B (en) 2016-10-18 2016-10-18 Self-adaptive file downloading method and cloud storage gateway

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610905570.4A CN107959700B (en) 2016-10-18 2016-10-18 Self-adaptive file downloading method and cloud storage gateway

Publications (2)

Publication Number Publication Date
CN107959700A true CN107959700A (en) 2018-04-24
CN107959700B CN107959700B (en) 2021-03-16

Family

ID=61954368

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610905570.4A Active CN107959700B (en) 2016-10-18 2016-10-18 Self-adaptive file downloading method and cloud storage gateway

Country Status (1)

Country Link
CN (1) CN107959700B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109359099A (en) * 2018-08-21 2019-02-19 中国平安人寿保险股份有限公司 Distributed document method for uploading, device, computer equipment and storage medium
CN109862065A (en) * 2018-12-06 2019-06-07 北京字节跳动网络技术有限公司 Document down loading method, device and electronic equipment
CN110198349A (en) * 2019-05-27 2019-09-03 腾讯科技(深圳)有限公司 Document transmission method and device, storage medium and electronic device
CN110221914A (en) * 2019-05-20 2019-09-10 平安银行股份有限公司 Document handling method and device
CN110784520A (en) * 2019-09-30 2020-02-11 北京字节跳动网络技术有限公司 File downloading method and device and electronic equipment
CN111327695A (en) * 2020-02-13 2020-06-23 腾讯科技(深圳)有限公司 Resource downloading method and related device
CN112199052A (en) * 2020-11-04 2021-01-08 江苏特思达电子科技股份有限公司 File downloading method and device and computer equipment
CN112491990A (en) * 2020-11-17 2021-03-12 中科三清科技有限公司 Hybrid cloud network data transmission method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103124275A (en) * 2011-11-18 2013-05-29 腾讯科技(深圳)有限公司 Method and device of obtaining files
CN103716719A (en) * 2013-12-02 2014-04-09 乐视网信息技术(北京)股份有限公司 Multimedia file downloading method and user terminal
CN103929427A (en) * 2014-04-23 2014-07-16 无锡天脉聚源传媒科技有限公司 Dynamic multi-thread downloading device and method
CN105635217A (en) * 2014-11-03 2016-06-01 广州市动景计算机科技有限公司 File download method and apparatus

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103124275A (en) * 2011-11-18 2013-05-29 腾讯科技(深圳)有限公司 Method and device of obtaining files
CN103716719A (en) * 2013-12-02 2014-04-09 乐视网信息技术(北京)股份有限公司 Multimedia file downloading method and user terminal
CN103929427A (en) * 2014-04-23 2014-07-16 无锡天脉聚源传媒科技有限公司 Dynamic multi-thread downloading device and method
CN105635217A (en) * 2014-11-03 2016-06-01 广州市动景计算机科技有限公司 File download method and apparatus

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109359099A (en) * 2018-08-21 2019-02-19 中国平安人寿保险股份有限公司 Distributed document method for uploading, device, computer equipment and storage medium
CN109862065B (en) * 2018-12-06 2021-09-14 北京字节跳动网络技术有限公司 File downloading method and device and electronic equipment
CN109862065A (en) * 2018-12-06 2019-06-07 北京字节跳动网络技术有限公司 Document down loading method, device and electronic equipment
JP2020091870A (en) * 2018-12-06 2020-06-11 北京字節跳働網絡技術有限公司 File download method and device, and computer-readable medium
US20200186588A1 (en) * 2018-12-06 2020-06-11 Beijing Bytedance Network Technology Co., Ltd. File downloading method, apparatus, and non-transitory computer-readable storage medium
KR20200070119A (en) * 2018-12-06 2020-06-17 베이징 바이트댄스 네트워크 테크놀로지 컴퍼니, 리미티드 File Downloading Method, Apparatus, and Non-Transitory Computer-Readable Storage Medium
KR102318639B1 (en) * 2018-12-06 2021-11-01 베이징 바이트댄스 네트워크 테크놀로지 컴퍼니, 리미티드 File Downloading Method, Apparatus, and Non-Transitory Computer-Readable Storage Medium
US11064012B2 (en) 2018-12-06 2021-07-13 Beijing Bytedance Network Technology Co., Ltd. File downloading method, apparatus, and non-transitory computer-readable storage medium
CN110221914A (en) * 2019-05-20 2019-09-10 平安银行股份有限公司 Document handling method and device
CN110221914B (en) * 2019-05-20 2024-05-17 平安银行股份有限公司 File processing method and device
CN110198349A (en) * 2019-05-27 2019-09-03 腾讯科技(深圳)有限公司 Document transmission method and device, storage medium and electronic device
CN110784520A (en) * 2019-09-30 2020-02-11 北京字节跳动网络技术有限公司 File downloading method and device and electronic equipment
CN111327695A (en) * 2020-02-13 2020-06-23 腾讯科技(深圳)有限公司 Resource downloading method and related device
CN112199052A (en) * 2020-11-04 2021-01-08 江苏特思达电子科技股份有限公司 File downloading method and device and computer equipment
CN112491990B (en) * 2020-11-17 2021-08-10 中科三清科技有限公司 Hybrid cloud network data transmission method and device, electronic equipment and storage medium
CN112491990A (en) * 2020-11-17 2021-03-12 中科三清科技有限公司 Hybrid cloud network data transmission method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN107959700B (en) 2021-03-16

Similar Documents

Publication Publication Date Title
CN107959700A (en) The method and cloud storage gateway that adaptive document is downloaded
DE102015002119B4 (en) Live video streaming with low lag time
CN107911722B (en) Content distribution network scheduling method and device, electronic equipment and computer readable storage medium
CN105812255B (en) Method and device for selecting return source line
CN103780652B (en) A kind of method and system of microblogging resource sharing
CN107277013B (en) Live broadcast system in peer-to-peer network and node management method
CN109242573A (en) Evaluation method, device, equipment and the storage medium of APP
CN104641575B (en) It is used for transmission the method, apparatus and user equipment of Media Stream
CN104822156B (en) A kind of method and device of user behavior analysis
CN104980417B (en) A kind of UGC document distribution method and equipment
CN107333148B (en) Method for processing video frequency and device, computer storage medium and equipment
CN106899894B (en) The adaptive stream media method, apparatus and server of dynamic optimization
JP2016533596A5 (en)
CN104516915B (en) A kind of media data dissemination method and device based on microblogging timeline
DE602004010224T2 (en) Traffic control device and corresponding service system
CN110690988A (en) Bandwidth control method, bandwidth control platform, server and storage medium
CN105721889A (en) P2P data download method and device
CN109962947A (en) Method for allocating tasks and device in a kind of peer-to-peer network
CN106254561A (en) The real-time offline download method of a kind of Internet resources file and system
RU2014110276A (en) METHOD AND SYSTEM FOR MANAGING DOWNLOADING A FILE IN A CLOUDY STORAGE SERVICE
CN107800734A (en) A kind of burst method for down loading, apparatus and system
CN104333816B (en) The determination method and device of downloading mode in a kind of P2P networks
CN107707594A (en) It is a kind of to realize the document transmission method and device accelerated on demand
WO2017185631A1 (en) Data downloading method and device
CN105306385A (en) Method and device for controlling downlink network bandwidth

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
GR01 Patent grant
GR01 Patent grant