CN101963953B - Cache optimization method for mobile rich media player - Google Patents

Cache optimization method for mobile rich media player Download PDF

Info

Publication number
CN101963953B
CN101963953B CN201010276370.XA CN201010276370A CN101963953B CN 101963953 B CN101963953 B CN 101963953B CN 201010276370 A CN201010276370 A CN 201010276370A CN 101963953 B CN101963953 B CN 101963953B
Authority
CN
China
Prior art keywords
character
rich media
buffer area
player
weights
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.)
Expired - Fee Related
Application number
CN201010276370.XA
Other languages
Chinese (zh)
Other versions
CN101963953A (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.)
Institute of Electronic and Information Engineering of Dongguan UESTC
Original Assignee
Institute of Electronic and Information Engineering of Dongguan UESTC
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 Institute of Electronic and Information Engineering of Dongguan UESTC filed Critical Institute of Electronic and Information Engineering of Dongguan UESTC
Priority to CN201010276370.XA priority Critical patent/CN101963953B/en
Publication of CN101963953A publication Critical patent/CN101963953A/en
Application granted granted Critical
Publication of CN101963953B publication Critical patent/CN101963953B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a cache optimization method for a mobile rich media player. In the method, a character cache region is set between the mobile rich media player and a local resource file to cache common character dot matrix information and width and height information of a character dot matrix; the mobile rich media player firstly searches a character needed to be displayed from the character cache region, if the character is present in the character cache region, the character dot matrix and the width and height information thereof stored in the character cache region are directly read and subjected to typesetting display; otherwise, the character dot matrix and the width and height information thereof are read and displayed from a local resource file. Therefore, the method has the advantages of avoiding frequently accessing the local resource file, reducing time consumption, avoiding redundant data, reducing memory overhead and simultaneously making the rendering speed of pages higher. In addition, the character replacement is performed according to total using times and latest using times, the principle of locality of a program can be reflected and the hit rate can be improved. Therefore, the character in the character cache region is optimized and the display speed of the character and the rendering speed of the page are further improved.

Description

The cache optimization method of a kind of mobile Rich Media player
Technical field
The invention belongs to Rich Media's technical field, more specifically, relate to the cache optimization method of a kind of mobile Rich Media player
Background technology
At present along with the development of mobile Internet technology, also continue to bring out like the mushrooms after rain based on the mobile rich media applications of portable terminal, they bring great convenience for people's live and work.Meanwhile, along with moving increasing of rich media applications, people are also increasingly high to the requirement of moving Rich Media's player capabilities, and the response time of mobile rich media applications, reaction velocity, fluency etc. become estimates an important indicator of using quality.
Run on the mobile Rich Media player of pc client owing to possess considerable hardware condition, can consider that almost the optimization of aspects such as buffer memory just can move more smoothly.Yet, move Rich Media's player owing to receive the restriction of aspects such as mobile terminal device processor and internal memory, if do not take effective optimization measure, be easy to cause move rich media applications and respond slowly, postpone obviously to influence user experience.
Common mobile Rich Media player is not when using buffer area; Base application on it can all read all character pattern information that need in the local resource file in the internal memory; And then the size of definite character pattern and be used for finally showing to page layout.Done two significant disadvantages like this:
1, all character patterns on the page is all read in the redundant data that internal memory can bring a lot of repeat character (RPT) information; Bring great waste to memory source; This is very unpractical for constrained devices such as mobile phones, probably can cause the memory source approach exhaustion;
2, use required character all will be searched in character of every demonstration from the dot matrix of all characters of resource file lattice information, this will expend great amount of time, will inevitably cause to use to show slowly.
In addition; The data that provide according to document; Mobile phone games in the mobile rich media applications, cell phone reading, mobile phone searching, mobile phone browser have been listed in preceding four of used mobile phone application service nearly half a year of mobile Internet user, and a big chunk content is exactly a character in these application.Therefore, solving the character cache problem that moves Rich Media's player is the emphasis that solves response time, reaction velocity and fluency.
Summary of the invention
The objective of the invention is to overcome the deficiency of existing detection method; The cache optimization method of a kind of moving Rich Media player is proposed; To reduce memory cost effectively to mobile device; Greatly accelerate the demonstration time and the response speed of Rich Media's player, thereby make to have moved can be on portable terminals such as the mobile phone smooth operation of rich media applications.
For realizing the foregoing invention purpose, the cache optimization method of the moving Rich Media of the present invention player is characterized in that, may further comprise the steps:
(1), between mobile Rich Media's player and local resource file, the character buffer area is set, being used for buffer memory moves Rich Media's player character pattern information commonly used; Simultaneously, the wide high information that also has character pattern in the character buffer;
(2), move the at first required characters displayed of search in the character buffer area of Rich Media's player, if this character has been arranged in the character buffer area, then with the demonstration that directly reads out and set type of the character pattern of storing in the character buffer area, wide, high information; Otherwise, from the local resource file, read and show;
(3), the displacement of character buffer area character
One cache manager is set; Be used for safeguarding the log sheet of the used character pattern information of Rich Media's player decides which character of replacing buffer memory, and this log sheet content comprises: the moment T2 of character key word K, total access times C1, the moment T1 when using for the first time, weights V, last computation weights, access times C2 in the cycle; When a character was asked, access times C2 added 1 respectively in pairing total access times C1 of this character and cycle, and T calculates the weights V of each character constantly, the pairing weights of so a certain character:
V=d*C1/(T-T1)+(1-d)*C2/(T-T2);(0≤d≤1)
Wherein d be one between 0 with the constant between 1, be used for balance total frequency of utilization and interior frequency of utilization of T-T2 cycle;
After weights V calculated completion, the moment T2 of last computation weights was changed to T constantly, and access times C2 is changed to 0 in the cycle;
A threshold value p is set, if the weights V>p of certain character, then this character will be changed to buffer zone and replaced that character with minimum weights.
Goal of the invention of the present invention is achieved in that
Owing to receive the restriction of portable terminal hardware device; It is often relatively poor to move Rich Media's player capabilities; To problems such as mobile rich media applications data volume are big, the committed memory space is many, the response time is long; The present invention proposes and a kind ofly between mobile Rich Media's player and local resource file, the character buffer area is set, be used for the character pattern information that the buffer memory player uses always and the wide high information of character pattern based on the cache optimization method that moves Rich Media's player; Move the at first required characters displayed of search in the character buffer area of Rich Media's player, if this character has been arranged in the character buffer area, then with the demonstration that directly reads out and set type of the character pattern of storing in the character buffer area, wide, high information; Otherwise, from the local resource file, read and show.Avoided like this visiting the local resource file continually, reduced time loss, simultaneously, also avoided the appearance of redundant data, reduction internal memory cost that can be to a certain degree.In addition,, so just can directly read the size of character, obtain, make the render speed of the page faster and avoided all going to carry out computing at every turn for having stored the wide high information of character pattern in the character buffer area.
Aspect the displacement of character buffer area character; The present invention is provided with a cache manager; Be used for safeguarding the log sheet of the used character pattern information of player decides which character of replacing buffer memory; If the weights V>p of certain character, then this character will be changed to buffer zone and replaced that character with minimum weights.The displacement of character is simultaneously with respect to total access times and nearest access times; Therefore, this Replacement Strategy not only can reflect the program locality principle, and can improve hit rate; Thereby optimize character buffer area character, further improved the render speed of the display speed and the page of character.
The present invention is through coming to reduce effectively the memory cost to mobile device to the mechanism that moves Rich Media's engine increase page character buffer memory; Demonstration time and response speed that greatly accelerate to use, thus make and move can be on portable terminals such as the mobile phone smooth operation of rich media applications.Through relatively finding with the performance of mobile WEB players such as UCWEB; When opening a same Webpage; Method of the present invention can reduce the demonstration time of the page really effectively, and also having proved thus increases the performance that page character caching mechanism can optimized application.
Description of drawings
Fig. 1 is the graph of a relation that moves Rich Media's player, character buffer area and local resource file;
Fig. 2 is a character Hash table structural drawing;
Fig. 3 is the structural drawing of cache manager;
Fig. 4 has the character of NULI character buffer area on average to show the time comparison diagram.
Embodiment
Describe below in conjunction with the accompanying drawing specific embodiments of the invention, so that those skilled in the art understands the present invention better.What need point out especially is that in the following description, when perhaps the detailed description of known function and design can desalinate main contents of the present invention, these were described in here and will be left in the basket.
Fig. 1 is the graph of a relation that moves Rich Media's player, character buffer area and local resource file.
In the present embodiment, as shown in Figure 1, between mobile Rich Media's player and local resource file, the character buffer area is set, be used for buffer memory from the mobile player of the local resource file character pattern information commonly used and the wide high information of character pattern.
In the present embodiment, the character buffer area charcter topology thes contents are as follows:
typedef?struct_FONT
{
Void*data; / * character pattern information */
Int width; The wide * of/* character/
Int height; The high * of/* character/
}FONT;
Move Rich Media's player when playing; At first in the character buffer area, search for required characters displayed; If this character has been arranged in the character buffer area, then with the demonstration that directly reads out and set type of the character pattern of storing in the character buffer area, wide, high information; Otherwise, from the local resource file, read and show.Avoided visiting the local resource file continually, reduced time loss, avoided the appearance of redundant data and reduced internal memory cost, made the render speed of the page faster simultaneously.
Fig. 2 is a character Hash table structural drawing;
In the present embodiment; As shown in Figure 2, in the character buffer of setting up, mobile Rich Media player is used always; Promptly use the more and more frequent character of number of times to set up a Hash table; Content comprises key word Key in the list item, relevant character ID chain list index, and it points to the lattice information of Key corresponding characters.Key word Key is representing the coding of character, like UTF-8, ASCII, Unicode etc.
At first check this table when moving Rich Media's player searches character buffer area; If the character of request is present among this table; Then will be dot matrix, the character of character is wide through the chain list index of correspondence, information such as character height reads out; Otherwise searching request will be submitted to the local resource file and searched for once.
Because the character buffer area is stored in the limited internal memory; Must limit to some extent buffer size, simultaneously, the purpose that also has of setting up the character buffer area is to improve the cache hit rate of using; The searching request of Rich Media's player will influence the content of storing in the character buffer area; To only store in the character buffer area and use the more and higher content of frequency, and the Replacement Strategy of a character buffer area character so just must be arranged, that is:
One cache manager is set; Be used for safeguarding the log sheet of the used character pattern information of Rich Media's player decides which character of replacing buffer memory; This log sheet content comprises: in the moment T2 of character key word K, total access times C1, the moment T1 when using for the first time, weights V, last computation weights, the cycle T-T2, and access times C2; When a character was asked, access times C2 added 1 respectively in pairing total access times C1 of this character and cycle, calculated the weights V of each character, the pairing weights of so a certain character constantly at T:
V=d*C1/(T-T1)+(1-d)*C2/(T-T2);(0≤d≤1)
Wherein d be one between 0 with the constant between 1, be used for balance total frequency of utilization and interior frequency of utilization of T-T2 cycle;
After weights V calculated completion, the moment T2 of last computation weights was changed to T constantly, and access times C2 is changed to 0 in the cycle; A threshold value p is set, if the weights V>p of certain character, then this character will be changed to buffer zone and replaced that character with minimum weights.
Above-mentioned character Replacement Strategy is simultaneously with respect to total access times and nearest access times; Therefore, this strategy not only can reflect the program locality principle, and can improve hit rate; Thereby optimize character buffer area character, further improved the render speed of the display speed and the page of character.
Fig. 3 is the structural drawing of cache manager
In the present embodiment, as shown in Figure 3, whole character buffer area is safeguarded cache manager through cache manager:
One character management module is used for accepting from the character request of Rich Media's player and finds the corresponding characters lattice information: at first inquire about corresponding content at the character buffer area, if exist, then directly from the character buffer area, take out; If do not exist, then from the local resource file, obtain; Promptly realize step of the present invention (2);
One upgrades administration module, is used for the character pattern information of some cycles ground polling character buffer area and it is upgraded; Because character pattern information change probability is less, so make cache manager according to the long cycle character pattern information in the fresh character buffer area more.During renewal, cache manager searching character buffer area with the character pattern information updating that needs upgrade, can guarantee the correctness that character shows like this.
One displacement administration module is used for the maintenance log table, sets up the original character buffer area, according to the content in the Replacement Strategy SUB substitute character buffer area of step (3).
More than the cooperative cooperating of three modules guaranteed character data in the character buffer accurately with use in character show convenient and swift.
Fig. 4 has the character of NULI character buffer area on average to show the time comparison diagram.
In this enforcement,
This paper is that example is tested with the S900C of mobile phone Dopod of Windows Mobile platform, and the performance parameter of this mobile phone is as shown in the table:
Figure BSA00000262473900061
Table 1
Experimentize according to following steps: the mobile Rich Media player when use and unused word accord with buffer memory in this mobile phone difference programming of usefulness; Ask same Webpage, this page demonstration time is noted respectively, withdraw from player then; Ask so repeatedly 20 times, test result is noted.
As shown in Figure 4, the display efficiency of setting up behind the character buffer area is very considerable, and the display effect outline of the English page is better than the Chinese page, because the probability outline of English page cache replacement is less than the Chinese page; The buffer memory effect is good more under the more situation of character, because this moment, cache contents approached a stable status more.Along with the increasing of page character display, the prolongation of time and the progressively increasing of buffer memory capacity; The character buffer memory effect of engine will be more and more obvious; And finally reach a more satisfactory show state [, thereby optimize to move the overall performance that Rich Media's player shows greatly.
Although above the illustrative embodiment of the present invention is described; So that the technician of present technique neck understands the present invention, but should be clear, the invention is not restricted to the scope of embodiment; To those skilled in the art; As long as various variations appended claim limit and the spirit and scope of the present invention confirmed in, these variations are conspicuous, all utilize innovation and creation that the present invention conceives all at the row of protection.

Claims (3)

1. the cache optimization method of a mobile Rich Media player is characterized in that, may further comprise the steps:
(1), between mobile Rich Media's player and local resource file, the character buffer area is set, being used for buffer memory moves Rich Media's player character pattern information commonly used; Simultaneously, the wide high information that also has character pattern in the character buffer area;
(2), move the at first required characters displayed of search in the character buffer area of Rich Media's player, if this character has been arranged in the character buffer area, then with the demonstration that directly reads out and set type of the character pattern of storing in the character buffer area, wide, high information; Otherwise, from the local resource file, read and show;
(3), the displacement of character buffer area character
One cache manager is set; Be used for safeguarding the log sheet of the used character pattern information of Rich Media's player decides which character of replacing buffer memory, and this log sheet content comprises: the moment T2 of character key word Key, total access times C1, the moment T1 when using for the first time, weights V, last computation weights, access times C2 in the cycle; When a character was asked, access times C2 added 1 respectively in pairing total access times C1 of this character and cycle, and T calculates the weights V of each character constantly, the pairing weights of so a certain character:
V Key=d*C1/(T-T1)+(1-d)*C2/(T-T2);(0≤d≤1)
Wherein d be one between 0 with the constant between 1, be used for balance total frequency of utilization and interior frequency of utilization of T-T2 cycle;
As weights V KeyCalculate after the completion, the moment T2 of last computation weights is changed to T constantly, and access times C2 is changed to 0 in the cycle;
A threshold value p is set, if the weights V of certain character Key>p, then this character will be changed to buffer area and replaced that character with minimum weights.
2. the cache optimization method of mobile Rich Media according to claim 1 player is characterized in that described cache manager also comprises:
One character management module is used for accepting from the character request of Rich Media's player and finds the corresponding characters lattice information: at first inquire about corresponding content at the character buffer area, if exist, then directly from the character buffer area, take out; If do not exist, then from the local resource file, obtain;
One upgrades administration module, is used for the character pattern information of some cycles ground polling character buffer area and it is upgraded; Because character pattern information change probability is less, so make cache manager according to the long cycle character pattern information in the fresh character buffer area more; During renewal, cache manager searching character buffer area with the character pattern information updating that needs upgrade, can guarantee the correctness that character shows like this.
3. the cache optimization method of mobile Rich Media according to claim 1 player; It is characterized in that, in the character buffer area of setting up, a Hash table set up in the character that moves Rich Media's player; Content comprises key word Key in the list item; Relevant character ID chain list index, it points to the lattice information of Key corresponding characters, and key word Key is representing the coding of character;
At first check this table when moving Rich Media's player searches character buffer area; If the character of request is present among this table; Then will be dot matrix, the character of character is wide through the chain list index of correspondence, the high information of character reads out; Otherwise searching request will be submitted to the local resource file and searched for once.
CN201010276370.XA 2010-09-08 2010-09-08 Cache optimization method for mobile rich media player Expired - Fee Related CN101963953B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201010276370.XA CN101963953B (en) 2010-09-08 2010-09-08 Cache optimization method for mobile rich media player

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010276370.XA CN101963953B (en) 2010-09-08 2010-09-08 Cache optimization method for mobile rich media player

Publications (2)

Publication Number Publication Date
CN101963953A CN101963953A (en) 2011-02-02
CN101963953B true CN101963953B (en) 2012-05-23

Family

ID=43516826

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010276370.XA Expired - Fee Related CN101963953B (en) 2010-09-08 2010-09-08 Cache optimization method for mobile rich media player

Country Status (1)

Country Link
CN (1) CN101963953B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102208180B (en) * 2011-06-02 2013-04-17 福建新大陆通信科技股份有限公司 Method for rapidly displaying vector font by set top box (STB)
CN104025030B (en) * 2011-12-30 2017-08-29 英特尔公司 Reduce method, device and equipment that domain tinter/tessellator is called
TWI795181B (en) * 2022-01-20 2023-03-01 網路家庭國際資訊股份有限公司 Web server and method for increasing fluency of web page

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101425863A (en) * 2007-10-30 2009-05-06 中兴通讯股份有限公司 Mobile terminal for supporting rich media service
CN101627609A (en) * 2006-08-21 2010-01-13 诺基亚公司 Caching directives for a file delivery protocol

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7155436B2 (en) * 2001-01-12 2006-12-26 Vendaria, Inc Method and system for generating and providing rich media presentations optimized for a device over a network

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101627609A (en) * 2006-08-21 2010-01-13 诺基亚公司 Caching directives for a file delivery protocol
CN101425863A (en) * 2007-10-30 2009-05-06 中兴通讯股份有限公司 Mobile terminal for supporting rich media service

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Zhihui Lv etc..Study of Main Technology in Rich Media Grid Delivery.《ICCNMC"03》.2003,1-5. *
张骥先等.移动设备上富媒体场景渲染优化策略.《计算机辅助设计与图形学学报》.2010,第22卷(第8期),1272-1278. *

Also Published As

Publication number Publication date
CN101963953A (en) 2011-02-02

Similar Documents

Publication Publication Date Title
US8612423B2 (en) Search cache for document search
CN104298680B (en) Data statistical approach and data statistics device
EP2608070A1 (en) Hybrid database table stored as both row and column store
US7974957B2 (en) Assessing mobile readiness of a page using a trained scorer
KR20160145785A (en) Flash optimized columnar data layout and data access algorithms for big data query engines
US10713330B2 (en) Optimized browser render process
CN102662869B (en) Memory pool access method in virtual machine and device and finger
US20110258202A1 (en) Concept extraction using title and emphasized text
CN103488523A (en) Page access method, page access device and server
CN106202224B (en) Search processing method and device
CN101963953B (en) Cache optimization method for mobile rich media player
US20130179419A1 (en) Retrieval of prefix completions by way of walking nodes of a trie data structure
CN104504076A (en) Method for implementing distributed caching with high concurrency and high space utilization rate
CN104166649B (en) Caching method and equipment for search engine
CN103699534A (en) Display method and device for data object in system directory
CN105138649A (en) Data search method and device and terminal
US8370363B2 (en) Hybrid neighborhood graph search for scalable visual indexing
US10387545B2 (en) Processing page
CN111858612B (en) Data accelerated access method and device based on graph database and storage medium
CN103841168A (en) Data copy updating method and metadata server
JP2022054389A (en) Method and apparatus for training retrieval model, device, computer storage medium, and computer program
EP3343395A1 (en) Data storage method and apparatus for mobile terminal
CN101853219B (en) Virtualized platform based Method for swapping in disc page
CN111026682B (en) Data access method and device of board card chip and computer readable storage medium
CN111459848B (en) File fragment sorting method and device, storage medium and electronic equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20120523

Termination date: 20120908