CN116339885A - List display method, electronic equipment and storage medium - Google Patents

List display method, electronic equipment and storage medium Download PDF

Info

Publication number
CN116339885A
CN116339885A CN202310144949.8A CN202310144949A CN116339885A CN 116339885 A CN116339885 A CN 116339885A CN 202310144949 A CN202310144949 A CN 202310144949A CN 116339885 A CN116339885 A CN 116339885A
Authority
CN
China
Prior art keywords
drawn
item
items
cache
list
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.)
Pending
Application number
CN202310144949.8A
Other languages
Chinese (zh)
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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Publication of CN116339885A publication Critical patent/CN116339885A/en
Priority to PCT/CN2023/134066 priority Critical patent/WO2024120226A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/0482Interaction with lists of selectable items, e.g. menus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application describes a list display method, electronic equipment and a storage medium, and relates to the technical field of computers. By pre-caching the items with excessively long drawing time, the problems of slow resource loading, long drawing time, slow non-first starting speed, unsmooth sliding and excessive memory occupation of the cache under the condition of limited memory resources of the lot equipment are solved. The list display method comprises the following steps: responding to a clicking event of a user, and starting a list; judging whether an item to be drawn in the list is cached in advance; if the to-be-drawn item is cached in advance, calling the cached to-be-drawn item, and displaying the to-be-drawn item; if the to-be-drawn item is not cached in advance, drawing the to-be-drawn item, displaying the to-be-drawn item, and judging whether to cache the data drawn by the to-be-drawn item.

Description

List display method, electronic equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a list display method, an electronic device, and a storage medium.
Background
In internet of things (internet of thing, IOT) devices, fixed content is often presented in the form of lists, such as application lists, settings, multi-page cards, and the like. Because of the limited performance and memory of IOT devices, the display of these fixed content lists faces problems of slow start-up speed, unsmooth sliding, etc. due to factors such as slow resource loading, time consuming drawing, etc.
There are a number of optimization methods currently in common use for the display of lists. However, these methods still have various drawbacks for IOT devices with limited performance and memory, and in addition, these general methods do not consider the factors of fixed list presentation content, which has limited optimization.
Disclosure of Invention
The application describes a list display method, electronic equipment and a storage medium. So as to alleviate the problem of unsmooth sliding under the condition of limited memory resources of LOT equipment.
In one aspect, an embodiment of the present application provides a list display method. The method comprises the steps of responding to a user click event, and starting a list; secondly, judging whether an item to be drawn in the list is cached in advance; if the to-be-drawn item is cached in advance, calling the cached to-be-drawn item, and displaying the to-be-drawn item; if the to-be-drawn item is not cached in advance, drawing the to-be-drawn item, displaying the to-be-drawn item, and judging whether to cache the data drawn by the to-be-drawn item. The cache processing mode comprises two modes of temporary cache and long-term cache. And finally, closing the list when the drawing of all the items to be drawn in the list is finished. According to the method, the problems of long time consumption, unsmooth sliding, slow resource loading and the like of the list item drawing are solved by caching the list item with long time consumption and caching the list item which is not in the display area in advance.
In one possible design, determining whether to cache data drawn by an entry to be drawn that is not cached in advance includes: judging whether the sum of the demand degrees S of all the items to be drawn of the list in the display area is larger than a first threshold value; wherein s=t×u, t is a drawing time of the item to be drawn, and u is an occupancy rate of a central processor of the item to be drawn; if the sum of the demand degrees S of all the items to be drawn of the list in the display area is smaller than a first threshold value, caching all the items to be drawn of the list in the display area is not needed; if the sum of the demand degrees S of all the items to be drawn of the list in the display area is larger than a first threshold value, judging whether the demand degree of each item to be drawn is larger than a second threshold value; if the demand degree of the items to be drawn is greater than the second threshold value and the items are not cached in advance, caching the data drawn by the items to be drawn, wherein the method judges whether the items to be drawn in the whole display area are cached or not, and the cached list items do not need to be cached repeatedly; if the demand of the items to be drawn is smaller than the second threshold, or if the demand of the items to be drawn is larger than the second threshold and cached in advance, the data drawn by the items to be drawn are not cached.
In one possible design, the second threshold is the first threshold divided by the number of all entries to be drawn in the list that are located within the display area. And comparing the demand degree of the items to be drawn in the list with the first threshold value and the second threshold value to judge whether the items of the list need to be cached, so that all the items of the list are prevented from being cached without selection, and the space of a memory is greatly saved.
In one possible design, the caching of the data after the drawing of the item to be drawn includes: and carrying out long-term caching or temporary caching on the data drawn by the items to be drawn.
In one possible design, the long-term buffering or temporary buffering is performed on the data drawn by the item to be drawn, including: judging whether the memory amount for long-term caching is sufficient or not; if the memory quantity for long-term caching is sufficient, carrying out long-term caching on the data drawn by the item to be drawn; if the memory amount for the long-term cache is insufficient, judging whether the memory amount for the temporary cache is sufficient or not; and if the memory amount for temporary caching is sufficient, temporarily caching the data drawn by the item to be drawn. By means of classified caching, the memory of the long-term cache and the memory of the temporary cache are orderly and reasonably arranged, and the orderly caching of the items to be drawn is achieved.
In one possible design, the list display method further includes: generating long-term cache evaluation values of all the items to be drawn, the lists of which are located in the display area; if the amount of memory for the long-term cache is insufficient, before judging whether the amount of memory for the temporary cache is sufficient, the list display method further comprises: judging whether the long-term cache evaluation value of the item to be drawn is larger than the long-term evaluation value of the item cached for a long time; if the long-term cache evaluation value of the item to be drawn is larger than the long-term cache evaluation value of at least one long-term cache item in the long-term cache items, removing the long-term cache item, and caching drawn data of the item to be drawn for a long time; if the long-term cache evaluation value of the item to be drawn is smaller than the long-term cache evaluation value of the item already cached, judging whether the memory amount for temporary cache is sufficient or not. By evaluating the long-term cache evaluation value of the item to be drawn and evaluating the long-term cache evaluation value of the item which is already cached for a long time, comparing the long-term cache evaluation value of the two items and caching the list item with the larger long-term cache evaluation value for a long time, the limited memory space for the long-term cache can store the list item with higher cache value and longer drawing time, and the memory space of the long-term cache is greatly saved.
In one possible design, the long-term cache evaluation value of the entry to be drawn is proportional to the number of recent accesses of the entry to be drawn, proportional to the drawing time of the entry to be drawn, and proportional to the CPU occupancy of the entry to be drawn.
In one possible design, the caching processing is performed on the data drawn by the item to be drawn, and the method further includes: generating temporary cache evaluation values of all items to be drawn of the list in the display area; if the memory amount for temporary caching is sufficient, temporarily caching the data drawn by the item to be drawn; if the memory amount for temporary caching is insufficient, calculating a temporary cache evaluation value of an item to be drawn and a temporary cache evaluation value of an item which is temporarily cached, and comparing the temporary cache evaluation value with the temporary cache evaluation value of the item to be drawn; if the temporary cache evaluation value of the item to be drawn is larger than the temporary cache evaluation value of the item which is temporarily cached, removing the item which is temporarily cached, and temporarily caching the data drawn by the item to be drawn; if the temporary cache evaluation value of the item to be drawn is smaller than the temporary cache evaluation value of the item which is temporarily cached, the data drawn by the item to be drawn is not subjected to temporary cache processing. By comparing the temporary cache evaluation values of the to-be-drawn items and the temporary cache items, the list items with larger temporary cache evaluation values are temporarily cached, so that limited temporary cache memory can store the list items with higher cache value and longer drawing time consumption, and the memory of the temporary cache is greatly saved.
In one possible design, the temporary cache evaluation value of the item to be drawn in the display area is larger than the temporary cache evaluation value of the item to be drawn in the non-display area; the temporary cache evaluation value of the item to be drawn is proportional to the latest access times of the item to be drawn, proportional to the drawing time of the item to be drawn and proportional to the occupancy rate of the central processing unit of the item to be drawn.
In one possible design, before determining whether the amount of memory for the long-term cache is sufficient, further comprising: judging whether the item to be drawn is in a first page or not; if the item to be drawn is in the first page, judging whether the memory amount for long-term caching is sufficient or not; and if the to-be-drawn item is not in the first page, judging whether the memory amount for temporary caching is sufficient. By long-term caching of the entries of the first page, the problem of long time consumption during list starting can be solved.
In one possible design, the list display method further includes: drawing and caching M items positioned before all items to be drawn and N items positioned after all items to be drawn in a list; m and N are positive integers greater than or equal to 0.
In one possible design, the drawing and caching of M entries in the list before all the entries to be drawn and N entries after all the entries to be drawn includes: if the demand of the item to be drawn is greater than the second threshold and is not cached in advance, caching the data drawn by the item to be drawn, and marking the item to be drawn as an item suggested to be cached; searching for an entry marked as a suggestion cache in the M entries and the N entries; judging whether the suggested cached items are cached or not; if the proposed cache entry is not cached, determining whether the amount of memory for temporary caching is sufficient.
In one possible design, the list display method further includes: closing the destroying list, and clearing the data of the temporarily cached items.
In one possible design, the list display method further includes: and responding to a user sliding event, sliding the list, and judging whether the items to be drawn in the list are cached in advance.
In another aspect, embodiments of the present application provide a list display apparatus, including: a processor, a memory, a rendering engine, and a frame buffer; the processor is used for judging whether the items to be drawn in the list are cached in the memory in advance; and if the data to be drawn of the items to be drawn are cached in advance, calling the cached data of the items to be drawn, and displaying the items to be drawn through a frame buffer. If the data to be drawn is not cached in advance, the data to be drawn is drawn through the drawing engine, whether the data drawn by the data to be drawn need to be cached in the memory or not is judged through the processor, and the data to be drawn is displayed through the frame buffer.
In another aspect, embodiments of the present application provide an electronic device, including: a processor and a memory; the memory is used for storing instructions executable by the processor; the processor is configured to execute instructions to implement the list display method described above.
In another aspect, embodiments of the present application provide a computer-readable storage medium having instructions stored therein that, when executed by a processor of an electronic device, enable the electronic device to perform a list display method as described above.
Compared with the prior art, the scheme provided by the application enables the memory utilization rate to be higher, reduces the waste of the memory, enables the content of the cache to be more comprehensive, improves the subsequent drawing and display efficiency, and can improve the drawing efficiency, save the memory and solve the problems of excessive memory occupation, slow drawing, time-consuming list starting and the like compared with the prior art under the same condition.
Drawings
Embodiments of the present invention will be described in more detail below with reference to the attached drawing figures:
FIG. 1 is a schematic diagram of a cache picture strategy;
FIG. 2 is a schematic diagram of a cache child control;
FIG. 3 is a schematic diagram of a technical module of the present invention;
FIG. 4 is a schematic diagram of a technical process of the present invention;
FIG. 5 is a schematic diagram of a cache policy flow;
fig. 6 is a schematic diagram of a cache policy drawn in advance.
Detailed Description
The general technical flowchart described in the embodiments of the present application is for more clearly describing the technical solutions of the embodiments of the present application, and does not constitute a limitation on the technical solutions provided by the embodiments of the present application.
In internet of things (internet of thing, IOT) devices, fixed content is often presented in the form of lists, such as application lists, settings, multi-page cards, and the like.
Regarding a method for implementing list display, in some technologies, a list display method is provided, including a scheme for caching a picture policy. The scheme mainly aims at the current situation that the loading of the picture resources is time-consuming, and the cost of the subsequent picture loading is reduced by caching the picture resources loaded from Flash or a network, so that the list display efficiency is improved.
As shown in fig. 1, when drawing an item, if a picture in the item is cached, the item is drawn based on the picture cache. If not, directly loading the picture resource and drawing the item, and then caching the picture based on the strategy. The policy here refers to that in the case of limited memory, the LRU mechanism is used to perform buffering, i.e. to preferentially buffer the most recently accessed picture resources. When the destruction list is closed, the picture cache is emptied.
Although the list display method can finish list display, in the IOT device with limited performance, the drawing of complex vectors, a large number of characters and other types in the items is time-consuming, and only caching pictures still has the problem of low list display efficiency. In addition, when the list is closed and destroyed, the picture cache can be emptied, and the subsequent list starting is time-consuming because no cache is available.
In other techniques, a list display method is provided that includes a scheme for caching item sub-controls. According to the scheme, the drawing content of the item is cached, so that the time consumption for re-drawing in the follow-up sliding process is reduced, and the drawing efficiency is improved.
As shown in fig. 2, when drawing an item, if the item child control drawing content is cached, the drawing item is cached based on the item child control. Otherwise, the direct drawing item is not cached, and then the drawing content of the child control is cached.
When the list is slid, the child control drawing cache of the items not in the display area is removed, and then the items are drawn continuously, so that excessive overhead of the memory is reduced. When the destruction list is closed, the child control drawing cache is emptied.
Although the list display method can finish list display, the drawing contents of all the child controls in the display area need to be cached, so that the memory is wasted. When the child control is used as a unit for caching, an overlapped area exists, so that the memory is wasted. When the list is closed and destroyed, the buffer memory is emptied, and the subsequent list is started with the same time consuming time.
Based on this, as known by those skilled in the art, the present application provides an optimization scheme for a fixed content list with strong versatility, and under the condition that the memory and performance of the LOT device are limited, by caching the item content of the list for a long time or temporarily, the drawing efficiency of the list item is improved, the subsequent item drawing time and the starting time of the list are reduced, the memory occupation amount is reduced, and the sliding performance of the list is improved.
The embodiment of the application can be applied to the situation that the items in the list are displayed in a scrolling mode in a display area (the items in the list are changed locally) or the content of the items in the list is displayed fixedly. The list display method can be implemented by a list display device provided by the embodiment of the application, and the device can be implemented in a software and/or hardware mode and can be generally integrated in an electronic device.
As shown in fig. 3, the technical solution provided in the present application mainly includes four modules, namely, a list, a drawing engine, a buffer management module, and a frame buffer.
S10, responding to a clicking event of a user, and starting the list.
The list includes, for example, an item to be displayed and a waiting item. The items to be displayed are items to be displayed in the display area of the electronic device, and the items to be displayed contain a large number of items arranged according to the specified sequence. The display area may be, for example, an area in the electronic device for displaying the content of the presented list items. The waiting item is positioned at the front side or the rear side of the item to be displayed, and is converted into the item to be displayed according to the sliding instruction of the user. Then, embodiments of the present application may also be applicable to list displays where the content is relatively less fixed.
When a user has an action of clicking or sliding the mouse, starting a list or a sliding list in response to the action; secondly, the number of accesses to the list is recorded, and if the list is currently started, the latest number of accesses to the list is recorded. The higher the number of accesses to the list, the higher the priority of the contents of the entries in the representative list, and the larger the value evaluation value for the cache.
After the list access times are recorded and the list is started, drawing the items in the display interface in the list, wherein the drawing process of the items comprises the following steps S20-S40.
S20, judging whether the items of the list are cached.
The items to be drawn in the list may be understood as items in the list that are located in the display area of the electronic device. The items to be drawn may be one or more. And under the condition that the items to be drawn are multiple, sequentially executing the steps of drawing the items by the multiple items to be drawn until the drawing of the multiple items to be drawn is completed. That is, if the entry is no longer within the display area of the electronic device, the drawing list step ends.
It is explained here that the pre-cached data should be drawn for the list. For example, the buffering of data may be implemented by a buffer management module in the list display apparatus.
For example, step S20 may be performed by a drawing engine module in the list display apparatus.
S30, if the to-be-drawn items are cached in advance, calling the cached to-be-drawn items, and displaying the to-be-drawn items.
If the drawing is cached, directly calling the items in the cache to avoid repeated drawing for a plurality of times, thereby improving the drawing efficiency and solving the problem that the drawing time of the Internet of things equipment is slow under the condition of limited performance.
And S40, if the item to be drawn is not cached in advance, directly drawing the item of the list, sending the item to a frame buffer for display, and judging whether to cache the data drawn by the item to be drawn.
If the items to be drawn are not cached before, the items to be drawn need to be drawn by a drawing engine, and in the drawing process, the latest access times of a list, the drawing time of the items to be drawn and the utilization rate of the items to be drawn in a central processing unit are recorded, and the long-term cache value and the temporary cache value of each drawing item are evaluated so as to facilitate the use of a subsequent cache strategy.
Step S40 may be implemented, for example, by a cache management module in the list display device.
In some embodiments, as shown in fig. 4, determining whether to cache the data after drawing the drawing item includes:
s41, judging whether the to-be-drawn items in the display area comprise to-be-drawn items needing to be cached.
S42, if the to-be-drawn items in the display area do not contain to-be-drawn items needing to be cached, the data after the data are drawn by all to-be-drawn items in the display area do not need to be cached.
And S43, if the to-be-drawn items in the display area contain to-be-drawn items needing to be cached, caching the data drawn by the to-be-drawn items needing to be cached.
In some embodiments, as shown in fig. 4, determining whether the to-be-drawn entry located in the display area includes the to-be-drawn entry that needs to be cached includes:
s411, judging whether the sum of the demand degrees of all the items to be drawn of the list in the display area is larger than a first threshold value; where s=t×u, t is the drawing time of the item to be drawn, and u is the cpu occupancy rate of the item to be drawn.
In one embodiment, when the sum of the load drawing time of all entries in the display area and the product of the CPU occupancy is greater than a specified Threshold, the cache condition is triggered, the specified Threshold is Threshold, i.e
Figure BDA0004088944630000091
Wherein Threshold is the Threshold for triggering buffering, t i Drawing time for the ith item in the display area, including the time of resource loading; u (u) i The occupancy rate of the CPU when the ith item in the display area is drawn is displayed.
And S412, if the sum of the requirements S of all the items to be drawn in the display area is smaller than the first threshold value, not caching all the items to be drawn in the display area in the list.
S413, if the sum of the demand degrees S of all the items to be drawn in the display area is greater than a first threshold value, judging whether the demand degree S of each item to be drawn in the items to be drawn in the display area is greater than a second threshold value.
In some embodiments, the second threshold is: the first threshold, divided by the number of all entries to be drawn for which the list is located within the display area.
In a specific embodiment, after triggering the necessary condition of the cache, the cache management unit decides which entries in the display area need to be cached based on the cache policy. The types of cache are classified into long-term cache and temporary cache, and the cache policy will be described in detail below.
First, if an item within the display areaThe product of the drawing time and the occupancy rate of the drawing time in a Central Processing Unit (CPU) is larger than a set buffer threshold, namely t i *u i Threshold/n, wherein Threshold/n is the set buffer Threshold, t i Drawing time for the ith item, u i The CPU occupancy rate of the ith entry at the time of drawing. If the assumption condition is satisfied, judging whether the item is cached; if the content is cached in advance, the cached item content is directly called to a frame buffer for display through graphic hardware; if not pre-cached, the entry is marked as a suggested cache.
And S414, if the demand degree of the item to be drawn is greater than the second threshold value and is not cached in advance, caching the data drawn by the item to be drawn.
In some embodiments, caching data drawn by an item to be drawn includes: and carrying out long-term caching or temporary caching on the data drawn by the items to be drawn.
For example, performing long-term cache processing or temporary cache processing on data drawn by an item to be drawn includes:
s440, judging whether the item to be drawn is in the first page.
If the entry to be drawn is in the first page, step S441 is performed.
If the entry to be drawn is not in the first page, step S445 is performed.
By executing step S440, when the item to be drawn is not in the first page, step S445 is directly executed, so that the execution flow of the list display method is simpler and more efficient, and the memory space of the long-term cache is saved.
S441, it is determined whether the amount of memory for the long-term cache is sufficient.
S442, if the memory quantity for long-term caching is sufficient, carrying out long-term caching on the data drawn by the item to be drawn.
S443, if the memory amount for the long-term cache is insufficient, judging whether the long-term cache evaluation value of the to-be-drawn entry is larger than the long-term cache evaluation value of at least one long-term cache entry in the long-term cache entries.
In some embodiments, the long-term cache evaluation value of the entry to be drawn is proportional to the number of recent accesses of the entry to be drawn;
for example, the list display method further includes recording the number of list accesses, and if the list is currently started, recording the number of last list accesses.
And/or;
in some embodiments, the long-term cache evaluation value of the entry to be drawn is proportional to the drawing time of the entry to be drawn.
The list display method further includes recording a drawing time of the list to be drawn items.
And/or;
in some embodiments, the long-term cache evaluation value of the entry to be drawn is proportional to the central processor occupancy of the entry to be drawn.
The list display method further comprises recording the occupancy rate of the central processing unit of the item to be drawn.
S444, if the long-term cache evaluation value of the item to be drawn is larger than the long-term cache evaluation value of at least one long-term cache item in the long-term cache items, removing one or more data in the at least one long-term cache item, and caching the data drawn by the item to be drawn for a long time.
S445, if the long-term cache evaluation value of the entry to be drawn is smaller than the long-term cache evaluation value of the entry already cached, it is determined whether the amount of memory for temporary cache is sufficient.
And S446, if the memory amount for temporary caching is sufficient, temporarily caching the data drawn by the item to be drawn.
S447, if the amount of memory used for temporary caching is insufficient, determining whether the temporary cache evaluation value of the to-be-drawn entry is greater than the temporary cache evaluation value of at least one temporary cache entry in the temporary cache entries.
The temporary cache evaluation value of the item to be drawn in the display area is larger than the temporary cache evaluation value of the item to be drawn in the display area;
and/or;
the temporary cache evaluation value of the item to be drawn is in direct proportion to the latest access times of the item to be drawn;
and/or;
the temporary cache evaluation value of the item to be drawn is in direct proportion to the drawing time of the item to be drawn;
and/or;
the temporary buffer evaluation value of the item to be drawn is proportional to the cpu occupancy of the item to be drawn.
S448, if the temporary cache evaluation value of the item to be drawn is greater than the temporary cache evaluation value of at least one temporary cache item in the temporary cache items, removing one or more data in the at least one temporary cache item, and temporarily caching the data drawn by the item to be drawn.
S449, if the temporary buffer evaluation value of the item to be drawn is smaller than the temporary buffer evaluation value of the item already temporarily buffered, the temporary buffer processing is not performed on the data drawn by the item to be drawn.
S45, if the demand of the items to be drawn is smaller than a second threshold, or if the demand of the items to be drawn is larger than the second threshold and cached in advance, caching the data drawn by the items to be drawn is not performed.
S50, responding to a user sliding event, sliding the list, and executing step S20.
S60, drawing and caching M items positioned before all items to be drawn and N items positioned after all items to be drawn in the list.
Wherein M and N are positive integers greater than or equal to 0, M and N can be equal, and M and N can be unequal.
In some embodiments, step S60 includes:
s61, in the search list, the M items positioned before all the items to be drawn and the N items positioned after all the items to be drawn are marked as the suggested cache items.
For example, if the desirability of the item to be drawn is greater than the second threshold and is not cached in advance, the data drawn by the item to be drawn may be marked as a suggested cache while the data drawn by the item to be drawn is cached.
S62, judging whether the item suggested to be cached is cached.
S63, if the suggested cached item is not cached, executing step S445.
In a specific embodiment, whether the item in the display area is sliding is judged, if the item is still sliding, drawing is continued, and whether the item needs to be cached is judged. If the sliding is stopped, the entries of the display area surrounding suggestion buffer, i.e., N entries after all the entries to be drawn, are selectively drawn in advance and temporarily buffered.
As shown in fig. 6, searching for an item marked as a suggested cache around the display area, temporarily not caching the item, judging whether the memory amount of the temporary cache is sufficient, if so, drawing the item and temporarily caching the item; if the memory amount of the temporary cache is insufficient, judging whether the temporary cache evaluation value of the item to be cached is larger than the temporary cache evaluation value of the item already cached temporarily, if so, removing the item with smaller temporary cache evaluation value, and carrying out temporary cache on the item with larger temporary cache evaluation value.
And S70, closing the destroying list, and clearing the data of the temporarily cached items.
In the above embodiment, the entire item is cached, and in addition, the block cache can be performed based on the control in consideration of the requirement that the specified control needs to be active. In the specific implementation flow, the basic flow remains unchanged from the above embodiment, but a method of caching an entry and a method of drawing based on a cache need to be changed.
Specifically, when the entry is cached, firstly, the control which does not support the dynamic effect in the entry is cached, and then, the child control which needs to do the dynamic effect is independently cached. Thus, at least two caches are needed in an entry containing a dynamic control.
When drawing is performed based on the cache, firstly drawing a control which does not support the action based on the cache, and then drawing a child control which needs to do the action based on the cache. Since the processing of dynamic effects is a general technology, it is not the focus of the present invention, and therefore, it is not described in detail herein.
The foregoing embodiments have been provided for the purpose of illustrating the general principles of the present invention in further detail, and are not to be construed as limiting the scope of the invention, but are merely intended to cover any modifications, equivalents, improvements, etc. based on the teachings of the invention.

Claims (18)

1. A list display method, the method comprising:
responding to a clicking event of a user, and starting a list;
sequentially judging whether the items to be drawn in the list are cached in advance;
if the to-be-drawn item is cached in advance, calling the cached to-be-drawn item, and displaying the to-be-drawn item;
if the item to be drawn is not cached in advance, the item to be drawn is drawn, the item to be drawn is displayed, whether caching processing is carried out on data drawn by the item to be drawn is judged, and the caching processing mode comprises a temporary caching mode and a long-term caching mode.
2. The list display method of claim 1, wherein determining whether to cache the data drawn by the item to be drawn comprises:
judging whether the to-be-drawn items in the display area contain to-be-drawn items needing to be cached or not;
if the to-be-drawn items in the display area do not contain the to-be-drawn items to be cached, the data drawn by all the to-be-drawn items of the list in the display area do not need to be cached;
and if the to-be-drawn item in the display area contains the to-be-drawn item to be cached, caching the data drawn by the to-be-drawn item to be cached.
3. The list display method of claim 2, wherein determining whether to cache the data drawn by the item to be drawn according to the drawing time of the item to be drawn, comprises:
judging whether the sum of the demand degrees S of all the items to be drawn of the list in the display area is larger than a first threshold value; wherein s=t×u, t is the drawing time of the item to be drawn, and u is the occupancy rate of the central processor of the item to be drawn;
if the sum of the requirements S of all the items to be drawn of the list in the display area is smaller than or equal to a first threshold value, caching of all the items to be drawn of the list in the display area is not needed;
if the sum of the demand degrees S of all the items to be drawn of the list in the display area is larger than a first threshold value, judging whether the demand degrees of at least part of the items to be drawn are larger than a second threshold value;
if the demand degree of the item to be drawn is greater than a second threshold value and is not cached in advance, caching the data drawn by the item to be drawn;
if the demand of the to-be-drawn item is smaller than a second threshold value, or the demand of the to-be-drawn item is larger than the second threshold value and cached in advance, the data drawn by the to-be-drawn item is not cached.
4. A list display method as claimed in claim 3, characterized in that the second threshold value is the first threshold value divided by the number of all the items to be drawn for which the list is located in the display area.
5. The list display method according to any one of claims 1 to 4, characterized in that the caching processing of the data after the drawing of the item to be drawn includes:
and carrying out long-term cache processing or temporary cache processing on the data drawn by the items to be drawn.
6. The list display method according to any one of claims 1 to 5, characterized in that performing a long-term buffer processing or a temporary buffer processing on the data after the drawing of the item to be drawn, comprises:
judging whether the memory amount for long-term caching is sufficient or not;
if the memory amount for long-term caching is sufficient, carrying out long-term caching on the data drawn by the item to be drawn;
if the memory amount for the long-term cache is insufficient, judging whether the memory amount for the temporary cache is sufficient or not;
and if the memory amount for temporary caching is sufficient, temporarily caching the data drawn by the item to be drawn.
7. The list display method of claim 6, wherein the list display method further comprises: generating long-term cache evaluation values of all the items to be drawn of the list in the display area;
if the amount of memory for the long-term cache is insufficient, before judging whether the amount of memory for the temporary cache is sufficient, the list display method further includes:
judging whether the long-term cache evaluation value of the to-be-drawn item is larger than the long-term evaluation value of at least one long-term cache item in the long-term cache items;
if the long-term cache evaluation value of the to-be-drawn item is larger than the long-term cache evaluation value of at least one long-term cache item in the long-term cache items, removing one or more data in the at least one long-term cache item, and caching the drawn data of the to-be-drawn item for a long time;
and if the long-term cache evaluation value of the to-be-drawn item is smaller than the long-term cache evaluation value of the long-term cache item, judging whether the memory amount for temporary cache is sufficient or not.
8. The list display method of claim 7 wherein the long-term cache evaluation value of the entry to be drawn is proportional to the number of recent accesses of the entry to be drawn;
and/or;
the long-term cache evaluation value of the item to be drawn is proportional to the drawing time of the item to be drawn;
and/or;
the long-term cache evaluation value of the entry to be drawn is proportional to a central processing unit occupancy rate of the entry to be drawn.
9. The list display method according to any one of claims 5 to 8, characterized in that the caching process is performed on the data drawn by the item to be drawn, further comprising:
generating temporary cache evaluation values of all the items to be drawn of the list in the display area;
if the memory amount for temporary caching is insufficient, judging whether the temporary caching evaluation value of the to-be-drawn item is larger than the temporary caching evaluation value of at least one temporary caching item in the temporary caching items;
if the temporary cache evaluation value of the to-be-drawn item is larger than the temporary cache evaluation value of at least one temporary cache item in the temporary cache items, removing one or more data in the at least one temporary cache item, and temporarily caching the drawn data of the to-be-drawn item;
and if the temporary cache evaluation value of the item to be drawn is smaller than the temporary cache evaluation value of the item which is temporarily cached, performing no temporary cache processing on the data drawn by the item to be drawn.
10. The list display method of claim 9, wherein the temporary buffer evaluation value of the entry to be drawn in the display area is larger than the temporary buffer evaluation value of the entry to be drawn in the non-display area;
and/or;
the temporary cache evaluation value of the to-be-drawn item is in direct proportion to the latest access times of the to-be-drawn item;
and/or;
the temporary cache evaluation value of the item to be drawn is in direct proportion to the drawing time of the item to be drawn;
and/or;
the temporary cache evaluation value of the item to be drawn is proportional to the CPU occupancy of the item to be drawn.
11. The list display method of any one of claims 5 to 7, further comprising, before determining whether the amount of memory for the long-term cache is sufficient:
judging whether the item to be drawn is in a first page or not;
if the item to be drawn is in the first page, judging whether the memory amount for long-term caching is sufficient or not;
and if the to-be-drawn item is not in the first page, judging whether the memory amount for temporary caching is sufficient.
12. The list display method according to any one of claims 3 to 11, characterized in that the list display method further comprises:
drawing and caching M items positioned before all the items to be drawn and N items positioned after all the items to be drawn in the list; m and N are positive integers greater than or equal to 0.
13. The list display method of claim 12 wherein drawing and caching M entries in the list that precede all of the entries to be drawn and N entries that follow all of the entries to be drawn, comprises:
if the demand degree of the to-be-drawn item is greater than the second threshold value and is not cached in advance, caching the data drawn by the to-be-drawn item, and marking the to-be-drawn item as an item for suggesting caching;
searching the M items and the items marked as suggestion caches in the N items;
judging whether the suggested cached items are cached or not;
and if the proposed cache entry is not cached, judging whether the memory amount for temporary cache is sufficient.
14. The list display method according to any one of claims 1 to 13, characterized in that the list display method further comprises:
and closing the destroying list, and clearing the data of the item temporarily cached.
15. The list display method according to any one of claims 1 to 14, characterized in that the list display method further comprises:
and responding to a user sliding event, sliding the list, and judging whether the items to be drawn in the list are cached in advance.
16. A list display apparatus characterized by comprising: the list display device comprises a processor, a memory, a drawing engine and a frame buffer;
the processor is used for judging whether the items to be drawn in the list are cached in the memory in advance;
if the data which is drawn by the to-be-drawn item is cached in advance, calling the data which is cached by the to-be-drawn item, and displaying the to-be-drawn item through the frame buffer;
if the data to be drawn is not cached in advance, drawing the data to be drawn by the drawing engine, judging whether the data to be drawn by the data to be drawn need to be cached in the memory by the processor, and displaying the data to be drawn by the frame buffer.
17. An electronic device, comprising: a processor and a memory; the memory is used for storing instructions executable by the processor; the processor is configured to execute the instructions to implement the list display method of any one of claims 1 to 15.
18. A computer readable storage medium having instructions stored therein, which when executed by a processor of an electronic device, enable the electronic device to perform the list display method of any one of claims 1 to 15.
CN202310144949.8A 2022-12-05 2023-01-30 List display method, electronic equipment and storage medium Pending CN116339885A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2023/134066 WO2024120226A1 (en) 2022-12-05 2023-11-24 List display method, electronic device, and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2022115469350 2022-12-05
CN202211546935 2022-12-05

Publications (1)

Publication Number Publication Date
CN116339885A true CN116339885A (en) 2023-06-27

Family

ID=86876585

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310144949.8A Pending CN116339885A (en) 2022-12-05 2023-01-30 List display method, electronic equipment and storage medium

Country Status (2)

Country Link
CN (1) CN116339885A (en)
WO (1) WO2024120226A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024120226A1 (en) * 2022-12-05 2024-06-13 华为技术有限公司 List display method, electronic device, and storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108319619B (en) * 2017-01-18 2022-03-11 腾讯科技(北京)有限公司 Data processing method and device
CN111897819A (en) * 2020-07-31 2020-11-06 平安普惠企业管理有限公司 Data storage method and device, electronic equipment and storage medium
CN116339885A (en) * 2022-12-05 2023-06-27 华为技术有限公司 List display method, electronic equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024120226A1 (en) * 2022-12-05 2024-06-13 华为技术有限公司 List display method, electronic device, and storage medium

Also Published As

Publication number Publication date
WO2024120226A1 (en) 2024-06-13

Similar Documents

Publication Publication Date Title
US11513874B2 (en) Memory management methods and systems
US9015722B2 (en) Efficient cache reuse through application determined scheduling
EP3514689B1 (en) Memory management method and apparatus
US7454564B2 (en) Automatic cache resizing system
US6128713A (en) Application programming interface enabling application programs to control allocation of physical memory in a virtual memory system
US6247042B1 (en) Method and system for restoring the state of physical memory as the focus changes among application programs in a computer
US6983467B2 (en) Application programming interface enabling application programs to group code and data to control allocation of physical memory in a virtual memory system
US9021243B2 (en) Method for increasing free memory amount of main memory and computer therefore
US20090307428A1 (en) Increasing remote desktop performance with video caching
US8141076B2 (en) Cell processor methods and apparatus
WO2024120226A1 (en) List display method, electronic device, and storage medium
US7761873B2 (en) User-space resource management
CN114071047A (en) Frame rate control method and related device
CN109685712A (en) Image buffer storage and application method and device, terminal
CN112784188B (en) Page rendering method and device
JP2004192403A (en) Information processing system and method for managing data in cache memory
JP2005515568A (en) Pre-processing and preloading digital display pages in multi-page digital data files
CN115408105A (en) Missing page exception handling method, device, equipment and storage medium
US11755534B2 (en) Data caching method and node based on hyper-converged infrastructure
CN112434235A (en) Webpage picture loading method and device, computer equipment and storage medium
CN110651253A (en) Memory management system, information processing apparatus, and memory management method
US8683491B2 (en) Information processing apparatus, execution method, and object program
CN112699082A (en) File access request response method and device
JPH0793198A (en) Computer system
CN115686697A (en) Image processing method, device, equipment and storage medium

Legal Events

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