CN108304534A - File management method, terminal and computer readable storage medium - Google Patents

File management method, terminal and computer readable storage medium Download PDF

Info

Publication number
CN108304534A
CN108304534A CN201810087288.9A CN201810087288A CN108304534A CN 108304534 A CN108304534 A CN 108304534A CN 201810087288 A CN201810087288 A CN 201810087288A CN 108304534 A CN108304534 A CN 108304534A
Authority
CN
China
Prior art keywords
file
pending
compressed
terminal
compression
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810087288.9A
Other languages
Chinese (zh)
Inventor
朱庆伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nubia Technology Co Ltd
Original Assignee
Nubia 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 Nubia Technology Co Ltd filed Critical Nubia Technology Co Ltd
Priority to CN201810087288.9A priority Critical patent/CN108304534A/en
Publication of CN108304534A publication Critical patent/CN108304534A/en
Pending legal-status Critical Current

Links

Classifications

    • 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/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • G06F16/162Delete operations
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a kind of file management method, terminal and computer readable storage medium, this method includes uncompressed file, at least one of compressed file by obtaining pending file, the pending file from terminal local and/or server;It obtains outside to observe conditions to pending file, and is observed conditions according to this and judge whether pending file meets contractive condition;If so, then carrying out compression processing according to default reduced rule to pending file, to generate corresponding compressed file, and the compressed file is stored, and deletes pending file;By the preservation processing to the compressed file, the storage of the related content of the pending file is realized;The invention also discloses a kind of terminal and computer readable storage mediums, by implementing said program, due to deleting corresponding pending file, reduce the occupancy to terminal storage space to a certain extent.

Description

File management method, terminal and computer readable storage medium
Technical field
The present invention relates to field of terminal technology, can more specifically to a kind of file management method, terminal and computer Read storage medium.
Background technology
Currently, terminal receive corresponding file need storage when, typically directly this document is stored, without Any processing can be carried out to this document, be not associated with the actual use situation of user, it is not intelligent to the mode of document storage management.
Invention content
The technical problem to be solved in the present invention is:A kind of new file management mode is provided, user can be based on to text Observing conditions for part is managed storage, thus provides a kind of file management method, terminal and computer readable storage medium.
The present invention provides a kind of file management method, and the file management method includes:
Obtain pending file from terminal local and/or server, the pending file includes uncompressed file, At least one of compressed file;
It obtains outside to observe conditions to the pending file, and the pending text is judged according to described observe conditions Whether part meets contractive condition;
If so, then compression processing is carried out according to default reduced rule to the pending file, to generate corresponding compression File, and the compressed file is stored, and delete the pending file.
Optionally, described to observe conditions including checking frequency, it observes conditions described in the basis and judges the pending text The step of whether part meets contractive condition include:
Check that frequency is compared with default mapping table by described, the default corresponding table includes checking frequency and pressure The correspondence of contracting situation, the compression situation include being compressed without compression and according to default compression ratio, determining and institute It states and checks the corresponding targeted compression situation of frequency, in the current compression for judging the targeted compression situation and the pending file Situation mismatches, and the targeted compression situation is described when being compressed according to default compression ratio, and determination meets the compression Condition.
Optionally, described before the step of obtaining pending file in terminal local and/or server, further include:
Receive the original document stored;
Alternatively, being reached to the pre-set time interval of the terminal.
Optionally, the default reduced rule includes:
Compression processing is carried out to the pending file based on the default compression ratio.
Optionally, the file management method further includes:
Judging current compression situation mismatch of the targeted compression situation with the pending file, and the target Compress situation be it is described without compression when, detect whether the pending file is compressed file, if so, then to it is described Compressed file is decompressed to obtain decompressing files, and is stored to the decompressing files, and deletes the pending text Part, if not, not handling the pending file;
When judging that the targeted compression situation is matched with the current compression situation of the pending file, then not to described Pending file is handled.
Optionally, corresponding to generate according to default reduced rule progress compression processing to the pending file described When compressed file, further include:
Preview file corresponding with the pending file is generated, the preview file is including at least the pending file File name;
After the generation compressed file with the preview file, the file management method further includes:
It receives outside and instruction is checked to the initial of the compressed file, instructed to preview text according to initial check Part is showed so that user checks;And when determining that meeting depth checks condition, obtain the compressed file and decompressed, and File after decompression is presented to user to check.
Optionally, the determination meets the step of depth checks condition and includes:
When receiving outside and check instruction to the depth of the compressed file, or detecting the stop of the preview file It is long when reaching default stay time, it determines and described meet the depth and check condition.
Optionally, described that compression processing is carried out to generate corresponding pressure according to default reduced rule to the pending file The step of contracting file includes:
When the preview file further includes the partial content information of the pending file, extraction removes the partial content Other content information outside information, and the other content information is compressed to generate according to the default reduced rule State compressed file.
Further, the present invention also provides a kind of terminal, the terminal includes processor, memory and communication bus;
The communication bus is for realizing the connection communication between processor and memory;
The processor is for executing one or more program stored in memory, to realize described in any one as above File management method the step of.
Further, the present invention also provides a kind of computer readable storage medium, the computer readable storage mediums It is stored with one or more program, one or more of programs can be executed by one or more processor, to realize The step of any one of them file management method as above.
Advantageous effect
A kind of file management method of present invention offer, terminal and computer readable storage medium, this document management method packet It includes and obtains pending file from terminal local and/or server, the pending file includes uncompressed file, compressed text At least one of part;It obtains outside to observe conditions to pending file, and is observed conditions according to this and judge pending file Whether contractive condition is met;If so, then compression processing is carried out according to default reduced rule to the pending file, to generate correspondence Compressed file, and the compressed file is stored, and delete pending file;At the preservation to the compressed file Reason, realizes the storage of the associated file content of the pending file, due to deleting corresponding pending file, certain Reduce the occupancy to terminal storage space in degree.
Description of the drawings
Present invention will be further explained below with reference to the attached drawings and examples, in attached drawing:
The hardware architecture diagram of Fig. 1 optional mobile terminals of each embodiment one to realize the present invention;
Fig. 2 is the file management method flow diagram that first embodiment of the invention provides;
Fig. 3 is the file management method flow diagram that second embodiment of the invention provides;
Fig. 4 is the terminal interface display schematic diagram one that second embodiment of the invention provides;
Fig. 5 is the terminal interface display schematic diagram two that second embodiment of the invention provides;
Fig. 6 is the terminal interface display schematic diagram three that second embodiment of the invention provides;
Fig. 7 is the structural schematic diagram for the terminal that third embodiment of the invention provides.
Specific implementation mode
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
In subsequent description, using for indicating that the suffix of such as " module ", " component " or " unit " of element is only The explanation for being conducive to the present invention, itself does not have a specific meaning.Therefore, " module ", " component " or " unit " can mix Ground uses.
Terminal can be implemented in a variety of manners.For example, terminal described in the present invention may include such as mobile phone, tablet Computer, laptop, palm PC, personal digital assistant (Personal Digital Assistant, PDA), portable The shiftings such as media player (Portable Media Player, PMP), navigation device, wearable device, Intelligent bracelet, pedometer The fixed terminals such as dynamic terminal, and number TV, desktop computer.
It will be illustrated by taking mobile terminal as an example in subsequent descriptions, it will be appreciated by those skilled in the art that in addition to special Except element for moving purpose, construction according to the embodiment of the present invention can also apply to the terminal of fixed type.
Referring to Fig. 1, a kind of hardware architecture diagram of its mobile terminal of each embodiment to realize the present invention, the shifting Moving terminal 100 may include:RF (Radio Frequency, radio frequency) unit 101, WiFi module 102, audio output unit 103, A/V (audio/video) input unit 104, sensor 105, display unit 106, user input unit 107, interface unit 108, the components such as memory 109, processor 110 and power supply 111.It will be understood by those skilled in the art that shown in Fig. 1 Mobile terminal structure does not constitute the restriction to mobile terminal, and mobile terminal may include components more more or fewer than diagram, Either combine certain components or different components arrangement.
The all parts of mobile terminal are specifically introduced with reference to Fig. 1:
Radio frequency unit 101 can be used for receiving and sending messages or communication process in, signal sends and receivees, specifically, by base station Downlink information receive after, to processor 110 handle;In addition, the data of uplink are sent to base station.In general, radio frequency unit 101 Including but not limited to antenna, at least one amplifier, transceiver, coupler, low-noise amplifier, duplexer etc..In addition, penetrating Frequency unit 101 can also be communicated with network and other equipment by radio communication.Above-mentioned wireless communication can use any communication Standard or agreement, including but not limited to GSM (Global System of Mobile communication, global system for mobile telecommunications System), GPRS (General Packet Radio Service, general packet radio service), CDMA2000 (Code Division Multiple Access 2000, CDMA 2000), WCDMA (Wideband Code Division Multiple Access, wideband code division multiple access), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access, TD SDMA), FDD-LTE (Frequency Division Duplexing-Long Term Evolution, frequency division duplex long term evolution) and TDD-LTE (Time Division Duplexing-Long Term Evolution, time division duplex long term evolution) etc..
WiFi belongs to short range wireless transmission technology, and mobile terminal can help user to receive and dispatch electricity by WiFi module 102 Sub- mail, browsing webpage and access streaming video etc., it has provided wireless broadband internet to the user and has accessed.Although Fig. 1 shows Go out WiFi module 102, but it is understood that, and it is not belonging to must be configured into for mobile terminal, it completely can be according to need It to be omitted in the range for the essence for not changing invention.
Audio output unit 103 can be in call signal reception pattern, call mode, record mould in mobile terminal 100 When under the isotypes such as formula, speech recognition mode, broadcast reception mode, it is that radio frequency unit 101 or WiFi module 102 are received or The audio data stored in memory 109 is converted into audio signal and exports to be sound.Moreover, audio output unit 103 The relevant audio output of specific function executed with mobile terminal 100 can also be provided (for example, call signal receives sound, disappears Breath receives sound etc.).Audio output unit 103 may include loud speaker, buzzer etc..
A/V input units 104 are for receiving audio or video signal.A/V input units 104 may include graphics processor (Graphics Processing Unit, GPU) 1041 and microphone 1042, graphics processor 1041 is in video acquisition mode Or the image data of the static images or video obtained by image capture apparatus (such as camera) in image capture mode carries out Reason.Treated, and picture frame may be displayed on display unit 106.Through graphics processor 1041, treated that picture frame can be deposited Storage is sent in memory 109 (or other storage mediums) or via radio frequency unit 101 or WiFi module 102.Mike Wind 1042 can connect in telephone calling model, logging mode, speech recognition mode etc. operational mode via microphone 1042 Quiet down sound (audio data), and can be audio data by such acoustic processing.Audio that treated (voice) data can To be converted to the format output that can be sent to mobile communication base station via radio frequency unit 101 in the case of telephone calling model. Microphone 1042 can implement various types of noises elimination (or inhibition) algorithms and send and receive sound to eliminate (or inhibition) The noise generated during frequency signal or interference.
Mobile terminal 100 further includes at least one sensor 105, such as optical sensor, motion sensor and other biographies Sensor.Specifically, optical sensor includes ambient light sensor and proximity sensor, wherein ambient light sensor can be according to environment The light and shade of light adjusts the brightness of display panel 1061, and proximity sensor can close when mobile terminal 100 is moved in one's ear Display panel 1061 and/or backlight.As a kind of motion sensor, accelerometer sensor can detect in all directions (general For three axis) size of acceleration, size and the direction of gravity are can detect that when static, can be used to identify the application of mobile phone posture (such as horizontal/vertical screen switching, dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, percussion) etc.; The fingerprint sensor that can also configure as mobile phone, pressure sensor, iris sensor, molecule sensor, gyroscope, barometer, The other sensors such as hygrometer, thermometer, infrared sensor, details are not described herein.
Display unit 106 is for showing information input by user or being supplied to the information of user.Display unit 106 can wrap Display panel 1061 is included, liquid crystal display (Liquid Crystal Display, LCD), Organic Light Emitting Diode may be used Forms such as (Organic Light-Emitting Diode, OLED) configure display panel 1061.
User input unit 107 can be used for receiving the number or character information of input, and generate the use with mobile terminal Family is arranged and the related key signals input of function control.Specifically, user input unit 107 may include touch panel 1071 with And other input equipments 1072.Touch panel 1071, also referred to as touch screen collect user on it or neighbouring touch operation (for example user uses any suitable objects or attachment such as finger, stylus on touch panel 1071 or in touch panel 1071 Neighbouring operation), and corresponding attachment device is driven according to preset formula.Touch panel 1071 may include touch detection Two parts of device and touch controller.Wherein, the touch orientation of touch detecting apparatus detection user, and detect touch operation band The signal come, transmits a signal to touch controller;Touch controller receives touch information from touch detecting apparatus, and by it It is converted into contact coordinate, then gives processor 110, and order that processor 110 is sent can be received and executed.In addition, can To realize touch panel 1071 using multiple types such as resistance-type, condenser type, infrared ray and surface acoustic waves.In addition to touch panel 1071, user input unit 107 can also include other input equipments 1072.Specifically, other input equipments 1072 can wrap It includes but is not limited in physical keyboard, function key (such as volume control button, switch key etc.), trace ball, mouse, operating lever etc. It is one or more, do not limit herein specifically.
Further, touch panel 1071 can cover display panel 1061, when touch panel 1071 detect on it or After neighbouring touch operation, processor 110 is sent to determine the type of touch event, is followed by subsequent processing device 110 according to touch thing The type of part provides corresponding visual output on display panel 1061.Although in Fig. 1, touch panel 1071 and display panel 1061 be to realize the function that outputs and inputs of mobile terminal as two independent components, but in certain embodiments, can The function that outputs and inputs of mobile terminal is realized so that touch panel 1071 and display panel 1061 is integrated, is not done herein specifically It limits.
Interface unit 108 be used as at least one external device (ED) connect with mobile terminal 100 can by interface.For example, External device (ED) may include wired or wireless headphone port, external power supply (or battery charger) port, wired or nothing Line data port, memory card port, the port for connecting the device with identification module, audio input/output (I/O) end Mouth, video i/o port, ear port etc..Interface unit 108 can be used for receiving the input from external device (ED) (for example, number It is believed that breath, electric power etc.) and the input received is transferred to one or more elements in mobile terminal 100 or can be with For the transmission data between mobile terminal 100 and external device (ED).
Memory 109 can be used for storing software program and various data.Memory 109 can include mainly storing program area And storage data field, wherein storing program area can storage program area, application program (such as the sound needed at least one function Sound playing function, image player function etc.) etc.;Storage data field can store according to mobile phone use created data (such as Audio data, phone directory etc.) etc..In addition, memory 109 may include high-speed random access memory, can also include non-easy The property lost memory, a for example, at least disk memory, flush memory device or other volatile solid-state parts.
Processor 110 is the control centre of mobile terminal, utilizes each of various interfaces and the entire mobile terminal of connection A part by running or execute the software program and/or module that are stored in memory 109, and calls and is stored in storage Data in device 109 execute the various functions and processing data of mobile terminal, to carry out integral monitoring to mobile terminal.Place Reason device 110 may include one or more processing units;Preferably, processor 110 can integrate application processor and modulatedemodulate is mediated Manage device, wherein the main processing operation system of application processor, user interface and application program etc., modem processor is main Processing wireless communication.It is understood that above-mentioned modem processor can not also be integrated into processor 110.
Mobile terminal 100 can also include the power supply 111 (such as battery) powered to all parts, it is preferred that power supply 111 Can be logically contiguous by power-supply management system and processor 110, to realize management charging by power-supply management system, put The functions such as electricity and power managed.
Although Fig. 1 is not shown, mobile terminal 100 can also be including bluetooth module etc., and details are not described herein.
Based on above-mentioned mobile terminal hardware configuration, each embodiment of the method for the present invention is proposed.
First embodiment
It is directly to be stored to the file received to solve existing file storage management mode, does not carry out any place Reason is also not associated with user and observes conditions to relative file, and managing the mode of storage file cannot observe conditions spirit according to user The problem of adjustment living, the present embodiment provides a kind of file management methods, are deposited after mainly being compressed to corresponding pending file Storage, compared with not compressing the mode directly stored, can reduce the occupancy to terminal storage space, ask to a certain extent Referring to Fig. 2, Fig. 2 is file management method basic flow chart provided in this embodiment, and this document management method includes the following steps:
S201, pending file is obtained from terminal local and/or server, the pending file includes uncompressed text Part, at least one of compressed file.
Terminal can obtain pending file from local, can also be obtained from the server for being stored with user file accordingly Take pending file, wherein pending file can refer to the uncompressed processing without compression processing, such as document, not Its format may be the formats such as " .doc ", " .docx ", " .xlsx ", " .ppt ", " .pdf ", " .txt " when compression;For picture, Its format may be the formats such as " .jpg ", " .gif ", " .bmp " when uncompressed;For music file, its format can when uncompressed Can be the formats such as " .MP3 ", " .WMA ";For video file, when uncompressed its format may be " .avi ", " .mp4 ", The formats such as " .3gp ", " .mkv ";No longer illustrate one by one herein, it should be understood that unpressed file format is not limited to above-mentioned lattice Formula.
Pending file can also be including compressed file in the present embodiment.
In the present embodiment, terminal dynamically can also obtain pending file from local and/or server, specifically, right Terminal pre-sets a time interval, and terminal can be according to the pre-set time interval dynamically from local and/or service Device obtains pending file, such as obtains pending file from terminal local and/or server at interval of 1 day, at interval of 1 week etc. It is handled.Specifically, the pre-set time interval can be flexibly arranged according to actual conditions.
Terminal can also be when receiving the original document stored, and triggering terminal is from local and/or server Obtain pending file.Such as download song needs in users from networks and store in terminal local, terminal just obtains at this time Corresponding pending file is taken to be handled.
In some instances, terminal can also be detected in the initial storage of all files stored on local, server Between, for the file of the not up to corresponding time interval being arranged of the time interval between initial storage time and current time, then It can continue to be stored with the current format of this document, namely compression processing not carried out to it, because this document is that user is rigid It being stored on terminal or server soon, user may need often to check to the file user of this kind of rigid storage soon, because This can will not be handled as pending file, and when user needs to check, terminal directly shows the original document It checks, is also avoided after compressing it to user, user, which often checks, causes terminal to need multiple decompression could be by corresponding document Content is presented to user and checks cumbersome, and user is facilitated to check.Only between initial storage time and current time when Between interval reach the file of the time interval being accordingly arranged, terminal just can be selected therefrom at corresponding pending file Reason, for the longer file of this kind of storage time, user may not often check, this programme can be to the phase in this class file It answers pending file to be handled, to be more bonded the actual use demand of user, can also to a certain extent reduce to end Hold the occupancy of memory space.
S202, acquisition outside observe conditions to the pending file.
For the corresponding pending file got, terminal can obtain the case where each pending file is checked by user, Such as to the pending file check frequency (that is to say the number of checking in a period of time, for example, checked in one day 2 times, one Checked in week 2 hours), it determines whether to compress the compressed file.If user checks the frequency of the pending file Rate is high, such as has checked within one day 5 times, then may be not suitable for carrying out compression processing to it, if user checks the pending file Frequency it is very low, such as do not check within one week yet it is primary, then then compression processing can be carried out to it, to reduce the pending text Occupancy of the part to terminal storage space, it should be understood that data volume would generally reduce after compression, therefore can reduce to terminal storage The occupancy in space.
It should be understood that checking that frequency can also be checked by checking number, checking in the characterizations such as duration, such as one day Checked in 2 times, one week 2 hours, essence with check that frequency should be identical.
It should be noted that terminal obtains observing conditions for corresponding pending file, need to be based on certain period of time, example Such as checking for the pending file is obtained out of entire period of initial storage moment to the current time of the pending file Situation, can also be based on other periods, such as it is above-mentioned to the pre-set time interval of terminal, such as the time interval It it is 1 day, then the number that the same day pending file is checked by user can be obtained when the time interval reaches.
S203, observing conditions according to judges whether the pending file meets contractive condition, if so, going to step S204, if not, going to step S205.
Specifically, can judge whether it meets contractive condition according to the frequency of checking of the pending file, this be waited for Processing file checks that frequency is compared with default mapping table, wherein default mapping table includes checking frequency and pressure The correspondence of contracting situation, the compression situation include being compressed without compression and according to default compression ratio, determine and are somebody's turn to do Check the corresponding targeted compression situation of frequency, judgement targeted compression situation and the pending file current compression situation not Match, and targeted compression situation is when being compressed according to default compression ratio, determination meets the contractive condition, so as to according to right The default compression ratio answered carries out compression processing to the pending file.
It should be understood that compression ratio refers to the size before file size after being compressed and compression Ratio, such as its size is 100MB to a file before the compression, after being compressed to it, size 90MB, then raw At the compressed file compression ratio be 90%.Compression ratio is bigger, it is generally recognized that compression degree is lower, and compression ratio is smaller, can be with Think that compression degree is higher.Compression ratio, which is generally less than, is equal to 100%.
Default mapping table is referring to as shown in table 1 below:
Table 1
Check frequency Compress situation
Number 3 times or more is checked in one week Without compression
Number is checked in one week 1-2 times It is compressed according to compression ratio 80%
It is not checked in one week It is compressed according to compression ratio 10%
If the current compression situation of certain pending file is compressive state, get the pending file checks frequency To have checked 10 times in one week, this is checked into frequency and presets mapping table shown in table 1, then can determine and check frequency with this The corresponding targeted compression situation of rate is without compressing, then targeted compression situation is mismatched with currently practical compression situation, and The targeted compression situation is not to be compressed according to default compression ratio, but without compression, therefore is unsatisfactory for contractive condition.
Terminal can detect whether the pending file is compressed file at this time, will determine that it is compressed file, then To this, compressed file has carried out decompression processing, because of the file checked that frequency is higher, be user is frequently necessary to check of this document, Decompression storage is carried out to it, can often be checked to avoid due to user, needs terminal repeatedly to decompress and checks cumbersome, end to user End directly stores the obtained decompressing files after decompression, when user needs to check, can directly extract the decompression File is presented to user and checks;The decompressing files terminal obtained for decompression needs to store it, for the pending text Part can then be deleted.
Such as pending file is that compressed file, compression ratio 50%, terminal got the pending file at one week Interior checks that frequency is 2 times, according to default mapping table shown in above-mentioned table 1, it may be determined that the pending file is checked The corresponding targeted compression situation of frequency (is compressed) according to compression ratio 80%, and the current compression situation of the pending file is Compression ratio 50% namely targeted compression situation are mismatched with current compression situation, and targeted compression situation is according to compression ratio 80% is compressed, thus may determine that it meets contractive condition, terminal is to compress it, to be preferably bonded user Use observe conditions, it is corresponding to generate specifically, terminal can be compressed according to default compression ratio (that is to say 80%) Compressed file.
Such as pending file is uncompressed file, terminal gets the pending file and checks frequency vacation in one week It is set as 3 times, according to default mapping table shown in above-mentioned table 1, it may be determined that the pending file checks that frequency is corresponding Targeted compression situation (without compression), targeted compression situation and (uncompressed) matching of current compression situation, therefore it is unsatisfactory for this Contractive condition, at this time terminal the pending file can not be handled, continue with the current format of the pending file into Row storage.
Such as pending file is uncompressed file, terminal gets the pending file and checks frequency vacation in one week It is set as 0 time, according to default mapping table shown in above-mentioned table 1, it may be determined that the pending file checks that frequency is corresponding Targeted compression situation (is compressed) according to compression ratio 10%, it may be determined that targeted compression situation is current with the pending file (uncompressed) mismatch of situation is compressed, and targeted compression situation is to be pressed according to default compression ratio (namely compression ratio 10%) Contracting, therefore the pending file meets the contractive condition, is compressed to it to preset compression ratio 10% according to this, with life At corresponding compressed file, which is stored, deletes the pending file, reduction accounts for terminal storage space With.
S204, compression processing is carried out according to default reduced rule to the pending file, to generate corresponding compression text Part, and the compressed file is stored, and delete the pending file.
It should be noted that terminal needs to store the compressed file after generating corresponding compressed file, and Original pending file is deleted, achievees the purpose that reduce space hold.The storage of compressed file can be stored in terminal local, Can also be stored in corresponding server, when user need use check the compressed file when, terminal can from local or It is obtained in the server.
Specifically, terminal can also be determined according to the compression ratio of compressed file is stored in local by the compressed file, still Be stored in server, ensure user can normal use while, reduce to the occupancy of terminal local memory space.For pressure The compressed file of shrinkage minimum, can store it in server, seldom be checked because this kind of compressed file is often user File, terminal need not frequently extract the compressed file, be stored in having little significance for terminal local, in order to reduce this kind of pressure Contracting file can store it in server the occupancy of terminal storage space;For the relatively large pressure of compression ratio Contracting file (namely compression degree is not high, facilitates the extraction of terminal decompression) and non-decompressing files, this kind of file user look into it It sees that frequency is generally higher, checks browsing and use in order to facilitate user, reduce terminal processes load, end can be stored it in End is local, is needed in user in use, directly obtain this document from local, in a word in order to user-friendly and deposited to terminal Two aspect of occupancy for storing up space reaches a best balance, promotes user experience.
S205, end.
If pending file is unsatisfactory for the contractive condition, it can not be handled.In some instances, can also It handles in the following way:Specifically, judging current compression situation mismatch of the targeted compression situation with pending file, and When targeted compression situation is without compression, detect whether the pending file is compressed file, if so, then having pressed this Contracting file is decompressed to obtain decompressing files, and is stored to the decompressing files, and deletes the pending file, such as It is no, then the pending file is not handled;Judging the current of the targeted compression situation and the pending file When compressing situation matching, then the pending file is not handled.Details are not described herein.
Second embodiment
The present embodiment provides a kind of file management method on the basis of first embodiment, specifically refers to Fig. 3, and Fig. 3 is The file management method refined flow chart that second embodiment of the invention provides, this document management method include the following steps:
S301, according to pre-set time interval pending file is obtained from terminal local and/or server.
Pre-set time interval can according to actual use situation flexibly be arranged, for example, 1 hour, 1 day, one week, 15 days etc., this implementation was not restricted this.It that is to say that terminal can dynamically obtain pending file to carry out subsequent processing.
S302, acquisition outside observe conditions to the pending file.
Observe conditions in the present embodiment may include check frequency namely in a period of time when checking number or checking It is long etc., such as check three times for one week, it checks within one day 1 minute etc..
When S303, determining its that observed conditions according to this meet contractive condition, which is advised according to default compression Compression processing is then carried out, to generate corresponding compressed file, and generates preview file corresponding with the pending file, and preview File includes at least the file name of the pending file.
For according to checking that frequency determines whether the process of contractive condition, the description specifically referred in first embodiment is said Bright, details are not described herein.Different from the first embodiment being compressed (packet to corresponding pending file in the present embodiment Include and uncompressed file compressed, also include the compressed file that compressed file is compressed into different compression ratios) processing it is same When, in other words before being compressed to corresponding pending file, preview file corresponding with the pending file can be also generated, And the preview file includes at least the file name of the pending file, in some instances, preview file can also include phase Answer the partial content information of pending file.By taking pending file is a Word document as an example, preview file may include this The file name of Word document can also include the content information of the first segment of the Word document or the content letter of first page Breath.When user needs to check the Word document, which can first be presented to the user by terminal, and user is from the preview File can get the file name of Word document, and further, user can also look in the part of the Word document Hold information and met the demand of checking of user in some cases, terminal need not also be extracted in whole Word documents Appearance, which is presented to the user, checks, improves terminal loads rate, avoids terminal needs that the Word document is directly carried out load presentation It is checked to user, is often possible to user nor in order to check that the full content of the Word document, the reduction of loading speed influence User's checks experience, in addition also increases the processing load of terminal.
For the pending file of alternative document type, corresponding preview file can also be equally generated, with audio file For, preview file may include the file name of the audio file, can also include the preceding 10 frame audio number of the audio file According to when user checks the audio file, which can be presented to user first and checked by terminal, Yong Huke Can be to determine which song (be equivalent to and only need to check title of the song) stored in terminal, be not intended to each song It plays out, can meet the demand of checking of user by showing the preview file, reduce terminal to the full extent Handle load;It is really interested in the song if user sees corresponding song title, it clicks and plays, terminal also may be used To be presented to the user 10 frame audio datas before in preview file, terminal again solves the compressed file of the song at this time Pressure, to obtain original document, if after preceding 10 frame audio data finishes playing, the subsequent audio frame that solution presses is in by terminal automatically User is now given, avoids checking affecting to user.If user has just exited after having played preceding 5 frame audio data and has worked as prezone Face, terminal can the audio data that presses of solution abandon, processing one is not interfere with user to check experience to file in this way, instead Since terminal improves loading speed, the Fileview experience of user is improved, second is that can also avoid existing in user's needs When checking certain file, original document directly can only be presented to the low problem of loading efficiency caused by user by terminal.Because past File is checked toward user's browsing, is not intended to check the whole content information of file, it is more likely that it is roughly to browse, identification Go out to really need the file checked.In this navigation process, if terminal is all that original file is directly presented to user, incite somebody to action Bigger processing load is generated to terminal.
For the pending file of alternative document type, such as picture/mb-type, preview file includes at least picture name, It can also be including thumbnail etc.;For video type, preview file includes at least the video name, can also include the video Preceding 5 frame data of data etc..This is no longer going to repeat them.
In order to reduce the occupancy to terminal storage space as much as possible, when being compressed to pending file, can pick Except the part content information included by preview file, only the other content information of the pending file is compressed to generate Corresponding compressed file avoids in preview file and compressed file including identical content information.Specifically, in preview file When further including the partial content information of pending file, the other content in addition to the contents of the section information in pending file is extracted Information, and the other content information is compressed to generate compressed file according to default reduced rule.
For example, preview file includes the file name of pending file and the content information of first page, compression text is being generated When part, the content information of the first page can be rejected, extracts the content information that the pending file second page starts to generate pressure Contracting file.It avoids preview file and compressed file while including the content information of first page, preview file is checked in user After one page of content information, terminal can decompress the compressed file, to directly show second page and subsequent content information It is checked to user.
For the generating process of preview file, the mode of checking of the pending file can be determined according to user, checked Mode include only check file name, only check preview file, check original document or compressed file, if such as user it is frequent Check the original document or compressed file of the pending file, then preview file can not include in the part of pending file Hold information, only includes file name;If user is always to look at the file name or preview file of pending file, and very When checking original document or compressed file less, then preview file may include corresponding partial content information.
S304, compressed file and preview file are stored, which is deleted.
The compressed file of generation and preview file can be stored in terminal local by terminal.Preview file can also be deposited Storage is in terminal local, in the server by compressed file storage, during user checks preview file, however, it is determined that Yong Huke When can need to check the compressed file, terminal can with the index relative between the preview file and compressed file, from server Middle acquisition compressed file, wherein index relative includes the correspondence between preview file and compressed file, and compression text The storage location of part, or obtain link;Terminal can get the compressed file according to storage location or acquisition link.
Instruction is checked in S305, reception outside to the initial of the compressed file.
S306, initially check that instruction shows so that user checks the preview file according to described.
Specific to refer to Fig. 4, user clicks file 41, is equivalent to issued to terminal initial and checks instruction, terminal root Instruction is initially checked according to this, the preview file of corresponding pending file is showed, and refers to Fig. 5, it is pre- that user is based on this File 51 of looking at can learn that the file name of this document, file type etc., user can also click the preview file 51, and terminal can To show the partial content information included by preview file, Fig. 6 is referred to, user can view this document first page 61 general contents avoid terminal from being loaded directly into the original contents information of the pending file, since data volume is big, load Efficiency is low, and this programme is that corresponding preview file is sent to user first to check, and the data volume of preview file and original text Part is compared, and data volume is extremely small, therefore terminal can quickly carry out loaded and displayed, and improve user checks efficiency, With this user is presented to check, if it is possible to meet user and check demand, then avoid terminal need by original document all into Row processing checks that, if cannot meet the demand of checking of user, terminal can be on backstage to compressing text accordingly to be presented to user Part is decompressed, and the content information of original document is presented to user, will not be impacted, be promoted to normal check of user User experience.
S307, it determines when meeting depth and checking condition, obtains the compressed file and decompressed, and by the file after decompression User is presented to check.
The depth condition of checking includes:It receives outside and instruction is checked to the depth of compressed file, or detect preview text When the stay time of part reaches default stay time, determine that meeting the depth checks condition.
Continuing with referring to Fig. 6, when user checks the portions of display content 61 included by preview file, such as user " expansion see full text " that setting can be clicked is equivalent to and receives depth and check instruction, thus the original that terminal presses backstage solution The content of beginning file is presented to user and checks.
In some instances, terminal can also detect the stay time of preview file, be determined whether according to the stay time Meet depth and check condition, if stay time has reached default stay time, it is determined that meets the depth and check condition.Example Such as, Fig. 6 is equally participated in, terminal starts timing when being shown to the portions of display content 61 included by preview file, if with Family is when the stay time on this interface reaches default stay time, it is determined that meets the depth and checks condition, to trigger The content for the original document that backstage solution presses is presented to user and checked by terminal.
For the pending file of different file types, terminal is when determining whether that meeting depth checks condition, Ke Yiling Selection living determines, such as the pending file of audio file type, the audio data included by preview file plays Cheng Shi is determined and is met depth and check condition, to which the original audio file that solution presses is continued to play by terminal, avoid to Family is normally checked and is affected.It should be appreciated that the stay time being equivalent in preview file reaches default stay time, make preview Audio data included by file finishes playing.Stop playing if user in the playing process of preview file, clicks, or moves back Current interface is gone out, it is determined that be unsatisfactory for the depth and check condition, if terminal decompresses the compressed file, can incite somebody to action File after decompression abandons.
3rd embodiment
It is shown in Figure 7 the present embodiment provides a kind of terminal comprising processor 71, memory 72 and communication bus 73, Wherein:
Communication bus 73 is for realizing the connection communication between processor 71 and memory 72;
Processor 71 is for executing one or more program stored in memory 72, to realize above-mentioned first embodiment And/or each step of the file management method in second embodiment.Specifically refer to above-mentioned first embodiment and/or the second implementation Description in example, details are not described herein.
The embodiment of the present invention provides a kind of computer readable storage medium, and the computer-readable recording medium storage has one A or multiple programs, one or more of programs can be executed by one or more processor, to realize above-mentioned first Each step of file management method in embodiment and/or second embodiment.Specifically refer to above-mentioned first embodiment and/or Description in two embodiments, details are not described herein.
It should be noted that herein, the terms "include", "comprise" or its any other variant are intended to non-row His property includes, so that process, method, article or device including a series of elements include not only those elements, and And further include other elements that are not explicitly listed, or further include for this process, method, article or device institute it is intrinsic Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including this There is also other identical elements in the process of element, method, article or device.
The embodiments of the present invention are for illustration only, can not represent the quality of embodiment.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can add the mode of required general hardware platform to realize by software, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on this understanding, technical scheme of the present invention substantially in other words does the prior art Going out the part of contribution can be expressed in the form of software products, which is stored in a storage medium In (such as ROM/RAM, magnetic disc, CD), including some instructions are used so that a station terminal (can be mobile phone, computer, service Device, air conditioner or network equipment etc.) execute method described in each embodiment of the present invention.
The embodiment of the present invention is described with above attached drawing, but the invention is not limited in above-mentioned specific Embodiment, the above mentioned embodiment is only schematical, rather than restrictive, those skilled in the art Under the inspiration of the present invention, without breaking away from the scope protected by the purposes and claims of the present invention, it can also make very much Form, all of these belong to the protection of the present invention.

Claims (10)

1. a kind of file management method, which is characterized in that the file management method includes:
Pending file is obtained from terminal local and/or server, the pending file includes uncompressed file, compressed At least one of file;
It obtains outside to observe conditions to the pending file, and judges that the pending file is according to described observe conditions It is no to meet contractive condition;
If so, compression processing then is carried out according to default reduced rule to the pending file, to generate corresponding compressed file, And the compressed file is stored, and delete the pending file.
2. file management method as described in claim 1, which is characterized in that it is described to observe conditions including checking frequency, it is described Judge that the step of whether pending file meets contractive condition includes according to described observe conditions:
Check that frequency is compared with default mapping table by described, the default mapping table includes checking frequency and pressure The correspondence of contracting situation, the compression situation include being compressed without compression and according to default compression ratio, determining and institute It states and checks the corresponding targeted compression situation of frequency, in the current compression for judging the targeted compression situation and the pending file Situation mismatches, and the targeted compression situation is described when being compressed according to default compression ratio, and determination meets the compression Condition.
3. file management method as described in claim 1, which is characterized in that described to be obtained from terminal local and/or server Before the step of taking pending file, further include:
Receive the original document stored;
Alternatively, being reached to the pre-set time interval of the terminal.
4. file management method as claimed in claim 2, which is characterized in that the default reduced rule includes:
Compression processing is carried out to the pending file based on the default compression ratio.
5. file management method as claimed in claim 2, which is characterized in that the file management method further includes:
Judging current compression situation mismatch of the targeted compression situation with the pending file, and the targeted compression Situation be it is described without compression when, detect whether the pending file is compressed file, if so, then having been compressed to described File is decompressed to obtain decompressing files, and is stored to the decompressing files, and deletes the pending file, such as It is no, then the pending file is not handled;
When judging that the targeted compression situation is matched with the current compression situation of the pending file, then do not wait locating to described Reason file is handled.
6. file management method as described in any one in claim 1-5, which is characterized in that described to the pending file When carrying out compression processing according to default reduced rule to generate corresponding compressed file, further include:
Generate preview file corresponding with the pending file, text of the preview file including at least the pending file Part title;
After the generation compressed file with the preview file, the file management method further includes:
Receive it is external instruction is checked to the initial of the compressed file, according to it is described it is initial check instruct to the preview file into Row shows so that user checks;And when determining that meeting depth checks condition, obtain the compressed file and decompressed, and will solution File after pressure is presented to user and checks.
7. file management method as claimed in claim 6, which is characterized in that the determination meets the step of depth checks condition Including:
It receives outside and instruction is checked to the depth of the compressed file, or detect that the stay time of the preview file reaches When to default stay time, determine that meeting the depth checks condition.
8. file management method as claimed in claim 6, which is characterized in that it is described to the pending file according to default pressure Contraction ga(u)ge then carries out the step of compression processing is to generate corresponding compressed file:
When the preview file further includes the partial content information of the pending file, extraction removes the partial content information Outer other content information, and the other content information is compressed to generate the pressure according to the default reduced rule Contracting file.
9. a kind of terminal, which is characterized in that the terminal includes processor, memory and communication bus;
The communication bus is for realizing the connection communication between processor and memory;
The processor is for executing one or more program stored in memory, to realize as appointed in claim 1-8 The step of file management method described in one.
10. a kind of computer readable storage medium, which is characterized in that the computer-readable recording medium storage there are one or Multiple programs, one or more of programs can be executed by one or more processor, to realize as in claim 1-8 The step of any one of them file management method.
CN201810087288.9A 2018-01-30 2018-01-30 File management method, terminal and computer readable storage medium Pending CN108304534A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810087288.9A CN108304534A (en) 2018-01-30 2018-01-30 File management method, terminal and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810087288.9A CN108304534A (en) 2018-01-30 2018-01-30 File management method, terminal and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN108304534A true CN108304534A (en) 2018-07-20

Family

ID=62866798

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810087288.9A Pending CN108304534A (en) 2018-01-30 2018-01-30 File management method, terminal and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN108304534A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110765080A (en) * 2018-07-26 2020-02-07 北京搜狗科技发展有限公司 File data processing method, device and equipment
CN116701327A (en) * 2022-12-07 2023-09-05 荣耀终端有限公司 File processing method and electronic equipment

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110270809A1 (en) * 2010-04-28 2011-11-03 Dell Products L.P. Heat indices for file systems and block storage
CN102682013A (en) * 2011-03-14 2012-09-19 盛乐信息技术(上海)有限公司 Method for operating compressed file in network storage appliance
CN103218224A (en) * 2013-03-29 2013-07-24 东莞宇龙通信科技有限公司 Method and terminal for improving utilization ratio of memory space
CN103646072A (en) * 2013-12-10 2014-03-19 河南博仕达通信技术有限公司 Automatic file classification method and mobile terminal
US20170142042A1 (en) * 2015-11-18 2017-05-18 Yahoo! Inc. Preview of Compressed File Email Attachments
CN106874278A (en) * 2015-12-11 2017-06-20 中国电信股份有限公司 A kind of online method for previewing, device, system and cloud storage platform
CN106933702A (en) * 2015-12-30 2017-07-07 深圳创锐思科技有限公司 A kind of method of intelligent terminal storage space management, device and intelligent terminal
CN107465413A (en) * 2017-07-07 2017-12-12 南京城市职业学院 A kind of self-adapting data compressibility and its method

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110270809A1 (en) * 2010-04-28 2011-11-03 Dell Products L.P. Heat indices for file systems and block storage
CN102682013A (en) * 2011-03-14 2012-09-19 盛乐信息技术(上海)有限公司 Method for operating compressed file in network storage appliance
CN103218224A (en) * 2013-03-29 2013-07-24 东莞宇龙通信科技有限公司 Method and terminal for improving utilization ratio of memory space
CN103646072A (en) * 2013-12-10 2014-03-19 河南博仕达通信技术有限公司 Automatic file classification method and mobile terminal
US20170142042A1 (en) * 2015-11-18 2017-05-18 Yahoo! Inc. Preview of Compressed File Email Attachments
CN106874278A (en) * 2015-12-11 2017-06-20 中国电信股份有限公司 A kind of online method for previewing, device, system and cloud storage platform
CN106933702A (en) * 2015-12-30 2017-07-07 深圳创锐思科技有限公司 A kind of method of intelligent terminal storage space management, device and intelligent terminal
CN107465413A (en) * 2017-07-07 2017-12-12 南京城市职业学院 A kind of self-adapting data compressibility and its method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110765080A (en) * 2018-07-26 2020-02-07 北京搜狗科技发展有限公司 File data processing method, device and equipment
CN116701327A (en) * 2022-12-07 2023-09-05 荣耀终端有限公司 File processing method and electronic equipment

Similar Documents

Publication Publication Date Title
CN111343081A (en) Information display method and electronic equipment
CN109445894A (en) A kind of screenshot method and electronic equipment
CN108268835A (en) sign language interpretation method, mobile terminal and computer readable storage medium
CN107562539B (en) Application program processing method and device, computer equipment and storage medium
CN109756767B (en) Preview data playing method, device and storage medium
CN107633051A (en) Desktop searching method, mobile terminal and computer-readable recording medium
CN109412932B (en) Screen capturing method and terminal
CN110768805A (en) Group message display method and electronic equipment
CN108307043A (en) Speech message conversion method, mobile terminal and computer readable storage medium
CN107797871A (en) EMS memory occupation method for releasing resource, mobile terminal and computer-readable recording medium
CN110180181A (en) Screenshot method, device and the computer readable storage medium of Wonderful time video
CN109324999B (en) Method and electronic equipment for executing operation based on download instruction
CN107592415A (en) Voice transmitting method, terminal and computer-readable recording medium
CN108021470A (en) A kind of data backup method, mobile terminal and computer-readable recording medium
CN108595107B (en) Interface content processing method and mobile terminal
CN107273024B (en) A kind of method and apparatus realized using data processing
WO2020156117A1 (en) File processing method and device, and terminal
CN110008184B (en) File processing method and electronic equipment
CN108228876A (en) A kind of method and mobile terminal for reading file data
CN109729220B (en) User state pushing method and mobile terminal
CN108304534A (en) File management method, terminal and computer readable storage medium
CN108228357B (en) Memory cleaning method and mobile terminal
CN107943590B (en) Memory optimization method based on associated starting application, mobile terminal and storage medium
CN109873901A (en) A kind of screenshot method for managing resource and terminal, computer readable storage medium
CN110826098B (en) Information processing method and electronic equipment

Legal Events

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

Application publication date: 20180720

RJ01 Rejection of invention patent application after publication