CN105893268A - Cached image processing method and device - Google Patents

Cached image processing method and device Download PDF

Info

Publication number
CN105893268A
CN105893268A CN201610171421.XA CN201610171421A CN105893268A CN 105893268 A CN105893268 A CN 105893268A CN 201610171421 A CN201610171421 A CN 201610171421A CN 105893268 A CN105893268 A CN 105893268A
Authority
CN
China
Prior art keywords
picture
information
target photo
image cache
space
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
CN201610171421.XA
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.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software 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 Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201610171421.XA priority Critical patent/CN105893268A/en
Publication of CN105893268A publication Critical patent/CN105893268A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • G06F12/0253Garbage collection, i.e. reclamation of unreferenced memory

Abstract

The invention relates to a cached image processing method and device. The method comprises the following steps: when the occupied space in an image cache space is greater than a preset threshold value, obtaining images which are least accessed in the image cache space; deleting the images which are least accessed from the image cache space. According to the cached image processing method and device, the images which are least accessed in the image cache space is acquired when the occupied space in the image cache space is greater than the preset threshold value, and the images which are least accessed is deleted from the image cache space, so that the aim of decreasing the cached images in the image cache space and the OOM error is avoided; meanwhile, the images which are least accessed are on interfaces that the users do not browse at ordinary times, so that the user experience is not influenced even the images which are least accessed are deleted.

Description

Caching image processing method and device
Technical field
It relates to computer technology, particularly relate to a kind of caching image processing method and device.
Background technology
Along with popularizing of mobile terminal, various application programs (Application is called for short APP) layer on mobile terminal Going out not poor, user also can install multiple APP on the mobile terminal of oneself.For the APP of some a large amount of use pictures, It is easy to too much cause internal memory to take in a large number because picture loads, thus (Out Of Memory is called for short to cause internal memory to overflow OOM) problem.
In correlation technique, multiple pictures load and use same pictures is to create multiple object, to save internal memory, But saying for APP, majority of case still loads the most different pictures.
Summary of the invention
For overcoming problem present in correlation technique, the disclosure provides one caching image processing method and device.
First aspect according to disclosure embodiment, it is provided that a kind of caching image processing method, including:
When having taken up room more than predetermined threshold value in image cache space, obtain least referenced figure in described image cache space Sheet;
Described least referenced picture is deleted from described image cache space.
Further, described method also includes:
Traversal picture information storage space, wherein, described pictorial information memory space is for storing the pictorial information that picture is corresponding;
Judge whether picture corresponding to Target Photo information is stored in described image cache space, and described Target Photo letter Whether the picture that breath is corresponding is current display picture, and described Target Photo information is arbitrary figure in described pictorial information memory space Sheet information;
If picture corresponding to described Target Photo information be not in described image cache space, and described Target Photo information is corresponding Picture be not current display picture, then the association status of described Target Photo information is designated weak rigidity.
Further, described method also includes:
Monitor picture corresponding to described Target Photo information when being called, obtain the association status of described Target Photo information;
If the association status of described Target Photo information is weak rigidity, then reload the figure that described Target Photo information is corresponding Sheet.
Further, described method also includes: traversal picture information storage space, wherein, and described pictorial information memory space For storing the pictorial information that picture is corresponding;
The pictorial information of soft pointer dereferences in described pictorial information memory space is deleted.
Further, when having taken up room more than predetermined threshold value in image cache space, obtain in described image cache space Least referenced picture, including:
When having taken up room more than predetermined threshold value in image cache space, nearest least referenced algorithm is used to obtain described picture Nearest least referenced picture in spatial cache.
Second aspect according to disclosure embodiment, it is provided that a kind of caching image processing method, including:
Acquisition module, when being configured to take up room more than predetermined threshold value in image cache space, obtains described picture and delays Deposit least referenced picture in space;
Cleaning module, is configured to delete described least referenced picture from described image cache space.
Further, described device also includes:
First spider module, is configured to travel through picture information storage space, and wherein, described pictorial information memory space is used for The pictorial information that storage picture is corresponding, described Target Photo information is any picture information in described pictorial information memory space;
Judge module, is configured to judge whether picture corresponding to Target Photo information is stored in described image cache space, And whether picture corresponding to described Target Photo information is current display picture;
Association process module, is configured at picture corresponding to described Target Photo information not in described image cache space, And picture corresponding to described Target Photo information is when being not current display picture, by the association status mark of described Target Photo information Know for weak rigidity.
Further, described device also includes:
Monitoring modular, is configured to monitor picture corresponding to described Target Photo information when being called, obtains described target figure The association status of sheet information;
Load-on module, is configured to, when the association status of described Target Photo information is weak rigidity, reload described target The picture that pictorial information is corresponding.
Further, described device also includes:
Second spider module, is configured to travel through picture information storage space, and wherein, described pictorial information memory space is used for The pictorial information that storage picture is corresponding;
Removing module, is configured to delete the pictorial information of soft pointer dereferences in described pictorial information memory space.
Further, described acquisition module, it is specifically configured to take up room more than predetermined threshold value in image cache space Time, use nearest least referenced algorithm to obtain nearest least referenced picture in described image cache space.
The third aspect according to disclosure embodiment, it is provided that a kind of terminal unit, including: processor, and be used for storing institute State the memorizer of the executable instruction of processor;
Wherein, described processor is configured to:
When having taken up room more than predetermined threshold value in image cache space, obtain least referenced figure in described image cache space Sheet;
Described least referenced picture is deleted from described image cache space.
Embodiment of the disclosure that the technical scheme of offer can include following beneficial effect: by accounting in image cache space During with space more than predetermined threshold value, obtain least referenced picture in this image cache space, by above-mentioned least referenced picture from upper State in image cache space and delete, it is achieved that reduce the picture that image cache space is cached, it is to avoid OOM mistake occurs, Simultaneously take account of the picture on the interface that the picture typically all user of least referenced will not browse at ordinary times, also will not shadow after deletion Ring Consumer's Experience.
It should be appreciated that it is only exemplary and explanatory that above general description and details hereinafter describe, can not limit The disclosure processed.
Accompanying drawing explanation
Accompanying drawing herein is merged in description and constitutes the part of this specification, it is shown that meets and embodiment of the disclosure, And for explaining the principle of the disclosure together with description.
Fig. 1 is according to a kind of flow chart caching image processing method shown in an exemplary embodiment;
Fig. 2 is according to a kind of flow chart caching image processing method shown in another exemplary embodiment;
Fig. 3 is according to a kind of block diagram caching picture processing device embodiment one shown in an exemplary embodiment;
Fig. 4 is according to a kind of block diagram caching picture processing device embodiment two shown in an exemplary embodiment;
Fig. 5 is according to a kind of block diagram caching picture processing device embodiment three shown in an exemplary embodiment;
Fig. 6 is according to a kind of block diagram caching picture processing device embodiment four shown in an exemplary embodiment;
Fig. 7 is the entity block diagram according to a kind of terminal unit shown in an exemplary embodiment;
Fig. 8 is the entity block diagram according to a kind of terminal unit 800 shown in an exemplary embodiment.
By above-mentioned accompanying drawing, it has been shown that the embodiment that the disclosure is clear and definite, hereinafter will be described in more detail.These accompanying drawings and Word describes the scope being not intended to be limited disclosure design by any mode, but is this by reference specific embodiment Skilled person illustrates the concept of the disclosure.
Detailed description of the invention
Here will illustrate exemplary embodiment in detail, its example represents in the accompanying drawings.Explained below relates to accompanying drawing Time, unless otherwise indicated, the same numbers in different accompanying drawings represents same or analogous key element.In following exemplary embodiment Described embodiment does not represent all embodiments consistent with the disclosure.On the contrary, they are only and such as appended power The example of the apparatus and method that some aspects that described in detail in profit claim, the disclosure are consistent.
Fig. 1 is according to a kind of flow chart caching image processing method shown in an exemplary embodiment, as it is shown in figure 1, should Caching image processing method can be applicable to terminal unit, and such as mobile phone, panel computer, notebook etc., in this no limit.
The method comprises the following steps:
In step S101, when having taken up room more than predetermined threshold value in image cache space, obtain this image cache empty Least referenced picture between.
When user uses terminal, certain APP of terminal displays to the user that picture, will conduct interviews the picture of caching, If certain picture is not the most accessed in Huan Cun, then shows that this picture is not the most shown in the recent period, but this picture is also In the position that image cache space hold is certain.
So can set a threshold value, when image cache space has taken up room more than predetermined threshold value, just trigger figure The cleaning of sheet spatial cache, at this moment, obtains the picture of least referenced in image cache space.
In step s 102, above-mentioned least referenced picture is deleted from above-mentioned image cache space.
Picture can cache with the form of bit diagram (bitmap), by least referenced picture from above-mentioned in image cache space In image cache space delete, will this least referenced picture bitmap remove.
The picture on interface that the picture of least referenced typically all user will not browse at ordinary times, does not typically interfere with after deletion yet Consumer's Experience, is the most also cleared up image cache space.
In the caching image processing method that the present embodiment provides, by having taken up room in image cache space more than presetting threshold During value, obtain least referenced picture in this image cache space, by above-mentioned least referenced picture from above-mentioned image cache space Delete, it is achieved that reduce the picture that image cache space is cached, it is to avoid OOM mistake occurs, and simultaneously takes account of minimum visit The picture on interface that the picture asked typically all user will not browse at ordinary times, does not interferes with Consumer's Experience yet after deletion.
Fig. 2 is according to a kind of flow chart caching image processing method shown in another exemplary embodiment, at above-described embodiment On the basis of, as in figure 2 it is shown, said method can also include:
In step s 201, traversal picture information storage space.
This pictorial information memory space is for storing the information of correspondence.Specifically, these information can include picture browsing (ImageView) information such as soft is quoted, picture path, picture network address.
During realization, above-mentioned pictorial information memory space can be a kind of data structure, such as Hash figure (HashMap), Wherein can store multiple key-value pair, each key assignments is unique.
While picture shows on the interface of APP, corresponding pictorial information is stored pictorial information memory space In, it addition, bitmap and the key assignments (key) of picture are stored in image cache space.
In step S202, it is judged that whether picture corresponding to Target Photo information is stored in image cache space, and should Whether picture corresponding to Target Photo information is current display picture.
Above-mentioned Target Photo information can be any picture information in above-mentioned pictorial information memory space, traversal pictorial information storage During space, the pictorial information in this pictorial information memory space can be performed successively the judgement of step S202, i.e. time Go through certain pictorial information to be carried out once judging.
In step S203, if picture corresponding to above-mentioned Target Photo information be not in image cache space, and above-mentioned target The picture that pictorial information is corresponding is not current display picture, then the association status of this Target Photo information is designated weak rigidity (weak)。
Picture is with the form caching of bitmap in image cache space, and when picture does not shows on interface, terminal will Release the bitmap and the adduction relationship of ImageView in pictorial information cached, so, just lose the bitmap quoted May be reclaimed and releasing memory by terminal.Picture corresponding to above-mentioned Target Photo information not in image cache space, explanation Bitmap corresponding to this Target Photo information has been deleted, and is specifically probably and takes up room in image cache space It is deleted more than during predetermined threshold value, it is also possible to reclaimed release by terminal.
If the bitmap of certain picture has been deleted, the bitmap that in pictorial information, ImageView quotes does not exists, Thus the association status of this Target Photo information is designated weak rigidity, in order to subsequent pictures navigation process is identified.
Further, monitor picture corresponding to above-mentioned Target Photo information when being called, obtain above-mentioned Target Photo information Association status.If the association status of this Target Photo information is weak rigidity, then reload this Target Photo information corresponding Picture.
Usually, the picture that in terminal, all APP are called all is loaded by the picture loader of terminal, is carrying out Before loading, picture loader can be registered to ImageView, to be registered as the observer of ImageView.Seeing When observing picture browsing action, i.e. monitor picture corresponding to Target Photo information when being called, obtain Target Photo information Association status, if the association status of this Target Photo information is weak rigidity, has illustrated the picture of Target Photo information association Not in image cache space, then need to obtain relevant Target Photo information by HashMap, and reload this mesh The picture that mark pictorial information is corresponding, to show on the interface of terminal.If the association status of this Target Photo information is Normal condition, then figure sector-meeting is normally drawn, it is not necessary to carry out other operation.
On the other hand, when traveling through above-mentioned pictorial information memory space, by the picture of pointer dereferences soft in pictorial information memory space Information deletion.If i.e. the soft pointer dereferences of certain pictorial information in pictorial information memory space, then directly delete this pictorial information Remove.To save the memory headroom of terminal further.Wherein, soft pointer is the softest to be quoted, and refers to the adduction relationship of pictorial information, The object picture that soft pointer dereferences refers to cited in soft pointer pictorial information has been deleted.
On the basis of above-described embodiment, when having taken up room more than predetermined threshold value in image cache space, obtain this picture Least referenced picture in spatial cache, when can be to have taken up room more than predetermined threshold value in image cache space, uses Nearly least referenced algorithm obtains nearest least referenced picture in this image cache space.
Nearest least referenced algorithm (Least Recently Used) i.e. can be used to obtain in image cache space minimum Access picture, and delete, it is ensured that Consumer's Experience is unaffected.Specifically, can be obtained by nearest least referenced algorithm Minimum in getting preset time period being accessed for picture, alternatively, preset time period can be certain after application program launching Time, this is not restricted.
Above-mentioned image cache space can be nearest minimum caching (LruCache), i.e. a kind of caching data structure, Ke Yi When in memory space, occupied space is more than predetermined threshold value, automatically will wherein delete by nearest least referenced picture, convenient the most real Existing.
Following for disclosure device embodiment, may be used for performing method of disclosure embodiment.For disclosure device embodiment In the details that do not discloses, refer to method of disclosure embodiment.
Fig. 3 is according to a kind of block diagram caching picture processing device embodiment one shown in an exemplary embodiment, this caching figure Piece treating apparatus can pass through software, hardware or both portions being implemented in combination with becoming the electronic equipment comprising touching display screen Divide or whole.With reference to Fig. 3, described device includes: acquisition module 301 and cleaning module 302.
Acquisition module 301, when being configured to take up room more than predetermined threshold value in image cache space, obtains described figure Least referenced picture in sheet spatial cache.
Cleaning module 302, is configured to delete described least referenced picture from described image cache space.
In the caching picture processing device that the present embodiment provides, taken up room in image cache space greatly by acquisition module When predetermined threshold value, obtain least referenced picture in this image cache space, then by cleaning module by above-mentioned least referenced picture Delete from above-mentioned image cache space, it is achieved that reduce the picture that image cache space is cached, it is to avoid OOM mistake is sent out Raw, simultaneously take account of the picture on the interface that the picture typically all user of least referenced will not browse at ordinary times, after deletion the most not Consumer's Experience can be affected.
On the basis of the embodiment shown in above-mentioned Fig. 3, Fig. 4 is to cache at picture according to the one shown in an exemplary embodiment The block diagram of reason device embodiment two, with reference to Fig. 4, said apparatus can also include: the first spider module 401, judge module 4 02 and association process module 403.Wherein:
First spider module 401, is configured to travel through picture information storage space, wherein, described pictorial information memory space For storing the pictorial information that picture is corresponding.
Judge module 402, is configured to judge whether picture corresponding to Target Photo information is stored in described image cache space In, and whether picture corresponding to described Target Photo information be current display picture.
Described Target Photo information is any picture information in described pictorial information memory space.
Association process module 403, is configured at picture corresponding to described Target Photo information not in described image cache space In, and when picture corresponding to described Target Photo information is not current display picture, by the association shape of described Target Photo information State is designated weak rigidity.
On the basis of the embodiment shown in above-mentioned Fig. 4, Fig. 5 is to cache at picture according to the one shown in an exemplary embodiment The block diagram of reason device embodiment three, with reference to Fig. 5, said apparatus can also include: monitoring modular 501 and load-on module 502, Wherein:
Monitoring modular 501, is configured to monitor picture corresponding to described Target Photo information when being called, obtains described mesh The association status of mark pictorial information.
Load-on module 502, is configured to when the association status of described Target Photo information is weak rigidity, reloads described The picture that Target Photo information is corresponding.
On the basis of the embodiment shown in above-mentioned Fig. 3, Fig. 6 is to cache at picture according to the one shown in an exemplary embodiment The block diagram of reason device embodiment four, with reference to Fig. 6, said apparatus can also include: the second spider module 601 and removing module 6 02, wherein:
Second spider module 601, is configured to travel through picture information storage space, wherein, described pictorial information memory space For storing the pictorial information that picture is corresponding.
Removing module 602, is configured to delete the pictorial information of soft pointer dereferences in described pictorial information memory space.
Further, on the basis of above-described embodiment, acquisition module 301, it is specifically configured in image cache space When having taken up room more than predetermined threshold value, nearest least referenced algorithm is used to obtain nearest minimum visit in described image cache space Ask picture.
The foregoing describing inner function module and the structural representation of caching picture processing device, its substantial executive agent should For a kind of terminal unit, such as mobile phone, notebook, panel computer, computer etc., this is not restricted.Fig. 7 is basis The entity block diagram of a kind of terminal unit shown in one exemplary embodiment, with reference to Fig. 7, this terminal unit can be implemented as: Processor 701 and for storing the memorizer 702 of processor 701 executable instruction;
Processor 701 is configured to:
When having taken up room more than predetermined threshold value in image cache space, obtain least referenced figure in described image cache space Sheet;
Described least referenced picture is deleted from described image cache space.
In the embodiment of above-mentioned terminal unit, it should be appreciated that this processor can be that CPU is (English: Central Processing Unit, is called for short: CPU), it is also possible to be other general processors, digital signal processor (English: Digital Signal Processor, is called for short: DSP), special IC (English: Application Specific Integrated Circuit, It is called for short: ASIC) etc..The processor that general processor can be microprocessor or this processor can also be any routine Deng, and aforesaid memorizer can be read only memory (English: read-only memory, abbreviation: ROM), at random Access memorizer (English: random access memory, RAM), flash memory, hard disk or solid-state it is called for short: Hard disk.SIM is also referred to as subscriber identification card, smart card, and digital mobile telephone must be loaded onto this card and can use. On computer chip, i.e. store the information of digital mobile phone client, the content such as the key of encryption and telephone directory of user. Hardware processor can be embodied directly in conjunction with the step of the method disclosed in disclosure embodiment to have performed, or with processing Hardware and software module combination execution in device complete.
Fig. 8 is the entity block diagram according to a kind of terminal unit 800 shown in an exemplary embodiment.Such as, this terminal unit Can be mobile phone, notebook, panel computer, computer etc. can realize cache picture processing device terminal unit.Reference Fig. 8, terminal unit 800 can include following one or more assembly: processes assembly 802, memorizer 804, electric power group Part 806, multimedia groupware 808, audio-frequency assembly 810, the interface 812 of input/output (I/O), sensor cluster 814, And communications component 816.
Processing assembly 802 and generally control the integrated operation of terminal unit 800, such as with display, data communication, multimedia is grasped Make and record operates the operation being associated.Process assembly 802 and can include that one or more processor 820 performs instruction, To complete all or part of step of above-mentioned method.Additionally, process assembly 802 can include one or more module, just Mutual in process between assembly 802 and other assemblies.Such as, process assembly 802 and can include multi-media module, with side Just multimedia groupware 808 and process between assembly 802 mutual.
Memorizer 804 is configured to store various types of data to support the operation at terminal unit 800.These data Example includes any application program for operation on terminal unit 800 or the instruction of method, Various types of data, message, figure Sheet, video etc..Memorizer 804 can be real by any kind of volatibility or non-volatile memory device or combinations thereof Existing, such as static RAM (SRAM), Electrically Erasable Read Only Memory (EEPROM), erasable Except programmable read only memory (EPROM), programmable read only memory (PROM), read only memory (ROM), Magnetic memory, flash memory, disk or CD.
The various assemblies that electric power assembly 806 is terminal unit 800 provide electric power.Electric power assembly 806 can include power management System, one or more power supplys, and other generate, manage and distribute, with for terminal unit 800, the assembly that electric power is associated.
The screen of one output interface of offer that multimedia groupware 808 is included between described terminal unit 800 and user.? In some embodiments, screen can include liquid crystal display (LCD) and touch panel (TP).If screen includes touching Touching panel, screen may be implemented as touch screen, to receive the input signal from user.Touch panel includes one or many Individual touch sensor is with the gesture on sensing touch, slip and touch panel.Described touch sensor can not only sense touch Or the border of sliding action, but also detect the persistent period relevant to described touch or slide and pressure.
Audio-frequency assembly 810 is configured to output and/or input audio signal.Such as, audio-frequency assembly 810 includes a Mike Wind (MIC), when terminal unit 800 is in operator scheme, during such as call model, logging mode and speech recognition mode, Mike is configured to receive external audio signal.The audio signal received can be further stored at memorizer 804 Or send via communications component 816.In certain embodiments, audio-frequency assembly 810 also includes a speaker, is used for exporting Audio signal.
I/O interface 812 provides interface for processing between assembly 802 and peripheral interface module, above-mentioned peripheral interface module is permissible It is keyboard, puts striking wheel, button etc..
Sensor cluster 814 includes one or more sensor, for providing the state of various aspects to comment for terminal unit 800 Estimate.Such as, what sensor cluster 814 can detect terminal unit 800 opens/closed mode, the relative localization of assembly, The most described assembly is display and the keypad of terminal unit 800, and sensor cluster 814 can also detect terminal unit 800 or the position change of 800 1 assemblies of terminal unit, the presence or absence that user contacts with terminal unit 800, eventually End equipment 800 orientation or acceleration/deceleration and the variations in temperature of terminal unit 800.Sensor cluster 814 can include close Sensor, is configured to when not having any physical contact object near detecting.Sensor cluster 814 also may be used To include optical sensor, such as CMOS or ccd image sensor, it is used for using in imaging applications.In some embodiments In, this sensor cluster 814 can also include acceleration transducer, gyro sensor, Magnetic Sensor, pressure transducer Or temperature sensor.
Communications component 816 is configured to facilitate the communication of wired or wireless mode between terminal unit 800 and other equipment.Eventually End equipment 800 can access wireless network based on communication standard, such as WiFi, 2G or 3G, or combinations thereof.? In one exemplary embodiment, communications component 816 receives the broadcast singal from external broadcasting management system via broadcast channel Or broadcast related information.In one exemplary embodiment, described communications component 816 also includes near-field communication (NFC) mould Block, to promote junction service.Such as, can be based on RF identification (RFID) technology, Infrared Data Association in NFC module (IrDA) technology, ultra broadband (UWB) technology, bluetooth (BT) technology and other technologies realize.
In the exemplary embodiment, terminal unit 800 can by one or more application specific integrated circuits (ASIC), Digital signal processor (DSP), digital signal processing appts (DSPD), PLD (PLD), existing Field programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic components realize, and are used for holding Row said method.
In the exemplary embodiment, additionally provide a kind of non-transitory computer-readable recording medium including instruction, such as, wrap Including the memorizer 804 of instruction, above-mentioned instruction can have been performed said method by the processor 820 of terminal unit 800.Example As, described non-transitory computer-readable recording medium can be ROM, random access memory (RAM), CD-ROM, Tape, floppy disk and optical data storage devices etc..
A kind of non-transitory computer-readable recording medium, when the instruction in described storage medium is by the process assembly of terminal unit During execution so that terminal unit is able to carry out a kind of caching image processing method, and described method includes:
When having taken up room more than predetermined threshold value in image cache space, obtain least referenced figure in described image cache space Sheet;
Described least referenced picture is deleted from described image cache space.
Further, the method also includes:
Traversal picture information storage space, wherein, described pictorial information memory space is for storing the pictorial information that picture is corresponding;
Judge whether picture corresponding to Target Photo information is stored in described image cache space, and described Target Photo letter Whether the picture that breath is corresponding is current display picture;Wherein, during described Target Photo information is described pictorial information memory space Any picture information.
If picture corresponding to described Target Photo information be not in described image cache space, and described Target Photo information is corresponding Picture be not current display picture, then the association status of described Target Photo information is designated weak rigidity.
Further, the method also includes: monitors picture corresponding to described Target Photo information when being called, obtains described The association status of Target Photo information;
If the association status of described Target Photo information is weak rigidity, then reload the figure that described Target Photo information is corresponding Sheet.
Further, the method also includes: traversal picture information storage space, and wherein, described pictorial information memory space is used In the pictorial information that storage picture is corresponding;
The pictorial information of soft pointer dereferences in described pictorial information memory space is deleted.
Further, when having taken up room more than predetermined threshold value in image cache space, obtain in described image cache space Least referenced picture, including:
When having taken up room more than predetermined threshold value in image cache space, nearest least referenced algorithm is used to obtain described picture Nearest least referenced picture in spatial cache.
Those skilled in the art, after considering description and putting into practice invention disclosed herein, will readily occur to other reality of the disclosure Execute scheme.The application is intended to any modification, purposes or the adaptations of the disclosure, these modification, purposes or Adaptations follow the disclosure general principle and include the undocumented common knowledge in the art of the disclosure or Conventional techniques means.Description and embodiments is considered only as exemplary, and the true scope of the disclosure and spirit are by following power Profit requires to point out.
It should be appreciated that the disclosure is not limited to precision architecture described above and illustrated in the accompanying drawings, and can To carry out various modifications and changes without departing from the scope.The scope of the present disclosure is only limited by appended claim.

Claims (11)

1. a caching image processing method, it is characterised in that including:
When having taken up room more than predetermined threshold value in image cache space, obtain least referenced figure in described image cache space Sheet;
Described least referenced picture is deleted from described image cache space.
Method the most according to claim 1, it is characterised in that also include:
Traversal picture information storage space, wherein, described pictorial information memory space is for storing the pictorial information that picture is corresponding;
Judge whether picture corresponding to Target Photo information is stored in described image cache space, and described Target Photo letter Whether the picture that breath is corresponding is current display picture, and described Target Photo information is arbitrary figure in described pictorial information memory space Sheet information;
If picture corresponding to described Target Photo information be not in described image cache space, and described Target Photo information is corresponding Picture be not current display picture, then the association status of described Target Photo information is designated weak rigidity.
Method the most according to claim 2, it is characterised in that also include:
Monitor picture corresponding to described Target Photo information when being called, obtain the association status of described Target Photo information;
If the association status of described Target Photo information is weak rigidity, then reload the figure that described Target Photo information is corresponding Sheet.
Method the most according to claim 1, it is characterised in that also include:
Traversal picture information storage space, wherein, described pictorial information memory space is for storing the pictorial information that picture is corresponding;
The pictorial information of soft pointer dereferences in described pictorial information memory space is deleted.
Method the most according to claim 1, it is characterised in that taken up room in image cache space more than presetting During threshold value, obtain least referenced picture in described image cache space, including:
When having taken up room more than predetermined threshold value in image cache space, nearest least referenced algorithm is used to obtain described picture Nearest least referenced picture in spatial cache.
6. a caching picture processing device, it is characterised in that including:
Acquisition module, when being configured to take up room more than predetermined threshold value in image cache space, obtains described picture and delays Deposit least referenced picture in space;
Cleaning module, is configured to delete described least referenced picture from described image cache space.
Device the most according to claim 6, it is characterised in that also include:
First spider module, is configured to travel through picture information storage space, and wherein, described pictorial information memory space is used for The pictorial information that storage picture is corresponding;
Judge module, is configured to judge whether picture corresponding to Target Photo information is stored in described image cache space, And whether picture corresponding to described Target Photo information is current display picture, described Target Photo information is described picture letter Any picture information in breath memory space;
Association process module, is configured at picture corresponding to described Target Photo information not in described image cache space, And picture corresponding to described Target Photo information is when being not current display picture, by the association status mark of described Target Photo information Know for weak rigidity.
Device the most according to claim 7, it is characterised in that also include:
Monitoring modular, is configured to monitor picture corresponding to described Target Photo information when being called, obtains described target figure The association status of sheet information;
Load-on module, is configured to, when the association status of described Target Photo information is weak rigidity, reload described target The picture that pictorial information is corresponding.
Device the most according to claim 6, it is characterised in that also include:
Second spider module, is configured to travel through picture information storage space, and wherein, described pictorial information memory space is used for The pictorial information that storage picture is corresponding;
Removing module, is configured to delete the pictorial information of soft pointer dereferences in described pictorial information memory space.
Device the most according to claim 6, it is characterised in that described acquisition module, is specifically configured at picture When spatial cache has taken up room more than predetermined threshold value, nearest least referenced algorithm is used to obtain in described image cache space Least referenced picture recently.
11. 1 kinds of terminal units, it is characterised in that including: processor, and for storing performing of described processor The memorizer of instruction;
Wherein, described processor is configured to:
When having taken up room more than predetermined threshold value in image cache space, obtain least referenced figure in described image cache space Sheet;
Described least referenced picture is deleted from described image cache space.
CN201610171421.XA 2016-03-24 2016-03-24 Cached image processing method and device Pending CN105893268A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610171421.XA CN105893268A (en) 2016-03-24 2016-03-24 Cached image processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610171421.XA CN105893268A (en) 2016-03-24 2016-03-24 Cached image processing method and device

Publications (1)

Publication Number Publication Date
CN105893268A true CN105893268A (en) 2016-08-24

Family

ID=57014253

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610171421.XA Pending CN105893268A (en) 2016-03-24 2016-03-24 Cached image processing method and device

Country Status (1)

Country Link
CN (1) CN105893268A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106503169A (en) * 2016-10-31 2017-03-15 百度在线网络技术(北京)有限公司 Image processing method and device
CN107193446A (en) * 2017-07-10 2017-09-22 北京小米移动软件有限公司 image processing method, device and storage medium
CN107577711A (en) * 2017-08-01 2018-01-12 北京奇艺世纪科技有限公司 A kind of method and apparatus of image cache
CN108108089A (en) * 2016-11-24 2018-06-01 中国移动通信有限公司研究院 A kind of picture loading method and device
CN108959505A (en) * 2018-06-27 2018-12-07 平安科技(深圳)有限公司 A kind of method and terminal device of management caching picture
WO2020006859A1 (en) * 2018-07-06 2020-01-09 平安科技(深圳)有限公司 Image cache cleaning method and device, terminal device and medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102541605A (en) * 2011-12-30 2012-07-04 Tcl集团股份有限公司 Method and device for picture loading based on Android system
CN102622347A (en) * 2011-01-26 2012-08-01 腾讯科技(深圳)有限公司 Image management method and movable terminal
US20140032818A1 (en) * 2012-07-30 2014-01-30 Jichuan Chang Providing a hybrid memory
CN103885753A (en) * 2014-03-03 2014-06-25 广州金山网络科技有限公司 Management method and device for caching images and client side

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102622347A (en) * 2011-01-26 2012-08-01 腾讯科技(深圳)有限公司 Image management method and movable terminal
CN102541605A (en) * 2011-12-30 2012-07-04 Tcl集团股份有限公司 Method and device for picture loading based on Android system
US20140032818A1 (en) * 2012-07-30 2014-01-30 Jichuan Chang Providing a hybrid memory
CN103885753A (en) * 2014-03-03 2014-06-25 广州金山网络科技有限公司 Management method and device for caching images and client side

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106503169A (en) * 2016-10-31 2017-03-15 百度在线网络技术(北京)有限公司 Image processing method and device
CN108108089A (en) * 2016-11-24 2018-06-01 中国移动通信有限公司研究院 A kind of picture loading method and device
CN108108089B (en) * 2016-11-24 2021-08-10 中国移动通信有限公司研究院 Picture loading method and device
CN107193446A (en) * 2017-07-10 2017-09-22 北京小米移动软件有限公司 image processing method, device and storage medium
CN107577711A (en) * 2017-08-01 2018-01-12 北京奇艺世纪科技有限公司 A kind of method and apparatus of image cache
CN107577711B (en) * 2017-08-01 2020-04-21 北京奇艺世纪科技有限公司 Method and device for caching pictures
CN108959505A (en) * 2018-06-27 2018-12-07 平安科技(深圳)有限公司 A kind of method and terminal device of management caching picture
WO2020006859A1 (en) * 2018-07-06 2020-01-09 平安科技(深圳)有限公司 Image cache cleaning method and device, terminal device and medium

Similar Documents

Publication Publication Date Title
CN105893268A (en) Cached image processing method and device
US8984537B2 (en) Maintaining data states upon forced exit
CN105955766A (en) Method and device for application preloading
RU2613028C2 (en) Method and device for file backup
CN106454392A (en) Live broadcast processing method, device and terminal
CN104766005A (en) Management method and device for application software access authority
CN103914337B (en) Service calling method, device and terminal
CN104899083A (en) Application share method and device
CN107040591A (en) A kind of method and device being controlled to client
CN110990341A (en) Method, device, electronic equipment and medium for clearing data
CN107423394A (en) Page display method and device
CN106598488A (en) Distributed data reading method and device
CN105808305A (en) Static resource loading method and device
CN106648730A (en) Processing method and device of abnormal application
CN103870955B (en) The processing method and processing device of data in webpage
CN109634762B (en) Data recovery method and device, electronic equipment and storage medium
CN104850643A (en) Image comparison method and device
CN106331076A (en) Advertisement push method and apparatus
CN105704322A (en) Weather information obtaining method and apparatus
CN106528247B (en) Data refreshing method and device
CN109918348B (en) Cleaning method, terminal and computer readable storage medium for application browsing record
CN106020939A (en) Lock deleting method and device and device for deleting lock
CN111258952B (en) Data storage control method, device and storage medium
CN108012258A (en) Data flux management method, device, terminal and the server of virtual SIM card
CN107256151A (en) Processing method, device and the terminal of page rendering

Legal Events

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

Application publication date: 20160824

RJ01 Rejection of invention patent application after publication