CN102110163A - Method and device for switching and displaying data object - Google Patents
Method and device for switching and displaying data object Download PDFInfo
- Publication number
- CN102110163A CN102110163A CN 201110046348 CN201110046348A CN102110163A CN 102110163 A CN102110163 A CN 102110163A CN 201110046348 CN201110046348 CN 201110046348 CN 201110046348 A CN201110046348 A CN 201110046348A CN 102110163 A CN102110163 A CN 102110163A
- Authority
- CN
- China
- Prior art keywords
- data
- memory container
- container
- buffer memory
- module
- 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 invention provides a method and device for switching and displaying a data object, aiming at solving the problem that the switching display efficiency is low when massive data objects are circularly switched and displayed. The method in the invention comprises the following steps of: creating a memory container and a cache container; searching whether a data object required to be displayed is contained in the cache container; if the data object is contained in the cache container, exchanging all the data objects in the memory container with all the data objects in the searched cache container, and displaying all the data objects in the memory container; if the data object is not contained in the cache container, unloading all the data objects in the cache container, storing all the data objects in the memory container into the cache container, unloading all the data objects in the memory container, loading initial data to be displayed at the next time, analyzing the initial data to form a new data object, storing the new data object into the memory container, and finally displaying all the data objects in the memory container. By applying the method and device in the invention, the switching display efficiency is greatly improved.
Description
Technical field
The present invention relates to computing machine mass data processing technical field, particularly a kind of method and device that switches the video data object.
Background technology
In the prior art, in computer industry, to switch demonstration lot of data object, generally need through 5 following steps:
All data objects of step 1, the current demonstration of unloading;
Step 2, loading primary data;
Step 3, parsing primary data;
Step 4, formation new data;
Step 5, demonstration new data.
In actual applications, if just show a spot of data object at every turn, and not long to the parsing time of primary data, so above processing mode can meet the demands substantially.But when needing to show lot of data, and the parsing time of each data object is longer at every turn, will cause the low problem of switching efficiency when at this moment adopting above processing mode.Two groups of data are for example arranged, the parsing of every group of data and load time all surpass 10 seconds, switch demonstration if adopt said method to circulate, then the time delay of data object demonstration each time all will be above 10 seconds, and the switching efficiency between this data obviously is very unfavorable.
Summary of the invention
For addressing the above problem, the invention provides a kind of method of switching the video data object, can improve the switching display efficiency.
The method of switching video data object of the present invention may further comprise the steps:
Create video memory container and buffer memory container, be respectively applied for all data objects of the current demonstration of storage and may need the data presented object next time;
Before the new data object of loading arrived described video memory container, whether search exists in all buffer memory containers needed the data presented object;
If exist, then all data objects in the buffer memory container that searches and all data objects in the video memory container are exchanged, all data objects in the video memory container after will exchanging then show;
If do not exist, then unload all data objects in the buffer memory container, all data objects in the video memory container are saved in this buffer memory container, unload all data objects in the described video memory container then, load the primary data that next time will show, resolve described primary data, the formation new data-objects also is saved in the described video memory container, at last all data objects in the video memory container is shown.
The present invention also provides a kind of device that switches the video data object in addition, comprising:
The container creation module is used to create video memory container and buffer memory container, all data objects of the current demonstration of storage in the described video memory container, and storage may need the data presented object next time in the described buffer memory container;
The search judge module that is connected with described container creation module, be used for before the new data object of loading arrives described video memory container, whether search exists in all buffer memory containers needs the data presented object, if the information that then sends, then sends information to described data exchange module if not to described Unload module;
The data exchange module that is connected with described search judge module, be used for after the information that receives described search judge module, all data objects in the buffer memory container that searches and all data objects in the video memory container are exchanged, and concurrent carry information is given display module;
The Unload module that is connected with described search judge module, all data objects that are used for unloading buffer memory container after the information that receives described search judge module transmission, and after all data object transfer in the video memory container arrive the buffer memory container, all data objects in the unloading video memory container;
The data shift module that is connected with described Unload module, be used for the unloading described video memory container all data objects before with all data object transfer in the buffer memory container that has unloaded;
Loading parsing module with described data shift module is connected is used to load the primary data that next time will show, resolves described primary data, forms new data object and is saved in the described video memory container, and concurrent carry information is given described display module;
With the display module that described loading parsing module and described data exchange module are connected respectively, be used for all data objects of described video memory container are shown.
From above scheme as can be seen, the method and the device of switching video data object of the present invention, when demonstration mass data object is switched in circulation, do not need all to pass through each time the process that loads and resolve primary data and just the data object of preserving before can be shown, greatly improved the switching display efficiency.
Description of drawings
Fig. 1 is a kind of method flow diagram that switches the video data object of the present invention;
Fig. 2 is a kind of device synoptic diagram that switches the video data object of the present invention.
Embodiment
The invention provides a kind of method and device that switches the video data object, can solve in the prior art and when demonstration mass data object is switched in circulation, switch the low problem of display efficiency, describe technical scheme of the present invention in detail below in conjunction with specific embodiment and accompanying drawing.
In this enforcement, suppose to be provided with altogether two groups of data, be respectively data A and data B, every group of data all have the lot of data object, and only allow to exist wherein one group of data at one time, promptly when data A exists, only need the data object of loading data A, and the object in all non-data A is all wanted unloaded and is fallen; In like manner, when switching to data B, only need the data object of loading data B, and the object of all non-data B is all wanted unloaded and is fallen.When the data that show A and B are switched in circulation, as shown in Figure 1, mainly comprise following step in its specific implementation process:
Step S1 is applied for creating video memory container and buffer memory container in internal memory by system, is respectively applied for all data objects of the current demonstration of storage and may needs the data presented object next time.Wherein, " video memory container " has and has only one, and " buffer memory container " can have a lot of, herein owing to have only demonstrations that need circulate of two groups of data altogether, therefore only need get final product by a buffer memory container certainly.
Step S2 is loading new data object before the described video memory container, and whether search exists in all buffer memory containers needs the data presented object, if execution in step S3 then, execution in step S4 then if not.
Step S3, if exist, promptly having searched needs the data presented object, therefore all data objects in all data objects in the buffer memory container that searches and the current video memory container are exchanged, promptly after the exchange, the data object of buffer memory container before current video memory container has been preserved, and the current cache container preserved before the data object preserved of video memory container.After finishing aforesaid operations, all data objects in the video memory container after the exchange are shown that one takes turns switching shows end.
Step S4 if do not exist, does not promptly search required next time data presented object in the buffer memory container, then unload all data objects in the buffer memory container, and all data objects in the video memory container are saved in this buffer memory container.
Step S5 unloads all data objects in the current video memory container.
Step S6 reloads the primary data that next time will show, resolves described primary data then, and the formation new data-objects also is saved in the described video memory container.
Step S7 shows all data objects in the video memory container, and one takes turns switching shows end.
Above for example be the situation of having only two groups of data to switch, and the method for switching video data object of the present invention obviously is applied to this incessantly, also is applicable to the situation of multi-group data.At this moment need to create a plurality of buffer memory containers and preserve the data object that had shown, but thing followed problem is when a plurality of buffer memory container, will in step S4, specifically unload the data object in which buffer memory container? as an embodiment preferably, the present invention is from the statistics probability, will the data presented object in order most possibly to find next time, adopt a following design philosophy need to determine unloaded buffer memory container, promptly all data objects in the unloading buffer memory container specifically comprise as follows in step S4: the number of times m of record searching failure, all interior data objects of m buffer memory container that unloading is corresponding; The initial value of described number of times m is 0, adds up afterwards, adopts following formula to carry out accumulation calculating: m=(m+1) %n, and n is total number of buffer memory container in the formula.
Further describe above-mentioned scheme.Suppose that one has 6 groups of data, difference reference numeral 1,2,3,4,5, come the representative data object with numbering below the 6(), system creation three buffer memory containers, a video memory container, wherein, during holding, three current buffer memorys deposited 1 respectively, 2,3, deposited 4 in the current video memory container: if need to show 5 next time, then carry out the search first time, if search failure, m=1 then, therefore the data in the buffer memory container at 1 place are all uninstalled, and 4 in the video memory container transferred in this buffer memory container that has uninstalled, uninstall 4 in the video memory container, load 5 then in the video memory container, (at this moment the data number in the buffer memory container is: 4 once to switch the demonstration end, 2,3); For the second time needing the data presented object is 6, then carry out the search second time, the search failure, m=2 then, therefore the data in the buffer memory container at 2 places are all uninstalled, and 5 in the video memory container transferred in this buffer memory container that has uninstalled, 5 in the unloading video memory container, load 6 then in the video memory container, (data number in the buffer memory container is at this moment: 4,5,3) to switch the demonstration end for the second time
As an embodiment preferably, can also accelerate search speed (new data-objects that search will show next time) by giving all data objects interpolation uniquely identified modes in each buffer memory container, it is method of the present invention, in all buffer memory containers the search whether exist need the data presented object before, add unique identification for all data objects in each buffer memory container, and after all data objects in each buffer memory container change, change described unique identification.Because all data in each buffer memory container are all corresponding unique identification, and will the data presented object also be that uniquely identified is arranged next time, therefore when step S2 searches for, can be according to the unique identification of the new data-objects that will show next time, search for whether to exist in all buffer memory containers and identify identical data object therewith, if have, illustrate that promptly searched will the data presented object in the buffer memory container, directly swap data has switched just, has greatly accelerated search speed.When adding unique identification, it should be noted that, sign container in data object to be unloaded when unloading data object at every turn, and behind another container, also all will add a new unique identification for again this container accordingly at loaded with new data object or transferring data object.
In addition, as shown in Figure 2, the present invention also provides a kind of device that switches the video data object, comprising:
The container creation module is used to create video memory container and buffer memory container, all data objects of the current demonstration of storage in the described video memory container, and storage may need the data presented object next time in the described buffer memory container;
The search judge module that is connected with described container creation module, be used for before the new data object of loading arrives described video memory container, whether search exists in all buffer memory containers needs the data presented object, if the information that then sends, then sends information to described data exchange module if not to described Unload module;
The data exchange module that is connected with described search judge module, be used for after the information that receives described search judge module, all data objects in the buffer memory container that searches and all data objects in the video memory container are exchanged, and concurrent carry information is given display module;
The Unload module that is connected with described search judge module, all data objects that are used for unloading buffer memory container after the information that receives described search judge module transmission, and after all data object transfer in the video memory container arrive the buffer memory container, all data objects in the unloading video memory container;
The data shift module that is connected with described Unload module, be used for the unloading described video memory container all data objects before with all data object transfer in the buffer memory container that has unloaded;
Loading parsing module with described data shift module is connected is used to load the primary data that next time will show, resolves described primary data, forms new data object and is saved in the described video memory container, and concurrent carry information is given described display module;
With the display module that described loading parsing module and described data exchange module are connected respectively, be used for after receiving described data exchange module or loading the information of parsing module transmission, all data objects in the described video memory container being shown.
Preferably, will the data presented object in order most possibly to find next time, device of the present invention can also comprise the logging modle that is connected with described Unload module, and described logging modle is used for the number of times m of record searching failure, and will write down the described Unload module of result notification; The initial value of described number of times m is 0, and adopts following formula to carry out accumulation calculating: m=(m+1) %n, and n is total number of buffer memory container in the formula.Receive the record result of logging modle when Unload module after, unload all data objects in m the corresponding buffer memory container according to this record result.
In addition, device of the present invention can also comprise the identification module that is connected with described container creation module, described identification module is used for adding unique identification to all data objects of each buffer memory container, when all data objects in each buffer memory container change, correspondingly change described unique identification.
From above scheme as can be seen, the method and the device of switching video data object of the present invention, do not need all to pass through each time the process that loads and resolve primary data, in searching certain buffer memory container, exist next time will the data presented object time, intercourse the data in video memory container and the buffer memory container, just can apace all data objects that need to show be shown, when demonstration mass data object is switched in circulation, reduce the switching delay time, greatly improved the switching display efficiency.
Above-described embodiment of the present invention does not constitute the qualification to protection domain of the present invention.Any modification of being done within the spirit and principles in the present invention, be equal to and replace and improvement etc., all should be included within the claim protection domain of the present invention.
Claims (7)
1. a method of switching the video data object is characterized in that, may further comprise the steps:
Create video memory container and buffer memory container, be respectively applied for all data objects of the current demonstration of storage and may need the data presented object next time;
Before the new data object of loading arrived described video memory container, whether search exists in all buffer memory containers needed the data presented object;
If exist, then all data objects in the buffer memory container that searches and all data objects in the video memory container are exchanged, all data objects in the video memory container after will exchanging then show;
If do not exist, then unload all data objects in the buffer memory container, all data objects in the video memory container are saved in this buffer memory container, unload all data objects in the described video memory container then, load the primary data that next time will show, resolve described primary data, the formation new data-objects also is saved in the described video memory container, and all data objects in the video memory container are shown.
2. the method for switching video data object according to claim 1 is characterized in that, all data objects in the described unloading buffer memory container specifically comprise: the number of times m of record searching failure, all interior data objects of m buffer memory container that unloading is corresponding; The initial value of described number of times m is 0, and adopts following formula to carry out accumulation calculating: m=(m+1) %n, and n is total number of buffer memory container in the formula.
3. the method for switching video data object according to claim 1 and 2 is characterized in that, in all buffer memory containers search whether exist need the data presented object before, add unique identifications for all data objects in each buffer memory container.
4. the method for switching video data object according to claim 3 is characterized in that, changes described unique identification when all data objects in each buffer memory container change.
5. a device that switches the video data object is characterized in that, comprising:
The container creation module is used to create video memory container and buffer memory container, all data objects of the current demonstration of storage in the described video memory container, and storage may need the data presented object next time in the described buffer memory container;
The search judge module that is connected with described container creation module, be used for before the new data object of loading arrives described video memory container, whether search exists in all buffer memory containers needs the data presented object, if the information that then sends, then sends information to described data exchange module if not to described Unload module;
The data exchange module that is connected with described search judge module, be used for after the information that receives described search judge module, all data objects in the buffer memory container that searches and all data objects in the video memory container are exchanged, and concurrent carry information is given display module;
The Unload module that is connected with described search judge module, all data objects that are used for unloading buffer memory container after the information that receives described search judge module transmission, and after all data object transfer in the video memory container arrive the buffer memory container, all data objects in the unloading video memory container;
The data shift module that is connected with described Unload module, be used for the unloading described video memory container all data objects before with all data object transfer in the buffer memory container that has unloaded;
Loading parsing module with described data shift module is connected is used to load the primary data that next time will show, resolves described primary data, forms new data object and is saved in the described video memory container, and concurrent carry information is given described display module;
With the display module that described loading parsing module and described data exchange module are connected respectively, be used for all data objects of described video memory container are shown.
6. the device of switching video data object according to claim 5 is characterized in that, also comprises the logging modle that is connected with described Unload module, and described logging modle is used for the number of times m of record searching failure, and will write down the described Unload module of result notification; The initial value of described number of times m is 0, and adopts following formula to carry out accumulation calculating: m=(m+1) %n, and n is total number of buffer memory container in the formula;
Described Unload module unloads all interior data objects of m corresponding buffer memory container according to the record result who receives.
7. according to the device of claim 5 or 6 described switching video data objects, it is characterized in that, also comprise the identification module that is connected with described container creation module, described identification module is used for adding unique identification to all data objects of each buffer memory container, changes described unique identification when all data objects in each buffer memory container change.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 201110046348 CN102110163B (en) | 2011-02-25 | 2011-02-25 | Method and device for switching and displaying data object |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 201110046348 CN102110163B (en) | 2011-02-25 | 2011-02-25 | Method and device for switching and displaying data object |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102110163A true CN102110163A (en) | 2011-06-29 |
CN102110163B CN102110163B (en) | 2012-12-05 |
Family
ID=44174324
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN 201110046348 Expired - Fee Related CN102110163B (en) | 2011-02-25 | 2011-02-25 | Method and device for switching and displaying data object |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102110163B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103677554A (en) * | 2012-09-17 | 2014-03-26 | 腾讯科技(深圳)有限公司 | Method and device for sliding screen smoothly |
CN105094524A (en) * | 2015-06-17 | 2015-11-25 | 深圳市美贝壳科技有限公司 | Data refresh method and system for switching application interface |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5680573A (en) * | 1994-07-12 | 1997-10-21 | Sybase, Inc. | Method of buffering data objects in a database |
CN101154230A (en) * | 2006-09-30 | 2008-04-02 | 中兴通讯股份有限公司 | Responding method for large data volume specified searching web pages |
-
2011
- 2011-02-25 CN CN 201110046348 patent/CN102110163B/en not_active Expired - Fee Related
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5680573A (en) * | 1994-07-12 | 1997-10-21 | Sybase, Inc. | Method of buffering data objects in a database |
CN101154230A (en) * | 2006-09-30 | 2008-04-02 | 中兴通讯股份有限公司 | Responding method for large data volume specified searching web pages |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103677554A (en) * | 2012-09-17 | 2014-03-26 | 腾讯科技(深圳)有限公司 | Method and device for sliding screen smoothly |
CN103677554B (en) * | 2012-09-17 | 2017-07-21 | 腾讯科技(深圳)有限公司 | A kind of sliding screen smoothly method and device |
CN105094524A (en) * | 2015-06-17 | 2015-11-25 | 深圳市美贝壳科技有限公司 | Data refresh method and system for switching application interface |
Also Published As
Publication number | Publication date |
---|---|
CN102110163B (en) | 2012-12-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101667958B (en) | Method for selecting hash function, and method and device for storing and searching routing table | |
CN102402611B (en) | Method for quickly searching keywords and reading lists by using ternary content addressable memory (TCAM) | |
CN105659208A (en) | Data processing apparatus and method for processing a plurality of threads | |
CN102890675B (en) | Method and device for storing and finding data | |
CN103064795B (en) | A kind of control method of memory device and relevant apparatus | |
CN101021858A (en) | Data storing method and device, and data seeking, adding and deleting method | |
CN102880724A (en) | Method and system for processing Hash collision | |
CN103136117A (en) | Snoop filter and non-inclusive shared cache memory | |
CN101650646A (en) | Method and device for realizing shared data consistency | |
WO2011102160A1 (en) | Event information management system, event management method and program | |
CN102110163B (en) | Method and device for switching and displaying data object | |
GB2593408A (en) | Increasing data performance by transferring data between storage tiers using workload characteristics | |
CN104519138A (en) | Data transmission method and data transmission system based on distributed FTP | |
CN103547995A (en) | Short pointers | |
CN103905310A (en) | Message processing method and forwarding device | |
CN103970672A (en) | Message memory management method and system | |
CN104301228A (en) | Method and system for realizing searching module in network processor | |
CN111738651A (en) | Processing method, device and equipment for scheduling task | |
CN100487697C (en) | Searching method by using modified hash method | |
CN107943615A (en) | Data processing method and system based on distributed type assemblies | |
CN101976229A (en) | Data reading method, system and device for peripheral equipment of system | |
CN101697194B (en) | Data processing system and method for improving reliability of RFID application | |
US20120054464A1 (en) | Single-port memory access control device | |
CN112965805B (en) | Cross-process asynchronous task processing method and system based on memory mapping file | |
CN114926103A (en) | Logistics allocation method, device, equipment and storage medium |
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 | ||
CP03 | Change of name, title or address | ||
CP03 | Change of name, title or address |
Address after: 510670 Guangdong city of Guangzhou province Kezhu Guangzhou high tech Industrial Development Zone, Road No. 233 Patentee after: VTRON GROUP Co.,Ltd. Address before: 510663 No. 6, color road, hi tech Industrial Development Zone, Guangdong, Guangzhou, China Patentee before: VTRON TECHNOLOGIES Ltd. |
|
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20121205 |