CN114006947A - 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
CN114006947A
CN114006947A CN202111323260.9A CN202111323260A CN114006947A CN 114006947 A CN114006947 A CN 114006947A CN 202111323260 A CN202111323260 A CN 202111323260A CN 114006947 A CN114006947 A CN 114006947A
Authority
CN
China
Prior art keywords
file
compression
size
target part
downloaded
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
CN202111323260.9A
Other languages
Chinese (zh)
Other versions
CN114006947B (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

Images

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]

Abstract

The invention discloses a file downloading method, a file downloading device, a computing device and a readable storage medium. The file downloading method of the invention comprises the following steps: when the file is compressed and downloaded, monitoring the size of a target part which is not compressed in the downloaded part of the file; when the size of the target part meets the compression condition, performing compression processing on the target part, and deleting the target part after the compression processing; and 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 finished. According to the file downloading method, when the file is downloaded, the file is downloaded and compressed at the same time, 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 the file larger than the residual storage capacity of the storage device can be downloaded by a user.

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 file downloading method, device, computing device, and storage medium.
Background
Based on the problem that the downloading of the file is failed due to insufficient storage capacity, the existing various downloading tools generally detect the residual storage capacity of the storage device before downloading the file, and when the size of the file to be downloaded is larger than the residual storage capacity of the storage device, the user is not allowed to create the downloading task. In this case, in order to download the file, the user generally replaces the storage device or deletes a current portion of the file in the storage device, which is a poor experience.
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: when the file is compressed and downloaded, monitoring the size of a target part which is not compressed in the downloaded part of the file; when the size of the target part meets the compression condition, performing compression processing on the target part, and deleting the target part after the compression processing; and 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 finished.
Optionally, in the file downloading method according to the present invention, before the step of performing compressed downloading on the file, the method further includes the steps of: judging whether the size of the file is larger than a residual storage capacity threshold value of the storage device or not; and if so, performing compression downloading on the file.
Optionally, in the file downloading method according to the present invention, before the step of performing compressed 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, compression downloading is carried out on the file.
Optionally, in the file downloading method according to the present invention, before the step of performing compression processing on the target portion when the size of the target portion satisfies the compression condition, the method further includes the steps 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 a compression manner 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 a storage threshold value, selecting a first compression mode; otherwise, selecting a second compression mode, wherein the compression ratio of the first compression mode is larger than that of the second compression mode.
Optionally, in the file downloading method according to the present invention, wherein the satisfying of the compression condition includes: the ratio of the size of the target part to the total size of the file is a first threshold value; 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: and decompressing each compressed packet to obtain the downloaded file.
According to still another aspect of the present invention, there is provided a file downloading apparatus including: the monitoring module is suitable for monitoring the size of a target part which is not compressed in a downloaded part of the file when the file is compressed and downloaded; 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 processing; and the iteration module is suitable for 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 finished.
According to yet another aspect of the 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 executed by the at least one processor, the program instructions comprising instructions for performing a file download method according to the present invention.
According to still another aspect of the present invention, there is provided a readable storage medium storing program instructions which, when read and executed by a computing device, cause the computing device to execute a file download method according to the present invention.
According to the file downloading method, the size of the uncompressed part in the downloaded part of the file is monitored in real time in the downloading process of the file. And when the size of the uncompressed part in the downloaded part of the file is monitored to meet the compression condition, compressing the uncompressed part of the file, and deleting the content of the uncompressed part. That is, the present invention downloads a file while compressing the file. Therefore, the downloaded file can be far smaller than the actual size of the file in the file downloading process, so that the storage capacity occupied by the file in the storage device can be saved. In addition, the file downloading method can download files with the storage capacity larger than the residual storage capacity of the storage device, and improves the user experience.
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 are indicative of various ways in which the principles disclosed herein may be practiced, and all aspects and equivalents thereof are intended to be within the scope of the claimed subject matter. The above and other objects, features and advantages of the present disclosure will become more apparent from the following detailed description read in conjunction with the accompanying drawings. Throughout this disclosure, like reference numerals generally refer to like parts or elements.
FIG. 1 shows a block diagram of a computing device 100, according to one embodiment of the invention;
FIG. 2 illustrates a flow diagram of a file download method 200 according to one embodiment of the invention;
FIG. 3 illustrates a schematic diagram of a file download interface 300, according to one embodiment of the present 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 a file can be downloaded successfully, the existing downloading tool detects the residual storage capacity of a storage device before downloading, and when the size of the downloaded file is larger than the residual storage capacity of the storage device, a downloading task is not allowed to be created. If the user wants to insist on downloading, only the content in the storage device can be deleted, which is often not the solution required by the user.
In order to solve the problems in the prior art, the invention provides a scheme. Specifically, one embodiment of the invention provides a file downloading method, which can be executed in a computing device. FIG. 1 shows 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 thereof 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 does not limit 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. A 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 Signal Processor (DSP), or any combination thereof. The processor 104 may include one or more levels of cache, such as a level one cache 110 and a level two 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. The physical memory in the computing device is usually referred to as a volatile memory RAM, and data in the disk needs to be loaded into the physical memory to be read by the processor 104. System memory 106 may include an operating system 120, one or more applications 122, and program data 124. In some implementations, the application 122 can be arranged to execute instructions on an operating system with program data 124 by one or more processors 104. Operating system 120 may be, for example, Linux, Windows, etc., which includes program instructions for handling basic system services and performing hardware dependent tasks. The application 122 includes program instructions for implementing various user-desired functions, and the application 122 may be, for example, but not limited to, a browser, instant messenger, a software development tool (e.g., an integrated development environment IDE, a compiler, etc.), and the like. When the application 122 is installed into the computing device 100, a driver module may be added to the operating system 120.
When the computing device 100 is started, the processor 104 reads program instructions of the operating system 120 from the system memory 106 and executes them. The application 122 runs on top of the operating system 120, utilizing the operating system 120 and interfaces provided by the underlying hardware to implement various user-desired functions. When the 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.
The computing device 100 also includes a storage device 132, the storage device 132 including removable storage 136 and non-removable storage 138, the removable storage 136 and the non-removable storage 138 each connected to the 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 the basic configuration 102 via the 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 communications with one or more other computing devices 162 over a network communication link via one or more communication ports 164.
A 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, such as carrier waves or other transport mechanisms, in a modulated data signal. A "modulated data signal" may be a signal that has one or more of its data set or its changes made 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 private-wired network, and various 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 a 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. It will be appreciated by those skilled in the art that the application 122 may include other applications 126 for implementing other functions in addition to instructions for performing the file download method 200.
Fig. 2 shows a flow diagram 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 intended to implement a file download method, starting at step S210.
In step S210, when compression downloading is performed on a file, the size of a target portion of the downloaded portion of the file that is not subjected to compression processing is monitored.
Before starting to download a file, a user is generally required to select a storage directory, that is, a storage device for storing the downloaded file. In some embodiments, the storage device may be a local disk, such as a C disk, a D disk, etc. in the computing device, or may be a relational database, such as MySQL, ACCESS, etc., or may be a non-relational database, such as NoSQL, etc.; the storage device may also be a local database residing in the computing device 100, or may be disposed at a plurality of geographic locations as a distributed database, such as HBase, in short, the storage device is used for storing data, and the present invention does not limit the specific deployment and configuration of the storage device. The computing device 100 may connect to a storage device and retrieve data stored in the storage device. 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 in a wired or wireless manner and obtain the data in the storage device through the data interface.
According to one embodiment of the present invention, the file can be normally downloaded when the remaining storage capacity of the storage device is greater than or equal to the size of the file to be downloaded, and the file can be compressed and downloaded when the remaining storage capacity of the storage device is less than the size of the file to be downloaded. The compression download means that when a file is downloaded, the file is compressed while being downloaded. Specifically, when a file is downloaded, a part of the content is compressed every time the part of the content is downloaded. And the ordinary downloading means that only the file is downloaded without compressing the file in the process of downloading the file.
Based on this, before the compressed downloading of the file, the method further comprises the following steps: and judging whether the size of the file to be downloaded is larger than the residual storage capacity threshold value of the storage device. And if so, performing compression downloading on the file. For example, the size of the file is 100M, and the threshold of the remaining storage capacity of the storage device is 80M. Obviously, the size of the file is larger than the threshold value of the residual storage capacity of the storage device, and then the compressed downloading is carried out on the file. In addition, when the size of the file is not larger than the threshold value of the remaining storage capacity of the storage device, that is, the remaining storage capacity of the storage device is sufficient, the ordinary download is performed on the file. Of course, when the size of the file is not larger than the threshold of the remaining storage capacity of the storage device, the compressed downloading of the file can also be selected. The present invention is not particularly limited.
It should be noted that if the file itself is already a file of a type having a higher compression ratio, it is not necessary to perform compression downloading on the file. Therefore, before the file is compressed and downloaded, 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, compression downloading is carried out on the file. If not, the ordinary downloading is executed to the file. Preferably, if the file is a compressed package file, it may further be determined whether the compressed package file can be compressed continuously, that is, whether the compression method adopted in the compression of the compressed package file is a compression method 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.
There are many compression methods, for example, zip, zipx, 7-zip, lzma2, and the like. Specifically, zip: a mainstream compression method. zipx: an improved zip file is suitable for compressing multimedia data. 7-zip: a mainstream efficient compression method, which has extremely high compression ratio. lzma 2: a compression algorithm modified and optimized by other algorithms typically has a higher compression rate than the other algorithms. The types of compression methods are not described in detail herein.
In a specific 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 at least includes a download file progress display area 310 and a download mode selection area 320. The download progress display area 310 may display 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. Accordingly, monitoring the size of the target portion of the downloaded portion of the file that is not subject to the compression process 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 general download interface. When the user selects compression downloading, 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 compressed. When the user selects normal download, then only the file is downloaded. That is, in the downloading process of the file, only the file is downloaded without performing the compression process.
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 value; 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 compressed and deleted. That is, every 10% of the file is downloaded or every time the size of the uncompressed part of the downloaded part of the file occupies 30% of the remaining storage capacity of the current storage device, the downloaded part is compressed and deleted. Of course, the above is only an example, the present invention is not limited to the sizes of the first threshold and the second threshold, and in a specific embodiment, a person skilled in the art may set the sizes according to actual situations.
As mentioned above, the compression ratio varies between different compression methods. 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, before the target portion is compressed, the compression mode of the file is determined based on the remaining storage capacity of the storage device and the size of the file. 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, selecting a second compression mode, wherein the compression ratio of the first compression mode is larger than that of the second compression mode. For example, the first compression method is 7z, and the second compression method is zip. 7z has a higher compression rate but a relatively slower speed than zip, and therefore, in the case where the remaining storage capacity of the storage device is different from the file to be downloaded, 7z having a higher compression rate is selected.
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. If the size of the target part at the last time does not reach the compression condition, the target part is also compressed. Of course, the target portion may be stored in the storage device without being compressed. The present invention is not particularly limited.
At this point, the compressed downloading of the file is completed. Since the compression and downloading provided by the embodiment is performed while downloading, a plurality of compression packages are obtained after the file downloading is completed. Each compressed packet may be decompressed in order to obtain the complete file content. The files obtained after decompressing each compressed packet are downloaded.
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 invention. The method 400 specifically includes:
1. click the create download task button.
2. A download link is entered.
3. And detecting the size of the file to be downloaded and the residual capacity of the disk.
4. If the size of the file to be downloaded is larger than the remaining capacity of the disk.
5. The type of the file to be downloaded is detected.
6. If the type of the file to be downloaded is a type with a high compression rate (for example, if the file itself is already a compressed packet, then recompression is not necessary), the compressed downloading is not performed on the downloaded file, otherwise, the user is prompted to select a "side-by-side compression" function.
7. After the user selects the "edge-to-edge compression" function, the software automatically selects the compression type according to the disk capacity and the file size (for example, 7z compression is selected when the compression rate is higher but the speed is relatively slower than zip, so that the disk space is different from the file to be downloaded by a large amount).
8. The downloaded portion is detected, and whenever 10% of the remaining disk space is used or 30% is used, the downloaded portion is broken into a compressed packet and discarded.
9. And finally, after the downloading is finished, a plurality of compressed packets are provided, and the complete downloaded content is obtained after the compressed packets are decompressed.
According to the file downloading method, the size of the uncompressed part in the downloaded part of the file is monitored in real time in the downloading process of the file. And when the size of the uncompressed part in the downloaded part of the file is monitored to meet the compression condition, compressing the uncompressed part of the file, and deleting the content of the uncompressed part. That is, the present invention downloads a file while compressing the file. Therefore, the downloaded file can be far smaller than the actual size of the file in the file downloading process, so that the storage capacity occupied by the file in the storage device can be saved. Therefore, the file downloading method can download the files with the storage capacity larger than the residual storage capacity 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. The monitoring module 510 is adapted to monitor the size of a target portion of the downloaded portion of the file that is not compressed when performing compression downloading 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 repeat the steps of iteratively monitoring the size of the target portion, compressing the target portion, and deleting the target portion until the file download is complete.
It should be noted that the working principle and the flow of the file downloading device 500 provided in this embodiment are similar to those of the file downloading method 200, and for the relevant points, reference may be made to the description of the file downloading method 200, which is not repeated herein.
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 thereof, may take the form of program code (i.e., instructions) embodied in tangible media, such as removable hard drives, U.S. disks, floppy disks, 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 execute the file download method of the present invention according to instructions in the program code stored in the memory.
By way of example, and not limitation, readable media may comprise readable storage media and communication media. Readable storage media store 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 this invention. The required structure for constructing such a system will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, 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 foregoing 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 interpreted as reflecting an intention that: that the invention as claimed 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 multiple sub-modules.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. 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. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements 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 included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments.
Furthermore, some of the described embodiments are described herein as a method or combination of method elements that can be performed by a processor of a computer system or by other means of performing the described functions. A processor having the necessary instructions for carrying out the method or method elements thus forms a means for carrying out the method or method elements. Further, the elements of the apparatus embodiments described herein are examples of the following apparatus: the apparatus is used to implement the functions performed by the elements for the purpose of carrying out the invention.
As used herein, unless otherwise specified the use of the ordinal adjectives "first", "second", "third", etc., to describe a common object, merely indicate that different instances of like objects are being referred to, and are not intended to imply that the objects so described must be in a given sequence, 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 this description, will appreciate that other embodiments can be devised which do not depart from 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 present invention has been disclosed in an illustrative rather than a restrictive sense, and the scope of the present invention is defined by the appended claims.

Claims (10)

1. A method of file download, comprising:
when the file is compressed and downloaded, monitoring the size of a target part which is not compressed in the downloaded part of the file;
when the size of the target part meets the compression condition, performing compression processing on the target part, and deleting the target part after the compression processing;
and 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 finished.
2. The method of claim 1, wherein prior to the step of performing a compressed download of the file, further comprising the steps of:
judging whether the size of the file is larger than a residual storage capacity threshold value of a storage device or not;
and if so, performing compression downloading on the file.
3. The method of claim 1 or 2, wherein before the step of performing a compressed download of the file, further comprising the step of:
judging whether the file is a non-compressed package file or not;
and if so, performing compression downloading on the file.
4. The method according to claim 2, wherein, before the step of compressing the target portion when the size of the target portion satisfies the compression condition, further comprising the steps 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 a compression of the file based on the remaining storage capacity of the storage device and the size of the file comprises:
if the difference value between the size of the file and the residual storage capacity of the storage device is larger than a storage threshold value, selecting a first compression mode;
otherwise, selecting a second compression mode, wherein the compression ratio of the first compression mode is larger than that of the second compression mode.
6. The method of any one of claims 1-5, wherein satisfying a compression condition comprises:
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.
7. The method according to any one of claims 1-6, wherein after the file download is completed, further comprising the steps of:
and decompressing each compressed packet to obtain the downloaded file.
8. A file download 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 compressed and downloaded;
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 processing;
and the iteration module is suitable for 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 finished.
9. A computing device, comprising:
at least one processor; and
a memory storing program instructions configured for execution 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 that, 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 true CN114006947A (en) 2022-02-01
CN114006947B 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 (6)

* 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
US20040199740A1 (en) * 2003-04-07 2004-10-07 Nokia Corporation Adaptive and recursive compression of lossily compressible files
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

Patent Citations (6)

* 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
US20040199740A1 (en) * 2003-04-07 2004-10-07 Nokia Corporation Adaptive and recursive compression of lossily compressible files
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
CN114006947B (en) 2024-03-01

Similar Documents

Publication Publication Date Title
US8131973B2 (en) Priority determination when dumping files
US20120101996A1 (en) Apparatus and method for snapshot image segmentation
CN112100136A (en) Document loading method, computing device and readable storage medium
CN106325896B (en) Shared function library file processing method and device for installation package
CN110874298B (en) Request data storage method and terminal equipment
CN110069217A (en) A kind of date storage method and device
CN107391627B (en) Data memory occupation analysis method and device and server
CN114006947B (en) File downloading method and device, computing equipment and storage medium
CN107391257B (en) Method, device and server for estimating memory capacity required by service
CN113204385A (en) Plug-in loading method and device, computing equipment and readable storage medium
CN113342452A (en) Window display method, computing device and readable storage medium
CN113556408B (en) Task downloading method and device, computing equipment and storage medium
CN113449291B (en) File import method and device, computing equipment and storage medium
CN106302715B (en) File management method, device and system
CN113766022A (en) Task downloading method and device, computing equipment and storage medium
CN111475220B (en) Cold start method and device, electronic equipment and computer storage medium
CN108846280B (en) Application file shelling method and device
CN113792013B (en) Retrieval method based on attachment content in mail, computing equipment and storage medium
CN114138285B (en) Application deployment method, computing device and readable storage medium
CN114070844A (en) File downloading method and device, computing equipment and storage medium
CN111897741B (en) Application software detection method and computing device
CN111263936A (en) Electronic terminal and junk file processing method thereof
CN117311853B (en) APK file processing method and device, computer equipment and storage medium
CN114417199A (en) Label aggregation method, computing device and readable storage medium
CN106055394A (en) Application unfreezing method and system

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