CN-122019033-A - List data processing method, device, equipment and storage medium
Abstract
The application discloses a list data processing method, a device, equipment and a storage medium, wherein the method comprises the steps of obtaining position information and display attribute information corresponding to each data item in a list data set; the method comprises the steps of carrying out canvas size calculation based on position information and display attribute information of each data item to obtain target size information of a cache display page, creating the cache display page corresponding to a list data set based on the target size information, creating the target display page based on a view port size, carrying out attribute classification on each data item based on the display attribute information to obtain data item sets of a plurality of attribute categories, rendering each data item set to the cache display page in batches to obtain a target off-screen page, and drawing at least part of rendering contents in the target off-screen page to the target display page. And the cache display page is added, so that the data item content is prerendered to the target off-screen page, the real-time calculation amount is reduced, the page loading delay is reduced, and the rendering efficiency of the data item is improved.
Inventors
- WANG ZHEN
Assignees
- 宁波方太厨具有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260104
Claims (10)
- 1. A method of list data processing, the method comprising: Acquiring position information and display attribute information corresponding to each data item in a list data set; Carrying out canvas size calculation based on the position information and the display attribute information of each data item to obtain target size information of a cache display page; Creating a cache display page corresponding to the list data set based on the target size information, and creating a target display page based on a view port size, wherein the view port size is the size of an area which can be used for rendering the display page in the terminal; performing attribute classification on each data item based on the display attribute information to obtain a data item set of a plurality of attribute categories; Rendering each data item set to the cache display page in batches to obtain a target off-screen page; And drawing at least part of rendering contents in the target off-screen page to the target display page.
- 2. The method of claim 1, wherein after the rendering of at least a portion of the rendered content in the target off-screen page to the target display page, the method further comprises: At least one target data block corresponding to the page rolling information is preloaded from the target off-screen page in response to a page rolling instruction carrying the page rolling information, wherein the target data block is a data block to be displayed adjacent to a page data block currently displayed by the target display page, and the page data block is obtained by carrying out data blocking on list data in the target off-screen page along the page rolling direction; and drawing the at least one target data block to the target display page.
- 3. The method according to claim 2, wherein preloading at least one target data block corresponding to the page scrolling information from the target off-screen page in response to a page scrolling instruction carrying the page scrolling information comprises: Determining the current scrolling speed corresponding to the page scrolling instruction based on the page scrolling information; And determining target data blocks with the target loading quantity corresponding to the current rolling speed and the rolling direction from page data blocks to be displayed in the target off-screen page based on a first corresponding relation between the rolling speed range and the data block loading quantity, wherein the data block loading quantity is positively related to the rolling speed.
- 4. The method of claim 3, wherein determining the target data block of the target loading number corresponding to the current scroll speed from the page data blocks to be displayed in the target off-screen page based on the first correspondence between the scroll speed range and the data block loading number comprises: Determining a first quantity corresponding to the current rolling speed and a second quantity corresponding to the current rolling acceleration based on a first corresponding relation between the rolling speed range and the loading quantity of the data block and a second corresponding relation between the rolling acceleration and the loading increment of the data block, wherein the current rolling acceleration is determined based on the rolling speed; Determining a sum of the first number and the second number as the target load number; and determining the target data blocks of the target loading quantity from the page data blocks to be displayed in the target off-screen page.
- 5. A method according to any one of claims 1-3, wherein the method further comprises: In the process of page rolling display, acquiring page rolling behavior data of an operation main body aiming at a current list data set, wherein the page rolling behavior data comprises a historical rolling speed, a historical rolling direction and a historical residence time, the residence time of a display frame of a target display page is represented by the historical residence time, and switching of adjacent display frames is triggered by a page rolling instruction; Inputting the historical rolling speed, the historical rolling direction and the historical residence time into a rolling behavior prediction model to conduct page rolling operation prediction, so as to obtain a predicted rolling position of at least one frame of predicted display frame and a rolling direction of each predicted rolling position; determining the loading priority of each page data block to be displayed corresponding to each predicted display frame based on the estimated rolling position and the rolling direction; and preloading the page data block to be displayed based on the loading priority.
- 6. The method of claim 5, wherein the method further comprises: And if any one of the historical scrolling speed, the historical scrolling direction and the historical residence time meets the random scrolling behavior condition, preloading target data blocks of target loading quantity before the current display data area of the target display page from page data blocks to be displayed, and preloading target data blocks of target loading quantity after the current display data area of the target display page.
- 7. The method of claim 6, wherein the meeting a random scroll behavior condition comprises: At least one of the switching frequency of the rolling direction being larger than or equal to a preset switching frequency, the discrete parameter of the rolling speed being larger than or equal to a preset discrete threshold value within a preset duration, and the residence time being smaller than or equal to a preset time threshold value is satisfied.
- 8. A data processing apparatus, the apparatus comprising: the data acquisition module is used for acquiring position information and display attribute information corresponding to each data item in the list data set; the size calculation module is used for calculating the canvas size based on the position information and the display attribute information of each data item to obtain the target size information of the cache display page; The page creation module is used for creating a cache display page corresponding to the list data set based on the target size information and creating a target display page based on a view port size, wherein the view port size is the size of an area which can be used for rendering the display page in the terminal; the classification module is used for carrying out attribute classification on each data item based on the display attribute information to obtain a data item set of a plurality of attribute categories; The first rendering module is used for rendering each data item set to the cache display page in batches to obtain a target off-screen page; And the second rendering module is used for drawing at least part of rendering contents in the target off-screen page to the target display page.
- 9. A list data processing apparatus, characterized in that the apparatus comprises a processor and a memory in which at least one instruction or at least one program is stored, which at least one instruction or at least one program is loaded and executed by the processor to implement the list data processing method according to any one of claims 1 to 7.
- 10. A computer readable storage medium having stored therein at least one instruction or at least one program, the at least one instruction or the at least one program being loaded and executed by a processor to implement the list data processing method of any one of claims 1 to 7.
Description
List data processing method, device, equipment and storage medium Technical Field The present application relates to the field of graphics rendering technologies, and in particular, to a method, an apparatus, a device, and a storage medium for processing list data. Background In embedded platforms or resource constrained systems, displaying and managing very long listings is an important technical challenge. The traditional list rendering mode generally adopts a method of preloading all list items at one time, but when the number of the list items is large, the memory occupation is too high, and the stability and the operation efficiency of the system are further affected. When processing the ultralong list, frequent DOM operations and JavaScript execution can have a great influence on rendering performance, and interface jamming or slow response is caused due to limited computing resources and memory, so that user experience is reduced. Disclosure of Invention The application provides a list rendering method, a device, equipment and a storage medium, which are characterized in that by adding a cache display page, and pre-rendering the content of the data item to a target off-screen page, so that the rendering efficiency of the data item is improved. The technical scheme of the application is as follows: in one aspect, the present application provides a method for processing list data, the method comprising: Acquiring position information and display attribute information corresponding to each data item in a list data set; Carrying out canvas size calculation based on the position information and the display attribute information of each data item to obtain target size information of a cache display page; Creating a cache display page corresponding to the list data set based on the target size information, and creating a target display page based on a view port size, wherein the view port size is the size of an area which can be used for rendering the display page in the terminal; performing attribute classification on each data item based on the display attribute information to obtain a data item set of a plurality of attribute categories; Rendering each data item set to the cache display page in batches to obtain a target off-screen page; And drawing at least part of rendering contents in the target off-screen page to the target display page. In another aspect, the present application provides a data processing apparatus, the apparatus comprising: the data acquisition module is used for acquiring position information and display attribute information corresponding to each data item in the list data set; the size calculation module is used for calculating the canvas size based on the position information and the display attribute information of each data item to obtain the target size information of the cache display page; The page creation module is used for creating a cache display page corresponding to the list data set based on the target size information and creating a target display page based on a view port size, wherein the view port size is the size of an area which can be used for rendering the display page in the terminal; the classification module is used for carrying out attribute classification on each data item based on the display attribute information to obtain a data item set of a plurality of attribute categories; The first rendering module is used for rendering each data item set to the cache display page in batches to obtain a target off-screen page; And the second rendering module is used for drawing at least part of rendering contents in the target off-screen page to the target display page. In another aspect, a system upgrade apparatus is provided, the apparatus comprising a processor and a memory, the memory storing at least one instruction or at least one program, the at least one instruction or the at least one program loaded and executed by the processor to implement a list data processing method as described above. In another aspect, a computer readable storage medium having stored therein at least one instruction or at least one program loaded and executed by a processor to implement a tabular data processing method as described above is provided. The list data processing method, the device, the equipment and the storage medium provided by the application have the following technical effects: According to the technical scheme, in an application scene of rendering a list data set, position information and display attribute information corresponding to each data item in the list data set are firstly obtained, canvas size calculation is conducted on the basis of the position information and the display attribute information of each data item to obtain target size information of a cache display page, then the cache display page corresponding to the list data set is created on the basis of the target size information, a target display page is created on the basis of a view port siz