CN109947367A - A kind of processing method and terminal of file - Google Patents

A kind of processing method and terminal of file Download PDF

Info

Publication number
CN109947367A
CN109947367A CN201910199511.3A CN201910199511A CN109947367A CN 109947367 A CN109947367 A CN 109947367A CN 201910199511 A CN201910199511 A CN 201910199511A CN 109947367 A CN109947367 A CN 109947367A
Authority
CN
China
Prior art keywords
file
cache policy
cache
terminal
strategy
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
CN201910199511.3A
Other languages
Chinese (zh)
Other versions
CN109947367B (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.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication 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 Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN201910199511.3A priority Critical patent/CN109947367B/en
Publication of CN109947367A publication Critical patent/CN109947367A/en
Application granted granted Critical
Publication of CN109947367B publication Critical patent/CN109947367B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention provides a kind of processing method of file and terminals, this method comprises: receiving the file write operations of at least one application;The file of at least one application is written in file storage area according to the target cache strategy to match in multi-level buffer strategy with the file;Wherein, the multi-level buffer strategy is the cache policy of the multiple grades stored on user's storage card SD in the terminal, and different grades of cache policy corresponds to different file storage areas.The program can be realized the unified management to file, convenient for realizing easy operation in file handling procedure, promotes operating reliability, reduces the mutual conflict between processing operation, improve disk file fragmentation, lifting system performance.

Description

A kind of processing method and terminal of file
Technical field
The present embodiments relate to the processing methods and terminal of field of communication technology more particularly to a kind of file.
Background technique
In the android system of terminal, as user uses terminal the increase of duration, RAM card file fragmentationization is existing Increasingly severe as, the garbage files of a large amount of fragmentations are stored in RAM card, occupy limited memory space, so as to cause Memory space is nervous, leads to cell phone system Caton, using the various performance issues such as low-response, seriously affects user experience.
In order to solve the problems, such as that garbage files occupy memory space, there are various forms of rubbish cleaning softwares, such as " mobile phone house keeper " built in common cell phone system generally includes rubbish cleaning modul, and there are also some special third party's " cleanings The inside of great master " software or even some heavyweight App have the rubbish cleaning modul of oneself realization, as Alipay, wechat are all wrapped Functional module containing Disk Cleanup.The implementation of these cleaning softwares is analyzed, their core process includes: artificial rubbish catalogue Identification, operation backstage configure it is online, client configuration pull, config directory file scan etc..
And major App manufacturer would generally develop online a set of similar above-mentioned rubbish liquidating plan, and by customized Testing mechanism or user actively enter scheme carry out rubbish cleaning.This will lead to SD card and is frequently scanned, and especially exist In the case that space is nervous more very, the service life and performance parameter of SD card are largely affected.Meanwhile frequent scanning Mean that frequent IO behavior is triggered, the performance of App and whole system can be produced a very large impact, reduce responsiveness, It easily causes using performance issues such as Caton, frame losing, ANR.This scheme implementation steps are complex, and reliability is low, rush mutually Prominent drawback is prominent.
Summary of the invention
The embodiment of the present invention provides the processing method and terminal of a kind of file, to solve existing document handling method step Complexity, reliability is low, there are problems that conflicting mutually between processing operation.
In order to solve the above-mentioned technical problem, the present invention is implemented as follows:
In a first aspect, being applied to terminal the embodiment of the invention provides a kind of processing method of file, comprising:
Receive the file write operations of at least one application;
By the file of at least one application, according to the target cache to match in multi-level buffer strategy with the file Strategy is written in file storage area;Wherein, the multi-level buffer strategy is to store on user's storage card SD in the terminal Multiple grades cache policy, different grades of cache policy corresponds to different file storage areas.
Second aspect, the embodiment of the invention also provides a kind of terminals, comprising:
Receiving module, for receiving the file write operations of at least one application;
First cache module, for by it is described at least one application file, according in multi-level buffer strategy with the text The target cache strategy that part matches is written in file storage area;Wherein, the multi-level buffer strategy is in the terminal The cache policy of the multiple grades stored on user's storage card SD, different grades of cache policy correspond to different file storage areas Domain.
The third aspect the embodiment of the invention also provides a kind of mobile terminal, including processor, memory and is stored in institute The computer program that can be run on memory and on the processor is stated, when the computer program is executed by the processor The step of realizing the processing method of file operation as described above.
Fourth aspect, it is described computer-readable to deposit the embodiment of the invention also provides a kind of computer readable storage medium Computer program is stored on storage media, the computer program realizes the place of file operation as described above when being executed by processor The step of reason method.
In embodiments of the present invention, by receiving the file write operations of at least one application, by least one application File is written in file storage area according to the cache policy to match in multi-level buffer strategy with file, operates in this Systematic difference only needs simply to abide by constraint, and the global scheme that can be provided by system effectively resolves disk space occupancy, Can be realized the unified management to file, convenient for realizing easy operation in file handling procedure, operating reliability, drop are promoted Mutual conflict between reduction process operation, improves disk file fragmentation, lifting system performance.
Detailed description of the invention
Fig. 1 shows the flow charts of the processing method of file in the embodiment of the present invention;
Fig. 2 indicates the structural relation figure in the embodiment of the present invention in terminal between each component part;
Fig. 3 indicates the structural block diagram of terminal in the embodiment of the present invention;
A kind of hardware structural diagram of Fig. 4 terminal of each embodiment to realize the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are some of the embodiments of the present invention, instead of all the embodiments.Based on this hair Embodiment in bright, every other implementation obtained by those of ordinary skill in the art without making creative efforts Example, shall fall within the protection scope of the present invention.
The embodiment of the present invention discloses a kind of processing method of file, is applied to terminal, as shown in connection with fig. 1, this method comprises:
Step 101, the file write operations of at least one application are received.
At least one application is applied to operate in each App in terminal system.The file that at least one is applied to those Write operation is obtained, and to execute subsequent cache policy corresponding with write operation, realizes targeted file cache Operation.
Step 102, by the file that at least one is applied, according to the target cache to match in multi-level buffer strategy with file Strategy is written in file storage area.
Wherein, the multi-level buffer strategy is the caching of the multiple grades stored on user's storage card SD in the terminal Strategy, different grades of cache policy correspond to different file storage areas.
Dividing in user's storage card, that is, SD card of terminal has multiple file storage areas, writes in different file storage areas The file entered is corresponding with different grades of file cache strategy.
Terminal system is needed through SD card, provides buffer service for platform application.Specifically, multi-level buffer strategy is specially Level Four cache policy.
System opens up four pieces of memory spaces, cache1, cache2 in SD card, cache3, cache4 respectively correspond level-one, Second level, three-level and level Four cache policy.
Wherein level cache strategy is used to store and arbitrarily can arbitrarily delete, and does not influence low using operation or influence degree File, such as picture load cache file, webpage load cache file, the larger persistence of the occupied spaces such as temporary log file The low file of demand;It is big but locally slow by the recoverable file of removing, such as map to store some volumes for L2 cache strategy Deposit file, video cache file etc.;Three-level cache policy, storage is some to occupy little space, but influences user experience after deleting Biggish file, such as user login information, the user characteristics such as user configuration information identify relevant caching record.Level Four caching Strategy, stores some files that cannot be removed, such as document, and the other users such as picture need to retain the file of backup.This four The probability that is cleaned of kind cache policy catalogue reduces step by step.The file that at least one is applied by the cache policy of different stage Be respectively written into file storage area, realizes that the strategyization to write-in file manages, convenient for the globalization to different files Control.
The processing method of this document in the embodiment of the present invention, by receiving the file write operations of at least one application, The file that at least one is applied is written file and deposited according to the cache policy to match in multi-level buffer strategy with file In storage area domain, operating in the systematic difference only needs simply to abide by constraint, and the global scheme that can be provided by system effectively solves Certainly good disk space occupies, can be realized the unified management to file, convenient for realizing easy operation in file handling procedure, Operating reliability is promoted, the mutual conflict between processing operation is reduced, improves disk file fragmentation, lifting system performance.
A preferred embodiment the most, wherein by the file of at least one application, according in multi-level buffer strategy The target cache strategy to match with the file is written in file storage area, comprising:
According to the attribute of the file of at least one application, from the multi-level buffer strategy, selection and the file The first cache policy to match;According to first cache policy of selection, the file is written in file storage area.
The file of the corresponding caching different attribute of different grades of cache policy.The file of different attribute by removing probability It is not identical.The attribute of this document can be include: can operating file, process file, read-only file, can written document etc., it is different File attribute table prescribed paper itself for apply running influence degree.
By the cache policy for the rank that the attribute according to file, selection match with file, and by the rank File is written in file storage area cache policy, to realize the concentration system of the subsequent file to different stage cache policy One management.The cache policy of different stage respectively corresponds the different file storage areas for dividing and obtaining, and text is written in file by this In part storage region, comprising: file is written in file destination storage region corresponding with first cache policy.
Further, the processing method of this document further include: obtain the file writing in file destination buffer zone Enter frequency, the grade of cache policy corresponding to the file destination buffer zone is higher than setting grade;In said write frequency In the case where given threshold, information warning is sent.
This document is file corresponding with a cache policy, obtains the file corresponding with a cache policy Write frequency shows the write-in of the file of the first application under a cache policy when write frequency exceeds given threshold Operation is excessively frequent, sends information warning to be reminded.
Specifically, which is the buffer zone of the cache policy corresponding to higher level.Work as detection When the file applied to some is frequently write into the buffer zone of those grades, then need to be warned in time, to avoid text A large amount of write-ins of the part in those buffer zones, avoid the malice of memory space from occupying.
For example, triggering cleaning service frequently writes into and corresponds to for the monitoring mechanism of write-in file App when file is written Under the file of three-level cache policy or level Four cache policy, or write-in alternative document catalogue, triggering service alarm is reported into machine System.Wherein sending information warning is specially to send information warning to background management platform.In background management system, operation personnel's meeting The App prompt for not abiding by control specification is received, notifies corresponding developer to rectify and improve after audit confirmation.It prevents in an application File is frequently written in corresponding file storage area with the higher cache policy of rank, not to avoid memory space It rationally occupies, and ensures the accuracy and reasonability when subsequent progress file removing or alternative document management operate.
Further, described to obtain the file in file destination buffer zone as a preferred embodiment Write frequency, comprising:
It obtains in preset time period, write-in number of the file in file destination buffer zone;According to said write The time span of number and the preset time period obtains the write frequency of the file.
By an applicating Chinese part being written in file destination buffer zone the monitoring of number, it is long to obtain setting time In degree, the write frequency of file corresponding with the cache policy of a grade.The write frequency be specially file with this one File write frequency in the corresponding file storage area of the cache policy of a grade.To realize to file write frequency Acquisition.
Specifically, write-in number of the file in file destination buffer zone is obtained, comprising: apply at least one The mistake in file destination storage region is written according to the cache policy to match in multi-level buffer strategy with file in file Cheng Zhong adds application identities to the file of write-in, which is used to mark the application source of write-in file;Based on the application Mark obtains in preset time period, the write-in number of file corresponding with the cache policy of the first estate in the first application;Base The time span of number and preset time period is written in file, obtains file write frequency.
The application identities are specially that packet name is applied to identify.Platform application developer or third party application developer, according to The control specification of system, when cache file is written according to the suitable cache policy of Attributions selection of presently written file, finally It is written under corresponding cache file directory, simultaneity factor can add the file of each write-in in written document and apply packet identifier Know.It is counted with the write frequency to subsequent applications.
Further, in the case where said write frequency exceeds given threshold, after sending information warning, further includes:
In the case that the first cache policy used when monitoring that the file continues and was written according to last time is written, The file is written using the second cache policy;Wherein, the grade of second cache policy is lower than first cache policy, The urgency that the grade of cache policy is cleaned according to file sorts from low to high.
Cache file in different file storage areas is cleaned probability with different;The urgency being cleaned is higher File is cleaned probability with higher;The lower grade of the corresponding cache policy of file, then the urgency that file is cleaned is got over Height is cleaned probability with bigger.Wherein, it caches according to the cache policy of different stage into different file storage areas File is cleaned probability with different;It is different it is described be cleaned probability with cache policy rank from high to low and step by step Increase.
As shown in Fig. 2, dividing different memory spaces in SD disk, different memory spaces correspond to the caching plan of different stage Slightly.Wherein, it is gradually increased from level-one to the grade of level Four cache policy.Level cache strategy corresponds to maximum file and is removed Probability, the urgency that corresponding file is cleaned are higher;Level Four cache policy corresponds to the smallest file by removing probability, corresponding The urgency that file is cleaned is lower.
Wherein, above-mentioned first cache policy can be one in three-level cache policy or level Four cache policy, and second is slow Depositing strategy can be one in level cache strategy or L2 cache strategy.
In the subsequent file write operation for receiving the first application, and the file of the subsequent file write operation is to be written In the case that region is first file storage area, the file to be written of the subsequent file write operation is written to the In two file storage areas;Wherein, the grade of the corresponding file process strategy in second file storage area is lower than described the The grade of the corresponding file process strategy in one file storage area.
The App prompt for not abiding by control specification is received in operation personnel, it is whole to notify that corresponding developer carries out after audit confirmation While changing, operation personnel, which issues not conforming to by system, returns App acknowledgement notification to be given to cleaned system service, and the App writes next time Behavior will be written when entering file to it to carry out forcing to be redirected in other cache catalogues, reduce the risk of garbage files write-in.
Further, as a preferred embodiment, this method further include:
Obtain the clearance order that the cleaning service module in the random access memory ROM of the terminal issues;According to described clear Except instruction is obtained in the file storage area based on the grade of the multi-level buffer strategy, it is lower than predetermined level according to grade The file destination that is cached of cache policy;Operation is purged to the file destination.
The remaining size of file storage area is obtained, the case where remaining size in file storage area is less than a preset value Under, obtain the clearance order that the cleaning service module in the random access memory ROM of terminal issues.
As shown in connection with fig. 2, terminal system is needed through SD card, provides buffer service for platform application, while real in ROM A kind of cleaning service of existing system level, starts execution by more policy mechanisms in due course, to reach the mesh of garbage files control 's.It realizes and carries out the systemic solution of rubbish control in system level.The App for operating in the system only needs simply to abide by about Beam, the global scheme that can be provided by system effectively resolve disk space occupancy, disk file fragmentation, system performance The problems such as.
According to the grade of multi-level buffer strategy, the target that the cache policy for being lower than a preset value according to grade is cached File is purged operation, to remove unessential file, lifting system maneuverability in time in the insufficient situation of space resources Energy.
Should during, system level provides service and the multi-level buffer strategy of a kind of system level, by mechanism of control from Main decision actively clears up garbage files on suitable opportunity, reduces developer to the tensity of system disk space state, subtracts The workload of few developer, lifting system performance and stability improve user experience.
Wherein, operation is purged to the file destination, comprising: remove enlivening for affiliated process in the file destination Degree is lower than the file of setting value.
Cleaning service in system triggers disk space anxiety under the scenes such as booting, screen locking, night, memory space anxiety Degree detecting carries out active cleaning to the file in level-one, L2 cache Policy Directories respectively according to tensity, meeting when cleaning The active file of process belonging to rejecting, has accomplished user's unaware space reclamation.
When disk space tensity is higher, pop-up confirmation prompt chooses whether cleaning corresponding A pp to user with three-level The file of cache policy caching;When tensity highest, pop-up prompt pops up level Four cache policy listed files, and according to institute It states process or file type is classified, choose whether to clear up to user.
Scheme, nervous journey of the developer without excessive concern disk space are managed using garbage files provided by the invention The problem of degree services very good solution disk garbage files by the system level of system level, file fragmentation.Developer Function and experience can be more concerned about, without the excessive issuable failure of program in the case of worrying low spatial.Mobile phone user without It need to fear that installation is widely applied, phone memory is nervous, and various App report that abnormal situation occurs after opening, and effectively mentions User experience is risen.
A kind of terminal is also disclosed in the embodiment of the present invention, as shown in connection with fig. 3, comprising: receiving module 301 and the first cache module 302。
Receiving module 301, for receiving the file write operations of at least one application;
First cache module 302, for by it is described at least one application file, according in multi-level buffer strategy with it is described The target cache strategy that file matches is written in file storage area;Wherein, the multi-level buffer strategy is in the terminal User's storage card SD on the cache policy of multiple grades that stores, different grades of cache policy corresponds to different file storages Region.
Wherein, first cache module 302 includes:
Submodule is selected, for the attribute according at least one file applied, from the multi-level buffer strategy, The first cache policy that selection matches with the file;
For first cache policy according to selection file storage area is written in the file by cache sub-module In.
Wherein, the terminal further include:
First obtains module, for obtaining write frequency of the file in file destination buffer zone, the target The grade of cache policy corresponding to file cache region is higher than setting grade;
Sending module, for sending information warning in the case where said write frequency exceeds given threshold.
Wherein, the terminal further include:
Second cache module, the first cache policy for being used when monitoring that the file continues and was written according to last time In the case where being written, the file is written using the second cache policy;
Wherein, the grade of second cache policy is lower than first cache policy, and the grade of cache policy is according to text The urgency that part is cleaned sorts from low to high.
The terminal further include:
Second obtains module, and the cleaning service module in the random access memory ROM for obtaining the terminal issues clear Except instruction;
Third obtains module, for according to the clearance order, based on the grade of the multi-level buffer strategy, described in acquisition In file storage area, according to grade lower than the file destination that the cache policy of a preset value is cached;
Module is removed, for being purged operation to the file destination.
Wherein, which is specifically used for: removing the liveness of affiliated process in the file destination lower than setting value File.
Terminal in the embodiment of the present invention, by receiving the file write operations of at least one application, by least one The file of application is written in file storage area according to the cache policy to match in multi-level buffer strategy with file, fortune Row only needs simply to abide by constraint in the systematic difference, and the global scheme that can be provided by system effectively resolves disk sky Between occupy, can be realized the unified management to file, be able to achieve easy operation during processing convenient for file, promote operation Reliability reduces the mutual conflict between processing operation, improves disk file fragmentation, lifting system performance.
Terminal provided in an embodiment of the present invention can be realized each mistake of the embodiment of above-mentioned contact person information processing method Journey, and identical technical effect can be reached, to avoid repeating, which is not described herein again.
A kind of hardware structural diagram of Fig. 4 terminal of each embodiment to realize the present invention.
The terminal 900 includes but is not limited to: radio frequency unit 901, network module 902, audio output unit 903, input are single Member 904, sensor 905, display unit 906, user input unit 907, interface unit 908, memory 909, processor 910, And the equal components of power supply 911.It will be understood by those skilled in the art that the not structure paired terminal of terminal structure shown in Fig. 4 It limits, terminal may include perhaps combining certain components or different component layouts than illustrating more or fewer components. In embodiments of the present invention, terminal include but is not limited to mobile phone, tablet computer, laptop, palm PC, car-mounted terminal, Wearable device and pedometer etc..
Wherein, processor 910, for receiving the file write operations of at least one application;It will at least one described application File be written in file storage area according to the target cache strategy to match in multi-level buffer strategy with the file;Its In, the multi-level buffer strategy is the cache policy of the multiple grades stored on user's storage card SD in the terminal, different The cache policy of grade corresponds to different file storage areas.
Terminal in the embodiment of the present invention is answered at least one by receiving the file write operations of at least one application File is written in file storage area according to the cache policy to match in multi-level buffer strategy with file, operation It only needs simply to abide by constraint in the systematic difference, the global scheme that can be provided by system effectively resolves disk space It occupies, can be realized the unified management to file, is able to achieve easy operation during processing convenient for file, promoting operation can By property, the mutual conflict between processing operation is reduced, improves disk file fragmentation, lifting system performance.
It should be understood that the embodiment of the present invention in, radio frequency unit 901 can be used for receiving and sending messages or communication process in, signal Send and receive, specifically, by from base station downlink data receive after, to processor 910 handle;In addition, by uplink Data are sent to base station.In general, radio frequency unit 901 includes but is not limited to antenna, at least one amplifier, transceiver, coupling Device, low-noise amplifier, duplexer etc..In addition, radio frequency unit 901 can also by wireless communication system and network and other set Standby communication.
Terminal provides wireless broadband internet by network module 902 for user and accesses, and such as user is helped to receive and dispatch electricity Sub- mail, browsing webpage and access streaming video etc..
Audio output unit 903 can be received by radio frequency unit 901 or network module 902 or in memory 909 The audio data of storage is converted into audio signal and exports to be sound.Moreover, audio output unit 903 can also provide and end The relevant audio output of specific function (for example, call signal receives sound, message sink sound etc.) that end 900 executes.Sound Frequency output unit 903 includes loudspeaker, buzzer and receiver etc..
Input unit 904 is for receiving audio or video signal.Input unit 904 may include graphics processor (Graphics Processing Unit, GPU) 9041 and microphone 9042, graphics processor 9041 is in video acquisition mode Or the image data of the static images or video obtained in image capture mode by image capture apparatus (such as camera) carries out Reason.Treated, and picture frame may be displayed on display unit 906.Through graphics processor 9041, treated that picture frame can be deposited Storage is sent in memory 909 (or other storage mediums) or via radio frequency unit 901 or network module 902.Mike Wind 9042 can receive sound, and can be audio data by such acoustic processing.Treated audio data can be The format output that mobile communication base station can be sent to via radio frequency unit 901 is converted in the case where telephone calling model.
Terminal 900 further includes at least one sensor 905, such as optical sensor, motion sensor and other sensors. Specifically, optical sensor includes ambient light sensor and proximity sensor, wherein ambient light sensor can be according to ambient light Light and shade adjusts the brightness of display panel 9061, and proximity sensor can close display panel when terminal 900 is moved in one's ear 9061 and/or backlight.As a kind of motion sensor, accelerometer sensor can detect in all directions (generally three axis) and add The size of speed can detect that size and the direction of gravity when static, can be used to identify terminal posture (such as horizontal/vertical screen switching, Dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, tap) etc.;Sensor 905 can be with Including fingerprint sensor, pressure sensor, iris sensor, molecule sensor, gyroscope, barometer, hygrometer, thermometer, Infrared sensor etc., details are not described herein.
Display unit 906 is for showing information input by user or being supplied to the information of user.Display unit 906 can wrap Display panel 9061 is included, liquid crystal display (Liquid Crystal Display, LCD), Organic Light Emitting Diode can be used Forms such as (Organic Light-Emitting Diode, OLED) configure display panel 9061.
User input unit 907 can be used for receiving the number or character information of input, and generates and set with the user of terminal It sets and the related key signals of function control inputs.Specifically, user input unit 907 include touch panel 9071 and other Input equipment 9072.Touch panel 9071, also referred to as touch screen, collect user on it or nearby touch operation (such as User is using any suitable objects or attachment such as finger, stylus on touch panel 9071 or near touch panel 9071 Operation).Touch panel 9071 may include both touch detecting apparatus and touch controller.Wherein, touch detecting apparatus is examined The touch orientation of user is surveyed, and detects touch operation bring signal, transmits a signal to touch controller;Touch controller from Touch information is received on touch detecting apparatus, and is converted into contact coordinate, then gives processor 910, receives processor 910 The order sent simultaneously is executed.Furthermore, it is possible to using multiple types such as resistance-type, condenser type, infrared ray and surface acoustic waves Realize touch panel 9071.In addition to touch panel 9071, user input unit 907 can also include other input equipments 9072. Specifically, other input equipments 9072 can include but is not limited to physical keyboard, function key (such as volume control button, switch Key etc.), trace ball, mouse, operating stick, details are not described herein.
Further, touch panel 9071 can be covered on display panel 9061, when touch panel 9071 is detected at it On or near touch operation after, send processor 910 to determine the type of touch event, be followed by subsequent processing device 910 according to touching The type for touching event provides corresponding visual output on display panel 9061.Although in Fig. 4, touch panel 9071 and display Panel 9061 is the function that outputs and inputs of realizing terminal as two independent components, but in certain embodiments, it can The function that outputs and inputs of terminal is realized so that touch panel 9071 and display panel 9061 is integrated, is not limited herein specifically It is fixed.
Interface unit 908 is the interface that external device (ED) is connect with terminal 900.For example, external device (ED) may include it is wired or Wireless head-band earphone port, external power supply (or battery charger) port, wired or wireless data port, memory card port, For connecting port, the port audio input/output (I/O), video i/o port, ear port of the device with identification module Etc..Interface unit 908 can be used for receiving the input (for example, data information, electric power etc.) from external device (ED) and will One or more elements that the input received is transferred in terminal 900 or can be used for terminal 900 and external device (ED) it Between transmit data.
Memory 909 can be used for storing software program and various data.Memory 909 can mainly include storing program area The storage data area and, wherein storing program area can (such as the sound of application program needed for storage program area, at least one function Sound playing function, image player function etc.) etc.;Storage data area can store according to mobile phone use created data (such as Audio data, phone directory etc.) etc..In addition, memory 909 may include high-speed random access memory, it 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 910 is the control centre of terminal, using the various pieces of various interfaces and the entire terminal of connection, is led to It crosses operation or executes the software program and/or module being stored in memory 909, and call and be stored in memory 909 Data execute the various functions and processing data of terminal, to carry out integral monitoring to terminal.Processor 910 may include one Or multiple processing units;Preferably, processor 910 can integrate application processor and modem processor, wherein application processing The main processing operation system of device, user interface and application program etc., modem processor mainly handles wireless communication.It can manage Solution, above-mentioned modem processor can not also be integrated into processor 910.
Terminal 900 can also include the power supply 911 (such as battery) powered to all parts, it is preferred that power supply 911 can be with It is logically contiguous by power-supply management system and processor 910, thus by power-supply management system realize management charging, electric discharge, with And the functions such as power managed.
In addition, terminal 900 includes some unshowned functional modules, details are not described herein.
Preferably, the embodiment of the present invention also provides a kind of terminal, including processor 910, and memory 909 is stored in storage It is real when which is executed by processor 910 on device 909 and the computer program that can be run on the processor 910 Each process of the processing method embodiment of existing above-mentioned file, and identical technical effect can be reached, to avoid repeating, here not It repeats again.
The embodiment of the present invention also provides a kind of computer readable storage medium, and meter is stored on computer readable storage medium Calculation machine program, the computer program realize each process of the processing method embodiment of above-mentioned file when being executed by processor, and Identical technical effect can be reached, to avoid repeating, which is not described herein again.Wherein, the computer readable storage medium, such as Read-only memory (Read-Only Memory, abbreviation ROM), random access memory (Random Access Memory, abbreviation RAM), magnetic or disk etc..
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row His property includes, so that the process, method, article or the device that include a series of elements not only include 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 being somebody's turn to do There is also other identical elements in the process, method of element, article or device.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art The part contributed out can be embodied in the form of software products, which is stored in a storage medium In (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a 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 to 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 belongs within protection of the invention.
Above-described is the preferred embodiment of the present invention, it should be pointed out that the ordinary person of the art is come It says, can also make several improvements and retouch under the premise of not departing from principle of the present invention, these improvements and modifications also exist In protection scope of the present invention.

Claims (12)

1. a kind of processing method of file is applied to terminal characterized by comprising
Receive the file write operations of at least one application;
By the file of at least one application, according to the target cache plan to match in multi-level buffer strategy with the file Slightly, it is written in file storage area;Wherein, the multi-level buffer strategy is to store on user's storage card SD in the terminal The cache policy of multiple grades, different grades of cache policy correspond to different file storage areas.
2. the processing method of file according to claim 1, which is characterized in that the text by least one application Part is written in file storage area according to the target cache strategy to match in multi-level buffer strategy with the file, comprising:
According to the attribute of the file of at least one application, from the multi-level buffer strategy, selection and the file phase The first cache policy matched;
According to first cache policy of selection, the file is written in file storage area.
3. the processing method of file according to claim 1, which is characterized in that further include:
Write frequency of the file in file destination buffer zone is obtained, is delayed corresponding to the file destination buffer zone The grade for depositing strategy is higher than setting grade;
In the case where said write frequency exceeds given threshold, information warning is sent.
4. the processing method of file according to claim 3, which is characterized in that described to exceed setting in said write frequency In the case where threshold value, after transmission information warning, further includes:
In the case that the first cache policy used when monitoring that the file continues and was written according to last time is written, use The file is written in second cache policy;
Wherein, the grade of second cache policy is lower than first cache policy, and the grade of cache policy is according to file quilt The urgency of cleaning sorts from low to high.
5. the processing method of file according to claim 1, which is characterized in that further include:
Obtain the clearance order that the cleaning service module in the random access memory ROM of the terminal issues;
It is obtained in the file storage area according to the clearance order based on the grade of the multi-level buffer strategy, according to etc. Grade is lower than the file destination that the cache policy of predetermined level is cached;
Operation is purged to the file destination.
6. the processing method of file according to claim 5, which is characterized in that described to be purged to the file destination Operation, comprising:
The liveness for removing affiliated process in the file destination is lower than the file of setting value.
7. a kind of terminal characterized by comprising
Receiving module, for receiving the file write operations of at least one application;
First cache module, for by it is described at least one application file, according in multi-level buffer strategy with the file phase Matched target cache strategy is written in file storage area;Wherein, the multi-level buffer strategy is the user in the terminal The cache policy of the multiple grades stored on storage card SD, different grades of cache policy correspond to different file storage areas.
8. terminal according to claim 7, which is characterized in that first cache module includes:
Submodule is selected, the attribute for the file according at least one application is selected from the multi-level buffer strategy The first cache policy to match with the file;
The file is written in file storage area for first cache policy according to selection for cache sub-module.
9. terminal according to claim 7, which is characterized in that further include:
First obtains module, for obtaining write frequency of the file in file destination buffer zone, the file destination The grade of cache policy corresponding to buffer zone is higher than setting grade;
Sending module, for sending information warning in the case where said write frequency exceeds given threshold.
10. terminal according to claim 9, which is characterized in that further include:
Second cache module, the first cache policy for using when monitoring that the file continues and was written according to last time carry out In the case where write-in, the file is written using the second cache policy;
Wherein, the grade of second cache policy is lower than first cache policy, and the grade of cache policy is according to file quilt The urgency of cleaning sorts from low to high.
11. terminal according to claim 7, which is characterized in that further include:
Second obtains module, and the removing that the cleaning service module in the random access memory ROM for obtaining the terminal issues refers to It enables;
Third obtains module, for obtaining the file based on the grade of the multi-level buffer strategy according to the clearance order In storage region, according to grade lower than the file destination that the cache policy of a preset value is cached;
Module is removed, for being purged operation to the file destination.
12. terminal according to claim 11, which is characterized in that the removing module is specifically used for: removing the target The liveness of affiliated process is lower than the file of setting value in file.
CN201910199511.3A 2019-03-15 2019-03-15 File processing method and terminal Active CN109947367B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910199511.3A CN109947367B (en) 2019-03-15 2019-03-15 File processing method and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910199511.3A CN109947367B (en) 2019-03-15 2019-03-15 File processing method and terminal

Publications (2)

Publication Number Publication Date
CN109947367A true CN109947367A (en) 2019-06-28
CN109947367B CN109947367B (en) 2024-01-09

Family

ID=67009047

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910199511.3A Active CN109947367B (en) 2019-03-15 2019-03-15 File processing method and terminal

Country Status (1)

Country Link
CN (1) CN109947367B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111723115A (en) * 2020-06-24 2020-09-29 深圳前海微众银行股份有限公司 Data statistics method, device, terminal and storage medium based on multi-level cache
CN112311616A (en) * 2019-08-01 2021-02-02 北京百度网讯科技有限公司 Data communication frequency statistical method, device and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101981555A (en) * 2008-06-30 2011-02-23 英特尔公司 Apparatus and method for multi-level cache utilization
US20120210066A1 (en) * 2011-02-15 2012-08-16 Fusion-Io, Inc. Systems and methods for a file-level cache
CN104346294A (en) * 2013-07-31 2015-02-11 华为技术有限公司 Data reading/writing method and device and computer system on basis of multi-level Cache
CN104699626A (en) * 2013-12-10 2015-06-10 中兴通讯股份有限公司 Terminal internal memory processing method, device and terminal
CN107943718A (en) * 2017-12-07 2018-04-20 网宿科技股份有限公司 A kind of method and apparatus for clearing up cache file

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101981555A (en) * 2008-06-30 2011-02-23 英特尔公司 Apparatus and method for multi-level cache utilization
US20120210066A1 (en) * 2011-02-15 2012-08-16 Fusion-Io, Inc. Systems and methods for a file-level cache
CN104346294A (en) * 2013-07-31 2015-02-11 华为技术有限公司 Data reading/writing method and device and computer system on basis of multi-level Cache
CN104699626A (en) * 2013-12-10 2015-06-10 中兴通讯股份有限公司 Terminal internal memory processing method, device and terminal
CN107943718A (en) * 2017-12-07 2018-04-20 网宿科技股份有限公司 A kind of method and apparatus for clearing up cache file

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112311616A (en) * 2019-08-01 2021-02-02 北京百度网讯科技有限公司 Data communication frequency statistical method, device and storage medium
CN111723115A (en) * 2020-06-24 2020-09-29 深圳前海微众银行股份有限公司 Data statistics method, device, terminal and storage medium based on multi-level cache

Also Published As

Publication number Publication date
CN109947367B (en) 2024-01-09

Similar Documents

Publication Publication Date Title
CN103336925B (en) A kind of method and apparatus scanning acceleration
CN110221885A (en) A kind of interface display method and terminal device
CN110062105A (en) A kind of interface display method and terminal device
CN109885257A (en) A kind of disk file reading/writing method and device
CN109857494A (en) A kind of message prompt method and terminal device
CN110209323A (en) A kind of method and terminal device showing unread message
CN109447027A (en) Fingerprint acquisition device, fingerprint identification method and terminal
CN110309004A (en) The processing method and terminal of data
CN110008062A (en) A kind of data managing method and mobile terminal
CN108647569B (en) A kind of finger scan method, mobile terminal
CN108228398A (en) A kind of abnormality eliminating method and mobile terminal
CN110049187A (en) A kind of display methods and terminal device
CN110231899A (en) Display methods and terminal device
CN106791185A (en) Method for managing contact person information, device and mobile terminal
CN109753331A (en) A kind of information preview method and mobile terminal
CN109522524A (en) A kind of text browsing methods and terminal device
CN108170559A (en) A kind of data back up method and terminal
CN108833684A (en) A kind of information cuing method and terminal device
CN109947367A (en) A kind of processing method and terminal of file
CN108052391A (en) Memory Optimize Method, mobile terminal and readable storage medium storing program for executing based on thread deadlock
CN110536253A (en) A kind of group's Adding Way and mobile terminal
CN107992378B (en) A kind of document handling method and mobile terminal
CN110505340A (en) A kind of message method and terminal device
CN109992192A (en) A kind of interface display method and terminal device
CN109284146A (en) A kind of light application open method and mobile terminal

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