CN112541140A - List loading method, terminal device, electronic device and storage medium - Google Patents

List loading method, terminal device, electronic device and storage medium Download PDF

Info

Publication number
CN112541140A
CN112541140A CN201910901457.2A CN201910901457A CN112541140A CN 112541140 A CN112541140 A CN 112541140A CN 201910901457 A CN201910901457 A CN 201910901457A CN 112541140 A CN112541140 A CN 112541140A
Authority
CN
China
Prior art keywords
data
visible
displayed
list
amount
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
CN201910901457.2A
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.)
Beijing Gridsum Technology Co Ltd
Original Assignee
Beijing Gridsum Technology 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 Beijing Gridsum Technology Co Ltd filed Critical Beijing Gridsum Technology Co Ltd
Priority to CN201910901457.2A priority Critical patent/CN112541140A/en
Publication of CN112541140A publication Critical patent/CN112541140A/en
Pending legal-status Critical Current

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

Abstract

The invention provides a list loading method, a list loading device, electronic equipment and a storage medium, wherein the method comprises the following steps: displaying first visible data in the data to be displayed; when a list rolling instruction is detected, loading newly-added data to the data to be displayed from total list data according to the list rolling instruction, and deleting redundant data in the data to be displayed; and displaying second visible data in the changed data to be displayed according to the list scrolling instruction, wherein the second visible data is before or after the first visible data. When the pull-down list is rolled, the newly added data are loaded to the data to be displayed in advance, and the corresponding redundant data in the data to be displayed are deleted, so that the real-time performance of loading the data in the pull-down list is improved, and the cache pressure of the browser for storing the data to be displayed is reduced.

Description

List loading method, terminal device, electronic device and storage medium
Technical Field
The invention belongs to the technical field of computers, and particularly relates to a list loading method, a terminal device, an electronic device and a storage medium.
Background
In the prior art, when a pull-down list of data is displayed through a web browser, corresponding data is generally retrieved and loaded according to a page turning operation of a user, and currently displayed data is replaced with the retrieved data.
The method depends on the interface of the background server, so that only the specified amount of data can be loaded each time, and when the retrieved data amount is too large, the corresponding data cannot be loaded in real time, so that the phenomenon of jamming occurs. And when the amount of loaded data is too large, a large amount of useless data exists, so that the cache pressure of the browser is large.
Disclosure of Invention
In view of the above, the present invention provides a list loading method, a terminal device, an electronic device, and a storage medium, so as to solve the problems that when a pull-down list displayed on an existing browser page is scrolled, loading data is not timely, which causes a jam, and a cache pressure of the browser is large.
According to a first aspect of the present invention, there is provided a list loading method, the method comprising:
displaying first visible data in the data to be displayed;
when a list rolling instruction is detected, loading newly-added data to the data to be displayed from total list data according to the list rolling instruction, and deleting redundant data in the data to be displayed;
and displaying second visible data in the changed data to be displayed according to the list scrolling instruction, wherein the second visible data is before or after the first visible data.
Optionally, the list scrolling instruction includes: the number of scrolling times; the step of loading newly added data from the total list data to the data to be displayed according to the list scrolling instruction and deleting redundant data in the data to be displayed comprises the following steps:
when the rolling times do not exceed a rolling time threshold value, loading newly-added data to the data to be displayed from the total list data according to the rolling times, and deleting redundant data in the data to be displayed;
and when the rolling times exceed a rolling time threshold value, deleting redundant data in the data to be displayed.
Optionally, the list scrolling instruction includes: forward identification or reverse identification; the step of displaying the second visible data in the changed data to be displayed according to the list scrolling instruction comprises the following steps:
determining a third quantity of the data to be displayed for shifting in the total list data according to the rolling times;
when the list scroll instruction includes a forward identification and there is a third amount of data in the data to be shown after the first visible data, showing second visible data, the second visible data comprising: a third amount of first visible subdata behind the first visible subdata in the data to be displayed, and a fourth amount of data ahead of the first visible subdata in the data to be displayed, wherein the sum of the fourth amount and the third amount is a preset amount;
when the list scroll instruction includes a reverse identification and there is a third amount of data in the data to be shown that precedes the first visible data, showing second visible data, the second visible data comprising: the display device comprises a first display device, a second display device and a display control device, wherein the first display device comprises a first display device and a second display device, the first display device comprises a first display device, the second display device comprises a display control device, the first display device comprises a first display device, a second display device and a display control device, the first display device comprises a first display device, the second display device comprises a display control device.
Optionally, the method further includes:
a third display sub-module, configured to display second visible data when the list scroll instruction includes a forward identifier and a fifth amount of data exists in the data to be displayed after the first visible data, where the second visible data includes: a fifth amount of second visible subdata after the first visible subdata in the data to be displayed, and a sixth amount of data before the second visible subdata in the data to be displayed, wherein the fifth amount is smaller than the third amount, and the sum of the sixth amount and the fifth amount is a preset amount;
when the list scroll instruction includes a reverse identification and there is a fifth amount of data in the data to be shown that precedes the first visible data, showing second visible data, the second visible data comprising: a fifth amount of second visible subdata before the first visible data in the data to be displayed, and a sixth amount of data before the second visible data in the data to be displayed.
Optionally, the dividing of the preset number into a first number for the forward identifier and a second number for the reverse identifier further includes, before the step of displaying the first visible data in the data to be displayed:
when the first visible data is data at the initial position in the general list data, loading a first amount of data behind the first visible data from the general list data to obtain data to be displayed;
and when the first visible data is the data at the tail position in the general list data, loading a second amount of data before the first visible data from the general list data to obtain the data to be displayed.
According to a second aspect of the present invention, there is provided a list loading apparatus, the apparatus comprising:
the first display module is used for displaying first visible data in the data to be displayed;
the dynamic updating module is used for loading newly-added data to the data to be displayed from the total list data according to the list rolling instruction and deleting redundant data in the data to be displayed when the list rolling instruction is detected;
and the second display module is used for displaying second visible data in the changed data to be displayed according to the list scrolling instruction, wherein the second visible data is before or after the first visible data.
Optionally, the list scrolling instruction includes: the number of scrolling times; the dynamic update module includes:
the first dynamic updating submodule is used for loading newly-added data to the data to be displayed from the total list data according to the rolling times and deleting redundant data in the data to be displayed when the rolling times do not exceed a rolling time threshold;
and the second dynamic updating submodule is used for deleting redundant data in the data to be displayed when the rolling times exceed a rolling time threshold value.
Optionally, the list scrolling instruction includes: forward identification or reverse identification; the second display module, comprising:
the determining submodule is used for determining a third quantity of the data to be displayed for shifting in the total list data according to the rolling times;
a first display sub-module, configured to display second visible data when the list scroll instruction includes a forward identifier and a third amount of data exists in the data to be displayed after the first visible data, where the second visible data includes: a third amount of first visible subdata behind the first visible subdata in the data to be displayed, and a fourth amount of data ahead of the first visible subdata in the data to be displayed, wherein the sum of the fourth amount and the third amount is a preset amount;
a second display sub-module, configured to display second visible data when the list scrolling instruction includes a reverse identifier and a third amount of data exists in the data to be displayed before the first visible data, where the second visible data includes: the display device comprises a first display device, a second display device and a display control device, wherein the first display device comprises a first display device and a second display device, the first display device comprises a first display device, the second display device comprises a display control device, the first display device comprises a first display device, a second display device and a display control device, the first display device comprises a first display device, the second display device comprises a display control device.
Optionally, the second display module further includes:
a second determining submodule, configured to determine whether the list scrolling instruction includes a forward direction identifier and a fifth amount of data exists in the data to be displayed after the first visible data
A third display submodule, configured to display second visible data, where the second visible data includes: a fifth amount of second visible subdata after the first visible subdata in the data to be displayed, and a sixth amount of data before the second visible subdata in the data to be displayed, wherein the fifth amount is smaller than the third amount, and the sum of the sixth amount and the fifth amount is a preset amount;
a fourth display sub-module, configured to display second visible data when the list scrolling instruction includes a reverse direction identifier and a fifth amount of data exists in the data to be displayed before the first visible data, where the second visible data includes: a fifth amount of second visible subdata before the first visible data in the data to be displayed, and a sixth amount of data before the second visible data in the data to be displayed.
Optionally, the preset number is divided into a first number for the forward identifier and a second number for the reverse identifier, and the apparatus further includes:
the display device comprises a first loading module, a second loading module and a display module, wherein the first loading module is used for loading a first amount of data behind first visible data from the general list data to obtain data to be displayed when the first visible data is data at the initial position in the general list data;
and the second loading module is used for loading a second amount of data before the first visible data from the general list data to obtain the data to be displayed when the first visible data is the data at the tail position in the general list data.
According to a third aspect of the invention, there is provided an electronic device comprising at least one processor, and at least one memory connected to the processor, a bus; the processor and the memory complete mutual communication through the bus; the processor is configured to call program instructions in the memory to perform the list loading method according to any of the first aspect.
According to a fourth aspect of the present invention, there is provided a computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the list loading method of any of the above first aspects.
Aiming at the prior art, the invention has the following advantages:
the invention provides a list loading method, a list loading device, electronic equipment and a storage medium, wherein the method comprises the following steps: displaying first visible data in the data to be displayed; when a list rolling instruction is detected, loading newly-added data to the data to be displayed from total list data according to the list rolling instruction, and deleting redundant data in the data to be displayed; and displaying second visible data in the changed data to be displayed according to the list scrolling instruction, wherein the second visible data is before or after the first visible data. When the pull-down list is rolled, the newly added data are loaded to the data to be displayed in advance, and the corresponding redundant data in the data to be displayed are deleted, so that the real-time performance of loading the data in the pull-down list is improved, and the cache pressure of the browser for storing the data to be displayed is reduced.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
FIG. 1 is a flowchart illustrating steps of a method for loading a list according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating steps of another method for loading lists according to an embodiment of the present invention;
fig. 3 is a block diagram illustrating a structure of a list loading apparatus according to an embodiment of the present invention;
fig. 4 is a block diagram of a device according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can 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 invention to those skilled in the art.
Fig. 1 is a flowchart of steps of a list loading method according to an embodiment of the present invention, where the method may include:
step 101, displaying first visible data in data to be displayed.
In the embodiment of the present invention, the data to be displayed is data loaded from the general list data of the background server to the cache by the browser, and is used for rendering a browser page to display a pull-down list. In order to enable a user to obtain better browsing experience, data before or after the currently displayed first visible data can be loaded into the data to be displayed from the total list data in advance, so that the loading time of displaying the required content after the user sends a scrolling instruction is reduced, the required data is displayed more quickly, and the user experience is improved. It is understood that the first visible data is a part of the data to be presented, and the data to be presented may include, in addition to the first visible data, partial data between and/or after the first visible data in the pre-loaded general list data. In practical application, the data size which can be displayed on the browser page is taken as a preset number, and when the first visible data is loaded and displayed, the data of the preset number before and/or after the first visible data in the total list data can be loaded in advance to obtain the data to be displayed.
And 102, when a list rolling instruction is detected, loading newly-added data to the data to be displayed from the total list data according to the list rolling instruction, and deleting redundant data in the data to be displayed.
In the embodiment of the present invention, in a manner before and/or after the currently displayed first visible data is loaded from the total list data in advance, although the loading time required for page scrolling may be reduced, when the amount of data to be browsed is too large, a large amount of list data which is temporarily unused may appear in the browser cache, resulting in too large cache pressure, so that the pull-down list in the browser page may be scrolled to be stuck. Therefore, the data to be displayed needs to be dynamically updated according to the received scrolling instruction, so as to reduce the cache pressure of the browser, thereby avoiding the problem of stuck down list in the browser page. The newly added data can be dynamically loaded to the data to be displayed according to the list rolling instruction, so that the browsing experience of a user is guaranteed, and meanwhile, redundant data opposite to the direction corresponding to the list rolling instruction is dynamically deleted according to the list rolling instruction.
In practical application, the data volume of the total list data can be set as N, the data volume that can be displayed on the browser page is M, and the number of downward scrolling times is K.
When N is less than or equal to M, the browser page can display all the general list data;
when N is larger than M, 2M list data can exist in the data to be displayed, when a user sends a list rolling instruction to a downward rolling roller, the data of M + 1-2M are displayed in a browser page, at the moment, 2M + 1-3M of newly added data are loaded to the data to be displayed from the total list data, and K is automatically increased by 1;
when a user sends a list rolling instruction to the downward rolling roller again, the browser page displays 2M + 1-3M data, at the moment, the redundant data of the previous 1-M are deleted from the data to be displayed, meanwhile, 3M + 1-4M newly added data are loaded into the data to be displayed from the total list data, K is automatically increased by 1, and so on;
on the contrary, when M + 1-4M data exists in the data to be displayed and the browser page currently displays 2M + 1-3M data, a user sends a list rolling instruction to an upward rolling roller wheel, the M + 1-2M data is displayed, 1-M newly added data is loaded to the data to be displayed from the total list data, and 3M + 1-4M redundant data is deleted.
And 103, displaying second visible data in the changed data to be displayed according to the list scrolling instruction, wherein the second visible data is before or after the first visible data.
In the embodiment of the present invention, a user may send a list scroll instruction for a displayed pull-down list to a browser by scrolling a scroll wheel up or down, and the browser may switch a first visual data displayed in a current browser page to a second visual data before or after the first visual data according to the number and direction of times the list scroll instruction is scrolled. It is conceivable that the second visible data may be the same amount of data as that contained in the first visible data.
The invention provides a list loading method, which comprises the following steps: displaying first visible data in the data to be displayed; when a list rolling instruction is detected, loading newly-added data to the data to be displayed from total list data according to the list rolling instruction, and deleting redundant data in the data to be displayed; and displaying second visible data in the changed data to be displayed according to the list scrolling instruction, wherein the second visible data is before or after the first visible data. When the pull-down list is rolled, the newly added data are loaded to the data to be displayed in advance, and the corresponding redundant data in the data to be displayed are deleted, so that the real-time performance of loading the data in the pull-down list is improved, and the cache pressure of the browser for storing the data to be displayed is reduced.
Fig. 2 is a flowchart of steps of another list loading method provided in an embodiment of the present invention, where the method may include:
step 201, when the first visible data is the data of the initial position in the general list data, loading a first amount of data after the first visible data from the general list data to obtain the data to be displayed.
In the embodiment of the present invention, a user may use a peripheral to which a terminal device is connected, for example: the system comprises a mouse, a keyboard and a browser, wherein a list scrolling instruction aiming at a pull-down list displayed on a browser page is sent to the browser, and the list scrolling instruction can comprise a forward identifier or a reverse identifier because the pull-down list usually has the characteristic of scrolling up and down.
In general, a pull-down list displayed in a browser page starts from a start position of total list data, and in this case, since first visible data in the total list data is empty before, it is not necessary to load data before the first visible data that needs to be currently displayed into data to be displayed, and only a first amount of data after the first visible data needs to be loaded, where the first data may be the same as the first visible data in amount, or may be configured according to browser cache needs.
If the data to be displayed is located between the starting position and the ending position of the total list data, list data with a certain data volume exists before or after the data to be displayed, and because the list scrolling instruction comprises a forward identifier, a first amount of newly added data after the data to be displayed can be correspondingly loaded into the data to be displayed from the total list data, so that the list data can be loaded in advance for being displayed by a browser page. And when the newly added data is loaded, deleting the corresponding first amount of redundant data from the data to be displayed so as to keep the data amount of the data to be displayed unchanged, thereby reducing the cache pressure of the browser. The redundant data refers to data at the reverse tail-end position in the data to be displayed corresponding to the forward identification.
Step 202, when the first visible data is the data at the end position in the general list data, loading a first amount of data before the first visible data from the general list data, and obtaining the data to be displayed.
In the embodiment of the present invention, if the drop-down list displayed in the browser page starts from the end position of the total list data, since the first visible data in the total list data is empty, only the second amount of data before the first visible data needs to be loaded. When the list scrolling instruction comprises the reverse identifier, a second amount of newly added data before the data to be displayed can be correspondingly loaded from the total list data into the data to be displayed, so that the list data is loaded in advance for being displayed by the browser page. And when the newly added data is loaded, deleting a second amount of corresponding redundant data from the data to be displayed so as to keep the data volume of the data to be displayed unchanged, thereby reducing the cache pressure of the browser. The redundant data refers to the data of the forward most initial position in the data to be displayed corresponding to the reverse identifier.
Step 203, displaying the first visible data in the data to be displayed.
In the embodiment of the invention, after the browser is initially loaded to the data to be displayed from the background server of the website, the data to be displayed is analyzed, and the first visible data in the data to be displayed is utilized to render the browser page so as to display the first visible data.
Step 204, receiving a list scrolling instruction, wherein the list scrolling instruction comprises: the number of scrolls.
In the embodiment of the invention, a user can send a list scrolling instruction to the browser by scrolling the scroll wheel on the mouse connected with the terminal equipment, the scrolling can be performed with upward or downward scroll operation for a plurality of times, the number of scrolling times is corresponding to the number of scrolling times, and the browser can scroll the displayed pull-down list according to the number of scrolling times.
And step 205, when the rolling frequency does not exceed the rolling frequency threshold, loading newly added data to the data to be displayed from the total list data according to the rolling frequency, and deleting redundant data in the data to be displayed.
In this embodiment of the present invention, the threshold of the scroll time is determined according to the data size of the total list data, and the data size of the drop-down list scroll corresponding to the scroll time cannot exceed the data size of the total list data. It is understood that each scroll time corresponds to the amount of data that needs to be scrolled by the drop-down list, and the threshold scroll time may be the data amount of the total list data divided by the data amount corresponding to one scroll time and rounded.
And determining the target data volume of a pull-down list needing to be rolled in the browser page according to the rolling times, loading newly added data of the target data volume before or after the data to be displayed to the data to be displayed from the total list data, and deleting redundant data of the target data volume in the opposite direction in the data to be displayed.
And step 206, deleting redundant data in the data to be displayed when the rolling times exceed a rolling time threshold value.
In the embodiment of the invention, when the rolling frequency exceeds the rolling frequency threshold value, only the redundant data in the data to be displayed is deleted, and the loading of the newly added data from the total list data is stopped, so that the data to be displayed cannot have the condition of empty data, thereby avoiding the empty data from appearing in the pull-down list displayed on the browser page and further improving the user experience.
Optionally, the list scrolling instruction includes: forward identification or reverse identification;
step 207, determining a third amount of the data to be displayed to be shifted in the total list data according to the rolling times.
In the embodiment of the present invention, the scroll number corresponds to a preset number of offset numbers, and each scroll may cause a pull-down list displayed on a browser page to correspond to list data of the offset numbers. The third number may be derived from a multiplier equal to the offset number and the scroll number.
Step 208, when the list scrolling command includes a forward identifier and a third amount of data exists in the data to be displayed after the first visible data, displaying second visible data, wherein the second visible data comprises: the display method comprises the steps that a third amount of first visible subdata behind the first visible subdata in the data to be displayed and a fourth amount of data in front of the first visible subdata in the data to be displayed are obtained, and the sum of the fourth amount and the third amount is a preset amount.
In an embodiment of the present invention, it is determined that the user needs to forward shift the drop down list by a third amount of data based on the list scroll instruction. And after determining that a third amount of first visible sub data exists in the data to be displayed after the first visible data, forming the first visible sub data and a fourth amount of data before the first visible data into second visible data, wherein the third amount and the fourth amount are equal to a preset amount.
It is understood that the amount of data of the drop-down list that can be displayed on the browser page is a certain amount, i.e., a preset amount, and in order to maintain the smoothness of list scrolling when the drop-down list is scrolled, the data is usually scrolled and shifted one by one, and the entire page is not switched. Therefore, the second visible data after offset is generally composed of a third amount of list data that needs to be offset, i.e., the first visible sub data, and a portion of data at the end position of the first visible data, i.e., the fourth amount of data, and the sum of the third amount and the fourth amount is equal to a preset amount. Further, when the third number is smaller than the preset number, the fourth number is larger than zero, which is the above condition; and when the third number is greater than or equal to the preset number, the fourth number is less than or equal to zero, and the second visible data needs to maintain the preset number, so that the fourth number of data needs to be removed from the starting position in the third number of the first visible sub data to obtain the preset number of the second visible data. For example: if (A, B, C, D, E, F, G, H) to be displayed exists, the preset number is 2, the first visible data is (D, E), and the third number is 1, then the second visible subdata (E, F) is formed by the third number of first visible subdata F after the first visible data (D, E) and the fourth number of E before the first visible subdata of 1.
Step 209, when the list scrolling command includes a reverse identifier and a third amount of data exists in the data to be displayed before the first visible data, displaying a second visible data, wherein the second visible data includes: the display device comprises a first display device, a second display device and a display control device, wherein the first display device comprises a first display device and a second display device, the first display device comprises a first display device, the second display device comprises a display control device, the first display device comprises a first display device, a second display device and a display control device, the first display device comprises a first display device, the second display device comprises a display control device.
In the embodiment of the present invention, on the contrary, the shifted second visible data is composed of a third number of list data that needs to be shifted, that is, the first visible sub data, and a part of data of the start position of the first visible data, that is, the fourth number of data, and the sum of the third number and the fourth number is equal to the preset number. For example: if (B, C, D, E, F, G) to be displayed exists, the preset number is 2, the first visible data is (D, E), the third number is 1, and then the second visible subdata (C, D) is formed by the first visible subdata C with the third number before the first visible data (D, E) and the D with the fourth number before the first visible subdata with the fourth number being 1.
Step 210, when the list scrolling command includes a forward identifier and a fifth amount of data exists in the data to be displayed after the first visible data, displaying second visible data, wherein the second visible data includes: a fifth amount of second visible subdata after the first visible subdata in the data to be displayed, and a sixth amount of data before the second visible subdata in the data to be displayed, where the fifth amount is smaller than the third amount, and a sum of the sixth amount and the fifth amount is a preset amount.
In this embodiment of the present invention, if the list scrolling command includes a forward flag, and there is no data of a third quantity that needs to be shifted after the first visible data in the data to be displayed, and there is at most a fifth quantity of second visible sub data, the second visible data may be composed of the second visible sub data and data of a sixth quantity before the second visible sub data, and the fifth quantity and the sixth quantity are equal to a preset quantity after the second visible data, so as to keep the quantity of data displayed by the second visible data unchanged. For example: the data (B, C, D, E, F, G) to be displayed exist, the preset number is 2, the first visible data is (D, E), the third number is 3, only the fifth number of second visible sub-data (F, G) exists after the first visible data, and the second visible data (F, G) is formed by the second visible sub-data and the previous sixth number of 0 data.
Step 211, when the list scrolling command includes a reverse identifier and a fifth amount of data exists before the first visible data in the data to be displayed, displaying second visible data, where the second visible data includes: a fifth amount of second visible subdata before the first visible data in the data to be displayed, and a sixth amount of data before the second visible data in the data to be displayed.
In this embodiment of the present invention, if the list scrolling command includes a reverse identifier, and when there is no third-order data that needs to be shifted in the data to be displayed before the first visible data, and there is at most a fifth amount of second visible sub data, the second visible data may be composed of the second visible sub data and a sixth amount of data before the second visible sub data, and the fifth amount and the sixth amount are equal to a preset amount later, so as to keep the amount of data displayed by the second visible data unchanged. For example: the data (B, C, D, E, F, G) to be displayed exist, the preset number is 2, the first visible data is (D, E), the third number is 3, only the fifth number of second visible data (B, C) exists before the first visible data, and the second visible data (B, C) is formed by the second visible data and the sixth number of data (0) after the second visible data.
The invention provides a list loading method, which comprises the following steps: displaying first visible data in the data to be displayed; when a list rolling instruction is detected, loading newly-added data to the data to be displayed from total list data according to the list rolling instruction, and deleting redundant data in the data to be displayed; and displaying second visible data in the changed data to be displayed according to the list scrolling instruction, wherein the second visible data is before or after the first visible data. When the pull-down list is rolled, the newly added data are loaded to the data to be displayed in advance, and the corresponding redundant data in the data to be displayed are deleted, so that the real-time performance of loading the data in the pull-down list is improved, and the cache pressure of the browser for storing the data to be displayed is reduced.
Fig. 3 is a block diagram of a list loading apparatus 30 according to an embodiment of the present invention, where the apparatus includes:
the first display module 301 is configured to display first visible data in the data to be displayed.
And a dynamic update module 302, configured to, when a list scroll instruction is detected, load newly-added data to the data to be displayed from the total list data according to the list scroll instruction, and delete redundant data in the data to be displayed.
Optionally, the list scrolling instruction includes: the number of scrolling times; the dynamic update module 302 includes:
the first dynamic update submodule 3021 is configured to, when the number of times of scrolling does not exceed a threshold of the number of times of scrolling, load newly-added data to the data to be displayed from the total list data according to the number of times of scrolling, and delete redundant data in the data to be displayed.
And the second dynamic update submodule 3022 is configured to delete the redundant data in the data to be displayed when the number of scrolling times exceeds a threshold value of the number of scrolling times.
A second displaying module 303, configured to display, according to the list scrolling instruction, second visible data in the changed data to be displayed, where the second visible data is before or after the first visible data.
Optionally, the list scrolling instruction includes: forward identification or reverse identification; the second display module 303 includes:
the determining submodule 3031 is configured to determine, according to the number of times of scrolling, a third number of times that the data to be displayed is shifted in the total list data.
The first displaying submodule 3032 is configured to display second visible data when the list scrolling instruction includes a forward identifier and a third amount of data exists in the data to be displayed after the first visible data, where the second visible data includes: the display method comprises the steps that a third amount of first visible subdata behind the first visible subdata in the data to be displayed and a fourth amount of data in front of the first visible subdata in the data to be displayed are obtained, and the sum of the fourth amount and the third amount is a preset amount.
A second displaying submodule 3033, configured to display second visible data when the list scrolling instruction includes a reverse identifier and a third amount of data exists in the data to be displayed before the first visible data, where the second visible data includes: the display device comprises a first display device, a second display device and a display control device, wherein the first display device comprises a first display device and a second display device, the first display device comprises a first display device, the second display device comprises a display control device, the first display device comprises a first display device, a second display device and a display control device, the first display device comprises a first display device, the second display device comprises a display control device.
Optionally, the second display module 303 further includes:
a third displaying submodule 3034, configured to display second visible data when the list scrolling instruction includes a forward identifier and a fifth amount of data exists in the data to be displayed after the first visible data, where the second visible data includes: a fifth amount of second visible subdata after the first visible subdata in the data to be displayed, and a sixth amount of data before the second visible subdata in the data to be displayed, where the fifth amount is smaller than the third amount, and a sum of the sixth amount and the fifth amount is a preset amount.
A fourth displaying sub-module 3035, configured to display second visible data when the list scrolling instruction includes a reverse identifier and a fifth amount of data exists in the data to be displayed before the first visible data, where the second visible data includes: a fifth amount of second visible subdata before the first visible data in the data to be displayed, and a sixth amount of data before the second visible data in the data to be displayed.
Optionally, the preset number is divided into a first number for the forward identifier and a second number for the reverse identifier, and the apparatus further includes:
a first loading module 304, configured to, when the first visible data is data at a start position in the general list data, load a first amount of data after the first visible data from the general list data, to obtain data to be displayed;
a second loading module 305, configured to, when the first visible data is data at an end position in the general list data, load a second amount of data before the first visible data from the general list data, so as to obtain data to be displayed.
The invention provides a list loading device, comprising: the first display module is used for displaying first visible data in the data to be displayed; the dynamic updating module is used for loading newly-added data to the data to be displayed from the total list data according to the list rolling instruction and deleting redundant data in the data to be displayed when the list rolling instruction is detected; and the second display module is used for displaying second visible data in the changed data to be displayed according to the list scrolling instruction, wherein the second visible data is before or after the first visible data. When the pull-down list is rolled, the newly added data are loaded to the data to be displayed in advance, and the corresponding redundant data in the data to be displayed are deleted, so that the real-time performance of loading the data in the pull-down list is improved, and the cache pressure of the browser for storing the data to be displayed is reduced.
For the above terminal device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and for relevant points, reference may be made to partial description of the method embodiment.
The list loading device comprises a processor and a memory, the first display module, the dynamic update module, the second display module, the first dynamic update submodule, the second dynamic update submodule, the determination submodule, the first display submodule, the second display submodule, the third display submodule, the fourth display submodule, the first loading module and the second loading module are all stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. The kernel can be set to be one or more than one, and the problems that when a pull-down list displayed on the page of the existing browser is rolled, the data loading efficiency is low and the cache pressure of the browser is high are solved by adjusting kernel parameters.
An embodiment of the present invention provides a storage medium on which a program is stored, the program implementing the list loading method when executed by a processor.
The embodiment of the invention provides a processor, which is used for running a program, wherein the list loading method is executed when the program runs.
Referring to fig. 4, an embodiment of the present invention provides an apparatus, which includes at least one processor 401, and at least one memory 402 connected to the processor 401, a bus 403; the processor 401 and the memory 402 complete communication with each other through the bus 403; processor 401 is configured to call program instructions in memory 402 to perform the list loading method described above. The device herein may be a server, a PC, a PAD, a mobile phone, etc.
The present application further provides a computer program product adapted to perform a program for initializing the following method steps when executed on a data processing device:
a method of list loading, the method comprising:
displaying first visible data in the data to be displayed;
when a list rolling instruction is detected, loading newly-added data to the data to be displayed from total list data according to the list rolling instruction, and deleting redundant data in the data to be displayed;
and displaying second visible data in the changed data to be displayed according to the list scrolling instruction, wherein the second visible data is before or after the first visible data.
Optionally, the list scrolling instruction includes: the number of scrolling times; the step of loading newly added data from the total list data to the data to be displayed according to the list scrolling instruction and deleting redundant data in the data to be displayed comprises the following steps:
when the rolling times do not exceed a rolling time threshold value, loading newly-added data to the data to be displayed from the total list data according to the rolling times, and deleting redundant data in the data to be displayed;
and when the rolling times exceed a rolling time threshold value, deleting redundant data in the data to be displayed.
Optionally, the list scrolling instruction includes: forward identification or reverse identification; the step of displaying second visible data in the changed data to be displayed according to the list scrolling instruction, wherein the second visible data is before or after the first visible data, comprises the following steps:
determining a third quantity of the data to be displayed for shifting in the total list data according to the rolling times;
when the list scroll instruction includes a forward identification and there is a third amount of data in the data to be shown after the first visible data, showing second visible data, the second visible data comprising: a third amount of first visible subdata behind the first visible subdata in the data to be displayed, and a fourth amount of data ahead of the first visible subdata in the data to be displayed, wherein the sum of the fourth amount and the third amount is a preset amount;
when the list scroll instruction includes a reverse identification and there is a third amount of data in the data to be shown that precedes the first visible data, showing second visible data, the second visible data comprising: the display device comprises a first display device, a second display device and a display control device, wherein the first display device comprises a first display device and a second display device, the first display device comprises a first display device, the second display device comprises a display control device, the first display device comprises a first display device, a second display device and a display control device, the first display device comprises a first display device, the second display device comprises a display control device.
Optionally, the method further includes:
when the list scroll instruction includes a forward identification and there is a fifth amount of data in the data to be shown that follows the first visible data
Presenting second visual data, the second visual data comprising: a fifth amount of second visible subdata after the first visible subdata in the data to be displayed, and a sixth amount of data before the second visible subdata in the data to be displayed, wherein the fifth amount is smaller than the third amount, and the sum of the sixth amount and the fifth amount is a preset amount;
when the list scroll instruction includes a reverse identification and there is a fifth amount of data in the data to be shown that precedes the first visible data, showing second visible data, the second visible data comprising: a fifth amount of second visible subdata before the first visible data in the data to be displayed, and a sixth amount of data before the second visible data in the data to be displayed.
Optionally, the dividing of the preset number into a first number for the forward identifier and a second number for the reverse identifier further includes, before the step of displaying the first visible data in the data to be displayed:
when the first visible data is data at the initial position in the general list data, loading a first amount of data behind the first visible data from the general list data to obtain data to be displayed;
and when the first visible data is the data at the tail position in the general list data, loading a second amount of data before the first visible data from the general list data to obtain the data to be displayed.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a device includes one or more processors (CPUs), memory, and a bus. The device may also include input/output interfaces, network interfaces, and the like.
The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip. The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (10)

1. A method of list loading, the method comprising:
displaying first visible data in the data to be displayed;
when a list rolling instruction is detected, loading newly-added data to the data to be displayed from total list data according to the list rolling instruction, and deleting redundant data in the data to be displayed;
and displaying second visible data in the changed data to be displayed according to the list scrolling instruction, wherein the second visible data is before or after the first visible data.
2. The method of claim 1, wherein the list scroll instruction comprises: the number of scrolling times; the step of loading newly added data from the total list data to the data to be displayed according to the list scrolling instruction and deleting redundant data in the data to be displayed comprises the following steps:
when the rolling times do not exceed a rolling time threshold value, loading newly-added data to the data to be displayed from the total list data according to the rolling times, and deleting redundant data in the data to be displayed;
and when the rolling times exceed a rolling time threshold value, deleting redundant data in the data to be displayed.
3. The method of claim 1, wherein the list scroll instruction comprises: forward identification or reverse identification; the step of displaying the second visible data in the changed data to be displayed according to the list scrolling instruction comprises the following steps:
determining a third quantity of the data to be displayed for shifting in the total list data according to the rolling times;
when the list scroll instruction includes a forward identification and there is a third amount of data in the data to be shown after the first visible data, showing second visible data, the second visible data comprising: a third amount of first visible subdata behind the first visible subdata in the data to be displayed, and a fourth amount of data ahead of the first visible subdata in the data to be displayed, wherein the sum of the fourth amount and the third amount is a preset amount;
when the list scroll instruction includes a reverse identification and there is a third amount of data in the data to be shown that precedes the first visible data, showing second visible data, the second visible data comprising: the display device comprises a first display device, a second display device and a display control device, wherein the first display device comprises a first display device and a second display device, the first display device comprises a first display device, the second display device comprises a display control device, the first display device comprises a first display device, a second display device and a display control device, the first display device comprises a first display device, the second display device comprises a display control device.
4. The method of claim 3, further comprising:
when the list scroll instruction includes a forward identification and there is a fifth amount of data in the data to be shown that follows the first visible data;
presenting second visual data, the second visual data comprising: a fifth amount of second visible subdata after the first visible subdata in the data to be displayed, and a sixth amount of data before the second visible subdata in the data to be displayed, wherein the fifth amount is smaller than the third amount, and the sum of the sixth amount and the fifth amount is a preset amount;
when the list scroll instruction includes a reverse identification and there is a fifth amount of data in the data to be shown that precedes the first visible data, showing second visible data, the second visible data comprising: a fifth amount of second visible subdata before the first visible data in the data to be displayed, and a sixth amount of data before the second visible data in the data to be displayed.
5. The method according to claim 4, wherein the preset number is divided into a first number for the forward direction identifiers and a second number for the reverse direction identifiers, and the step of displaying the first visible data in the data to be displayed is preceded by the step of:
when the first visible data is data at the initial position in the general list data, loading a first amount of data behind the first visible data from the general list data to obtain data to be displayed;
and when the first visible data is the data at the tail position in the general list data, loading a second amount of data before the first visible data from the general list data to obtain the data to be displayed.
6. A list loading apparatus, the apparatus comprising:
the first display module is used for displaying first visible data in the data to be displayed;
the dynamic updating module is used for loading newly-added data to the data to be displayed from the total list data according to the list rolling instruction and deleting redundant data in the data to be displayed when the list rolling instruction is detected;
and the second display module is used for displaying second visible data in the changed data to be displayed according to the list scrolling instruction, wherein the second visible data is before or after the first visible data.
7. The apparatus of claim 6, wherein the list scroll instruction comprises: the number of scrolling times; the dynamic update module includes:
the first dynamic updating submodule is used for loading newly-added data to the data to be displayed from the total list data according to the rolling times and deleting redundant data in the data to be displayed when the rolling times do not exceed a rolling time threshold;
and the second dynamic updating submodule is used for deleting redundant data in the data to be displayed when the rolling times exceed a rolling time threshold value.
8. The apparatus of claim 6, wherein the list scroll instruction comprises: forward identification or reverse identification; the second display module, comprising:
the determining submodule is used for determining a third quantity of the data to be displayed for shifting in the total list data according to the rolling times;
a first display sub-module, configured to display second visible data when the list scroll instruction includes a forward identifier and a third amount of data exists in the data to be displayed after the first visible data, where the second visible data includes: a third amount of first visible subdata behind the first visible subdata in the data to be displayed, and a fourth amount of data ahead of the first visible subdata in the data to be displayed, wherein the sum of the fourth amount and the third amount is a preset amount;
a second display sub-module, configured to display second visible data when the list scrolling instruction includes a reverse identifier and a third amount of data exists in the data to be displayed before the first visible data, where the second visible data includes: the display device comprises a first display device, a second display device and a display control device, wherein the first display device comprises a first display device and a second display device, the first display device comprises a first display device, the second display device comprises a display control device, the first display device comprises a first display device, a second display device and a display control device, the first display device comprises a first display device, the second display device comprises a display control device.
9. An electronic device comprising at least one processor, and at least one memory, bus connected to the processor; the processor and the memory complete mutual communication through the bus; the processor is configured to call program instructions in the memory to perform the list loading method of any of claims 1 to 5.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the list loading method of any one of claims 1 to 5.
CN201910901457.2A 2019-09-23 2019-09-23 List loading method, terminal device, electronic device and storage medium Pending CN112541140A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910901457.2A CN112541140A (en) 2019-09-23 2019-09-23 List loading method, terminal device, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910901457.2A CN112541140A (en) 2019-09-23 2019-09-23 List loading method, terminal device, electronic device and storage medium

Publications (1)

Publication Number Publication Date
CN112541140A true CN112541140A (en) 2021-03-23

Family

ID=75013175

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910901457.2A Pending CN112541140A (en) 2019-09-23 2019-09-23 List loading method, terminal device, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN112541140A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113868315A (en) * 2021-09-28 2021-12-31 深圳云之家网络有限公司 Data rolling loading method, device, equipment and storage medium
CN114217724A (en) * 2022-02-14 2022-03-22 北京智象信息技术有限公司 Method, system and medium for displaying and interacting long list data in TV application

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105843517A (en) * 2016-03-14 2016-08-10 乐视移动智能信息技术(北京)有限公司 Mobile terminal total graph displaying method and system
CN107273374A (en) * 2016-04-06 2017-10-20 滴滴(中国)科技有限公司 The display methods and device of a kind of drop-down window
CN109725818A (en) * 2018-12-25 2019-05-07 上海连尚网络科技有限公司 A kind of information displaying method, equipment and computer-readable medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105843517A (en) * 2016-03-14 2016-08-10 乐视移动智能信息技术(北京)有限公司 Mobile terminal total graph displaying method and system
CN107273374A (en) * 2016-04-06 2017-10-20 滴滴(中国)科技有限公司 The display methods and device of a kind of drop-down window
CN109725818A (en) * 2018-12-25 2019-05-07 上海连尚网络科技有限公司 A kind of information displaying method, equipment and computer-readable medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113868315A (en) * 2021-09-28 2021-12-31 深圳云之家网络有限公司 Data rolling loading method, device, equipment and storage medium
CN114217724A (en) * 2022-02-14 2022-03-22 北京智象信息技术有限公司 Method, system and medium for displaying and interacting long list data in TV application

Similar Documents

Publication Publication Date Title
US20220261129A1 (en) Display controlling method, terminal, information processing apparatus, and storage medium
US10114865B2 (en) Tile cache
US8949739B2 (en) Creating and maintaining images of browsed documents
CN109408752B (en) Online document display method and device and electronic equipment
CN111159436B (en) Method, device and computing equipment for recommending multimedia content
US20110113365A1 (en) Scrolling large data sets
CN109388317B (en) Picture loading method, terminal device and storage medium
JP2011501299A (en) Dynamically updated virtual list view
CN103984781A (en) Webpage loading method and device
CN104238897A (en) Menu item displaying method and device
US20220035655A1 (en) Method and Device for Anonymous Page Management, Terminal Device, and Readable Storage Medium
CN109086141B (en) Memory management method and device and computer readable storage medium
CN112541140A (en) List loading method, terminal device, electronic device and storage medium
CN106201237A (en) A kind of information collection method and device
US9612734B1 (en) Random access browser scrolling for large pages
CN105630893A (en) Display method and device of photo title
WO2018057401A1 (en) Preserve input focus while scrolling in a virtualized dataset
CN108681469B (en) Page caching method, device, equipment and storage medium based on Android system
US8788965B2 (en) Method and device for displaying data by adjusting the size of controls
EP3504637B1 (en) Dynamically render large dataset in client application
CN112711726B (en) Method, device, computer equipment and storage medium for caching video data
CN108874875A (en) The asynchronous loading method of web page contents, device, readable storage medium storing program for executing and terminal
CN113190321A (en) Method and equipment for application program page pull-up refreshing
CN110020285B (en) Histogram processing method and device
CN105528247A (en) Information processing method and client side

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