Table rendering method and device and electronic equipment
Optimizing the table rendering process through paging and virtual scrolling area rendering, solving the problem of low table rendering efficiency and improving loading speed and user experience.
Patent Information
- Application Number
- CN202510736483.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-04
- Publication Date
- 2025-07-04
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the prior art, the table rendering efficiency is low, resulting in long wait times for users, affecting user experience and processing efficiency.
The table is paging through paging parameters, a virtual scrolling area is built, and the virtual scrolling area is rendered based on multiple pages, and other areas are rendered in combination with preset elements to optimize the rendering process.
Improves the loading speed and scrolling fluency of the table, avoids waiting or lag in the case of large amount of data, and improves rendering efficiency and user experience.
Smart Images

Figure CN120257958A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of big data, and in particular, to a method, device, and electronic device for table rendering. Background Art
[0002] With the rapid development of science and technology, information has become increasingly complex, and the information that each user needs to process in work or life has also become more and more. And the table is one of the effective and intuitive ways to process information. However, with the increase in the amount of data, more and more users need to wait for a long time when using the table, and even frequently experience lags when using the table to process data, which seriously affects the user experience and also greatly reduces the user's data processing efficiency. In the related art, the efficiency of rendering the table is low, resulting in a poor user experience when using the table.
[0003] In response to the above problems, no effective solution has been proposed yet. Summary of the Invention
[0004] Embodiments of the present invention provide a method, device, and electronic device for table rendering to at least solve the technical problem of low efficiency in rendering a table in the related art.
[0005] According to one aspect of the embodiments of the present invention, a method for table rendering is provided, including: in response to receiving a rendering instruction for a target table, obtaining the target table and paging parameters; paging the target table based on the paging parameters to obtain multiple pages corresponding to the target table, where different pages are used to represent table data at different positions in the target table; constructing a virtual scrolling area of the target table based on the paging parameters; rendering the virtual scrolling area based on the multiple pages, and rendering other areas outside the virtual scrolling area of the target table based on preset elements.
[0006] Further, rendering the virtual scrolling area based on the multiple pages includes: determining a first page and a second page among the multiple pages, where the second page is the page adjacent to the first page among the multiple pages; rendering a visible area in the virtual scrolling area based on the first page, and rendering a preloading area in the virtual scrolling area based on the second page.
[0007] Further, render the visible area in the virtual scroll area based on the first page, and render the pre-loaded area in the virtual scroll area based on the second page, including: responding to an operation instruction acting on the target table, and parsing the operation data in the operation instruction; determining first operation data associated with the first page in the operation data, and determining second operation data associated with the second page in the operation data; rendering the visible area based on the first operation data and the first page, and rendering the pre-loaded area based on the second operation data and the second page.
[0008] Further, the method further includes: responding to a sliding instruction acting on the virtual scroll area, and obtaining a page number identifier corresponding to the virtual scroll bar; rendering the virtual scroll area based on the page number identifier and multiple pages.
[0009] Further, rendering the virtual scroll area based on the page number identifier and multiple pages includes: determining a third page corresponding to the page number identifier from multiple pages, and obtaining a rendering result of the third page, where the rendering result is used to indicate whether to render the third page in the virtual scroll area; rendering the virtual scroll area based on the rendering result.
[0010] Further, rendering the virtual scroll area based on the rendering result includes: in response to the rendering result being to render the third page in the virtual scroll area, obtaining a fourth page corresponding to the third page, and rendering the virtual scroll area based on the fourth page, where the fourth page is a page adjacent to the third page among multiple pages; in response to the rendering result being that the third page is not rendered in the virtual scroll area, rendering the virtual scroll area based on the third page.
[0011] Further, constructing a virtual scroll area of the target table based on paging parameters includes: determining the page heights of multiple pages based on the paging parameters; determining a target height based on the product of the page height and a preset parameter; constructing the virtual scroll area based on the target height and the table width of the target table.
[0012] According to another aspect of the embodiments of the present invention, there is also provided an electronic device, including: a memory storing an executable program; a processor for running the program, where when the program runs, it executes the methods in the various embodiments of the present invention.
[0013] According to another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium, the computer-readable storage medium including a stored executable program, where when the executable program runs, it controls the device where the computer-readable storage medium is located to execute the methods in the various embodiments of the present invention.
[0014] According to another aspect of the embodiments of the present invention, there is also provided a computer program product, including a computer program which, when executed by a processor, implements the methods in the various embodiments of the present invention.
[0015] According to another aspect of the embodiments of the present invention, there is also provided a computer program which, when executed by a processor, implements the methods in the various embodiments of the present invention.
[0016] In the embodiments of the present invention, in response to receiving a rendering instruction for a target table, the target table and paging parameters are obtained; the target table is paged based on the paging parameters to obtain multiple pages corresponding to the target table; a virtual scrolling area of the target table is constructed based on the paging parameters; the virtual scrolling area is rendered based on the multiple pages, and other areas outside the virtual scrolling area in the target table are rendered based on preset elements. In this application, reasonable paging processing is performed through the paging parameters to obtain multiple pages, and fast rendering is respectively performed through the virtual scrolling area and other areas, effectively improving the loading speed of the table and the smoothness of scrolling, avoiding the problem that users wait or experience lag when using the table in the case of a large amount of data, effectively improving the efficiency of rendering the table, achieving the purpose of effectively improving the user experience, and thus solving the technical problem of low efficiency in rendering the table in the related art. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The schematic embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0018] Figure 1 is a flowchart of an optional table rendering method according to an embodiment of the present invention;
[0019] Figure 2 is a schematic diagram of an optional virtual scrolling area according to an embodiment of the present invention;
[0020] Figure 3 is a schematic structural diagram of an optional table rendering device according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0021] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are only some of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0022] It should be noted that the terms "first", "second", etc. in the specification, claims and above-mentioned drawings of the present invention are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present invention described here can be implemented in an order other than those illustrated or described here. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0023] According to an embodiment of the present invention, an embodiment of a table rendering method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. And although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.
[0024] Figure 1 is a flowchart of an optional table rendering method according to an embodiment of the present invention, as Figure 1 shown, the method includes the following steps:
[0025] Step S102, in response to receiving a rendering instruction for a target table, obtain the target table and paging parameters.
[0026] The above-mentioned table refers to a table used by a user to statistically process data or process data. The above-mentioned table refers to a table including a large amount of data and needs to be rendered. The user can render the above-mentioned table through the above-mentioned rendering instruction to improve the fluency of the user when using the table.
[0027] The above-mentioned target table refers to the table that the user is currently using, the table that the user needs to open and use. In this application, the user needs to use the above-mentioned target table. Therefore, it is necessary to render the above-mentioned target table through the above-mentioned rendering instruction to improve the fluency of the user when using the target table.
[0028] The above-mentioned rendering instruction refers to an instruction for rendering the above-mentioned target table. Through the above-mentioned rendering instruction, the above-mentioned table can be rendered, and the data in the table can be presented in a visual form, so that the user can more intuitively understand and analyze the data in the above-mentioned target table. Among them, the above-mentioned rendering instruction can be: a touch instruction, a click instruction, a voice instruction or an action instruction, etc.
[0029] The above pagination parameters refer to the parameters for paginating the above target table. In this application, the above target table can be paginated through the above pagination parameters. The above pagination parameters can be set according to the status of the target table, and can also be set manually based on experience and requirements. The above pagination parameters can also be set according to the actual application scenario. The above pagination parameters include, but are not limited to: the number of information items per page, the fixed row height per row, or the number of pagination pages, etc. The pagination parameters corresponding to different tables can be different.
[0030] In an alternative embodiment, the user can send a rendering instruction for the above target table to the controller. After the controller receives the above rendering instruction for rendering the above target table, the user can obtain the above target table, and the user can determine the pagination parameters corresponding to the above target table by himself / herself according to the above target table.
[0031] In another alternative embodiment, a pagination parameter determination model can be established in advance. The user can send a rendering instruction for the above target table to the controller. After the controller receives the above rendering instruction for rendering the above target table, the user can obtain the above target table, and the above target table can be used as the input of the above pagination parameter determination model and input into the above pagination parameter determination model to output the pagination parameters corresponding to the above target table.
[0032] In the case where the rendering instruction is a touch instruction, the user can touch the interactive panel to send the rendering instruction for the above target table to the controller. After the controller receives the above rendering instruction for rendering the above target table, the user can obtain the above target table, and the user can determine the pagination parameters corresponding to the above target table by himself / herself according to the above target table.
[0033] In the case where the rendering instruction is a click instruction, the user can click a preset control in the interactive panel to send the rendering instruction for the above target table. After the controller receives the above rendering instruction for rendering the above target table, the user can obtain the above target table, and the user can determine the pagination parameters corresponding to the above target table by himself / herself according to the above target table.
[0034] In the case where the rendering instruction is a voice instruction, a specific voice can be preset in advance. The user can determine the above target table and pagination parameters by speaking the specific voice. When the user speaks the specific voice and the processor detects the presence of the above specific voice in the user's voice, the processor generates a rendering instruction and sends the rendering instruction to the above controller. After the controller receives the above rendering instruction for rendering the above target table, the user can obtain the above target table, and the user can determine the pagination parameters corresponding to the above target table by himself / herself according to the above target table.
[0035] When the rendering instruction is an action instruction, a specific action can be preset in advance. The image of the user is collected through the camera and sent to the processor. The processor performs image recognition on the above image to identify whether the specific action exists in the above image. When the processor detects that the specific action exists in the above image, the processor generates a rendering instruction and sends the rendering instruction to the above controller. After receiving the rendering instruction for rendering the above target table, the user can obtain the above target table, and the user can determine the paging parameters corresponding to the above target table by himself according to the above target table.
[0036] In this application, by setting the above rendering instruction, the user can choose whether to render the above target table according to the need when using the above target table. When the data in the table is less, the user can directly open the above table, which effectively improves the controllability of rendering the above target table, improves the flexibility of table rendering, and improves the user experience.
[0037] Step S104, page the target table based on the paging parameters to obtain multiple pages corresponding to the target table, where different pages are used to represent the table data at different positions in the target table.
[0038] The above table data refers to the data stored in the target table. Since there may be a lot of data in the table, directly rendering the table may result in a long rendering time, resulting in low efficiency of rendering the above target table. Therefore, it is necessary to page the above target table through the paging parameters to accelerate the efficiency of rendering the above target table.
[0039] In an alternative embodiment, after obtaining the above paging parameters, the user can issue a paging instruction to the controller according to the above paging parameters, and the controller pages the above target table to obtain multiple pages corresponding to the target table, where different pages represent the table data at different positions in the target table, and the table data in the above multiple pages added together is all the data in the target table.
[0040] In another alternative embodiment, a paging model can be established in advance. After obtaining the above paging parameters, the above paging parameters and the above target table can be used as the input of the above paging model and input into the above paging model. The above paging model pages the above target table to obtain multiple corresponding pages in the target table, where different pages are used to represent the table data at different positions in the target table.
[0041] In this application, the above-mentioned target table is accurately paged through paging parameters to obtain relatively accurate multiple pages, effectively improving the accuracy of obtaining the above-mentioned multiple pages. Moreover, through the above-mentioned paging parameters, multiple pages can be quickly obtained, effectively improving the rate of obtaining the above-mentioned multiple pages. Furthermore, the efficiency of rendering the table is effectively improved, enhancing the user experience.
[0042] Step S106: Construct a virtual scrolling area of the target table based on the paging parameters.
[0043] The above-mentioned virtual scrolling area refers to the area that appears through scrolling in the target table. If the user needs to view the virtual scrolling area above or below the current display area, they can scroll the mouse to view the above-mentioned virtual scrolling area. In this application, multiple pages are used to render the above-mentioned virtual scrolling area so that when the user uses the target table, they can smoothly view the data in the above-mentioned virtual scrolling area by scrolling the mouse.
[0044] In an alternative embodiment, the user determines the virtual scrolling area of the target table through the above-mentioned processor. Among them, after obtaining the above-mentioned paging parameters, the processor can determine the virtual scrolling area of the target table according to the above-mentioned paging parameters.
[0045] In another alternative embodiment, a virtual scrolling area determination model can be established in advance. After obtaining the above-mentioned paging parameters, the above-mentioned paging parameters can be used as the input of the above-mentioned virtual scrolling area determination model and input into the above-mentioned virtual scrolling area determination model to output the virtual scrolling area of the above-mentioned target table.
[0046] In this application, the above-mentioned virtual scrolling area of the target table is accurately constructed through the above-mentioned paging parameters, effectively improving the accuracy of obtaining the above-mentioned virtual scrolling area. Furthermore, the rate of obtaining the above-mentioned virtual scrolling area is effectively improved, the rate of rendering the above-mentioned target table is improved, and the user experience is enhanced.
[0047] Step S108: Render the virtual scrolling area based on multiple pages, and render other areas outside the virtual scrolling area of the target table based on preset elements.
[0048] The above-mentioned preset elements refer to the elements for rendering other areas outside the virtual scrolling area of the above-mentioned target table. Through the above-mentioned preset elements, other areas outside the virtual scrolling area of the above-mentioned target table can be rendered, and then partially rendered other areas are obtained. When the user needs to view other areas, the other areas are rendered again. Among them, the above-mentioned preset elements include but are not limited to: row elements, column elements, table title elements, background color elements, or cell elements, etc.
[0049] In an alternative embodiment, the user can render the virtual scrolling area according to multiple pages through the above-mentioned processor, and can render other areas outside the virtual scrolling area in the target table according to preset elements to obtain the rendered target table.
[0050] In another alternative embodiment, a rendering model can be established in advance. After obtaining the above-mentioned multiple pages and determining the virtual scrolling area, the above-mentioned multiple pages and the virtual scrolling area can be used as the input of the above-mentioned rendering model and input into the above-mentioned rendering model to render the virtual scrolling area, and render other areas outside the virtual scrolling area in the target table according to preset elements.
[0051] In this application, the virtual scrolling area is rendered through multiple pages, and other areas outside the virtual scrolling area in the target table are rendered according to preset elements, so that when the user needs to view other areas, the other areas are rendered, effectively improving the rendering efficiency of the above-mentioned target table, and thus effectively improving the user experience.
[0052] Through the above steps, in response to receiving a rendering instruction for the target table, the target table and paging parameters are obtained; the target table is paged based on the paging parameters to obtain multiple pages corresponding to the target table; a virtual scrolling area of the target table is constructed based on the paging parameters; the virtual scrolling area is rendered based on multiple pages, and other areas outside the virtual scrolling area in the target table are rendered based on preset elements. In this application, reasonable paging processing has been performed through the paging parameters to obtain multiple pages, and the virtual scrolling area and other areas are respectively rendered quickly, effectively improving the loading speed of the table and the smoothness of scrolling, avoiding the problem of waiting or jamming when the user uses the table in the case of a large amount of data, effectively improving the rendering efficiency of the table, achieving the purpose of effectively improving the user experience, and thus solving the technical problem of low rendering efficiency of the table in the related art.
[0053] Optionally, rendering the virtual scrolling area based on multiple pages includes: determining a first page and a second page among the multiple pages, where the second page is the page adjacent to the first page among the multiple pages; rendering the visible area in the virtual scrolling area based on the first page, and rendering the preloading area in the virtual scrolling area based on the second page.
[0054] The above-mentioned preloading area refers to the area in the virtual scrolling area that is relatively close to the currently displayed area. In this application, the above-mentioned preloading area is rendered to prevent the situation where when the user suddenly scrolls to the preloading area, the preloading area is not fully loaded, thereby effectively improving the user experience.
[0055] In an alternative embodiment, a first page and a second page among the multiple pages are determined. The first page is the page displayed in front of the user, and the second page refers to the page adjacent to the first page among the multiple pages. After determining the first page and the second page, the visual area in the virtual scrolling area is rendered according to the first page, and the preloading area in the virtual scrolling area is rendered according to the second page.
[0056] In this application, by determining the first page and the second page, the controller can quickly render the visual area in the virtual scrolling area according to the first page, and the controller can render the preloading area in the virtual scrolling area according to the second page.
[0057] Optionally, rendering the visual area in the virtual scrolling area based on the first page and rendering the preloading area in the virtual scrolling area based on the second page includes: responding to an operation instruction acting on a target table, and parsing the operation data in the operation instruction; determining first operation data associated with the first page in the operation data, and determining second operation data associated with the second page in the operation data; rendering the visual area based on the first operation data and the first page, and rendering the preloading area based on the second operation data and the second page.
[0058] The above operation instruction refers to an operation instruction made by the user on the above target table. Among them, the above operation instruction includes but is not limited to: zooming in, zooming out, scrolling the mouse wheel downwards or scrolling the mouse wheel upwards, etc. In this application, the operation data of the user is determined through the above operation instruction.
[0059] In an alternative embodiment, the controller can parse the operation data from the operation instruction of the user acting on the above target table. After determining the operation data, the first operation data associated with the first page in the operation data can be determined, and the second operation data associated with the second page in the operation data can be determined. The visual area is rendered according to the first operation data and the first page, and the preloading area is rendered according to the second operation data and the second page.
[0060] In another alternative embodiment, when the user operates on the data in the table, the operated data is recorded in the corresponding array. After loading the original data and rendering the table, it is determined again whether the data has been recorded by the above data structure. If the data has been recorded, rendering is performed again according to the rules. After determining the operation data, the first operation data associated with the first page in the operation data can be determined, and the second operation data associated with the second page in the operation data can be determined. The visual area is rendered according to the first operation data and the first page, and the preloading area is rendered according to the second operation data and the second page.
[0061] In this application, the first page is accurately and quickly rendered through the first operation data, and the second page is accurately and quickly rendered through the second operation data, effectively improving the accuracy and speed of rendering the table and enhancing the user experience.
[0062] Optionally, the method further includes: responding to a sliding instruction acting on the virtual scrolling area, obtaining the page number identifier corresponding to the virtual scroll bar; rendering the virtual scrolling area based on the page number identifier and multiple pages.
[0063] The above page number identifier refers to an identifier used to determine the position of a certain page among the above multiple pages in the above multiple pages. The user can determine the position of the page corresponding to the above page number identifier in the above multiple pages through the above page number identifier.
[0064] In an optional embodiment, when the user controls the virtual scrolling area to slide through a sliding instruction, the page number identifier corresponding to the virtual scroll bar is obtained in real time during the sliding process, and the virtual scrolling area is rendered based on the page number identifier and multiple pages.
[0065] In this application, by setting the page number identifier, the virtual scrolling area can be quickly located through the above page number identifier, so as to quickly render the above virtual scrolling area, effectively improving the rendering speed of the above virtual scrolling area, and further effectively improving the rendering speed of the table, and further effectively enhancing the user experience.
[0066] Optionally, rendering the virtual scrolling area based on the page number identifier and multiple pages includes: determining a third page corresponding to the page number identifier from multiple pages, and obtaining the rendering result of the third page, where the rendering result is used to indicate whether to render the third page in the virtual scrolling area; rendering the virtual scrolling area based on the rendering result.
[0067] In an optional embodiment, when the user controls the virtual scrolling area to slide through a sliding instruction, the page number identifier corresponding to the virtual scroll bar is obtained in real time during the sliding process, and the third page corresponding to the page number identifier among multiple pages is determined through the above page number identifier, and the rendering result of the third page is obtained, and the virtual scrolling area is rendered according to the rendering result. When the third page is to be rendered in the virtual scrolling area, the above third page does not need to be rendered. When the third page is not to be rendered in the virtual scrolling area, the above third page is rendered in the virtual scrolling area.
[0068] In this application, by determining the rendering result of the third page to determine the rendering status of the third page, and determining whether to render the third page according to the rendering status of the third page, the situation of repeated rendering is prevented, the rendering rate of the third page is effectively improved, and then the rendering rate of the table is effectively improved, enhancing the user experience.
[0069] Optionally, rendering the virtual scroll area based on the rendering result includes: in response to the rendering result being to render the third page in the virtual scroll area, obtaining the fourth page corresponding to the third page, and rendering the virtual scroll area based on the fourth page, where the fourth page is the page adjacent to the third page among multiple pages; in response to the rendering result being that the third page is not rendered in the virtual scroll area, rendering the virtual scroll area based on the third page.
[0070] In an alternative embodiment, when the rendering result is to render the third page in the virtual scroll area, obtain the fourth page corresponding to the third page, and render the virtual scroll area according to the fourth page. The fourth page is the page adjacent to the third page among multiple pages. When the rendering result is that the third page is not rendered in the virtual scroll area, render the virtual scroll area according to the third page.
[0071] In another alternative embodiment, a fourth-page determination model can be established in advance. When the rendering result is to render the third page in the virtual scroll area, input the third page and the multiple pages as the input of the fourth-page determination model into the fourth-page determination model, output the fourth page. After obtaining the fourth page, render the virtual scroll area according to the fourth page. The fourth page is the page adjacent to the third page among multiple pages. When the rendering result is that the third page is not rendered in the virtual scroll area, render the virtual scroll area according to the third page.
[0072] In this application, by determining the fourth page, after obtaining the third page, it is still possible to render the page adjacent to the third page, so that after the user uses the above-mentioned sliding instruction, it is still possible to render the pages around the third page, effectively improving the rendering efficiency of the table, effectively improving the comprehensiveness of rendering the table, and enhancing the user experience.
[0073] Optionally, constructing the virtual scroll area of the target table based on the paging parameter includes: determining the page height of multiple pages based on the paging parameter; determining the target height based on the product of the page height and the preset parameter; constructing the virtual scroll area based on the target height and the table width of the target table.
[0074] The above preset parameters refer to the parameters preset for determining the target height of the above virtual scrolling area. Among them, the above preset parameters can be set according to the target table state, can also be set manually according to experience and requirements, and can also be set according to the actual application scenario.
[0075] In an alternative embodiment, after obtaining the above paging parameters, the page heights of multiple pages can be determined according to the above paging parameters, and the target height can be determined according to the product of the above page height and the preset parameters set in advance, and the above virtual scrolling area can be determined according to the target height and the width of the target table.
[0076] Exemplarily, Figure 2 is a schematic diagram of an alternative virtual scrolling area according to an embodiment of the present invention. As Figure 2 shown, the target height of the virtual scrolling area is set manually, and the width of the virtual scrolling area is equal to the width of the above target table. The upper end and the lower end of the target table are filled with empty elements.
[0077] In this application, the above target height is quickly determined through preset parameters and page height, and the above virtual scrolling area is quickly determined through the above target height and the table width of the target table, effectively improving the rate of obtaining the above virtual scrolling area, thereby effectively improving the efficiency of table rendering and enhancing the user experience.
[0078] According to another aspect of the embodiments of the present invention, a table rendering device is further provided. The device can execute the table rendering method of the above embodiments. The specific implementation method and preferred application scenario are the same as those of the above embodiments and will not be elaborated here.
[0079] Figure 3 is a schematic structural diagram of an alternative table rendering device according to an embodiment of the present invention. As Figure 3 shown, the device includes: an acquisition module 30, configured to acquire a target table and paging parameters in response to receiving a rendering instruction of the target table; a paging module 32, configured to page the target table based on the paging parameters to obtain multiple pages corresponding to the target table, where different pages are used to represent table data at different positions in the target table; a construction module 34, configured to construct a virtual scrolling area of the target table based on the paging parameters; and a rendering module 36, configured to render the virtual scrolling area based on multiple pages and render other areas outside the virtual scrolling area in the target table based on preset elements.
[0080] Optionally, the rendering module includes: a determination unit configured to determine a first page and a second page among a plurality of pages, where the second page is a page adjacent to the first page among the plurality of pages; a first rendering unit configured to render a visible area in the virtual scrolling area based on the first page and render a preloading area in the virtual scrolling area based on the second page.
[0081] Optionally, the rendering unit includes: a parsing subunit configured to parse operation data in an operation instruction in response to an operation instruction acting on a target table; a determination subunit configured to determine first operation data associated with the first page and second operation data associated with the second page in the operation data; a rendering subunit configured to render the visible area based on the first operation data and the first page and render the preloading area based on the second operation data and the second page.
[0082] Optionally, the apparatus further includes: a judgment module configured to obtain a page number identifier corresponding to a virtual scroll bar in response to a sliding instruction acting on the virtual scrolling area; a page number identifier module configured to render the virtual scrolling area based on the page number identifier and the plurality of pages.
[0083] Optionally, the page number identifier module includes: a rendering result unit configured to determine a third page corresponding to the page number identifier from the plurality of pages and obtain a rendering result of the third page, where the rendering result is used to indicate whether to render the third page in the virtual scrolling area; a second rendering unit configured to render the virtual scrolling area based on the rendering result.
[0084] Optionally, the second rendering unit includes: a first judgment subunit configured to obtain a fourth page corresponding to the third page and render the virtual scrolling area based on the fourth page in response to the rendering result indicating that the third page is to be rendered in the virtual scrolling area, where the fourth page is a page adjacent to the third page among the plurality of pages; a second judgment subunit configured to render the virtual scrolling area based on the third page in response to the rendering result indicating that the third page is not to be rendered in the virtual scrolling area.
[0085] Optionally, the construction module includes: a height unit configured to determine the page height of a plurality of pages based on paging parameters; a calculation unit configured to determine a target height based on the product of the page height and a preset parameter; a construction unit configured to construct a virtual scrolling area based on the target height and the table width of the target table.
[0086] An embodiment of the present application further provides an electronic device, including: a memory storing an executable program; a processor configured to run the program, where when the program runs, it executes the methods in the various embodiments of the present invention.
[0087] Embodiments of the present application also provide a computer-readable storage medium. The computer-readable storage medium includes an executable program stored therein. When the executable program runs, it controls the device where the computer-readable storage medium is located to execute the methods in various embodiments of the present invention.
[0088] Embodiments of the present application also provide a computer program product, including a computer program which, when executed by a processor, implements the methods in various embodiments of the present invention.
[0089] Embodiments of the present application also provide a computer program which, when executed by a processor, implements the methods in the above-mentioned various embodiments of the present invention.
[0090] The serial numbers of the above-mentioned embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0091] In the above embodiments of the present invention, the descriptions of the various embodiments have their own emphases. For parts not detailed in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.
[0092] In several embodiments provided by the present application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only illustrative. For example, the division of the units can be a logical function division. In actual implementation, there can be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces. The indirect couplings or communication connections of the units or modules can be in an electrical or other form.
[0093] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place, or can be distributed to multiple units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0094] In addition, in various embodiments of the present invention, the functional units can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
[0095] When the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes: various media such as USB flash drives, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), mobile hard disks, magnetic disks, or optical discs that can store program codes.
[0096] The above are only the preferred embodiments of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present invention.
Claims
1. A table rendering method, characterized in that, Including: Upon receiving a rendering instruction for a target table, obtain the target table and paging parameters; Paginate the target table based on the paging parameters to obtain multiple pages corresponding to the target table, where different pages are used to represent table data at different positions in the target table; Construct a virtual scrolling area for the target table based on the paging parameters; Render the virtual scrolling area based on the multiple pages, and render other areas outside the virtual scrolling area in the target table based on preset elements.
2. The table rendering method according to claim 1, wherein Rendering the virtual scrolling area based on the multiple pages includes: Determine a first page and a second page among the multiple pages, where the second page is the page adjacent to the first page among the multiple pages; Render the visible area in the virtual scrolling area based on the first page, and render the preloading area in the virtual scrolling area based on the second page.
3. The table rendering method according to claim 2, wherein Rendering the visible area in the virtual scrolling area based on the first page, and rendering the preloading area in the virtual scrolling area based on the second page includes: Upon receiving an operation instruction acting on the target table, parse the operation data in the operation instruction; Determine first operation data associated with the first page in the operation data, and determine second operation data associated with the second page in the operation data; Render the visible area based on the first operation data and the first page, and render the preloading area based on the second operation data and the second page.
4. The table rendering method according to claim 1, wherein The method further includes: Upon receiving a sliding instruction acting on the virtual scrolling area, obtain a page number identifier corresponding to the virtual scroll bar; Render the virtual scrolling area based on the page number identifier and the multiple pages.
5. The table rendering method according to claim 4, wherein Rendering the virtual scrolling area based on the page number identifier and the multiple pages includes: Determine a third page corresponding to the page number identifier from the multiple pages, and obtain a rendering result of the third page, where the rendering result is used to indicate whether to render the third page in the virtual scrolling area; Render the virtual scrolling area based on the rendering result.
6. The table rendering method according to claim 5, wherein Rendering the virtual scrolling area based on the rendering result includes: Upon the rendering result indicating that the third page is to be rendered in the virtual scrolling area, obtain a fourth page corresponding to the third page, and render the virtual scrolling area based on the fourth page, where the fourth page is the page adjacent to the third page among the multiple pages; Upon the rendering result indicating that the third page is not to be rendered in the virtual scrolling area, render the virtual scrolling area based on the third page.
7. The table rendering method according to claim 1, wherein Constructing a virtual scrolling area for the target table based on the paging parameters includes: Determine the page heights of the multiple pages based on the paging parameters; Determine a target height based on the product of the page height and preset parameters; Construct the virtual scrolling area based on the target height and the table width of the target table.
8. An electronic device, characterized in that, Comprising: A memory storing an executable program; A processor for running the program, wherein when the program runs, it executes the method according to any one of claims 1 to 7.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored executable program, wherein when the executable program runs, it controls the device where the storage medium is located to execute the method according to any one of claims 1 to 7.
10. A computer program product, characterized in that, Including a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Big data rendering method and device based on virtual paging technology
CN115981529A
Implementation method of page virtual list
CN116756455A
Techniques for rendering a table spanning multiple pages
US20210049208A1