CN110020266B - Method and device for accessing pictures, computer-readable storage medium and terminal equipment - Google Patents

Method and device for accessing pictures, computer-readable storage medium and terminal equipment Download PDF

Info

Publication number
CN110020266B
CN110020266B CN201710570799.1A CN201710570799A CN110020266B CN 110020266 B CN110020266 B CN 110020266B CN 201710570799 A CN201710570799 A CN 201710570799A CN 110020266 B CN110020266 B CN 110020266B
Authority
CN
China
Prior art keywords
picture
loaded
memory cache
cache
memory
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710570799.1A
Other languages
Chinese (zh)
Other versions
CN110020266A (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.)
Shenzhen TCL High-Tech Development Co Ltd
Original Assignee
Shenzhen TCL High-Tech Development 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 Shenzhen TCL High-Tech Development Co Ltd filed Critical Shenzhen TCL High-Tech Development Co Ltd
Priority to CN201710570799.1A priority Critical patent/CN110020266B/en
Publication of CN110020266A publication Critical patent/CN110020266A/en
Application granted granted Critical
Publication of CN110020266B publication Critical patent/CN110020266B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9574Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Systems or methods specially adapted for specific business sectors, e.g. utilities or tourism
    • G06Q50/01Social networking

Abstract

The invention relates to the field of image processing, and provides a method and a device for accessing pictures, a computer readable storage medium and terminal equipment, so as to improve the loading speed of the pictures. The method comprises the following steps: preferentially loading the picture to be loaded from the memory cache according to the query factor of the picture to be loaded; if the picture to be loaded does not exist in the hard disk cache and the memory cache, the picture to be loaded is obtained from the network; if the memory cache does not reach the upper limit of the storage space, storing the picture to be loaded into the memory cache; and if the memory cache reaches the upper limit of the storage space, deleting the picture with the least access amount from the memory cache. The technical scheme provided by the invention can accelerate the speed of loading the picture and enhance the smoothness of picture loading during operations such as picture sharing and the like.

Description

Method and device for accessing pictures, computer-readable storage medium and terminal equipment
Technical Field
The invention belongs to the field of image processing, and particularly relates to a method and a device for accessing pictures, a computer readable storage medium and terminal equipment.
Background
The popularization of social sharing type APP enables communication and communication of people to be more convenient and efficient, and sharing of pictures is a common function of the APP. High definition picture quality and smooth loading speed are the ultimate pursuits of such APPs, and the smoothness of picture loading speed is highly dependent on high memory and high network speed.
For an Android system, the available memory of each APP is allocated by the system, and is related to the system version, the terminal hardware configuration and the like, the memory occupied by each APP has a certain size, which is not infinite, and the network speed is determined by the network environment where the terminal is located to a great extent. How to realize fluency in picture loading under the conditions of limited memory and network speed is always a problem of research in the industry.
The existing solution to the above problem is a memory cache and a hard disk cache, but the former has the defect that the size of the cache is limited, and after deleting the picture with the least access amount, if the picture is accessed again, the picture needs to be obtained again on the network, so that the loading speed of the picture is affected, and the hard disk cache has the defect that the storage access speed is slower than that of the memory cache.
The above technical problems need to be solved in the industry.
Disclosure of Invention
The invention provides a method and a device for accessing pictures, a computer readable storage medium and terminal equipment, which are used for improving the loading speed of the pictures.
The invention provides a method for accessing pictures, which comprises the following steps:
preferentially loading the picture to be loaded from a memory cache according to the query factor of the picture to be loaded;
if the picture to be loaded does not exist in the hard disk cache and the memory cache, the picture to be loaded is obtained from a network;
if the memory cache does not reach the upper limit of the storage space, storing the picture to be loaded into the memory cache;
and if the memory cache reaches the upper limit of the storage space, deleting the picture with the least access amount from the memory cache.
A second aspect of the present invention provides an apparatus for accessing pictures, the apparatus comprising:
the priority loading module is used for preferentially loading the picture to be loaded from the memory cache according to the query factor of the picture to be loaded;
the obtaining module is used for obtaining the picture to be loaded from a network if the picture to be loaded does not exist in the hard disk cache and the memory cache;
the first storage module is used for storing the picture to be loaded to the memory cache if the memory cache does not reach the upper limit of the storage space;
and the deleting module is used for deleting the picture with the minimum access amount from the memory cache if the memory cache reaches the upper limit of the storage space.
A third aspect of the present invention provides a terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:
preferentially loading the picture to be loaded from a memory cache according to the query factor of the picture to be loaded;
if the picture to be loaded does not exist in the hard disk cache and the memory cache, the picture to be loaded is obtained from a network;
if the memory cache does not reach the upper limit of the storage space, storing the picture to be loaded into the memory cache;
and if the memory cache reaches the upper limit of the storage space, deleting the picture with the least access amount from the memory cache.
A fourth aspect of embodiments of the present invention provides a computer-readable storage medium storing a computer program, which when executed by a processor, implements the steps of:
preferentially loading the picture to be loaded from a memory cache according to the query factor of the picture to be loaded;
if the picture to be loaded does not exist in the hard disk cache and the memory cache, the picture to be loaded is obtained from a network;
if the memory cache does not reach the upper limit of the storage space, storing the picture to be loaded into the memory cache;
and if the memory cache reaches the upper limit of the storage space, deleting the picture with the least access amount from the memory cache.
According to the technical scheme provided by the invention, the picture to be loaded is preferentially loaded from the memory cache according to the query factor of the picture to be loaded; after the storage space of the memory cache reaches the upper limit, the picture with the least access amount is deleted from the memory cache, so that other pictures can be stored in the memory cache, and the pictures are always loaded preferentially during subsequent access.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flow chart illustrating an implementation of a method for accessing pictures according to an embodiment of the present invention;
FIG. 2 is a schematic structural diagram of an apparatus for accessing pictures according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of an apparatus for accessing pictures according to another embodiment of the present invention;
FIG. 4 is a schematic structural diagram of an apparatus for accessing pictures according to another embodiment of the present invention;
fig. 5 is a schematic structural diagram of a terminal device according to an embodiment of the present invention.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
In order to explain the technical means of the present invention, the following description will be given by way of specific examples.
Fig. 1 is a schematic diagram of an implementation flow of a method for accessing pictures according to an embodiment of the present invention, which mainly includes the following steps S101 to S104, described in detail below:
and S101, preferentially loading the picture to be loaded from the memory cache according to the query factor of the picture to be loaded.
When the system needs to load a picture, it sends a request for loading a picture Resource, where the parameter included in the request may be a query factor of the picture to be loaded, and the query factor may be, for example, a url (uniform Resource locator) of the picture to be loaded. As an embodiment of the present invention, preferentially loading the picture to be loaded from the memory cache according to the query factor of the picture to be loaded can be implemented by the following steps S1011 to S1015:
and S1011, inquiring the memory cache according to the inquiry factor of the picture to be loaded.
S1012, if the picture to be loaded is stored in the memory cache, the picture to be loaded is loaded.
Because the access speed of the memory cache is higher than that of the hard disk cache, in the embodiment of the invention, the memory cache can be inquired firstly according to the inquiry factor of the picture to be loaded. If the picture to be loaded is stored in the memory cache, the picture to be loaded is directly loaded from the memory cache without being inquired at other places.
And S1013, if the to-be-loaded picture is not stored in the memory cache, querying the hard disk cache.
It should be noted that, in the embodiment of the present invention, a cache management module is provided for managing a memory cache, a hard disk cache, and some operations thereof, such as deletion and acquisition of pictures, specifically including parameter setting, data monitoring, and the like, where the parameter setting is a preset threshold of an access frequency of a picture stored in the hard disk cache within a preset time, and is used to transfer the picture to the memory cache for storage if the access frequency of the picture in the hard disk cache reaches the preset threshold within the preset time; the data monitoring comprises monitoring the picture deleting operation event in the memory cache and monitoring the picture obtaining operation event in the hard disk cache. Specifically, when actions such as system deletion and recovery occur, the memory cache executes a function entryRemoved (bootean asserted, K key, V old value, V new value), where the parameter asserted is a boolean, the parameter key is a query factor of a picture to be loaded, the parameter oldValue represents the picture to be loaded itself, the newValue represents the updated picture of the picture to be loaded, and the bootean, K, and V are data types of the parameters; when the eviced parameter of the function is true, the system is deleted and recycled, therefore, whether the system deletion recycling operation occurs or not can be known only by rewriting the function and monitoring the eviced parameter, so that monitoring of the picture deletion operation event in the memory cache is realized, the hard disk cache can have a file named as a journal (log) under a directory stored by the cached picture, the operation record of the program for each picture is stored in the file, and if the access frequency of a certain picture is required to be obtained, monitoring of the picture deletion operation event obtained by the hard disk cache can be realized only by obtaining the reading record corresponding to the picture in the journal file.
And S1014, if the picture to be loaded is stored in the hard disk cache, recording the access times of the picture to be loaded.
The recorded access times of the pictures to be loaded can be used as a basis for whether the pictures are moved to the memory cache or not.
And S1015, loading the picture to be loaded with the access times recorded.
And S102, if the picture to be loaded does not exist in the hard disk cache and the memory cache, obtaining the picture to be loaded from the network.
The picture to be loaded can be obtained from the network according to the URL of the picture to be loaded.
And S103, if the memory cache does not reach the upper limit of the storage space, storing the picture to be loaded into the memory cache.
And S104, if the memory cache reaches the upper limit of the storage space, deleting the picture with the least access amount from the memory cache.
As described above, since the access speed of the memory cache is faster than that of the hard disk cache, the pictures acquired from the network are preferentially stored in the memory cache, but the precondition is that the memory cache does not reach the upper limit of the storage space. And if the memory cache does not reach the upper limit of the storage space, storing the picture to be loaded into the memory cache. If the memory cache reaches the upper limit of the storage space, the picture with the minimum access amount is deleted from the memory cache, and the vacated space can continuously store other pictures with the access amount which is more than that of the picture with the minimum access amount.
As mentioned above, the cache management module may monitor the memory cache, the hard disk cache, some operations thereof, and the like. In the above embodiment, the method further includes monitoring a picture deletion operation event of the memory cache. And if the picture deleting operation event occurs in the memory cache is monitored, deleting the picture with the minimum access amount from the memory cache, and storing the deleted picture into the hard disk cache.
Although the pictures in the memory cache are accessed preferentially, the pictures in the hard disk cache are not stored all the way to the hard disk cache. As described above, the cache management module may set a parameter of a preset threshold for the access frequency of the pictures stored in the hard disk cache within a preset time, and the access frequency of the pictures in the hard disk cache may also be recorded. The method provided by the embodiment of the invention also comprises the following steps: and inquiring the access frequency of the pictures in the hard disk cache according to a preset period, and moving the pictures of which the access frequency reaches a preset threshold value in a preset time from the hard disk cache to the memory cache.
As can be seen from the method for accessing pictures illustrated in fig. 1, the picture to be loaded is preferentially loaded from the memory cache according to the query factor of the picture to be loaded; after the storage space of the memory cache reaches the upper limit, the picture with the least access amount is deleted from the memory cache, so that other pictures can be stored in the memory cache, and the pictures are always loaded preferentially during subsequent access.
Fig. 2 is a schematic diagram of an apparatus for accessing pictures according to an embodiment of the present invention, which mainly includes a priority loading module 201, an obtaining module 202, a first storing module 203, and a deleting module 204, and the following is described in detail:
the priority loading module 201 is configured to preferentially load the picture to be loaded from the memory cache according to the query factor of the picture to be loaded;
the obtaining module 202 is configured to obtain the picture to be loaded from the network if the picture to be loaded does not exist in the hard disk cache and the memory cache;
the first storage module 203 is configured to store the picture to be loaded into the memory cache if the memory cache does not reach the upper limit of the storage space;
the deleting module 204 is configured to delete the picture with the minimum access amount from the memory cache if the memory cache has reached the upper limit of the storage space.
It should be noted that, since the apparatus provided in the embodiment of the present invention is based on the same concept as the method embodiment of the present invention, the technical effect brought by the apparatus is the same as the method embodiment of the present invention, and specific contents may refer to the description in the method embodiment of the present invention, and are not described herein again.
The apparatus for accessing pictures illustrated in fig. 2 may further include a monitoring module 301, such as the apparatus for accessing pictures illustrated in fig. 3. The monitoring module 301 is configured to monitor a picture deletion operation event of the memory cache.
The apparatus for accessing pictures illustrated in fig. 3 may further include a second storage module 01, such as the apparatus for accessing pictures illustrated in fig. 4. The second storage module 401 is configured to, if the monitoring module 301 monitors that a picture deletion operation event occurs in the memory cache, delete the picture with the smallest access amount from the memory cache by the deletion module 204, and store the deleted picture in the hard disk cache.
The apparatus of any of the above examples of fig. 2 to 4 may further include a frequency query module and a shift module, wherein:
the frequency query module is used for querying the access frequency of the pictures in the hard disk cache according to a preset period;
and the moving module is used for moving the picture with the access frequency reaching the preset threshold value in the preset time from the hard disk cache to the memory cache.
The priority loading module 201 illustrated in any one of fig. 2 to fig. 4 may include a first query unit, a first loading unit, a second query unit, a first recording unit, and a second loading unit, where:
the first query unit is used for querying the memory cache according to the query factor of the picture to be loaded;
the first loading unit is used for loading the picture to be loaded if the picture to be loaded is stored in the memory cache;
the second query unit is used for querying the hard disk cache if the to-be-loaded picture is not stored in the memory cache;
the first recording unit is used for recording the access times of the pictures to be loaded if the pictures to be loaded are stored in the hard disk cache;
and the second loading unit is used for loading the pictures to be loaded with the recorded access times.
Fig. 5 is a schematic structural diagram of a terminal device according to an embodiment of the present invention. As shown in fig. 5, the terminal device 5 of this embodiment includes: a processor 50, a memory 51 and a computer program 52, such as a program of a method of accessing pictures, stored in the memory 51 and executable on the processor 50. The processor 50 executes the computer program 52 to implement the steps in the above-mentioned method embodiment for accessing pictures, such as the steps S101 to S104 shown in fig. 1. Alternatively, the processor 50, when executing the computer program 52, implements the functions of each module/unit in each device embodiment described above, such as the functions of the priority loading module 201, the obtaining module 202, the first storing module 203, and the deleting module 204 shown in fig. 2.
Illustratively, the computer program 52 of the method for accessing pictures mainly includes: preferentially loading the picture to be loaded from the memory cache according to the query factor of the picture to be loaded; if the picture to be loaded does not exist in the hard disk cache and the memory cache, the picture to be loaded is obtained from the network; if the memory cache does not reach the upper limit of the storage space, storing the picture to be loaded into the memory cache; and if the memory cache reaches the upper limit of the storage space, deleting the picture with the least access amount from the memory cache. The computer program 52 may be divided into one or more modules/units, which are stored in the memory 51 and executed by the processor 50 to accomplish the present invention. One or more modules/units may be a series of computer program instruction segments capable of performing specific functions that describe the execution of computer program 52 in computing device 5. For example, the computer program 52 may be divided into the functions of the priority loading module 201, the obtaining module 202, the first storing module 203, and the deleting module 204 (modules in the virtual device), and the specific functions of each module are as follows: the priority loading module 201 is configured to preferentially load the picture to be loaded from the memory cache according to the query factor of the picture to be loaded; the obtaining module 202 is configured to obtain the picture to be loaded from the network if the picture to be loaded does not exist in the hard disk cache and the memory cache; the first storage module 203 is configured to store the picture to be loaded into the memory cache if the memory cache does not reach the upper limit of the storage space; the deleting module 204 is configured to delete the picture with the minimum access amount from the memory cache if the memory cache has reached the upper limit of the storage space.
The terminal device 5 may include, but is not limited to, a processor 50, a memory 51. Those skilled in the art will appreciate that fig. 5 is merely an example of a terminal device 5 and does not constitute a limitation of terminal device 5 and may include more or fewer components than shown, or some components may be combined, or different components, e.g., the terminal device may also include input output devices, network access devices, buses, etc.
The Processor 50 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The storage 51 may be an internal storage unit of the terminal device 5, such as a hard disk or a memory of the terminal device 5. The memory 51 may also be an external storage device of the terminal device 5, such as a plug-in hard disk provided on the terminal device 5, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like. Further, the memory 51 may also include both an internal storage unit of the terminal device 5 and an external storage device. The memory 51 is used for storing computer programs and other programs and data required by the terminal device. The memory 51 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules, so as to perform all or part of the functions described above. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, a module or a unit may be divided into only one logical function, and may be implemented in other ways, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the processes in the method according to the embodiments of the present invention may also be implemented by instructing related hardware through a computer program, where the computer program of the method for accessing pictures may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps in the embodiments of the method may be implemented, that is, the picture to be loaded is preferentially loaded from a memory cache according to the query factor of the picture to be loaded; if the picture to be loaded does not exist in the hard disk cache and the memory cache, the picture to be loaded is obtained from the network; if the memory cache does not reach the upper limit of the storage space, storing the picture to be loaded into the memory cache; and if the memory cache reaches the upper limit of the storage space, deleting the picture with the least access amount from the memory cache. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying computer program code, recording medium, U.S. disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution media, and the like. It should be noted that the computer readable medium may contain other components which may be suitably increased or decreased as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, in accordance with legislation and patent practice, the computer readable medium does not include electrical carrier signals and telecommunications signals. The above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

Claims (6)

1. A method for accessing pictures, the method comprising:
preferentially loading the picture to be loaded from a memory cache according to the URL of the picture to be loaded;
if the picture to be loaded does not exist in the hard disk cache and the memory cache, the picture to be loaded is obtained from a network;
if the memory cache does not reach the upper limit of the storage space, storing the picture to be loaded into the memory cache;
if the memory cache reaches the upper limit of the storage space, deleting the picture with the least access amount from the memory cache;
monitoring the picture deleting operation event of the memory cache;
and if the picture deleting operation event occurs in the memory cache, deleting the picture with the least access amount from the memory cache, and storing the deleted picture into the hard disk cache.
2. The method of claim 1, wherein the method further comprises:
inquiring the access frequency of the pictures in the hard disk cache according to a preset period;
and moving the picture of which the access frequency reaches a preset threshold value in a preset time from the hard disk cache to the memory cache.
3. The method according to claim 1, wherein the preferentially loading the picture to be loaded from the memory cache according to the query factor of the picture to be loaded comprises:
inquiring the memory cache according to the inquiry factor of the picture to be loaded;
if the picture to be loaded is stored in the memory cache, loading the picture to be loaded;
if the picture to be loaded is not stored in the memory cache, inquiring the hard disk cache;
if the picture to be loaded is stored in the hard disk cache, recording the access times of the picture to be loaded;
and loading the pictures to be loaded with the recorded access times.
4. An apparatus for accessing pictures, the apparatus comprising:
the priority loading module is used for preferentially loading the picture to be loaded from the memory cache according to the URL of the picture to be loaded;
the obtaining module is used for obtaining the picture to be loaded from a network if the picture to be loaded does not exist in the hard disk cache and the memory cache;
the first storage module is used for storing the picture to be loaded to the memory cache if the memory cache does not reach the upper limit of the storage space;
a deleting module, configured to delete the picture with the smallest access amount from the memory cache if the memory cache has reached the upper limit of the storage space;
the monitoring module is used for monitoring the picture deleting operation event cached in the memory;
and the second storage module is used for storing the deleted picture into the hard disk cache after the deleting module deletes the picture with the minimum access amount from the memory cache if the monitoring module monitors that the picture deleting operation event occurs in the memory cache.
5. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any one of claims 1 to 3 when executing the computer program.
6. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 3.
CN201710570799.1A 2017-07-13 2017-07-13 Method and device for accessing pictures, computer-readable storage medium and terminal equipment Active CN110020266B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710570799.1A CN110020266B (en) 2017-07-13 2017-07-13 Method and device for accessing pictures, computer-readable storage medium and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710570799.1A CN110020266B (en) 2017-07-13 2017-07-13 Method and device for accessing pictures, computer-readable storage medium and terminal equipment

Publications (2)

Publication Number Publication Date
CN110020266A CN110020266A (en) 2019-07-16
CN110020266B true CN110020266B (en) 2021-12-14

Family

ID=67185816

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710570799.1A Active CN110020266B (en) 2017-07-13 2017-07-13 Method and device for accessing pictures, computer-readable storage medium and terminal equipment

Country Status (1)

Country Link
CN (1) CN110020266B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112437192B (en) * 2019-08-23 2023-12-22 西安中兴新软件有限责任公司 Method and device for running application software, electronic equipment and computer readable medium
CN111966642B (en) * 2020-08-28 2022-09-30 维沃移动通信有限公司 Picture management method and device and electronic equipment
CN112835525A (en) * 2021-02-07 2021-05-25 东方网力科技股份有限公司 Method, device and terminal for improving utilization rate of storage space
CN113438537A (en) * 2021-06-24 2021-09-24 广州欢网科技有限责任公司 Terminal screen saver loading method and device and terminal equipment
CN115220663A (en) * 2022-08-01 2022-10-21 大拓(山东)物联网科技有限公司 Single-chip microcomputer picture buffering processing method and device
CN116301655B (en) * 2023-04-12 2023-11-07 深圳市英唐数码科技有限公司 Method, system and readable storage medium for loading historical note pictures

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101662454A (en) * 2008-08-29 2010-03-03 阿里巴巴集团控股有限公司 Method, device and system for image processing in internet
CN102622347A (en) * 2011-01-26 2012-08-01 腾讯科技(深圳)有限公司 Image management method and movable terminal
CN103136205A (en) * 2011-11-23 2013-06-05 上海博泰悦臻网络技术服务有限公司 Web picture service system and method
CN105808160A (en) * 2016-02-24 2016-07-27 鄞州浙江清华长三角研究院创新中心 mpCache hybrid storage system based on SSD (Solid State Disk)
CN106547624A (en) * 2016-11-04 2017-03-29 武汉斗鱼网络科技有限公司 Picture loading method and device based on Android

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7305697B2 (en) * 2001-02-02 2007-12-04 Opentv, Inc. Service gateway for interactive television
US9223642B2 (en) * 2013-03-15 2015-12-29 Super Talent Technology, Corp. Green NAND device (GND) driver with DRAM data persistence for enhanced flash endurance and performance
US20140143271A1 (en) * 2012-11-21 2014-05-22 General Electric Company Multi-level medical image viewer memory management
CN103198027A (en) * 2013-02-27 2013-07-10 天脉聚源(北京)传媒科技有限公司 Method and device for storing and providing files
CN103559299B (en) * 2013-11-14 2017-02-15 贝壳网际(北京)安全技术有限公司 Method, device and mobile terminal for cleaning up files
CN104657380A (en) * 2013-11-20 2015-05-27 青岛海信移动通信技术股份有限公司 Picture loading method and device
CN104679788A (en) * 2013-12-02 2015-06-03 中国移动通信集团广东有限公司 Image processing method and device as well as terminal equipment
CN104461661A (en) * 2014-12-30 2015-03-25 中科创达软件股份有限公司 Image resource loading method and system
CN105224473A (en) * 2015-09-15 2016-01-06 浪潮(北京)电子信息产业有限公司 The update method that a kind of solid state hard disc is data cached and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101662454A (en) * 2008-08-29 2010-03-03 阿里巴巴集团控股有限公司 Method, device and system for image processing in internet
CN102622347A (en) * 2011-01-26 2012-08-01 腾讯科技(深圳)有限公司 Image management method and movable terminal
CN103136205A (en) * 2011-11-23 2013-06-05 上海博泰悦臻网络技术服务有限公司 Web picture service system and method
CN105808160A (en) * 2016-02-24 2016-07-27 鄞州浙江清华长三角研究院创新中心 mpCache hybrid storage system based on SSD (Solid State Disk)
CN106547624A (en) * 2016-11-04 2017-03-29 武汉斗鱼网络科技有限公司 Picture loading method and device based on Android

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"A Graph-based Model for GPU Caching Problems";Lingda Li 等;《In Proceedings of the 2009 IEEE International Symposium on Workload Characterization》;20161230;第1-12页 *
"一种面向图数据的预装载缓存策略";左遥 等;《计算机工程》;20160531;第85-93页 *

Also Published As

Publication number Publication date
CN110020266A (en) 2019-07-16

Similar Documents

Publication Publication Date Title
CN110020266B (en) Method and device for accessing pictures, computer-readable storage medium and terminal equipment
CN107870728B (en) Method and apparatus for moving data
US10671285B2 (en) Tier based data file management
KR102235047B1 (en) Methods, devices, and systems for caching data items
CN110109868B (en) Method, apparatus and computer program product for indexing files
EP3283965B1 (en) Reducing memory commit charge when compressing memory
CN109344296B (en) Domain lifecycle control method, system, server and storage medium for implementing HASH key of Redis
CN103229150B (en) data control method and system
CN113485635A (en) Data storage method, device, equipment and storage medium
CN112148736A (en) Method, device and storage medium for caching data
US10628305B2 (en) Determining a data layout in a log structured storage system
CN111352957A (en) Remote dictionary service optimization method and related equipment
CN110554914B (en) Resource lock management method, device, server and storage medium
US11520818B2 (en) Method, apparatus and computer program product for managing metadata of storage object
CN110674082A (en) Method and device for removing online document, electronic equipment and computer readable medium
CN113742131B (en) Method, electronic device and computer program product for storage management
CN112596949B (en) High-efficiency SSD (solid State disk) deleted data recovery method and system
CN113127438B (en) Method, apparatus, server and medium for storing data
US20150254184A1 (en) Directory Maintenance Method and Apparatus
CN108345431B (en) Data reading method and device
CN114675776A (en) Resource storage method and device, storage medium and electronic equipment
CN113297003A (en) Method, electronic device and computer program product for managing backup data
CN113032349A (en) Data storage method and device, electronic equipment and computer readable medium
CN104268205A (en) Method and device for obtaining information of installed applications in IOS system
CN115543225B (en) Data processing method, system, device, computer storage medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant