CN102081920A - Method and device for controlling picture display - Google Patents
Method and device for controlling picture display Download PDFInfo
- Publication number
- CN102081920A CN102081920A CN 201010616081 CN201010616081A CN102081920A CN 102081920 A CN102081920 A CN 102081920A CN 201010616081 CN201010616081 CN 201010616081 CN 201010616081 A CN201010616081 A CN 201010616081A CN 102081920 A CN102081920 A CN 102081920A
- Authority
- CN
- China
- Prior art keywords
- picture
- described task
- need
- task
- index information
- 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
Links
Images
Abstract
The embodiment of the invention relates to the technical field of picture display and discloses a method and device for controlling picture display. The method comprises the following steps: creating a hashtable which is used for storing index information of pictures in a cache; receiving task starting information which contains the information of a picture needed to be loaded with task; and inquiring if the index information of the picture needed to be loaded with task is stored in the hashtable, and if yes, loading and displaying the picture corresponding to the index information in the cache and adding 1 to the loading weight of the picture corresponding to the index information. By using the method and device provided by the embodiment of the invention, the picture display speed can be increased, the system resource consumption can be reduced, and the acceleration for the multi-task picture operation is supported.
Description
Technical field
The present invention relates to technical field of picture display, relate in particular to a kind of method and device that picture shows of controlling.
Background technology
In embedded device, the method that the control picture shows mainly comprises two steps, and first step is that picture is carried out decode operation, and second step is that decoded picture output is shown.
The inventor finds in practice, has following defective in the method that above-mentioned control picture shows at least:
All need to carry out picture decode operation when 1, showing same pictures at every turn, reduced the picture display speed;
All need to carry out picture at every turn when 2, showing same pictures and open and close operation, cause taking a large amount of system resources;
3, the method for above-mentioned control picture demonstration is only considered the operation of individual task to picture, does not consider the acceleration of a plurality of tasks to the picture operation.
Summary of the invention
At above-mentioned defective, a kind of method and device that picture shows of controlling is provided in the embodiment of the invention, be used to improve the picture display speed, reduce system resources consumption and support of the acceleration of a plurality of tasks the picture operation.
Wherein, a kind of method of controlling the picture demonstration comprises:
Create Hash table, described Hash table is used for the index information of the picture in the memory buffers;
Receive task start message, described task start message is used to indicate the information of the picture that described task need load;
Inquire about the index information that whether stores the picture that described task need load in the described Hash table, if having, the picture that then loads the described index information correspondence in the buffer memory shows, and the loading weight of the picture of described index information correspondence is added 1.
Alternatively, the information of the described task picture that need load includes but not limited to the index information of the picture that described task need load.
As an optional embodiment, the method that described control picture shows can also comprise:
If do not store the index information of the picture that described task need load in the described Hash table as yet, then
The picture that described task need be loaded is loaded in the buffer memory;
The index information of the picture that described task need be loaded is stored in the described Hash table, and the loading weight of the picture that described task need be loaded adds 1.
As an optional embodiment, the method that described control picture shows can also comprise:
Receive task termination message, described task termination message is used to indicate the information of the picture that described task need unload;
The loading weight of the picture that need unload described task subtracts 1;
Be non-0 value if the loading weight of the picture that described task need unload subtracts 1 back, then the picture that the described task in the buffer memory need not be unloaded reclaims; If after the loading weight of the picture that described task need unload subtracts 1 is 0 value, then reclaim the picture that the described task in the buffer memory need unload.
Alternatively, the information of the described task picture that need unload includes but not limited to the index information of the picture that described task need unload.
Wherein, a kind of control picture device shown comprises:
Creating unit is used to create Hash table, and described Hash table is used for the index information of the picture in the memory buffers;
Receiving element is used to receive task start message, and described task start message is used to indicate the information of the picture that described task need load;
Query unit is used for inquiring about the index information whether described Hash table that described creating unit creates stores the picture that described task need load;
Loading unit is used at the Query Result of described query unit when being, the picture that loads the described index information correspondence in the buffer memory shows, and the loading weight of the picture of described index information correspondence is added 1.
Alternatively, the information of the described task picture that need load includes but not limited to the index information of the picture that described task need load.
As an optional embodiment, in the described control picture device shown:
Described loading unit, also be used at the Query Result of described query unit for not the time, the picture that described task need be loaded is loaded in the buffer memory, and the index information of the picture that described task need be loaded is stored in the described Hash table, and the loading weight of the picture that described task need be loaded adds 1.
As an optional embodiment, in the described control picture device shown:
Described receiving element also is used to receive task termination message, and described task termination message is used to indicate the information of the picture that described task need unload;
Correspondingly, described loading unit, the loading weight that also is used for the picture that need unload described task subtracts 1, is non-0 value if the loading weight of the picture that described task need unload subtracts 1 back, and then the picture that the described task in the buffer memory need not be unloaded reclaims; If after the loading weight of the picture that described task need unload subtracts 1 is 0 value, then reclaim the picture that the described task in the buffer memory need unload.
Alternatively, the information of the described task picture that need unload includes but not limited to the index information of the picture that described task need unload.
Compared with prior art, the embodiment of the invention has following beneficial effect:
Adopted buffer memory to preserve picture in the embodiment of the invention, can reduce the decode operation of picture, thereby can improve the picture display speed; In addition, adopted buffer memory to preserve picture in the embodiment of the invention, can also reduce picture and open and close operation, thereby can reduce system resources consumption; Moreover, adopted buffer memory to preserve picture in the embodiment of the invention, make each task from buffer memory, to Load Image and show, and the loading weight of picture is added 1 operation, can support of the acceleration of a plurality of tasks like this to the operation of picture.
Description of drawings
In order to be illustrated more clearly in the technical scheme in the embodiment of the invention, to do to introduce simply to the accompanying drawing of required use among the embodiment below, apparently, accompanying drawing in describing below only is some embodiments of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain other accompanying drawing according to these accompanying drawings.
A kind of method flow synoptic diagram of controlling picture demonstration of Fig. 1 for providing in the embodiment of the invention;
The method flow synoptic diagram that Fig. 2 shows for the another kind control picture that provides in the embodiment of the invention;
A kind of control picture device shown structural representation of Fig. 3 for providing in the embodiment of the invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the invention, the technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills belong to the scope of protection of the invention not making the every other embodiment that is obtained under the creative work prerequisite.
A kind of method and device that picture shows of controlling is provided in the embodiment of the invention, can be applied to embedded device, can improve the picture display speed, reduced system resources consumption and support of the acceleration of a plurality of tasks the picture operation by this method and apparatus.Below be elaborated respectively.
Embodiment one:
See also Fig. 1, a kind of method flow synoptic diagram of controlling picture demonstration of Fig. 1 for providing in the embodiment of the invention.As shown in Figure 1, this method can may further comprise the steps:
101, create Hash table (Hash table), wherein, Hash table is used for the index information of the picture in the memory buffers;
In the embodiment of the invention, Hash table is also named hash table, is a kind of data structure that directly conducts interviews according to key value (Key value).That is to say that a position visits record in the table by key value is mapped to for it, to accelerate searching speed.In the embodiment of the invention, the index information of picture can be used as the key value of Hash table.
102, receive task start message, this task start message is used for the information of the picture that the indication task need load;
As an optional embodiment, the information of the picture that above-mentioned task need load can be the index information of the above-mentioned task picture that need load, perhaps also can other the information that can identify the picture identity.
103, whether store the index information of the picture that above-mentioned task need load in the above-mentioned Hash table of inquiry, if having, the picture that then loads the above-mentioned index information correspondence in the buffer memory shows, and the loading weight of the picture of above-mentioned index information correspondence is added 1.
As an optional embodiment, if inquire the index information that does not store the picture that above-mentioned task need load in the above-mentioned Hash table as yet in the above-mentioned steps 103, then the method that shows of the control picture that provides of the embodiment of the invention can also may further comprise the steps:
A, the picture that above-mentioned task need be loaded are loaded in the buffer memory;
The index information of B, picture that above-mentioned task need be loaded is stored in the Hash table, and the loading weight of the picture that above-mentioned task need be loaded adds 1.
As an optional embodiment, in the method that the control picture that the embodiment of the invention provides shows, after task is finished the use of picture resource, can also may further comprise the steps:
C, receive task termination message, wherein, this task termination message is used to indicate the information of the picture that above-mentioned task need unload;
The loading weight of D, the picture that need unload above-mentioned task subtracts 1;
E, be non-0 value if the loading weight of the above-mentioned task picture that need unload subtracts 1 back, then the picture that the above-mentioned task in the buffer memory need not be unloaded reclaims; Otherwise,, then reclaim the picture that the above-mentioned task in the buffer memory need unload if be 0 value after the loading weight of the picture that above-mentioned task need unload subtracts 1.
In the embodiment of the invention, said picture is reclaimed is meant picture deleted.
As an optional embodiment, the information of the picture that above-mentioned task need unload can be the index information of the above-mentioned task picture that need unload, perhaps also can other the information that can identify the picture identity.
As an optional embodiment, in the embodiment of the invention, when system withdraws from, all picture resources in the buffer memory all can be reclaimed, reduce cache resources consumption.
Adopted buffer memory to preserve picture in the embodiment of the invention one, can reduce the decode operation of picture, thereby can improve the picture display speed; In addition, adopted buffer memory to preserve picture in the embodiment of the invention one, can also reduce picture and open and close operation, thereby can reduce system resources consumption; Moreover, adopted buffer memory to preserve picture in the embodiment of the invention one, make each task from buffer memory, to Load Image and show, and the loading weight of picture is added 1 operation, can support of the acceleration of a plurality of tasks like this to the operation of picture.
Embodiment two:
See also Fig. 2, the method flow synoptic diagram that Fig. 2 shows for the another kind control picture that provides in the embodiment of the invention.As shown in Figure 2, this method can may further comprise the steps:
201, create Hash table, wherein, Hash table is used for the index information of the picture in the memory buffers;
202, the index information of the picture that the task of storing need load whether in the above-mentioned Hash table of inquiry is if then execution in step 203; If not, then carry out 204;
203, the picture that loads the above-mentioned index information correspondence in the buffer memory shows, and the loading weight of the picture of above-mentioned index information correspondence is added 1; And execution in step 205;
204, the picture that above-mentioned task need be loaded is loaded in the buffer memory, and the index information of the picture that above-mentioned task need be loaded is stored in the Hash table, and the loading weight of the picture that above-mentioned task need be loaded adds 1; And execution in step 205;
205, system's operation;
206, judge whether task unloads picture, if then execution in step 207; Otherwise, then return step 205, the operation of continuation system;
For instance, if receive task termination message, this task termination message is used to indicate the information of the picture that above-mentioned task need unload, and then explanation task need unload picture; Otherwise the explanation task does not need to unload picture.
207, the loading weight of the picture that need unload above-mentioned task subtracts 1;
Whether after 208, the loading weight of judging the picture that above-mentioned task need unload subtracts 1 is 0 value, if then execution in step 209; Otherwise, then return step 205, the operation of continuation system;
209, reclaim the picture that the above-mentioned task in the buffer memory need unload;
210, judge whether system withdraws from, if then execution in step 211; Otherwise, then return step 205, the operation of continuation system;
211, all picture resources in the buffer memory are all reclaimed.
Adopted buffer memory to preserve picture in the embodiment of the invention two, can reduce the decode operation of picture, thereby can improve the picture display speed; In addition, adopted buffer memory to preserve picture in the embodiment of the invention two, can also reduce picture and open and close operation, thereby can reduce system resources consumption; Moreover, adopted buffer memory to preserve picture in the embodiment of the invention two, make each task from buffer memory, to Load Image and show, and the loading weight of picture is added 1 operation, can support of the acceleration of a plurality of tasks like this to the operation of picture.
Embodiment two:
See also Fig. 3, a kind of structural representation of controlling picture device shown of Fig. 3 for providing in the embodiment of the invention.The control picture device shown that the embodiment of the invention provides can be applied to embedded system or other need control the system that picture shows.As shown in Figure 3, this device can comprise:
Creating unit 301 is used to create Hash table, and wherein, Hash table is used for the index information of the picture in the memory buffers;
Receiving element 302 is used to receive task start message, and this task start message is used to indicate the information of the picture that above-mentioned task need load;
Alternatively, the information of the above-mentioned task picture that need load includes but not limited to the index information of the picture that above-mentioned task need load.
Query unit 303 is used for inquiring about the index information whether Hash table that creating unit 301 creates stores the picture that above-mentioned task need load;
Loading unit 304 is used at the Query Result of query unit 303 when being, the picture that loads the above-mentioned index information correspondence in the buffer memory shows, and the loading weight of the picture of above-mentioned index information correspondence is added 1.
As an optional embodiment, in the control picture device shown that the embodiment of the invention provides:
Loading unit 304, also be used at the Query Result of query unit 303 for not the time, the picture that above-mentioned task need be loaded is loaded in the buffer memory, and the index information of the picture that above-mentioned task need be loaded is stored in the Hash table, and the loading weight of the picture that above-mentioned task need be loaded adds 1.
As an optional embodiment, in the control picture device shown that the embodiment of the invention provides:
Receiving element 302 also is used to receive task termination message, and this task termination message is used to indicate the information of the picture that above-mentioned task need unload;
Correspondingly, loading unit 304, the loading weight that also is used for the picture that need unload above-mentioned task subtracts 1, is non-0 value if the loading weight of the picture that above-mentioned task need unload subtracts 1 back, and then the picture that the above-mentioned task in the buffer memory need not be unloaded reclaims; If after the loading weight of the picture that above-mentioned task need unload subtracts 1 is 0 value, then reclaim the picture that the above-mentioned task in the buffer memory need unload.
Alternatively, the information of the above-mentioned task picture that need unload includes but not limited to the index information of the picture that above-mentioned task need unload.
Adopted buffer memory to preserve picture in the embodiment of the invention three, can reduce the decode operation of picture, thereby can improve the picture display speed; In addition, adopted buffer memory to preserve picture in the embodiment of the invention three, can also reduce picture and open and close operation, thereby can reduce system resources consumption; Moreover, adopted buffer memory to preserve picture in the embodiment of the invention three, make each task from buffer memory, to Load Image and show, and the loading weight of picture is added 1 operation, can support of the acceleration of a plurality of tasks like this to the operation of picture.
One of ordinary skill in the art will appreciate that: all or part of step that realizes said method embodiment can be finished by the relevant hardware of programmed instruction, aforesaid program can be stored in the computer read/write memory medium, this program is carried out the step that comprises said method embodiment when carrying out; And aforesaid storage medium comprises: flash disk, ROM (read-only memory) (Read-Only Memory, ROM), random access device (Random Access Memory, RAM), various media that can be program code stored such as magnetic disc or CD.
More than a kind ofly controlled method and the device that picture shows and be described in detail what provide in the embodiment of the invention, used concrete sample herein principle of the present invention and embodiment are set forth, the explanation of above embodiment just is used for helping to understand method of the present invention and core concept thereof; Simultaneously, for one of ordinary skill in the art, according to thought of the present invention, the part that all can change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.
Claims (10)
1. control the method that picture shows for one kind, it is characterized in that, comprising:
Create Hash table, described Hash table is used for the index information of the picture in the memory buffers;
Receive task start message, described task start message is used to indicate the information of the picture that described task need load;
Inquire about the index information that whether stores the picture that described task need load in the described Hash table, if having, the picture that then loads the described index information correspondence in the buffer memory shows, and the loading weight of the picture of described index information correspondence is added 1.
2. method according to claim 1 is characterized in that the information of the picture that described task need load includes but not limited to the index information of the picture that described task need load.
3. method according to claim 1 is characterized in that, described method also comprises:
If do not store the index information of the picture that described task need load in the described Hash table as yet, then the picture that described task need be loaded is loaded in the buffer memory;
The index information of the picture that described task need be loaded is stored in the described Hash table, and the loading weight of the picture that described task need be loaded adds 1.
4. according to claim 1 or 2 or 3 described methods, it is characterized in that described method also comprises:
Receive task termination message, described task termination message is used to indicate the information of the picture that described task need unload;
The loading weight of the picture that need unload described task subtracts 1;
Be non-0 value if the loading weight of the picture that described task need unload subtracts 1 back, then the picture that the described task in the buffer memory need not be unloaded reclaims; If after the loading weight of the picture that described task need unload subtracts 1 is 0 value, then reclaim the picture that the described task in the buffer memory need unload.
5. method according to claim 4 is characterized in that the information of the picture that described task need unload includes but not limited to the index information of the picture that described task need unload.
6. a control picture device shown is characterized in that, comprising:
Creating unit is used to create Hash table, and described Hash table is used for the index information of the picture in the memory buffers;
Receiving element is used to receive task start message, and described task start message is used to indicate the information of the picture that described task need load;
Query unit is used for inquiring about the index information whether described Hash table that described creating unit creates stores the picture that described task need load;
Loading unit is used at the Query Result of described query unit when being, the picture that loads the described index information correspondence in the buffer memory shows, and the loading weight of the picture of described index information correspondence is added 1.
7. device according to claim 6 is characterized in that,
The information of the picture that described task need load includes but not limited to the index information of the picture that described task need load.
8. device according to claim 6 is characterized in that,
Described loading unit, also be used at the Query Result of described query unit for not the time, the picture that described task need be loaded is loaded in the buffer memory, and the index information of the picture that described task need be loaded is stored in the described Hash table, and the loading weight of the picture that described task need be loaded adds 1.
9. according to claim 6 or 7 or 8 described devices, it is characterized in that,
Described receiving element also is used to receive task termination message, and described task termination message is used to indicate the information of the picture that described task need unload;
Described loading unit, the loading weight that also is used for the picture that need unload described task subtracts 1, is non-0 value if the loading weight of the picture that described task need unload subtracts 1 back, and then the picture that the described task in the buffer memory need not be unloaded reclaims; If after the loading weight of the picture that described task need unload subtracts 1 is 0 value, then reclaim the picture that the described task in the buffer memory need unload.
10. device according to claim 9 is characterized in that the information of the picture that described task need unload includes but not limited to the index information of the picture that described task need unload.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201010616081XA CN102081920B (en) | 2010-12-30 | 2010-12-30 | Method and device for controlling picture display |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201010616081XA CN102081920B (en) | 2010-12-30 | 2010-12-30 | Method and device for controlling picture display |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102081920A true CN102081920A (en) | 2011-06-01 |
CN102081920B CN102081920B (en) | 2012-08-22 |
Family
ID=44087846
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201010616081XA Active CN102081920B (en) | 2010-12-30 | 2010-12-30 | Method and device for controlling picture display |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102081920B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102750174A (en) * | 2012-06-29 | 2012-10-24 | Tcl集团股份有限公司 | Method and device for loading file |
CN103077014A (en) * | 2012-12-25 | 2013-05-01 | 深圳Tcl新技术有限公司 | Method and device for recovering pictures based on life cycle of interface |
CN107888981A (en) * | 2017-11-16 | 2018-04-06 | 北京小米移动软件有限公司 | Audio frequency and video preload method, apparatus, equipment and storage medium |
CN110647502A (en) * | 2018-06-26 | 2020-01-03 | 中兴通讯股份有限公司 | File loading method, equipment, device and computer storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS6488660A (en) * | 1987-09-29 | 1989-04-03 | Toshiba Corp | Font cache control system |
CN101221580A (en) * | 2008-01-03 | 2008-07-16 | 中兴通讯股份有限公司 | Method for improving page layout display performance of embedded browser |
CN101741986A (en) * | 2009-12-31 | 2010-06-16 | 优视科技有限公司 | Page cache method for mobile communication equipment terminal |
US20100188412A1 (en) * | 2009-01-28 | 2010-07-29 | Microsoft Corporation | Content based cache for graphics resource management |
-
2010
- 2010-12-30 CN CN201010616081XA patent/CN102081920B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS6488660A (en) * | 1987-09-29 | 1989-04-03 | Toshiba Corp | Font cache control system |
CN101221580A (en) * | 2008-01-03 | 2008-07-16 | 中兴通讯股份有限公司 | Method for improving page layout display performance of embedded browser |
US20100188412A1 (en) * | 2009-01-28 | 2010-07-29 | Microsoft Corporation | Content based cache for graphics resource management |
CN101741986A (en) * | 2009-12-31 | 2010-06-16 | 优视科技有限公司 | Page cache method for mobile communication equipment terminal |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102750174A (en) * | 2012-06-29 | 2012-10-24 | Tcl集团股份有限公司 | Method and device for loading file |
CN102750174B (en) * | 2012-06-29 | 2016-01-27 | Tcl集团股份有限公司 | file loading method and device |
CN103077014A (en) * | 2012-12-25 | 2013-05-01 | 深圳Tcl新技术有限公司 | Method and device for recovering pictures based on life cycle of interface |
CN107888981A (en) * | 2017-11-16 | 2018-04-06 | 北京小米移动软件有限公司 | Audio frequency and video preload method, apparatus, equipment and storage medium |
CN110647502A (en) * | 2018-06-26 | 2020-01-03 | 中兴通讯股份有限公司 | File loading method, equipment, device and computer storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN102081920B (en) | 2012-08-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN100456261C (en) | File management device, file management method, file management method program, and recording medium the file management method program | |
US20050086551A1 (en) | Memory optimization for a computer system having a hibernation mode | |
JP2009502050A (en) | GPU timeline with rendered queue | |
CN102081920B (en) | Method and device for controlling picture display | |
US9165603B2 (en) | Method and apparatus for grouping video tracks in a video editing timeline | |
US10795606B2 (en) | Buffer-based update of state data | |
CN112905113A (en) | Data access processing method and device | |
CN111475425A (en) | Method for managing flash memory module and related flash memory controller and electronic device | |
US10198208B2 (en) | Performing collective I/O operations within operating system processes | |
WO2016078091A1 (en) | Input output (io) request processing method and file server | |
CN107544298A (en) | A kind of camera call method and device | |
CN104104705A (en) | Access method and device of distributed storage system | |
CN103617133A (en) | Method and device for compressing virtual memory in Windows system | |
US20090138655A1 (en) | Method and terminal for demand paging at least one of code and data requiring real-time response | |
CN103377060B (en) | A kind of computer program accelerated method and system | |
CN102270179B (en) | For the data Storage and Processing method based on sheet unit and the system thereof of CAD system | |
US9262304B2 (en) | Methods and systems for testing interactions between mobile applications | |
CN108089904B (en) | Display page expansion method and device | |
CN103246611A (en) | File processing method and system | |
US20070294468A1 (en) | Architecture for reading and writing to flash memory | |
US20100082647A1 (en) | Method for creating image file and method for sorting file systems | |
KR101663545B1 (en) | Method for rearranging dynamic code and disk drive using the same | |
CN110175053B (en) | Picture loading method and device | |
JP2009211540A (en) | Device and method for executing computer usable code | |
KR20030095820A (en) | Access control device for memory and method thereof |
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 |