CN114006947B - File downloading method and device, computing equipment and storage medium - Google Patents

File downloading method and device, computing equipment and storage medium Download PDF

Info

Publication number
CN114006947B
CN114006947B CN202111323260.9A CN202111323260A CN114006947B CN 114006947 B CN114006947 B CN 114006947B CN 202111323260 A CN202111323260 A CN 202111323260A CN 114006947 B CN114006947 B CN 114006947B
Authority
CN
China
Prior art keywords
file
compression
size
downloading
target part
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111323260.9A
Other languages
Chinese (zh)
Other versions
CN114006947A (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.)
Uniontech Software Technology Co Ltd
Original Assignee
Uniontech Software 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 Uniontech Software Technology Co Ltd filed Critical Uniontech Software Technology Co Ltd
Priority to CN202111323260.9A priority Critical patent/CN114006947B/en
Publication of CN114006947A publication Critical patent/CN114006947A/en
Application granted granted Critical
Publication of CN114006947B publication Critical patent/CN114006947B/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
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/04Protocols for data compression, e.g. ROHC
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/174Redundancy elimination performed by the file system
    • G06F16/1744Redundancy elimination performed by the file system using compression, e.g. sparse files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/174Redundancy elimination performed by the file system
    • G06F16/1748De-duplication implemented within the file system, e.g. based on file segments
    • 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)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a file downloading method, a file downloading device, computing equipment and a readable storage medium. The file downloading method of the invention comprises the following steps: monitoring the size of a target part which is not subjected to compression processing in a downloaded part of the file when the compression downloading is performed on the file; when the size of the target part meets the compression condition, compressing the target part, and deleting the target part after compressing; repeating the steps of iteratively monitoring the size of the target part, compressing the target part and deleting the target part until the file downloading is completed. According to the file downloading method, when downloading the file, the file is downloaded and compressed, so that the downloaded file is far smaller than the actual size of the file, the storage capacity occupied by the file in the storage device is saved, and a user can download the file with the storage capacity larger than the residual storage capacity of the storage device.

Description

File downloading method and device, computing equipment and storage medium
Technical Field
The present invention relates to the field of computers, and in particular, to a method, an apparatus, a computing device, and a storage medium for downloading files.
Background
Based on the problem that insufficient storage capacity can cause file downloading failure, existing various downloading tools generally detect the residual storage capacity of a storage device before downloading files, and when the size of the files to be downloaded is larger than the residual storage capacity of the storage device, users are not allowed to create downloading tasks. In this case, in order to be able to download the file, the user typically replaces the storage device or deletes the current part of the file in the storage device, which is less experienced.
Disclosure of Invention
To this end, the present invention provides a file downloading method, apparatus, computing device and storage medium in an effort to solve or at least alleviate the above-identified problems.
According to an aspect of the present invention, there is provided a file downloading method, including: monitoring the size of a target part which is not subjected to compression processing in a downloaded part of the file when the compression downloading is performed on the file; when the size of the target part meets the compression condition, compressing the target part, and deleting the target part after compressing; repeating the steps of iteratively monitoring the size of the target part, compressing the target part and deleting the target part until the file downloading is completed.
Optionally, in the file downloading method according to the present invention, before the step of performing compression downloading on the file, the method further includes the steps of: judging whether the size of the file is larger than the residual storage capacity threshold value of the storage device or not; if so, performing compression downloading on the file.
Optionally, in the file downloading method according to the present invention, before the step of performing compression downloading on the file, the method further includes the steps of: judging whether the file is a non-compressed package file or not; if yes, the file is compressed and downloaded.
Optionally, in the file downloading method according to the present invention, before the step of performing the compression process on the target portion when the size of the target portion satisfies the compression condition, the method further includes the step of: the compression method for the file is determined based on the remaining storage capacity of the storage device and the size of the file.
Optionally, in the file downloading method according to the present invention, the step of determining the compression mode of the file based on the remaining storage capacity of the storage device and the size of the file includes: if the difference value between the size of the file and the residual storage capacity of the storage device is larger than the storage threshold value, selecting a first compression mode; otherwise, a second compression mode is selected, wherein the compression ratio of the first compression mode is greater than that of the second compression mode.
Optionally, in the file downloading method according to the present invention, the meeting the compression condition includes: the ratio of the size of the target part to the total size of the file is a first threshold; or the ratio of the size of the target portion to the remaining storage capacity of the storage device is a second threshold.
Optionally, in the file downloading method according to the present invention, after the file downloading is completed, the method further includes the steps of: decompressing each compressed package to obtain the downloaded file.
According to still another aspect of the present invention, there is provided a file downloading apparatus comprising: the monitoring module is suitable for monitoring the size of a target part which is not subjected to compression processing in a downloaded part of the file when the file is subjected to compression downloading; the compression module is suitable for compressing the target part when the size of the target part meets the compression condition, and deleting the target part after the compression; the iteration module is suitable for repeatedly carrying out the steps of iteratively monitoring the size of the target part, carrying out compression processing on the target part and deleting the target part until the file downloading is completed.
According to yet another aspect of the present invention, there is provided a computing device comprising: at least one processor; and a memory storing program instructions, wherein the program instructions are configured to be adapted to be executed by the at least one processor, the program instructions comprising instructions for performing a file download method according to the invention.
According to yet another aspect of the present invention, there is provided a readable storage medium storing program instructions that, when read and executed by a computing device, cause the computing device to perform a file download method according to the present invention.
According to the file downloading method, the size of an uncompressed part in a downloaded part of a file is monitored in real time in the downloading process of the file. Whenever the size of the uncompressed part in the downloaded part of the file is monitored to meet the compression condition, it is compressed and the part of the content is deleted. That is, the present invention compresses files while downloading them. In this way, the downloaded file can be made much smaller than the actual size of the file during the file downloading process, so that the storage capacity occupied in the storage device can be saved. In addition, the file downloading method can download the file with the residual storage capacity larger than that of the storage device, and user experience is improved.
Drawings
To the accomplishment of the foregoing and related ends, certain illustrative aspects are described herein in connection with the following description and the annexed drawings, which set forth the various ways in which the principles disclosed herein may be practiced, and all aspects and equivalents thereof are intended to fall within the scope of the claimed subject matter. The above, as well as additional objects, features, and advantages of the present disclosure will become more apparent from the following detailed description when read in conjunction with the accompanying drawings. Like reference numerals generally refer to like parts or elements throughout the present disclosure.
FIG. 1 illustrates a block diagram of a computing device 100, according to one embodiment of the invention;
FIG. 2 shows a flow chart of a file download method 200 according to one embodiment of the invention;
FIG. 3 shows a schematic diagram of a file download interface 300 according to one embodiment of the invention;
FIG. 4 shows a schematic diagram of a flow chart of a file download method 400 according to yet another embodiment of the invention;
fig. 5 shows a schematic structural diagram of a file downloading device 500 according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
In order to ensure that the file can be downloaded successfully, the existing downloading tool detects the residual storage capacity of the storage device before downloading, and when the size of the downloaded file is larger than the residual storage capacity of the storage device, the downloading tool is not allowed to create a downloading task. If the user wants to adhere to the download, only the content in the storage device can be deleted, which is often not a solution required by the user.
The proposal of the invention is provided for solving the problems in the prior art. In particular, one embodiment of the present invention provides a file downloading method that may be performed in a computing device. FIG. 1 illustrates a block diagram of a computing device 100, according to one embodiment of the invention. It should be noted that the computing device 100 shown in fig. 1 is only an example, and in practice, the computing device for implementing the file downloading method of the present invention may be any type of device, and the hardware configuration of the computing device may be the same as that of the computing device 100 shown in fig. 1 or may be different from that of the computing device 100 shown in fig. 1. In practice, the computing device for implementing the file downloading method of the present invention may add or delete hardware components of the computing device 100 shown in fig. 1, and the present invention is not limited to the specific hardware configuration of the computing device.
As shown in FIG. 1, in a basic configuration 102, a computing device 100 typically includes a system memory 106 and one or more processors 104. The memory bus 108 may be used for communication between the processor 104 and the system memory 106.
Depending on the desired configuration, the processor 104 may be any type of processing including, but not limited to: a microprocessor (μp), a microcontroller (μc), a digital information processor (DSP), or any combination thereof. The processor 104 may include one or more levels of caches, such as a first level cache 110 and a second level cache 112, a processor core 114, and registers 116. The example processor core 114 may include an Arithmetic Logic Unit (ALU), a Floating Point Unit (FPU), a digital signal processing core (DSP core), or any combination thereof. The example memory controller 118 may be used with the processor 104, or in some implementations, the memory controller 118 may be an internal part of the processor 104.
Depending on the desired configuration, system memory 106 may be any type of memory including, but not limited to: volatile memory (such as RAM), non-volatile memory (such as ROM, flash memory, etc.), or any combination thereof. Physical memory in a computing device is often referred to as volatile memory, RAM, and data in disk needs to be loaded into physical memory in order to be read by processor 104. The system memory 106 may include an operating system 120, one or more applications 122, and program data 124. In some implementations, the application 122 may be arranged to execute instructions on an operating system by the one or more processors 104 using the program data 124. The operating system 120 may be, for example, linux, windows or the like, which includes program instructions for handling basic system services and performing hardware-dependent tasks. The application 122 includes program instructions for implementing various functions desired by the user, and the application 122 may be, for example, a browser, instant messaging software, a software development tool (e.g., integrated development environment IDE, compiler, etc.), or the like, but is not limited thereto. When an application 122 is installed into computing device 100, a driver module may be added to operating system 120.
When the computing device 100 starts up running, the processor 104 reads and executes program instructions of the operating system 120 from the system memory 106. Applications 122 run on top of operating system 120, utilizing interfaces provided by operating system 120 and underlying hardware to implement various user-desired functions. When a user launches the application 122, the application 122 is loaded into the system memory 106, and the processor 104 reads and executes the program instructions of the application 122 from the system memory 106.
Computing device 100 also includes storage device 132, storage device 132 including removable storage 136 and non-removable storage 138, both removable storage 136 and non-removable storage 138 being connected to storage interface bus 134.
Computing device 100 may also include an interface bus 140 that facilitates communication from various interface devices (e.g., output devices 142, peripheral interfaces 144, and communication devices 146) to basic configuration 102 via bus/interface controller 130. The example output device 142 includes a graphics processing unit 148 and an audio processing unit 150. They may be configured to facilitate communication with various external devices such as a display or speakers via one or more a/V ports 152. Example peripheral interfaces 144 may include a serial interface controller 154 and a parallel interface controller 156, which may be configured to facilitate communication with external devices such as input devices (e.g., keyboard, mouse, pen, voice input device, touch input device) or other peripherals (e.g., printer, scanner, etc.) via one or more I/O ports 158. An example communication device 146 may include a network controller 160, which may be arranged to facilitate communication with one or more other computing devices 162 via one or more communication ports 164 over a network communication link.
The network communication link may be one example of a communication medium. Communication media may typically be embodied by computer readable instructions, data structures, program modules, and may include any information delivery media in a modulated data signal, such as a carrier wave or other transport mechanism. A "modulated data signal" may be a signal that has one or more of its data set or changed in such a manner as to encode information in the signal. By way of non-limiting example, communication media may include wired media such as a wired network or special purpose network, and wireless media such as acoustic, radio Frequency (RF), microwave, infrared (IR) or other wireless media. The term computer readable media as used herein may include both storage media and communication media.
In the computing device 100 according to the present invention, the application 122 includes instructions for performing the file download method 200 of the present invention, which may instruct the processor 104 to perform the file download method of the present invention. Those skilled in the art will appreciate that the application 122 may include other applications 126 for implementing other functions in addition to the instructions for performing the file download method 200.
Fig. 2 shows a flow chart of a file download method 200 according to one embodiment of the invention. The method 200 is suitable for execution in a computing device, such as the computing device 100 shown in fig. 1.
As shown in fig. 2, the method 200 is for implementing a file downloading method, and starts in step S210.
In step S210, when compression download is performed on a file, the size of a target portion of the downloaded portion of the file, which is not subjected to compression processing, is monitored.
Before downloading a file, a user is generally required to select a storage directory, that is, a storage device that stores the downloaded file. In some embodiments, the storage device may be a local disk, such as a C disk, a D disk, etc. in a computing device, a relational database, such as MySQL, ACCESS, etc., or a non-relational database, such as NoSQL, etc.; the present invention is not limited to the specific deployment and configuration of the storage device, and the storage device may be a local database residing in the computing device 100, or may be a distributed database, such as HBase, disposed at a plurality of geographic locations. The computing device 100 may connect with the storage and retrieve data stored in the storage. For example, the computing device 100 may directly read the data in the storage device (when the storage device is a local database of the computing device 100), or may access the internet through a wired or wireless manner, and obtain the data in the storage device through a data interface.
According to an embodiment of the present invention, it is possible to perform normal download of a file when the remaining storage capacity of the storage device is greater than or equal to the size of the file to be downloaded, and to perform compression download of the file when the remaining storage capacity of the storage device is less than the size of the file to be downloaded. The compression downloading refers to downloading and compressing when downloading files. Specifically, when a file is downloaded, each time a part of the content is downloaded, the part of the content is compressed. In the process of downloading the file, the ordinary downloading means that only the file is downloaded without compressing the file.
Based on this, before the file is compressed and downloaded, the method further comprises the steps of: and judging whether the size of the file to be downloaded is larger than the residual storage capacity threshold of the storage device. If so, performing compression downloading on the file. For example, the file size is 100M and the remaining storage capacity threshold of the storage device is 80M. It is apparent that the file size is greater than the remaining storage capacity threshold of the storage device, then a compression download is performed on the file. In addition, when the size of the file is not greater than the remaining storage capacity threshold of the storage device, that is, when the remaining storage capacity of the storage device is sufficient, normal download is performed on the file. Of course, when the size of the file is not greater than the remaining storage capacity threshold of the storage device, compression download of the file may also be selected. The present invention is not particularly limited in this regard.
It should be noted that if the file itself is already a file of a higher compression ratio type, it is not necessary to perform compression download on the file. Therefore, before the file is downloaded in compression, it is necessary to determine whether the file is an uncompressed file. Specifically, it is determined whether the file is an uncompressed package file. If yes, the file is compressed and downloaded. If not, normal download is performed on the file. Preferably, if the file is a compressed package file, it may be further determined whether the compressed package file can be continuously compressed, that is, whether the compression mode adopted in the compression of the compressed package file is a compression mode with a high compression ratio is detected. When the file is a compressed package file, but the selected compression mode is not the compression mode with higher compression ratio, the file can be compressed and downloaded by adopting the compression mode with higher compression ratio.
Among them, there are many kinds of compression methods, for example, zip, 7-zip, lzma2, and the like. Specifically, zip: a compression method of main stream. zipx: an improved zip file is suitable for compressing multimedia data. 7-zip: a mainstream efficient compression method has an extremely high compression ratio. lzma2: a compression algorithm is improved and optimized by other algorithms, and the compression rate is higher than other algorithms in general. The types of compression methods will not be described here.
In one particular example, referring to FIG. 3, FIG. 3 shows a schematic diagram of a file download interface 300 according to one embodiment of the invention. The file download presentation interface 300 shown in fig. 3 includes at least a download file progress display area 310 and a download mode selection area 320. The download file progress display area 310 may show the download progress of the file, and the computing device may determine when to compress the downloaded portion of the file according to the size of the downloaded portion of the file. Thus, monitoring the size of a target portion of a downloaded portion of a file that has not been subjected to compression processing can be achieved by monitoring the download file progress display area 310. The download mode selection area 320 includes at least a compression download interface and a normal download interface. When the user selects compression download, the file is compressed while being downloaded. That is, in the downloading process of the file, each time a part of the content is downloaded, the downloaded part of the content is subjected to compression processing. When the user selects the normal download, only the file is downloaded. That is, in the downloading process of the file, only the file is downloaded, and compression processing is not performed thereon.
In step S220, when the size of the target portion satisfies the compression condition, the target portion is subjected to compression processing, and after the compression processing, the target portion is deleted. Wherein the size of the target portion satisfying the compression condition includes: the ratio of the size of the target part to the total size of the file is a first threshold; or the ratio of the size of the target portion to the remaining storage capacity of the storage device is a second threshold. For example, when the size of the target portion is 10% of the total size of the file, or when the size of the target portion is 30% of the remaining storage capacity of the current storage device, the target portion may be subjected to compression processing and deleted. That is, every time 10% of a file is downloaded or every time the size of an uncompressed portion of a downloaded portion of the file is 30% of the remaining storage capacity of the current storage device, the downloaded portion is subjected to compression processing and deleted. Of course, the foregoing is merely an example, and the present invention is not limited to the first threshold and the second threshold, and in a specific embodiment, those skilled in the art may set the threshold according to the actual situation.
As mentioned above, different compression modes have different compression ratios. When the remaining storage capacity of the storage device is insufficient, a compression method having a high compression ratio needs to be selected. In some embodiments, the manner in which the file is compressed is also determined based on the remaining storage capacity of the storage device and the size of the file prior to the compression process on the target portion. Specifically, if the difference between the size of the file and the remaining storage capacity of the storage device is greater than the storage threshold, the first compression mode is selected. Otherwise, a second compression mode is selected, wherein the compression ratio of the first compression mode is greater than that of the second compression mode. For example, the first compression mode is 7z, and the second compression mode is zip.7z is higher in compression rate but relatively slower in speed than zip, so in the case where the remaining storage capacity of the storage device differs greatly from the file to be downloaded, 7z is selected with a higher compression rate.
In step S230, the steps of iteratively monitoring the size of the target portion, compressing the target portion, and deleting the target portion are repeated until the file download is completed. And if the size of the last target part does not reach the compression condition, performing compression treatment on the target part. Of course, the target portion may be stored directly in the storage device without compression processing. The present invention is not particularly limited in this regard.
Thus, the compression downloading of the file is completed. Since the compression download provided in this embodiment is performed while downloading, a plurality of compression packages are obtained after the file download is completed. To obtain the complete file content, each compressed package may be decompressed. The downloaded file is obtained after decompressing each compressed package.
In a specific example, referring to fig. 4, fig. 4 shows a schematic diagram of a flow chart of a file download method 400 according to yet another embodiment of the present invention. The method 400 specifically includes:
1. clicking the create download task button.
2. A download link is entered.
3. The size of the file to be downloaded and the remaining capacity of the disk are detected.
4. If the size of the file to be downloaded is larger than the disk remaining capacity.
5. The type of file to be downloaded is detected.
6. If the type of file to be downloaded is of a type with a relatively high compression rate (e.g., the file itself is already a compressed package, and no recompression is necessary), then no compressed download is performed on the downloaded file, otherwise the user is prompted to select the "press-while-simultaneously" function.
7. After the user selects the "push-while-push" function, the software automatically selects the compression type based on the disk capacity and file size (e.g., 7z compression is selected in the case where 7z is higher in compression rate but relatively slower in speed than zip, so disk space differs significantly from the file to be downloaded).
8. The downloaded portion is detected, and each time 10% or 30% of the remaining disk space is downloaded, the downloaded portion is packed into a compressed package and removed.
9. And finally, after the downloading is completed, a plurality of compressed packages are arranged, and the complete downloaded content is obtained after decompression.
According to the file downloading method, the size of an uncompressed part in a downloaded part of a file is monitored in real time in the downloading process of the file. Whenever the size of the uncompressed part in the downloaded part of the file is monitored to meet the compression condition, it is compressed and the part of the content is deleted. That is, the present invention compresses files while downloading them. In this way, the downloaded file can be made much smaller than the actual size of the file during the file downloading process, so that the storage capacity occupied in the storage device can be saved. Therefore, the file downloading method can download the file with the residual storage capacity larger than that of the storage device, and improves the user experience.
Fig. 5 shows a schematic structural diagram of a file downloading device 500 according to an embodiment of the present invention. The apparatus 500 includes a monitoring module 510, a compression module 520, and an iteration module 530 coupled in sequence. Wherein the monitoring module 510 is adapted to monitor the size of a target portion of the downloaded portion of the file that is not subjected to the compression process when the compression download is performed on the file. The compression module 520 is adapted to perform compression processing on the target portion when the size of the target portion satisfies the compression condition, and delete the target portion after the compression processing. The iteration module 530 is adapted to iterate the steps of monitoring the size of the target portion, compressing the target portion, and deleting the target portion until the file download is completed.
It should be noted that, the working principle and flow of the file downloading device 500 provided in this embodiment are similar to those of the file downloading method 200 described above, and the description of the file downloading method 200 may be referred to for related points, which are not repeated here.
The various techniques described herein may be implemented in connection with hardware or software or, alternatively, with a combination of both. Thus, the methods and apparatus of the present invention, or certain aspects or portions of the methods and apparatus of the present invention, may take the form of program code (i.e., instructions) embodied in tangible media, such as removable hard drives, U-drives, floppy diskettes, CD-ROMs, or any other machine-readable storage medium, wherein, when the program is loaded into and executed by a machine, such as a computer, the machine becomes an apparatus for practicing the invention.
In the case of program code execution on programmable computers, the computing device will generally include a processor, a storage medium readable by the processor (including volatile and non-volatile memory and/or storage elements), at least one input device, and at least one output device. Wherein the memory is configured to store program code; the processor is configured to perform the file download method of the present invention in accordance with instructions in said program code stored in the memory.
By way of example, and not limitation, readable media comprise readable storage media and communication media. The readable storage medium stores information such as computer readable instructions, data structures, program modules, or other data. Communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media. Combinations of any of the above are also included within the scope of readable media.
In the description provided herein, algorithms and displays are not inherently related to any particular computer, virtual system, or other apparatus. Various general-purpose systems may also be used with examples of the invention. The required structure for a construction of such a system is apparent from the description above. In addition, the present invention is not directed to any particular programming language. It will be appreciated that the teachings of the present invention described herein may be implemented in a variety of programming languages, and the above description of specific languages is provided for disclosure of enablement and best mode of the present invention.
In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
It should be appreciated that in the above description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be construed as reflecting the intention that: i.e., the claimed invention requires more features than are expressly recited in each claim.
Those skilled in the art will appreciate that the modules or units or components of the devices in the examples disclosed herein may be arranged in a device as described in this embodiment, or alternatively may be located in one or more devices different from the devices in this example. The modules in the foregoing examples may be combined into one module or may be further divided into a plurality of sub-modules.
Those skilled in the art will appreciate that the modules in the apparatus of the embodiments may be adaptively changed and disposed in one or more apparatuses different from the embodiments. The modules or units or components of the embodiments may be combined into one module or unit or component and, furthermore, they may be divided into a plurality of sub-modules or sub-units or sub-components. Any combination of all features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or units of any method or apparatus so disclosed, may be used in combination, except insofar as at least some of such features and/or processes or units are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings), may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features but not others included in other embodiments, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments.
Furthermore, some of the embodiments are described herein as methods or combinations of method elements that may be implemented by a processor of a computer system or by other means of performing the functions. Thus, a processor with the necessary instructions for implementing the described method or method element forms a means for implementing the method or method element. Furthermore, the elements of the apparatus embodiments described herein are examples of the following apparatus: the apparatus is for carrying out the functions performed by the elements for carrying out the objects of the invention.
As used herein, unless otherwise specified the use of the ordinal terms "first," "second," "third," etc., to describe a general object merely denote different instances of like objects, and are not intended to imply that the objects so described must have a given order, either temporally, spatially, in ranking, or in any other manner.
While the invention has been described with respect to a limited number of embodiments, those skilled in the art, having benefit of the above description, will appreciate that other embodiments are contemplated within the scope of the invention as described herein. Furthermore, it should be noted that the language used in the specification has been principally selected for readability and instructional purposes, and may not have been selected to delineate or circumscribe the inventive subject matter. Accordingly, many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the appended claims. The disclosure of the present invention is intended to be illustrative, but not limiting, of the scope of the invention, which is defined by the appended claims.

Claims (10)

1. A file downloading method, comprising:
monitoring the size of a target part which is not subjected to compression processing in a downloaded part of the file when the file is subjected to compression downloading;
when the size of the target part meets the compression condition, carrying out compression processing on the target part, and deleting the target part after the compression processing;
repeating the steps of iteratively monitoring the size of the target part, compressing the target part and deleting the target part until the file downloading is completed.
2. The method of claim 1, wherein prior to the step of performing a compression download on the file, further comprising the step of:
judging whether the size of the file is larger than the residual storage capacity threshold value of the storage device or not;
and if the file is larger than the file, performing compression downloading on the file.
3. The method of claim 1 or 2, wherein prior to the step of performing a compression download on the file, further comprising the step of:
judging whether the file is a non-compressed package file or not;
if yes, compression downloading is carried out on the file.
4. The method of claim 2, wherein, before the step of performing compression processing on the target portion when the size of the target portion satisfies a compression condition, further comprising the step of:
and determining a compression mode of the file based on the residual storage capacity of the storage device and the size of the file.
5. The method of claim 4, wherein the determining the compression scheme of the file based on the remaining storage capacity of the storage device and the size of the file comprises:
if the difference between the size of the file and the residual storage capacity of the storage device is larger than a storage threshold, selecting a first compression mode;
otherwise, a second compression mode is selected, wherein the compression ratio of the first compression mode is greater than that of the second compression mode.
6. The method of claim 2 or 4, wherein satisfying the compression condition comprises:
the ratio of the size of the target portion to the total size of the file is a first threshold; or (b)
The ratio of the size of the target portion to the remaining storage capacity of the storage device is a second threshold.
7. The method of claim 1 or 2, wherein after the file download is completed, further comprising the steps of:
decompressing each compressed package to obtain the downloaded file.
8. A file downloading apparatus comprising:
the monitoring module is suitable for monitoring the size of a target part which is not subjected to compression processing in the downloaded part of the file when the file is subjected to compression downloading;
the compression module is suitable for compressing the target part when the size of the target part meets the compression condition, and deleting the target part after the compression;
and the iteration module is suitable for repeatedly carrying out the steps of iteratively monitoring the size of the target part, carrying out compression processing on the target part and deleting the target part until the file downloading is completed.
9. A computing device, comprising:
at least one processor; and
a memory storing program instructions, wherein the program instructions are configured to be adapted to be executed by the at least one processor, the program instructions comprising instructions for performing the method of any of claims 1-7.
10. A readable storage medium storing program instructions which, when read and executed by a computing device, cause the computing device to perform the method of any of claims 1-7.
CN202111323260.9A 2021-11-05 2021-11-05 File downloading method and device, computing equipment and storage medium Active CN114006947B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111323260.9A CN114006947B (en) 2021-11-05 2021-11-05 File downloading method and device, computing equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111323260.9A CN114006947B (en) 2021-11-05 2021-11-05 File downloading method and device, computing equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114006947A CN114006947A (en) 2022-02-01
CN114006947B true CN114006947B (en) 2024-03-01

Family

ID=79928680

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111323260.9A Active CN114006947B (en) 2021-11-05 2021-11-05 File downloading method and device, computing equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114006947B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0496149A (en) * 1990-08-09 1992-03-27 Oki Electric Ind Co Ltd File compression processing method
JPH09128276A (en) * 1995-08-28 1997-05-16 Toshiba Corp Computer system and file managing method used by the same
KR100724260B1 (en) * 2005-12-15 2007-05-31 에스케이 텔레콤주식회사 Contents division download method in a mobile terminal
JP2012014236A (en) * 2010-06-29 2012-01-19 Ntt Docomo Inc File compressing apparatus, method, and program
CN105045846A (en) * 2015-06-30 2015-11-11 广东欧珀移动通信有限公司 Image storage method and terminal

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040199740A1 (en) * 2003-04-07 2004-10-07 Nokia Corporation Adaptive and recursive compression of lossily compressible files

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0496149A (en) * 1990-08-09 1992-03-27 Oki Electric Ind Co Ltd File compression processing method
JPH09128276A (en) * 1995-08-28 1997-05-16 Toshiba Corp Computer system and file managing method used by the same
KR100724260B1 (en) * 2005-12-15 2007-05-31 에스케이 텔레콤주식회사 Contents division download method in a mobile terminal
JP2012014236A (en) * 2010-06-29 2012-01-19 Ntt Docomo Inc File compressing apparatus, method, and program
CN105045846A (en) * 2015-06-30 2015-11-11 广东欧珀移动通信有限公司 Image storage method and terminal

Also Published As

Publication number Publication date
CN114006947A (en) 2022-02-01

Similar Documents

Publication Publication Date Title
CN111782414B (en) Delay message processing method and system
JP5658283B2 (en) Application operating method, apparatus and system
US7185328B2 (en) System and method for improving a working set
US20140164487A1 (en) File saving system and method
US20090106598A1 (en) Automated Interaction Diagram Generation Using Source Code Breakpoints
US20120101996A1 (en) Apparatus and method for snapshot image segmentation
WO2017016479A1 (en) Method and apparatus for downloading file
CN111049889B (en) Static resource uploading method and device, integrated server and system
CN104461505B (en) A kind of terminal
CN105208135A (en) File transmission method and equipment
CN110874298B (en) Request data storage method and terminal equipment
CN112100136A (en) Document loading method, computing device and readable storage medium
CN110532016B (en) Version management method, version updating method and version management system
JP5217155B2 (en) File compression automatic determination method and method, and program
CN114006947B (en) File downloading method and device, computing equipment and storage medium
CN107391627B (en) Data memory occupation analysis method and device and server
CN107391257B (en) Method, device and server for estimating memory capacity required by service
CN110069217A (en) A kind of date storage method and device
CN113556408B (en) Task downloading method and device, computing equipment and storage medium
CN114070844B (en) File downloading method and device, computing equipment and storage medium
CN113449291B (en) File import method and device, computing equipment and storage medium
CN113766022A (en) Task downloading method and device, computing equipment and storage medium
KR100568999B1 (en) Dynamic file combining system and the file downloading method
CN117311853B (en) APK file processing method and device, computer equipment and storage medium
JP6107524B2 (en) Document management apparatus and document management program

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