CN103631616A - Method and system for fast loading and caching of picture - Google Patents

Method and system for fast loading and caching of picture Download PDF

Info

Publication number
CN103631616A
CN103631616A CN201310382790.XA CN201310382790A CN103631616A CN 103631616 A CN103631616 A CN 103631616A CN 201310382790 A CN201310382790 A CN 201310382790A CN 103631616 A CN103631616 A CN 103631616A
Authority
CN
China
Prior art keywords
picture
mobile terminal
data
caching
compressed
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
CN201310382790.XA
Other languages
Chinese (zh)
Other versions
CN103631616B (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.)
Guangzhou Pinwei Software Co Ltd
Original Assignee
Guangzhou Pinwei 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 Guangzhou Pinwei Software Co Ltd filed Critical Guangzhou Pinwei Software Co Ltd
Priority to CN201310382790.XA priority Critical patent/CN103631616B/en
Publication of CN103631616A publication Critical patent/CN103631616A/en
Application granted granted Critical
Publication of CN103631616B publication Critical patent/CN103631616B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Transfer Between Computers (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

The invention provides a method and system for fast loading and caching of a picture. According to the method and system for fast loading and caching of the picture, equal-ratio compression is conducted on the picture to be loaded according to picture quality parameters of a mobile terminal to obtain a compressed picture, caching historical data are wiped by the mobile terminal according to current service scenes at the same time, and at last, caching data of the compressed picture are loaded with a reading before updating strategy. Due to the fact that the equal-ratio compression is conducted on the picture to be loaded according to the picture quality parameters of the mobile terminal, the size of the picture to be loaded can be reduced, network flow can be reduced and loading speed can be increased on the premise that the quality of the picture to be loaded is not reduced. Due to the fact that the caching historical data are wiped according to the current service scenes, more memory space can be ensured in a memory of the mobile terminal for caching of data of the compressed picture, and memory overflowing does not occur easily. Due to the adoption of the reading before updating loading strategy, loading and caching can be conducted as soon as an application program is opened, and then picture loading speed is increased.

Description

Picture rapid loading and caching method and system
Technical field
The present invention relates to picture Processing Technique field, particularly relate to picture rapid loading and caching method and system.
Background technology
Along with internet development, shopping at network is accepted and uses by increasing people.In order to meet consumers in general's demand, general shopping website is all manufactured with the client that is applicable to mobile terminal, facilitates consumer on mobile terminal, browses the enough commodity of choosing.
Consumer browsing, in the process of the free choice of goods for directly perceived, have a clear understanding of merchandise news, all can select to browse a large amount of pictures.The client of existing mobile terminal is all generally the former figure of directly loading and buffer memory commodity, on mobile terminal, owing to being subject to the limitation of mobile terminal processing power, when the loading of picture and buffer memory are dealt with improperly, be easy to cause internal memory to overflow, mobile terminal is at 2G/3G net environment in addition, if adopt the loading method that directly loads former figure, its speed of Loading Image can very slowly and need to consume a large amount of flows.
Summary of the invention
Based on this, be necessary for directly loading on mobile terminal and the method for the former figure of buffer memory, during loading, loading velocity slowly need to consume a large amount of flows, during buffer memory, easily there is the problem that internal memory overflows, provide a kind of speed that Loads Image fast, save flow and be not prone to picture rapid loading and caching method and the system that internal memory overflows.
Picture rapid loading and a caching method, comprise step:
Obtain the picture quality parameter of mobile terminal;
According to the picture quality parameter of described mobile terminal, by picture geometric ratio compression to be loaded, obtain compressed picture;
According to current business scene, select data cached purge mechanism, remove history buffer data;
Take first to read the strategy upgrading again and load the data cached of compressed picture.
Picture rapid loading and a caching system, comprising:
Picture quality parameter acquisition module, for obtaining the picture quality parameter of mobile terminal;
Compressed picture acquisition module, for according to the picture quality parameter of described mobile terminal, by picture geometric ratio compression to be loaded, obtains compressed picture;
Historical data is removed module, for according to current business scene, selects data cached purge mechanism, removes history buffer data;
Load-on module, loads the data cached of compressed picture for taking first to read the strategy upgrading again.
Picture rapid loading of the present invention and caching method and system, according to mobile terminal picture mass parameter, treat to Load Image and carry out geometric ratio compression, obtain compressed picture, mobile terminal is removed the historical data of buffer memory according to current business scene simultaneously, finally adopts the strategy that first reads rear renewal to load the data cached of compressed picture.In the process of whole loading and buffer memory, according to mobile terminal picture mass parameter, treat to Load Image and carry out geometric ratio compression, can not reduce under the prerequisite of picture quality to be loaded, reduce the size of picture to be loaded, thereby reduce the network traffics in the process of Loading Image, improve loading velocity, according to business scenario, remove the historical data of buffer memory, can guarantee to have in mobile terminal internal memory the data of more memory headroom buffer memory compressed picture, be not prone to the situation that internal memory overflows, adopt the loading strategy that first reads rear renewal, can guarantee that the very first time of opening application program enters the state that loads buffer memory, accelerate picture loading velocity.
Accompanying drawing explanation
Fig. 1 is the schematic flow sheet of picture rapid loading of the present invention and first embodiment of caching method;
Fig. 2 is the schematic flow sheet of picture rapid loading of the present invention and second embodiment of caching method;
Fig. 3 is the structural representation of picture rapid loading of the present invention and first embodiment of caching system;
Fig. 4 is the structural representation of picture rapid loading of the present invention and second embodiment of caching system.
Embodiment
In order to make object of the present invention, technical scheme and advantage clearer, below with reference to the accompanying drawings and embodiment, the present invention is further elaborated.Should be appreciated that concrete enforcement described herein, only in order to explain the present invention, does not limit the present invention.
As shown in Figure 1, a kind of picture rapid loading and caching method, comprise step:
S200: the picture quality parameter of obtaining mobile terminal.
Its performance of different mobile terminals can be different, and its quality Showing Picture is also different.First obtain the picture quality parameter of current mobile terminal here.So that the Performance Match that the picture quality of downloading and mobile terminal Show Picture is avoided downloading the image data that cannot be moved in a large number terminal use, saved network traffics, also can not make the picture quality of mobile terminal loaded and displayed decline simultaneously.
S400: according to the picture quality parameter of described mobile terminal, by picture geometric ratio compression to be loaded, obtain compressed picture.
According to the picture quality parameter of described mobile terminal, by picture geometric ratio compression to be loaded, can make the picture quality of download and the Performance Match that mobile terminal Shows Picture, avoid downloading and cannot be moved in a large number the image data that terminal is used, saved network traffics, also can not make the picture quality of mobile terminal loaded and displayed decline simultaneously.
S600: according to current business scene, select data cached purge mechanism, remove history buffer data.
Current business scene comprises that access history is data cached, mobile terminal internal storage data size changes and current application program changes.When access history is data cached, whether detection history is data cached is the data that surpass the preset buffer memory time limit, if so, removes this historical data; When mobile terminal internal storage data size changes, detect the capacity whether data cached size surpasses mobile terminal internal memory, if surpass, remove from the current cache time at most be stored in the data in described mobile terminal internal memory, discharge the space of mobile terminal internal memory; When current application program changes, the application program use of execution before detecting is remaining historical data, if having, removes remaining historical data.The mechanism of multiple automatic elimination image cache is set, is applicable to different business scenarios.Need not user manually eliminate, reach the effect that intelligence is eliminated buffer memory.
S800: take first to read the strategy upgrading again and load the data cached of compressed picture.
Use new cache optimization strategy, first read and upgrade, one opens application program opens the page immediately, and simultaneously the Fast Compression mechanism that Loads Image under 2G/3G network, strengthens the speed that update content occurs.
Picture rapid loading of the present invention and caching method, according to mobile terminal picture mass parameter, treat to Load Image and carry out geometric ratio compression, obtain compressed picture, mobile terminal is removed the historical data of buffer memory according to current business scene simultaneously, finally adopts the strategy that first reads rear renewal to load the data cached of compressed picture.In the process of whole loading and buffer memory, according to mobile terminal picture mass parameter, treat to Load Image and carry out geometric ratio compression, can not reduce under the prerequisite of picture quality to be loaded, reduce the size of picture to be loaded, thereby reduce the network traffics in the process of Loading Image, improve loading velocity, according to business scenario, remove the historical data of buffer memory, can guarantee to have in mobile terminal internal memory the data of more memory headroom buffer memory compressed picture, be not prone to the situation that internal memory overflows, adopt the loading strategy that first reads rear renewal, can guarantee that the very first time of opening application program enters the state that loads buffer memory, accelerate picture loading velocity.
As shown in Figure 2, therein in an embodiment, after described step S400 also in steps:
S500: described compressed picture is divided into first's picture and second portion picture, adopt soft way of reference to carry out buffer memory, adopt normal way of reference to carry out buffer memory to the data of described second portion picture the data of described a part of picture, obtain compressed picture data cached.
Soft quoting: if an object only has soft quoting, that be just similar to can have can thing daily necessities.If memory headroom is enough, Garbage Collector just can not reclaim it, if memory headroom deficiency, will reclaim the internal memory of these objects.As long as Garbage Collector does not reclaim it, this object just can be used by program.The soft high-speed cache that can be used to realize internal memory sensitivity of quoting.Soft quote and normally to quote be all to belong to a kind of administrative mechanism of internal memory.Adopt different cache way to carry out to compressed picture the efficiency that data buffer storage can significantly be accelerated buffer memory.
As shown in Figure 2, therein in an embodiment, before described step S200 also in steps:
S100: identification mobile terminal style, determine mobile terminal performance.
Mobile terminal has number of different types, such as smart mobile phone, panel computer etc., and its performance of different mobile terminals is different, and processing power is also just different.The stronger ability that it processes picture of mobile whole processing power is also just stronger in addition, and the quality of the picture of demonstration is also just better.Identification mobile terminal style, determines mobile terminal performance to determine the mass parameter that mobile terminal Shows Picture in the step below.
As shown in Figure 2, therein in an embodiment, after described step S500 also in steps:
S520: the quantity of calculating coherent video in described second portion picture;
S540: when the quantity of coherent video surpasses the threshold value of default coherent video quantity in described second portion picture, the cache way of the data of described second portion picture is converted to soft way of reference by normally quoting.
In an embodiment, described mobile terminal is smart mobile phone therein.
Smart mobile phone is a kind of the most frequently used mobile terminal, in the time of most consumer be all use that this mobile terminal of smart mobile phone is browsed, commodities purchased picture.
As shown in Figure 3, a kind of picture rapid loading and caching system, comprising:
Picture quality parameter acquisition module 100, for obtaining the picture quality parameter of mobile terminal;
Compressed picture acquisition module 200, for according to the picture quality parameter of described mobile terminal, by picture geometric ratio compression to be loaded, obtains compressed picture;
Historical data is removed module 300, for according to current business scene, selects data cached purge mechanism, removes history buffer data;
Load-on module 400, loads the data cached of compressed picture for taking first to read the strategy upgrading again.
Picture rapid loading of the present invention and caching system, compressed picture acquisition module 200 is treated to Load Image according to mobile terminal picture mass parameter and is carried out geometric ratio compression, obtain compressed picture, historical data is removed module 400 and according to current business scene, is removed the historical data of buffer memory simultaneously, and load-on module 500 adopts the strategy that first reads rear renewal to load the data cached of compressed picture.In the process of whole loading and buffer memory, according to mobile terminal picture mass parameter, treat to Load Image and carry out geometric ratio compression, can not reduce under the prerequisite of picture quality to be loaded, reduce the size of picture to be loaded, thereby reduce the network traffics in the process of Loading Image, improve loading velocity, according to business scenario, remove the historical data of buffer memory, can guarantee to have in mobile terminal internal memory the data of more memory headroom buffer memory compressed picture, be not prone to the situation that internal memory overflows, adopt the loading strategy that first reads rear renewal, can guarantee that the very first time of opening application program enters the state that loads buffer memory, accelerate picture loading velocity.
As shown in Figure 4, in an embodiment, described picture rapid loading and caching system, also comprise therein:
Cache module 500, for described compressed picture is divided into first's picture and second portion picture, adopt soft way of reference to carry out buffer memory, adopt normal way of reference to carry out buffer memory to the data of described second portion picture the data of described a part of picture, obtain compressed picture data cached;
As shown in Figure 4, in an embodiment, described picture rapid loading and caching system, also comprise therein:
Intelligent terminal determination module 600, for identifying mobile terminal style, determines mobile terminal performance.
As shown in Figure 4, in an embodiment, described picture rapid loading and caching system, also comprise therein:
Coherent video computing module 700, for calculating the quantity of described second portion picture coherent video;
Cache way modular converter 800, while surpassing the threshold value of default coherent video quantity for the quantity when described second portion picture coherent video, is converted to soft way of reference by the cache way of the data of described second portion picture by normally quoting.
In an embodiment, described mobile terminal is smart mobile phone therein.
The above embodiment has only expressed several embodiment of the present invention, and it describes comparatively concrete and detailed, but can not therefore be interpreted as the restriction to the scope of the claims of the present invention.It should be pointed out that for the person of ordinary skill of the art, without departing from the inventive concept of the premise, can also make some distortion and improvement, these all belong to protection scope of the present invention.Therefore, the protection domain of patent of the present invention should be as the criterion with claims.

Claims (10)

1. picture rapid loading and a caching method, is characterized in that, comprises step:
Obtain the picture quality parameter of mobile terminal;
According to the picture quality parameter of described mobile terminal, by picture geometric ratio compression to be loaded, obtain compressed picture;
According to current business scene, select data cached purge mechanism, remove history buffer data;
Take first to read the strategy upgrading again and load the data cached of compressed picture.
2. picture rapid loading according to claim 1 and caching method, is characterized in that, described according to the picture quality parameter of described mobile terminal, by picture geometric ratio compression to be loaded, obtains compressed picture afterwards also in steps:
Described compressed picture is divided into first's picture and second portion picture, adopt soft way of reference to carry out buffer memory, adopt normal way of reference to carry out buffer memory to the data of described second portion picture the data of described a part of picture, obtain the data cached of compressed picture.
3. picture rapid loading according to claim 1 and 2 and caching method, is characterized in that, described step is obtained before the picture quality parameter of mobile terminal also in steps:
Identification mobile terminal style, determines mobile terminal performance.
4. picture rapid loading according to claim 2 and caching method, it is characterized in that, described step is divided into first's picture and second portion picture by described compressed picture, adopt soft way of reference to carry out buffer memory, adopt normal way of reference to carry out buffer memory to described second portion picture described a part of picture, obtain compressed picture data cached afterwards also in steps:
Calculate the quantity of coherent video in described second portion picture;
When the quantity of coherent video surpasses the threshold value of default coherent video quantity in described second portion picture, the cache way of the data of described second portion picture is converted to soft way of reference by normal way of reference.
5. picture rapid loading according to claim 1 and 2 and caching method, is characterized in that, described mobile terminal is smart mobile phone.
6. picture rapid loading and a caching system, is characterized in that, comprising:
Picture quality parameter acquisition module, for obtaining the picture quality parameter of mobile terminal;
Compressed picture acquisition module, for according to the picture quality parameter of described mobile terminal, by picture geometric ratio compression to be loaded, obtains compressed picture;
Historical data is removed module, for according to current business scene, selects data cached purge mechanism, removes history buffer data;
Load-on module, loads the data cached of compressed picture for taking first to read the strategy upgrading again.
7. picture rapid loading according to claim 6 and caching system, is characterized in that, also comprises:
Cache module, for described compressed picture is divided into first's picture and second portion picture, adopt soft way of reference to carry out buffer memory, adopt normal way of reference to carry out buffer memory to the data of described second portion picture the data of described a part of picture, obtain compressed picture data cached.
8. according to picture rapid loading and caching system described in claim 6 or 7, it is characterized in that, also comprise:
Intelligent terminal determination module, for identifying mobile terminal style, determines mobile terminal performance.
9. picture rapid loading according to claim 7 and caching system, is characterized in that, also comprises:
Coherent video computing module, for calculating the quantity of described second portion picture coherent video;
Cache way modular converter, while surpassing the threshold value of default coherent video quantity for the quantity when described second portion picture coherent video, is converted to soft way of reference by the cache way of the data of described second portion picture by normally quoting.
10. according to picture rapid loading and caching system described in claim 6 or 7, it is characterized in that, described mobile terminal is smart mobile phone.
CN201310382790.XA 2013-08-28 2013-08-28 Picture is quickly loaded and caching method and system Active CN103631616B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310382790.XA CN103631616B (en) 2013-08-28 2013-08-28 Picture is quickly loaded and caching method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310382790.XA CN103631616B (en) 2013-08-28 2013-08-28 Picture is quickly loaded and caching method and system

Publications (2)

Publication Number Publication Date
CN103631616A true CN103631616A (en) 2014-03-12
CN103631616B CN103631616B (en) 2017-07-11

Family

ID=50212713

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310382790.XA Active CN103631616B (en) 2013-08-28 2013-08-28 Picture is quickly loaded and caching method and system

Country Status (1)

Country Link
CN (1) CN103631616B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104104726A (en) * 2014-07-23 2014-10-15 天脉聚源(北京)教育科技有限公司 Image loading method, device and system
CN104808952A (en) * 2015-05-05 2015-07-29 百度在线网络技术(北京)有限公司 Data caching method and device
CN105513005A (en) * 2015-12-02 2016-04-20 魅族科技(中国)有限公司 Memory management method and terminal
WO2017143524A1 (en) * 2016-02-24 2017-08-31 康志强 Capacity management method and system for smartwatch
WO2020006860A1 (en) * 2018-07-06 2020-01-09 平安科技(深圳)有限公司 Picture cache cleaning method and apparatus, terminal device and medium
CN111798366A (en) * 2020-06-18 2020-10-20 福州富昌维控电子科技有限公司 Method and terminal for accelerating PNG display speed based on small memory embedded device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101072285A (en) * 2006-05-11 2007-11-14 松下电器产业株式会社 Picture recording device
CN102905045A (en) * 2012-10-26 2013-01-30 北京奇虎科技有限公司 Method and server for providing picture data to computing terminal

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101072285A (en) * 2006-05-11 2007-11-14 松下电器产业株式会社 Picture recording device
CN102905045A (en) * 2012-10-26 2013-01-30 北京奇虎科技有限公司 Method and server for providing picture data to computing terminal

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
梁晟 等: "《基于android的授权图片浏览系统的实现》", 《贵阳学院学报(自然科学版)》, vol. 8, no. 1, 31 March 2013 (2013-03-31), pages 34 - 36 *

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104104726A (en) * 2014-07-23 2014-10-15 天脉聚源(北京)教育科技有限公司 Image loading method, device and system
CN104104726B (en) * 2014-07-23 2017-08-08 天脉聚源(北京)教育科技有限公司 A kind of picture loading method, apparatus and system
CN104808952A (en) * 2015-05-05 2015-07-29 百度在线网络技术(北京)有限公司 Data caching method and device
CN104808952B (en) * 2015-05-05 2018-09-18 百度在线网络技术(北京)有限公司 data cache method and device
CN105513005A (en) * 2015-12-02 2016-04-20 魅族科技(中国)有限公司 Memory management method and terminal
CN105513005B (en) * 2015-12-02 2019-01-29 魅族科技(中国)有限公司 A kind of method and terminal of memory management
WO2017143524A1 (en) * 2016-02-24 2017-08-31 康志强 Capacity management method and system for smartwatch
WO2020006860A1 (en) * 2018-07-06 2020-01-09 平安科技(深圳)有限公司 Picture cache cleaning method and apparatus, terminal device and medium
CN111798366A (en) * 2020-06-18 2020-10-20 福州富昌维控电子科技有限公司 Method and terminal for accelerating PNG display speed based on small memory embedded device

Also Published As

Publication number Publication date
CN103631616B (en) 2017-07-11

Similar Documents

Publication Publication Date Title
CN103631616A (en) Method and system for fast loading and caching of picture
CN103559299B (en) Method, device and mobile terminal for cleaning up files
CN103544207B (en) A kind of method and system of picture loaded and displayed
CN103677942B (en) A kind of method and apparatus of movable terminal to browse network pictures
US20140208328A1 (en) Method for terminal acceleration, terminal and storage medium
EP2755145A1 (en) Webpage browsing method and device, and storage medium
US9823945B2 (en) Method and apparatus for managing application program
WO2014026602A1 (en) A data processing method, apparatus and mobile terminal
CN104699626B (en) Terminal internal memory processing method, device and terminal
CN110096660A (en) Method, apparatus and electronic equipment for loading page picture
CN105740425A (en) File storage method and apparatus
CN103294718A (en) Method and device for web page cache management
CN105516787B (en) The storage controlling method and device of application cache data
CN110378276B (en) Vehicle state acquisition method, device, equipment and storage medium
CN103984781A (en) Webpage loading method and device
CN106681990A (en) Method for reading caching data under mobile cloud storage environment
CN106598523A (en) Picture loading method, device and electronic equipment
CN112083988A (en) Screen refresh rate control method, mobile terminal and computer readable storage medium
CN104035921A (en) Information processing method and electronic devices
CN106933702A (en) A kind of method of intelligent terminal storage space management, device and intelligent terminal
US20190332859A1 (en) Method for identifying main picture in web page
CN108287892B (en) Picture loading method and device and electronic equipment
CN110413579A (en) Image cache method, equipment, storage medium and device based on caching value
CN112541140A (en) List loading method, terminal device, electronic device and storage medium
CN107220081B (en) Method and device for updating screen locking information card and electronic equipment

Legal Events

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