CN107463567B - Data cache loading method and device and portable terminal equipment - Google Patents

Data cache loading method and device and portable terminal equipment Download PDF

Info

Publication number
CN107463567B
CN107463567B CN201610390293.8A CN201610390293A CN107463567B CN 107463567 B CN107463567 B CN 107463567B CN 201610390293 A CN201610390293 A CN 201610390293A CN 107463567 B CN107463567 B CN 107463567B
Authority
CN
China
Prior art keywords
data
slider
cache
portable terminal
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.)
Active
Application number
CN201610390293.8A
Other languages
Chinese (zh)
Other versions
CN107463567A (en
Inventor
郭发尧
吕成宾
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba China Co Ltd
Original Assignee
Alibaba China 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 Alibaba China Co Ltd filed Critical Alibaba China Co Ltd
Priority to CN201610390293.8A priority Critical patent/CN107463567B/en
Publication of CN107463567A publication Critical patent/CN107463567A/en
Application granted granted Critical
Publication of CN107463567B publication Critical patent/CN107463567B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9574Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • G06F16/972Access to data in other repository systems, e.g. legacy data or dynamic Web page generation

Abstract

The invention discloses a data cache loading method and device for portable terminal equipment and the portable terminal equipment. The data cache loading method comprises the following steps: reading data from the cached data list to load the data into a data slider of the memory, wherein the total number of data items in the data slider is kept at a first preset number; and repeatedly utilizing the user interface controls with the first preset number to sequentially display the data in the data slider on a display device of the portable terminal equipment, wherein the first preset number is set to be far smaller than the total number of the data in the cached data list. By using the method, only a small amount of data to be displayed is loaded to the memory, and a small amount of user interface controls are virtually reused for visual display of a user, so that memory consumption is reduced, cache reading speed is increased, and smoothness of data list sliding is realized.

Description

Data cache loading method and device and portable terminal equipment
Technical Field
The present invention generally relates to the field of cache technologies, and in particular, to a data cache loading method and apparatus, and a portable terminal device.
Background
In a portable terminal device such as a smart phone, when an application program acquires a resource through a network server, the resource can be cached in a local disk for a period of time after acquisition, so that when the user acquires the resource again, the user does not need to consume flow to re-request the server for providing, but directly uses a data list cached in the local disk. Data caching is one of the most fundamental technologies for improving network access performance.
In the prior art, in order to present data cached locally, a User Interface (UI) control, for example, a TableViewCell, which is the same as the total number of cached data needs to be constructed when a cached data list to be displayed is loaded into a memory.
However, when the local cache data is too much, for example, in the process of browsing millions of data by a user, loading a large amount of data into the memory and constructing a large amount of UI controls may cause problems of slow loading speed, large memory consumption, unsmooth sliding of the data list, and the like.
Therefore, a method and an apparatus for loading a data cache with high speed and low memory consumption are needed.
Disclosure of Invention
One purpose of the present invention is to effectively optimize the memory storage strategy and increase the cache reading speed of the data list, thereby ensuring the smoothness of the sliding of the data list.
Therefore, the data cache loading method and the data cache loading device achieve the purposes of only actually creating a small number of UI controls and displaying the data loaded into the memory in a mode of virtually reusing the UI controls by combining UI virtualization and data virtualization and utilizing the movement characteristics of the data slider, thereby reducing the memory consumption and improving the cache reading speed, and further realizing the smoothness of the sliding of the data list.
According to an aspect of the present invention, there is provided a data cache loading method for a portable terminal device, including the steps of: reading data from a cache data list to be displayed to load into a data slider of a memory, wherein the total number of data items in the data slider is kept at a first preset number; and repeatedly utilizing the user interface controls with the first preset number to sequentially display the data in the data slider on a display device of the portable terminal equipment, wherein the first preset number is set to be far smaller than the total number of the data in the cache data list to be displayed.
By using the method, only a small amount of data to be displayed is loaded to the memory, and a small amount of UI controls are reused virtually for visual display of a user, so that memory consumption is reduced, cache reading speed is increased, and smoothness of sliding of the data list is realized.
In one embodiment of the present invention, the total number of data items displayed on the display device is a second predetermined number, and the first predetermined number is set to be greater than the second predetermined number.
In this embodiment, the amount of data in the data slider loaded into the memory at one time is larger than the amount of data visible to the user. The preloading mode further improves the fluency of data loading by loading the information to be read by the user into the memory in advance.
In an embodiment of the present invention, the data cache loading method further includes: displaying the data loaded into the data slider on a display device of the portable terminal equipment by utilizing the user interface control under the condition that the data request updating speed for the portable terminal equipment is detected to be less than or equal to an updating speed threshold value; and reading data from the cached data list to update the data slider.
In an embodiment of the present invention, the data cache loading method further includes: in the case that the data request update speed for the portable terminal device is detected to be greater than an update speed threshold, emptying the user interface control; determining data in the cached data list which should be loaded into the data slider, and updating the data slider accordingly; and displaying the updated data in the data slider on a display device of the portable terminal equipment by using the emptied user interface control.
In this embodiment, although the data list moves quickly because the user requests the data update quickly, the UI display content is not timely, and the UI control content needs to be cleared first, and then the UI control is notified to display the content in the updated data slider after the data slider is updated preferentially. Due to the small amount of memory reads, the update time is short and the user's visual response time is negligible.
In one embodiment of the invention, the first predetermined number is determined in dependence on any one or more of the following factors: a display area of the display device, data input/output performance of the portable terminal apparatus, and a memory capacity.
In one embodiment of the invention, the data slider is updated such that the data entry at the center position of the data slider corresponds to the center presentation area displayed on the display device. In a further embodiment of the present invention, the center position of the data slider comprises an asymmetric center position.
In one embodiment of the present invention, the first predetermined number L1 may be expressed as:
L1=activeSmallSegment+activeLargeSegment+1,
wherein the activeSmallSegment and the activeLargeSegment are respectively a smaller activating segment and a larger activating segment at two ends of the central position pos of the data slider,
the top position top and bottom position bot of the data slider are represented as:
in the event that the data slider slips down,
top=pos–activeSmallSegment
bot=pos+activeLargeSegment;
in the case where the data slider is slid up,
top=pos–activeLargeSegment
bot=pos+activeSmallSegment。
in an embodiment of the present invention, the active segments activeSmallSegment and activeLargeSegment of the data slider are determined according to a sliding speed of the data slider and/or a data input/output performance of the portable terminal device.
In an embodiment of the present invention, the data cache loading method further includes: destroying the data entry sliding out of the data slider while updating the data slider. In a further embodiment of the present invention, the step of destroying the data entry sliding out of the data slider while updating the data slider further comprises: in the event that the data entry sliding out of the data slider is a modified data entry, the modification to the data entry is synchronized into the cached data list.
In this embodiment, each cached real data item only has one virtual data item loaded into the memory at one time, that is, a virtual data item is generated when data is loaded into the memory, and the virtual data item is destroyed after the data slider slides away, so that the cached data is prevented from being read and written at the same time by using a data locking protection technology.
According to another aspect of the present invention, there is provided a data cache loading apparatus, including: the memory loading device is used for reading data from a cache data list to be displayed so as to load the data into a data slider of the memory, and the total number of data items in the data slider is kept at a first preset number; and the control display device is used for repeatedly utilizing the first preset number of user interface controls to sequentially display the data in the data slider on the display device of the portable terminal equipment, wherein the first preset number is set to be far smaller than the total number of the data in the cache data list to be displayed.
In one embodiment of the present invention, the total number of data items displayed on the display device is a second predetermined number, and the first predetermined number is set to be greater than the second predetermined number.
In an embodiment of the present invention, the data cache loading device further includes a first data updating device, configured to, when it is detected that the data request update speed for the portable terminal device is less than or equal to the update speed threshold, cause the control presentation device to present, using the user interface control, the data loaded into the data slider on the display device of the portable terminal device, and cause the memory loading device to read data from the cached data list to update the data slider.
In an embodiment of the present invention, the data cache loading device further includes a second data updating device, configured to, when it is detected that the data request update speed for the portable terminal device is greater than the update speed threshold, clear the user interface control, enable the memory loading device to determine the data in the cached data list that should be loaded into the data slider, and update the data slider accordingly, and enable the control presentation device to present the data in the updated data slider on the display device of the portable terminal device by using the cleared user interface control.
In one embodiment of the invention, the first predetermined number is determined in dependence on any one or more of the following factors: a display area of the display device, data input/output performance of the portable terminal apparatus, and a memory capacity.
In one embodiment of the invention, the data slider is updated such that the data entry at the center position of the data slider corresponds to the center presentation area displayed on the display device. In a further embodiment of the present invention, the center position of the data slider comprises an asymmetric center position.
In an embodiment of the present invention, the first predetermined number L1 is:
L1=activeSmallSegment+activeLargeSegment+1,
wherein the activeSmallSegment and the activeLargeSegment are respectively a smaller activating segment and a larger activating segment at two ends of the central position pos of the data slider,
the top position top and bottom position bot of the data slider are represented as:
in the event that the data slider slips down,
top=pos–activeSmallSegment
bot=pos+activeLargeSegment;
in the case where the data slider is slid up,
top=pos–activeLargeSegment
bot=pos+activeSmallSegment。
in an embodiment of the present invention, the active segments activeSmallSegment and activeLargeSegment of the data slider are determined according to a sliding speed of the data slider and/or a data input/output performance of the portable terminal device.
In an embodiment of the present invention, the data cache loading apparatus further includes: and the data destroying device is used for destroying the data item sliding out of the data slider when the data slider is updated. In a further embodiment of the present invention, the data destruction apparatus further includes: and the data synchronization unit is used for synchronizing the modification of the data entry sliding out of the data slider into the cached data list under the condition that the data entry is the modified data entry.
According to still another aspect of the present invention, there is provided a portable terminal device including: the storage device is cached with a data list; the display device is used for displaying the data list cached in the storage device to a user; and one or more processing devices coupled to the storage device and the display device, the one or more processing devices configured to: reading data from a cache data list to be displayed in the storage device to load the data into a data slider of a memory, wherein the total number of data items in the data slider is kept at a first preset number; and repeatedly utilizing the first preset number of user interface controls to sequentially display the data in the data slider on the display device, wherein the first preset number is set to be far smaller than the total number of data in the cache data list to be displayed.
By using the data cache loading method and device and the portable terminal equipment, only a small amount of data to be displayed is loaded to the memory by using the movement characteristic of the data slider through a double cache mechanism of UI virtualization and data virtualization, and only a small amount of UI controls are correspondingly created and the data loaded to the memory is displayed in a mode of virtually reusing the UI controls, so that the memory consumption is reduced, the cache reading speed is increased, and the smoothness of the sliding of the data list is realized.
Drawings
The above and other objects, features and advantages of the present disclosure will become more apparent by describing in greater detail exemplary embodiments thereof with reference to the attached drawings, in which like reference numerals generally represent like parts throughout.
Fig. 1 is a block diagram showing the configuration of a portable terminal device according to an embodiment of the present invention.
FIG. 2 is a general flow diagram illustrating the process of requesting load of cached data according to one embodiment of the invention.
FIG. 3 is a flow diagram illustrating a data cache loading method according to an embodiment of the invention.
FIG. 4 is a flowchart illustrating a memory data update presentation process according to an embodiment of the invention.
FIG. 5 is a diagram illustrating an example data cache load to which the present invention is applied.
Fig. 6 is a functional block diagram illustrating a data cache loading apparatus according to an embodiment of the present invention.
Detailed Description
Preferred embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While the preferred embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
As described above, in the prior art, when cache data is displayed, all cache data lists to be displayed need to be loaded into a memory, and User Interface (UI) controls having the same number of lengths as the cache data lists are constructed, for example, a TableView cell (a list formed by TableView cell controls is usually denoted as TableView), so that when the cache data is too large, the problems of slow data loading speed and large memory consumption are caused.
The inventor has noted that although there are generally as many pieces of data in the TableView as there are to build how many TableView cells, most of the TableView cells are invisible to the user, resulting in wasted memory.
In order to reduce memory consumption and improve cache reading speed, the data cache loading method and the data cache loading device only load a small amount of data to be displayed to a memory through a double cache mechanism of UI virtualization and data virtualization, and correspondingly only actually create a small amount of UI controls, namely only create UI controls for visual presentation of a user, and present the data loaded to the memory in a manner of virtually reusing the UI controls, so that the memory is not consumed more, and the smoothness of sliding of a data list is realized.
An embodiment of the present invention will be specifically described below with reference to fig. 1 to 6. Fig. 1 is a block diagram showing the configuration of a portable terminal device 100 according to an embodiment of the present invention. The components of the portable terminal device 100 include, but are not limited to, a storage device 110, a display device 120, and one or more processing devices 130. The processing device 130 is connected to the storage device 110 and the display device 120. In one embodiment of the invention, the other components of the portable terminal device 100 described above and not shown in fig. 1 may also be connected to each other, for example by a bus.
It should be understood that the block diagram of the portable terminal device shown in fig. 1 is for exemplary purposes only and is not intended to limit the scope of the present invention. Those skilled in the art may add or replace other components as desired. For example, in one embodiment of the present invention, the portable terminal apparatus 100 may further include a user input and output device capable of receiving a user instruction, such as a keyboard, a mouse, a touch screen, a keypad, a sensor capable of sensing a user action, and the like.
The portable terminal device 100 may be any type of mobile computing device, including a mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smartphone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other type of mobile device. The portable terminal device 100 may also be a mobile server.
The list of data accessed by the user via the network is cached in the storage device 110. Storage 110 may include one or more of any type of storage device that stores content in the form of files or in other forms, including magnetic hard drives, solid state hard drives, semiconductor storage devices, flash memory, or any other computer readable writable storage medium capable of storing program instructions or digital information.
The data buffered in the storage device 110 is presented to the user through the display device 120. The display device 120 may be a separate component (peripheral) or may be integrated with the storage device 110 and the processing device 130. The display device 120 may be configured to display a Graphical User Interface (GUI) including a pointer, cursor, and other information to a user. By way of example, the display device 120 may be any type of display including a Liquid Crystal Display (LCD), an electroluminescent display (ELD), a Field Emission Display (FED), a light emitting diode display (LED), an organic light emitting diode display (OLED), and the like.
The processing device 130 can read the network data cached in the storage device 110 to load the network data into the memory, and create and reuse a certain number of UI controls to sequentially present the data loaded into the memory on the display device 120.
The general process 200 of a user requesting to load cache data through the processing device 130 can be seen in fig. 2. In response to the request for cache list data (step S210), it is determined whether the requested data exists in the memory (step S220). After determining that the requested data is loaded in the memory, it is further determined whether the data in the memory needs to be updated (step S230). When it is determined in step S230 that the data loaded in the memory does not need to be updated, the processing device 130 directly presents the data to the user by constructing the UI control (step S270).
If it is determined in step S220 that the requested data does not exist in the memory or it is determined in step S230 that the data loaded into the memory needs to be updated, the process 200 proceeds to step S240, i.e., enters a data input/output (I/O) thread, and queries the local storage device 110 (see fig. 1) for the requested cached data. The queried data is then returned (step S250). Next, the returned data is loaded into the memory (step S260). Finally, the process 200 proceeds to step S270, where the data is presented using the UI controls.
For convenience of description, the data block loaded into the memory is referred to as a data slider, and each item of data stored in the memory is referred to as a virtual data item. Correspondingly, a data item cached in the local storage 110 is referred to as a real data item. Typically, real data items are stored in an ordered list of data. The data structure of each real data mainly comprises two aspects: core information key and real data item content realData. The key of the real data item is used as the index of the data item, which can be used to calculate the height of TableView in memory and the position of the UI control TableView cell in advance. This will be described in more detail below.
Fig. 3 shows a data cache loading method 300 for the portable terminal device 100 according to an embodiment of the present invention. In step S310, data is read from the cache data list to be displayed to be loaded into the data slider of the memory. In the present invention, the length of the data slider, i.e., the total number of data entries loaded in the data slider of the memory, is maintained at the first predetermined number L1. Next, in step S330, a first predetermined number L1 of UI controls are constructed and the L1 UI controls are repeatedly used to sequentially present the data loaded into the data slider in step S310 on the display device 120 of the portable terminal apparatus 100.
In the present invention, the first predetermined number L1 is set to be much smaller than the total number of data in the cache data list to be displayed in the local storage device 110. For example, in one example, the height of the list of data to be displayed may be in the order of millions, while the first predetermined number may be only a few tens. That is, in the present invention, only a reasonable amount of cache data is read into the memory in one loading process. The data amount loaded into the memory each time and the number of actually constructed UI controls are far smaller than the total data amount in the data list to be actually displayed.
By using the method, only a small amount of data to be displayed is loaded to the memory, and a small amount of UI controls are reused virtually for visual display of a user, so that memory consumption is reduced, cache reading speed is increased, and smoothness of sliding of the data list is realized.
In one embodiment of the present invention, the first predetermined number may be determined according to any one or more factors among a display area of the display device 120, data input/output (I/O) performance of the portable terminal apparatus 100, and a memory capacity. Generally, the larger the length L1 of the data slider is, the fewer times the I/O reads the local cache database is, but the more data is read each time, the longer the reading time is; when the length L1 of the data slider is smaller, the I/O reads the database frequently, but the amount of data read each time is small. Generally, when the memory is abundant and the I/O performance of the portable terminal device 100 is strong, a data slider having a large length may be selected, whereas when the I/O performance of the terminal device 100 is slightly poor, a data slider having a small length may be selected. When the memory capacity of the device is small, the size of the data slider is limited by comprehensively considering the memory factor.
In one embodiment of the invention, the preloading mode can be adopted in consideration of the timeliness and liquidity of the user when the user slides the list while browsing information, namely, the data volume loaded at one time is higher than the information volume visible to the user. Specifically, assuming that the total number of data items displayed to the user on the display device 120 is the second predetermined number L2, the length of the data slider, i.e., the first predetermined number L1, is set to be greater than the second predetermined number L2. The preloading mode further improves the fluency of data loading by loading the information to be read by the user into the memory in advance. The specific values of L1 and L2 may be set according to practical situations, for example, determined by performing tests and calculations in a specific scenario.
The invention will be further described with reference to fig. 4 and 5. FIG. 5 is a diagram illustrating an example data cache load to which the present invention is applied. As shown in fig. 5A, assuming that the total amount of the disk cache data is 13, the UI display area visible to the user is 3-5 at this time, and the data sequentially loaded into the memory is 2-6, only 5 UI controls tableviewcells need to be constructed by using the UI virtualization technology of the present invention.
FIG. 4 is a flow diagram illustrating a memory data update presentation process 400 according to an embodiment of the invention. And when the user indicates to slide the data list, updating and displaying the data loaded into the memory. Specifically, first, in step S410, it is determined whether the data request update speed of the user is greater than the update speed threshold. For example, when browsing a web page, a user may first quickly slide to a favorite column and then slowly browse specific web page information.
When it is determined that the update speed of the data request is less than or equal to the update speed threshold, the information to be read by the user is already loaded into the memory in the case of adopting the preloading mode, and therefore, in step S432, the loaded data is directly displayed on the display device 120 by using the UI control that has been constructed. Next, in step S434, data is gradually read from the data list cached in the storage device 110 to update the memory data. As shown in FIG. 5B, when the user slowly slides the data list, the visible UI presentation area changes to 4-6, at which time the memory is updated so that the data loaded into the memory is 3-7.
If it is determined in step S410 that the data request update speed is greater than the update speed threshold, that is, the user is fast sliding the data list, and the UI display content is not timely, the content in the UI control needs to be cleared first (step S452). When the sliding is to be stopped, the change in the TableView height may be calculated according to the key value of the data item, the data to be loaded into the memory in the cached data list is determined, and the data slider is preferentially updated (step S454). The emptied UI control is then notified to reveal the data in the updated data slider (step S456). In this embodiment, since the amount of memory reading is small, the update time is short, and the visual response time of the user is negligible. As shown in fig. 5C, when the user swipes the data list quickly, the UI control TableViewCell content is cleared first. And when the sliding stops, updating the data slider to load data 6-10, wherein the UI display area is 7-9.
As shown in fig. 5, during the updating of the memory data, the data entry at the central position pos of the data slider is always made to correspond to the display center presentation area, i.e., is always at the center of the user's vision, such as the center of the screen of the mobile phone. In a further embodiment, the center position of the data slider comprises an asymmetric center position, as shown in FIGS. 5A-C.
As shown in fig. 5D, the length of the data slider, i.e. the number of UI controls, the first predetermined number L1 may be represented as:
L1=activeSmallSegment+activeLargeSegment+1,
wherein, activeSmallSegment and activeLargeSegment are respectively the smaller and larger activation segments at the two ends of the central position pos of the data slider. These activation segments may be determined according to the directionality of the data slider sliding. For example, it is desirable to reserve a larger active segment activeLargeSegment for the part that will slide to the pos point location because it is more likely to reach to become the next pos, while the other end does not exclude the possibility of sliding to, but with a smaller probability, a smaller active segment activeSmallSegment can be reserved. Specifically, the values of the active segments activeSmallSegment and activeLargeSegment of the data slider may be determined according to the sliding speed of the data slider and/or the data input/output performance of the portable terminal device 100.
The data slider may also have two attributes, a top position top and a bottom position bot for the data slider. In the case of a data list glide, i.e., a data slider glide, these two attributes can be expressed as:
top=pos–activeSmallSegment
bot=pos+activeLargeSegment。
in the case of a data list downslide, i.e., a data slider upslide, these two attributes can be expressed as:
top=pos–activeLargeSegment
bot=pos+activeSmallSegment。
in order to optimize the memory storage strategy and avoid occupying excessive memory resources, when the data in the memory is updated along with the scrolling of the data list, only the data content to be displayed, namely the data items to be displayed on the display device 120, in the memory is ensured, and the items which are not in the display area are deleted.
Returning to FIG. 3, in step S350, the data entry sliding out of the data slider is destroyed while the data slider is updated. In other words, there is only one virtual data item loaded to memory per real data item at a time. The virtual data item is generated when the real data item is loaded into the memory, and the data slider is destroyed after sliding away.
In the process of reading information, the user also needs to modify the cache data according to operations such as reading, user deletion, user comment, user collection and the like of the user. The user's modifications first act on the virtual data item, synchronizing the modifications to the real data item as the virtual data item is destroyed. It is noted that data lock protection is required in this case to prevent simultaneous reading and writing of cached data.
Fig. 6 is a functional block diagram illustrating a data cache loading apparatus 600 according to an embodiment of the present invention. The functional modules of the data cache loading device 600 may be implemented by hardware, software or a combination of hardware and software implementing the principles of the present invention, for example, by one or more processing devices 130 in the portable terminal device 100 shown in fig. 1. It will be appreciated by those skilled in the art that the functional blocks depicted in fig. 6 may be combined or divided into sub-blocks to implement the principles of the invention described above. Thus, the description herein may support any possible combination, or division, or further definition of the functional modules described herein.
Referring to fig. 6, the data cache loading device 600 may include a memory loading device 610 and a control presentation device 630. The memory loading device 610 is configured to read data from the cached data list to load into a data slider of the memory. The total number of data entries in the data slider is maintained at a first predetermined number. The control presentation means 630 is configured to reuse a first predetermined number of UI controls so that the data in the data slider is presented in sequence on the display means 120 of the portable terminal apparatus 100 as shown in fig. 1.
In the present invention, the first predetermined number is set to be much smaller than the total number of data in the cached data list. Therefore, only a small amount of data to be displayed is loaded to the memory, and a small amount of UI controls are reused virtually for visual display of a user, so that memory consumption is reduced, cache reading speed is increased, and smoothness of sliding of the data list is achieved. The first predetermined number may be determined according to any one or more factors among a display area of the display device 120, data input/output performance of the portable terminal apparatus 100, and a memory capacity.
In one embodiment of the present invention, the total number of data items displayed on the display device 120 is a second predetermined number, and the first predetermined number is set to be greater than the second predetermined number. In this embodiment, the amount of data in the data slider loaded into the memory at one time is larger than the amount of data visible to the user. The preloading mode further improves the fluency of data loading by loading the information to be read by the user into the memory in advance.
In an embodiment of the present invention, the data cache loading apparatus 600 may further include a first data updating apparatus 672 configured to, in a case where it is detected that the data request update speed for the portable terminal device 100 is less than or equal to the update speed threshold, cause the control presentation apparatus 630 to present the data loaded into the data slider on the display apparatus 120 by using the UI control, and cause the memory loading apparatus 610 to read the data from the cached data list to update the data slider.
In an embodiment of the present invention, the data cache loading apparatus 600 may further include a second data updating apparatus 674 configured to, in a case that it is detected that the update speed of the data request for the portable terminal device 100 is greater than the update speed threshold, clear the UI control, cause the memory loading apparatus 610 to determine data in the cached data list that should be loaded into the data slider, and update the data slider accordingly, and cause the control presenting apparatus 630 to present the data in the updated data slider on the display apparatus 120 by using the cleared user interface control.
In one embodiment of the invention, the data slider is updated such that the data entry at the center position of the data slider corresponds to the center presentation area displayed on the display device 120. In a further embodiment of the present invention, the center position of the data slider comprises an asymmetric center position.
In one embodiment of the present invention, the first predetermined number L1 is:
L1=activeSmallSegment+activeLargeSegment+1,
wherein, activeSmallSegment and activeLargeSegment are respectively the smaller and larger activation segments at the two ends of the central position pos of the data slider.
The top position top and bottom position bot of the data slider are represented as:
in the event that the data slider slips down,
top=pos–activeSmallSegment
bot=pos+activeLargeSegment;
in the case where the data slider is slipping up,
top=pos–activeLargeSegment
bot=pos+activeSmallSegment。
in one embodiment of the present invention, the active segments activeSmallSegment and activeLargeSegment of the data slider may be determined according to the sliding speed of the data slider and/or the data input/output performance of the portable terminal device 100.
In an embodiment of the present invention, the data cache loading apparatus 600 may further include a data destruction apparatus 650 configured to destroy the data entry sliding out of the data slider when the data slider is updated. In a further embodiment of the present invention, the data destruction device 650 may further include a data synchronization unit 652 configured to synchronize the modification of the data entry sliding out of the data slider to the cached data list if the data entry is a modified data entry.
In summary, with the data cache loading method and apparatus and the portable terminal device of the present invention, through a dual cache mechanism of UI virtualization and data virtualization, by using the movement characteristics of the data slider, only a small amount of data to be displayed is loaded into the memory, and accordingly only a small amount of UI controls are created and the data loaded into the memory is displayed in a manner of virtually reusing the UI controls, so as to reduce memory consumption and improve cache reading speed, thereby achieving fluency of data list sliding.
Furthermore, the method according to the invention may also be implemented as a computer program comprising computer program code instructions for carrying out the above-mentioned steps defined in the above-mentioned method of the invention. Alternatively, the method according to the present invention may also be implemented as a computer program product comprising a computer readable medium having stored thereon a computer program for executing the above-mentioned functions defined in the above-mentioned method of the present invention. Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or combinations of both.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems and methods according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Having described embodiments of the present invention, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the embodiments disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen in order to best explain the principles of the embodiments, the practical application, or improvements made to the technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.

Claims (23)

1. A data cache loading method for a portable terminal device, comprising the steps of:
reading data from an ordered cache data list to be displayed to load the data into a data slider of a memory, wherein the data slider comprises continuous data in the cache data list, and the total number of data items in the data slider is kept at a first preset number; and
creating and reusing the first predetermined number of user interface controls to sequentially present the data in the data slider on a display device of the portable terminal device, wherein,
the first preset number is set to be far smaller than the total number of data in the cache data list to be displayed.
2. The data cache loading method of claim 1, wherein a total number of data entries displayed on the display device is a second predetermined number, the first predetermined number being set greater than the second predetermined number.
3. The data cache loading method of claim 2, further comprising:
in the case where it is detected that the data request update speed for the portable terminal apparatus is less than or equal to the update speed threshold,
displaying the data loaded into the data slider on a display device of the portable terminal equipment by using the user interface control; and
and reading data from the cached data list to update the data slider.
4. The data cache loading method of claim 2, further comprising:
in the case where it is detected that the data request update speed for the portable terminal apparatus is greater than the update speed threshold,
clearing the user interface control;
determining data in the cached data list which should be loaded into the data slider, and updating the data slider accordingly; and
and displaying the updated data in the data slider on a display device of the portable terminal equipment by using the emptied user interface control.
5. The data cache loading method of any of claims 1 to 4,
the first predetermined number is determined in accordance with any one or more of the following factors: a display area of the display device, data input/output performance of the portable terminal apparatus, and a memory capacity.
6. The data cache loading method of claim 3 or 4,
the data slider is updated such that a data entry at a center position of the data slider corresponds to a center presentation area displayed on the display device.
7. The data cache loading method of claim 6,
the center position of the data slider comprises an asymmetric center position.
8. The data cache loading method of claim 7, wherein the first predetermined number L1 is:
L1=activeSmallSegment+activeLargeSegment+1,
wherein the activeSmallSegment and the activeLargeSegment are respectively a smaller activating segment and a larger activating segment at two ends of the central position pos of the data slider,
the top position top and bottom position bot of the data slider are represented as:
in the event that the data slider slips down,
top=pos–activeSmallSegment
bot=pos+activeLargeSegment;
in the case where the data slider is slid up,
top=pos–activeLargeSegment
bot=pos+activeSmallSegment。
9. the data cache loading method of claim 8,
the active segments activeSmallSegment and activeLargeSegment of the data slider are determined according to the sliding speed of the data slider and/or the data input/output performance of the portable terminal device.
10. The data cache loading method of any of claims 1 to 4, further comprising:
destroying the data entry sliding out of the data slider while updating the data slider.
11. The data cache loading method of claim 10, wherein the step of destroying data entries sliding out of the data slider while updating the data slider further comprises:
in the event that the data entry sliding out of the data slider is a modified data entry, the modification to the data entry is synchronized into the cached data list.
12. A data cache loading apparatus, comprising:
the memory loading device is used for reading data from an ordered cache data list to be displayed so as to load the data into a data slider of a memory, the data slider comprises continuous data in the cache data list, and the total number of data items in the data slider is kept at a first preset number; and
control presentation means for creating and reusing the first predetermined number of user interface controls so that the data in the data slider is presented in sequence on a display means of the portable terminal device, wherein,
the first preset number is set to be far smaller than the total number of data in the cache data list to be displayed.
13. The data cache loading apparatus of claim 12, wherein a total number of data entries displayed on the display apparatus is a second predetermined number, the first predetermined number being set greater than the second predetermined number.
14. The data cache loading apparatus according to claim 13, further comprising a first data updating apparatus, configured to, in a case that it is detected that the data request update speed for the portable terminal device is less than or equal to the update speed threshold, cause the control presentation apparatus to present, using the user interface control, the data loaded into the data slider on the display apparatus of the portable terminal device, and cause the memory loading apparatus to read data from the cached data list to update the data slider.
15. The data cache loading apparatus according to claim 13, further comprising a second data updating apparatus, configured to, in a case that it is detected that the data request update speed for the portable terminal device is greater than the update speed threshold, clear the user interface control, enable the memory loading apparatus to determine the data in the cached data list that should be loaded into the data slider, and thereby update the data slider, and enable the control presenting apparatus to present the data in the updated data slider on the display apparatus of the portable terminal device by using the cleared user interface control.
16. The data cache loading device of any one of claims 12 to 15,
the first predetermined number is determined in accordance with any one or more of the following factors: a display area of the display device, data input/output performance of the portable terminal apparatus, and a memory capacity.
17. The data cache loading apparatus of claim 14 or 15,
the data slider is updated such that a data entry at a center position of the data slider corresponds to a center presentation area displayed on the display device.
18. The data cache loading device of claim 17,
the center position of the data slider comprises an asymmetric center position.
19. The data cache loading apparatus of claim 18, wherein the first predetermined number L1 is:
L1=activeSmallSegment+activeLargeSegment+1,
wherein the activeSmallSegment and the activeLargeSegment are respectively a smaller activating segment and a larger activating segment at two ends of the central position pos of the data slider,
the top position top and bottom position bot of the data slider are represented as:
in the event that the data slider slips down,
top=pos–activeSmallSegment
bot=pos+activeLargeSegment;
in the case where the data slider is slid up,
top=pos–activeLargeSegment
bot=pos+activeSmallSegment。
20. the data cache loading device of claim 19,
the active segments activeSmallSegment and activeLargeSegment of the data slider are determined according to the sliding speed of the data slider and/or the data input/output performance of the portable terminal device.
21. The data cache loading apparatus of any one of claims 12 to 15, further comprising:
and the data destroying device is used for destroying the data item sliding out of the data slider when the data slider is updated.
22. The data cache loading device of claim 21, wherein the data destruction device further comprises:
and the data synchronization unit is used for synchronizing the modification of the data entry sliding out of the data slider into the cached data list under the condition that the data entry is the modified data entry.
23. A portable terminal device comprising:
the storage device is cached with a data list;
the display device is used for displaying the data list cached in the storage device to a user; and
one or more processing devices coupled to the storage device and the display device, the one or more processing devices configured to:
reading data from an ordered cache data list to be displayed in the storage device to load the data into a data slider of a memory, wherein the data slider comprises continuous data in the cache data list, and the total number of data items in the data slider is kept at a first preset number; and
creating and reusing the first predetermined number of user interface controls to sequentially present the data in the data slider on the display device, wherein,
the first preset number is set to be far smaller than the total number of data in the cache data list to be displayed.
CN201610390293.8A 2016-06-02 2016-06-02 Data cache loading method and device and portable terminal equipment Active CN107463567B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610390293.8A CN107463567B (en) 2016-06-02 2016-06-02 Data cache loading method and device and portable terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610390293.8A CN107463567B (en) 2016-06-02 2016-06-02 Data cache loading method and device and portable terminal equipment

Publications (2)

Publication Number Publication Date
CN107463567A CN107463567A (en) 2017-12-12
CN107463567B true CN107463567B (en) 2021-04-09

Family

ID=60544847

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610390293.8A Active CN107463567B (en) 2016-06-02 2016-06-02 Data cache loading method and device and portable terminal equipment

Country Status (1)

Country Link
CN (1) CN107463567B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111428169A (en) * 2020-03-20 2020-07-17 深圳市盟天科技有限公司 Optimization method, system, server and storage medium for page loading

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102833352A (en) * 2012-09-17 2012-12-19 深圳中兴网信科技有限公司 Distributed cache management system and method for implementing distributed cache management
CN105095200A (en) * 2014-04-16 2015-11-25 北大方正集团有限公司 Method and device for displaying picture in waterfall flow manner

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101751476B (en) * 2010-02-02 2012-05-02 汉王科技股份有限公司 Method and device for marking electronic bookmarks
CN102331877B (en) * 2011-06-24 2014-08-06 北京新媒传信科技有限公司 Method and device for displaying information on touch screen
CN103677554B (en) * 2012-09-17 2017-07-21 腾讯科技(深圳)有限公司 A kind of sliding screen smoothly method and device
US9582612B2 (en) * 2014-01-08 2017-02-28 Sap Se Space constrained ordered list previews
CN105468251A (en) * 2014-09-11 2016-04-06 深圳市麦思美汽车电子有限公司 Volume control method and system with audio and visual synchronization feedback

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102833352A (en) * 2012-09-17 2012-12-19 深圳中兴网信科技有限公司 Distributed cache management system and method for implementing distributed cache management
CN105095200A (en) * 2014-04-16 2015-11-25 北大方正集团有限公司 Method and device for displaying picture in waterfall flow manner

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"iOS 开发 UITableView 加载图片的内存管理";黄天柱 等;《计算机系统应用》;20120915;第21卷(第9期);113-118 *

Also Published As

Publication number Publication date
CN107463567A (en) 2017-12-12

Similar Documents

Publication Publication Date Title
US20210271646A1 (en) Smart archiving and data previewing for mobile devices
US10775971B2 (en) Pinch gestures in a tile-based user interface
US9195667B2 (en) System for on-line archiving of content in an object store
US9939992B2 (en) Methods and systems for navigating a list with gestures
KR102238063B1 (en) Predictive contextual toolbar for productivity applications
US10936795B2 (en) Techniques for use of snapshots with browsing transitions
CN109446353B (en) Management of local and remote media items
CN101853208B (en) Method and system to perform caching based on file-level heuristics
US20110113365A1 (en) Scrolling large data sets
US10609210B2 (en) Systems and methods for adaptive and predictable graphical user interfaces
US8245148B2 (en) History display apparatus, history display system, history display method, and program
AU2016316125A1 (en) Systems and techniques for aggregation, display, and sharing of data
US9292169B2 (en) Method and device for displaying interface
US20150149429A1 (en) Contextual information lookup and navigation
US20130325832A1 (en) Presenting search results with concurrently viewable targets
JP6033752B2 (en) File location shortcuts and window layout
US9612734B1 (en) Random access browser scrolling for large pages
US10678750B2 (en) On demand file sync
CN107463567B (en) Data cache loading method and device and portable terminal equipment
TW201830218A (en) Method and device for view transition
US10885265B2 (en) Information displayed while information is scrolled on a terminal screen
AU2016218367A1 (en) Externalized execution of input method editor
KR101639993B1 (en) Pre-loaded data management method and terminal device thereof
US11892981B2 (en) On demand file sync
JP6270263B2 (en) Information management system and information processing apparatus

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
TA01 Transfer of patent application right

Effective date of registration: 20200710

Address after: 310052 room 508, floor 5, building 4, No. 699, Wangshang Road, Changhe street, Binjiang District, Hangzhou City, Zhejiang Province

Applicant after: Alibaba (China) Co.,Ltd.

Address before: 510627 Guangdong city of Guangzhou province Whampoa Tianhe District Road No. 163 Xiping Yun Lu Yun Ping B radio square 14 storey tower

Applicant before: Guangzhou Dongjing Computer Technology Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant