Shopping cart time slice loading method and device

By using a time-sliced ​​loading method, the shopping cart page is loaded in a loop and document fragment operations are delayed, which solves the problem of rendering large amounts of data on the shopping cart page, improves performance and user experience, and is suitable for various websites and mini-programs, especially performing excellently in resource-constrained environments.

CN121901522APending Publication Date: 2026-04-21IND BANK CO +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
IND BANK CO
Filing Date
2025-12-30
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

The shopping cart page has a large amount of data and multiple nested layers, which leads to long rendering and layout calculation times, serious performance issues, and affects user experience. In addition, the existing solutions increase the complexity of page code and mobile compatibility issues.

Method used

The time-sliced ​​loading method is adopted. The shopping cart page is loaded in a loop, the amount of data per page is configured, the creation and filling of document fragments are delayed to the next repaint cycle, the use of document fragments reduces the number of operations on the DOM tree, and the data is rendered in batches.

Benefits of technology

It improves shopping cart loading performance, reduces hardware requirements, avoids page reflows, and enhances user experience, especially in resource-constrained environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121901522A_ABST
    Figure CN121901522A_ABST
Patent Text Reader

Abstract

The invention discloses a shopping cart time slice loading method and device which can be used in the technical field of computers, and the method comprises the steps: determining the upper limit of the data volume displayed by a single page of a shopping cart page, and obtaining the to-be-rendered total data volume of the shopping cart page; the shopping cart page is loaded circularly according to the following steps until the total to-be-rendered data volume of the shopping cart page after circulation is not larger than 0, and circulation is terminated: the single-page data volume is configured according to the total to-be-rendered data volume of the shopping cart page and the upper limit of the data volume displayed in the single page; a callback function is executed before the redrawing period loaded by the shopping cart, and the callback function comprises document fragments and is used for delaying creation and filling operation of the document fragments to be executed before the next redrawing period; and subtracting the single-page data volume from the to-be-rendered total data volume of the shopping cart page to obtain a new to-be-rendered total data volume of the shopping cart page. The loading performance of the shopping cart can be improved, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to a method and apparatus for loading shopping cart time-segmented data. Background Technology

[0002] Shopping carts typically don't require pagination requests, and the returned data often involves nested data structures and includes various combinations of images and text. The large volume of data, rendered simultaneously, consumes significant time in rendering and layout calculations, easily leading to performance issues, poor user experience, and increased maintenance costs. Common solutions often employ scroll event calculations or timers to check scrolling and load new data. However, these methods not only increase the complexity of the page code but also easily cause mobile compatibility issues and poor user experience. Summary of the Invention

[0003] This invention provides a shopping cart time-segmented loading method to improve shopping cart loading performance and enhance user experience. The method includes:

[0004] Determine the maximum amount of data to be displayed on a single page of the shopping cart page, and obtain the total amount of data to be rendered on the shopping cart page;

[0005] The shopping cart page will be loaded in a loop following these steps, until the total amount of data to be rendered on the shopping cart page is no greater than 0 after the loop, at which point the loop will terminate:

[0006] Configure the single-page data volume based on the total amount of data to be rendered on the shopping cart page and the maximum amount of data to be displayed per page;

[0007] A callback function is executed before the redraw cycle when the shopping cart is loaded. The callback function contains a document fragment, which is used to delay the creation and filling of the document fragment until before the next redraw cycle. The document fragment contains multiple list elements created in a loop based on the value of the single page data volume.

[0008] The total amount of data to be rendered on the new shopping cart page is calculated by subtracting the amount of data per page from the total amount of data to be rendered on the shopping cart page.

[0009] This invention also provides a shopping cart time-segmented loading device to improve shopping cart loading performance and enhance user experience. The device includes:

[0010] The data volume acquisition module is used to determine the upper limit of the data volume displayed on a single page of the shopping cart page and to obtain the total data volume to be rendered on the shopping cart page.

[0011] The loop loading module loads the shopping cart page in a loop according to the following steps, terminating the loop when the total amount of data to be rendered on the shopping cart page is no greater than 0:

[0012] Configure the single-page data volume based on the total amount of data to be rendered on the shopping cart page and the maximum amount of data to be displayed per page;

[0013] A callback function is executed before the redraw cycle when the shopping cart is loaded. The callback function contains a document fragment, which is used to delay the creation and filling of the document fragment until the next redraw cycle. The document fragment contains multiple list elements created in a loop based on the value of the single page data volume.

[0014] The total amount of data to be rendered on the new shopping cart page is calculated by subtracting the amount of data per page from the total amount of data to be rendered on the shopping cart page.

[0015] This invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the above-described shopping cart time-slice loading method.

[0016] This invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described shopping cart time-slicing loading method.

[0017] This invention also provides a computer program product, which includes a computer program that, when executed by a processor, implements the above-described shopping cart time-slicing loading method.

[0018] In this embodiment of the invention, the upper limit of the data volume displayed on a single page of the shopping cart page is determined, and the total data volume to be rendered on the shopping cart page is obtained. The shopping cart page is loaded in a loop according to the following steps until the total data volume to be rendered on the shopping cart page is not greater than 0 after the loop, at which point the loop terminates: The data volume per page is configured based on the total data volume to be rendered on the shopping cart page and the upper limit of the data volume displayed on a single page; a callback function is executed before the repaint cycle of the shopping cart loading, the callback function containing a document fragment, used to delay the creation and filling operations of the document fragment until before the next repaint cycle, the document fragment containing multiple list elements created in a loop based on the value of the data volume per page; the total data volume to be rendered on the shopping cart page is subtracted from the data volume per page to obtain the new total data volume to be rendered on the shopping cart page. By looping and loading in batches, it is ensured that only a portion of the data is processed before each repaint, reducing hardware requirements. Using document fragments reduces the number of operations on the DOM tree, preventing page reflow, improving shopping cart loading performance, and enhancing user experience. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. In the drawings:

[0020] Figure 1 This is a flowchart of the shopping cart time-segmented loading method provided in this embodiment of the invention;

[0021] Figure 2 This is a flowchart illustrating the cyclic loading of the shopping cart page provided in an embodiment of the present invention;

[0022] Figure 3 This is a schematic diagram of the shopping cart time-segmentation loading device provided in an embodiment of the present invention;

[0023] Figure 4 This is another schematic diagram of the shopping cart time-segmentation loading device provided in an embodiment of the present invention;

[0024] Figure 5 This is a structural block diagram of a computer device provided in an embodiment of the present invention. Detailed Implementation

[0025] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings. Here, the illustrative embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.

[0026] In this document, the term "and / or" merely describes a relationship, indicating that three relationships can exist. For example, A and / or B can represent three cases: A alone, A and B simultaneously, and B alone. Furthermore, the term "at least one" in this document means any combination of at least two of any one or more elements. For example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C.

[0027] In the description of this specification, the terms "comprising," "including," "having," and "containing" are open-ended terms, meaning that they include but are not limited to. The terms "an embodiment," "a specific embodiment," "some embodiments," and "for example," etc., refer to specific features, structures, or characteristics described in connection with that embodiment or example that are included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, or characteristics described can be combined in any suitable manner in one or more embodiments or examples. The order of steps involved in the various embodiments is used to illustrate the implementation of this application, and the order of steps is not limited and can be adjusted appropriately as needed.

[0028] This invention provides a method for loading shopping cart data in time slices. Figure 1 A flowchart of the shopping cart time-sliced ​​loading method, such as... Figure 1 As shown, it includes:

[0029] Step 101: Determine the maximum amount of data to be displayed on a single page of the shopping cart page, and obtain the total amount of data to be rendered on the shopping cart page;

[0030] Step 102: Load the shopping cart page in a loop according to the following steps until the total amount of data to be rendered on the shopping cart page is no greater than 0 after the loop, then terminate the loop:

[0031] Configure the single-page data volume based on the total amount of data to be rendered on the shopping cart page and the maximum amount of data to be displayed per page;

[0032] A callback function is executed before the redraw cycle when the shopping cart is loaded. The callback function contains a document fragment, which is used to delay the creation and filling of the document fragment until the next redraw cycle. The document fragment contains multiple list elements created in a loop based on the value of the single page data volume.

[0033] The total amount of data to be rendered on the new shopping cart page is calculated by subtracting the amount of data per page from the total amount of data to be rendered on the shopping cart page.

[0034] The shopping cart time-slicing loading method proposed in this invention can be applied to various types of websites, mobile devices, and mini-programs, especially in application scenarios that require displaying mixed data such as images and text. The time-slicing loading function of this invention can improve user loading speed and enhance user experience. Furthermore, with the increasing popularity of e-commerce and social mini-programs and the growing user base, the application scenarios of this invention are becoming increasingly diversified. Using this invention in various usage scenarios, it can easily adapt to different data volumes and page layout requirements, rendering data in batches. This avoids performance degradation or page lag caused by the browser processing a large amount of data at once. Only a portion of the data is processed before each redraw, achieving a smooth rendering effect. In summary, this invention has a very wide range of applications and can be applied to applications that load large amounts of data. Because it processes only a small portion of the data at a time, it reduces memory requirements, which is particularly important for applications running in resource-constrained environments. This makes the system feel more responsive and improves the user experience.

[0035] The specific implementation includes the following steps:

[0036] 1. Create and declare the variable once to represent the maximum number of data items displayed per page, and declare the function loopRender. This function has two parameters: curTotal and curIndex.

[0037] curTotal represents the total amount of data to be rendered, and curIndex is the current index.

[0038] 2. Add a conditional check to the `loopRender` function. If `curTotal` is less than or equal to 0, the function returns immediately without performing any operation. Calculate the amount of data per page and declare a variable `pageCount`. This variable is assigned the smaller value between `curTotal` and `once`.

[0039] 3. Using window.requestAnimationFrame for frame animation ensures that the callback function is executed before redrawing. Document fragments are created and populated by creating list elements and adding them to the document fragments via a loop.

[0040] 4. The function recursively calls itself. During each recursion, curTotal decreases the pageCount and curIndex increases the pageCount. Finally, loopRender(1000,0) is called to start the entire process.

[0041] In one embodiment, the data volume per page is configured based on the total amount of data to be rendered on the shopping cart page and the maximum amount of data that can be displayed per page, including:

[0042] The smaller of the total amount of data to be rendered on the shopping cart page and the maximum amount of data that can be displayed on a single page is used as the data volume per page.

[0043] In one specific embodiment, a variable once is created and declared, and once is assigned the value 20, indicating that a maximum of 20 data items will be displayed per page. A function loopRender is created and declared. This function has two required parameters, curTotal and curIndex. curTotal represents the total amount of data to be rendered, and curIndex is the current index.

[0044] Add a conditional check inside the loopRender function. First, check if urTotal is less than or equal to 0. If it is, the function returns directly without performing any operation: if(curTotal<=0) return.

[0045] To calculate the maximum number of data items displayed per page, declare a variable `pageCount` and set `let pageCount = Math.min(curTotal, once)`. This variable is assigned the smaller of `curTotal` and `once`. This means that if the number of data items is less than 20, all data items will be displayed per page; otherwise, a maximum of 20 data items will be displayed per page.

[0046] Figure 2 This is a flowchart of the loop loading of the shopping cart page provided in an embodiment of the present invention, such as... Figure 2 As shown, in this embodiment of the invention, the process of cyclically loading the shopping cart page includes:

[0047] Step 201: Create a loop loading function, and configure the total amount of data to be rendered and the index in the loop loading function. The loop loading function is used to control the shopping cart page to complete the loop loading.

[0048] Step 202: Control the number of loops in the loop loading function based on the total amount of data to be rendered and the index.

[0049] In one specific embodiment, the window.requestAnimationFrame function is used to request animation frames. window.requestAnimationFrame(_=>{write the calling code here}) will cause the browser to call the provided callback function before the next repaint, thereby achieving a smooth animation effect.

[0050] Create and populate document fragments by creating list elements and adding them to the document fragments in a loop. `let fragment = document.createDocumentFragment(), fragment.appendChild(list elements)`

[0051] This invention uses time-sliced ​​loading technology and adopts the idea of ​​front-end pagination to render large amounts of data. Data is added in batches through recursion and frame animation. Using requestAnimationFrame can ensure that the browser processes only a portion of the data before each repaint. Processing only a small portion of the data at a time reduces the memory requirements, making it very suitable for running in resource-constrained environments.

[0052] This invention utilizes recursion and document fragments (documentFragments). The recursive algorithm allows for the implementation of complex data rendering logic with relatively concise code, naturally expressing the idea of ​​"doing a part of the work, then repeating the process until completion." Using document fragments allows the DOM structure to be built in memory without immediately inserting it into the actual document. This reduces the number of direct operations on the DOM tree, avoids page reflows, and reduces page complexity and maintenance costs. It also solves problems such as mobile compatibility issues and poor user experience.

[0053] In one embodiment, it further includes:

[0054] In each loop, the index value is increased by the amount of data per page to obtain the new index value.

[0055] In one specific embodiment, the function recursively calls itself, loopRender(curTotal-pageCount,curIndex+pageCount). During each recursion, curTotal decreases by the number of pageCounts and curIndex increases by the number of pageCounts. If 1000 data items are to be rendered, curTotal is assigned the value 1000 and curIndex is assigned the value 0. Finally, loopRender(1000,0) is called to start the entire process.

[0056] For example, during a promotional event on an e-commerce platform, the number of items in users' shopping carts surged, with some active users having over 200 items in their carts. Under traditional rendering methods, this resulted in significant performance issues during page loading.

[0057] Specific problem manifestations:

[0058] • Page loading time exceeding 8 seconds causes user anxiety while waiting;

[0059] • Scrolling is choppy, and the frame rate drops below 10fps;

[0060] • Memory usage increased sharply, causing crashes on low-end devices;

[0061] Delayed user interaction response negatively impacts purchase conversion rates.

[0062] To load the shopping cart, follow the method described above:

[0063] Step 1: Determine rendering parameters:

[0064] The system first analyzes the current device's rendering capabilities using a performance testing module, determining that the maximum amount of data displayed per page is 20 items. Simultaneously, it retrieves the total amount of data to be rendered from the shopping cart service interface, which is 187 items.

[0065] Step 2: Initialize the rendering loop:

[0066] The system initiates the pagination rendering mechanism, with the initial state as follows:

[0067] • Remaining data to be rendered: 187 items

[0068] • Maximum number of items per page: 20

[0069] Current page number: 0

[0070] Step 3: First round of rendering execution:

[0071] Calculation phase:

[0072] Take the minimum value (187, 20) = 20, and determine that 20 products will be displayed on the homepage.

[0073] Rendering preparation stage:

[0074] Before the browser repaint cycle arrives, the system creates a DocumentFragment. This is a lightweight container for DOM nodes and does not trigger an actual reflow or repaint.

[0075] Data population stage:

[0076] Create 20 shopping cart item elements in a loop within the document snippet:

[0077] • Product image placeholder (lazy loading)

[0078] Product name and specifications

[0079] Price display area

[0080] Quantity selector

[0081] • Delete operation button

[0082] DOM manipulation phase:

[0083] Before the next redraw cycle, insert the complete document fragment into the cart container all at once, triggering only one reflow.

[0084] Status update phase:

[0085] Update remaining data: 187 - 20 = 167 items;

[0086] Step 4: Continuous Loop Rendering:

[0087] The system continues the rendering loop, processing 20 items per round:

[0088] Round Two:

[0089] Render 20 items

[0090] • Remaining data volume: 167 - 20 = 147 items

[0091] Users can now browse and interact with the first 40 items.

[0092] Rounds 3 through 9:

[0093] Rendering continues at a rate of 20 items per page, providing a smooth, progressive loading experience for the user. During this period:

[0094] The page remains interactive at all times.

[0095] • Scrolling of the rendered portion is smooth.

[0096] Memory usage increased steadily.

[0097] Step 5: Final round and cycle termination;

[0098] Round 10:

[0099] Remaining data volume: 187 - (9 × 20) = 7 items

[0100] • The minimum number of data items per page is (7, 20) = 7 items.

[0101] ·Render the last 7 items

[0102] Loop termination:

[0103] Remaining data: 7 - 7 = 0 items

[0104] The rendering loop ends when the termination condition is met (the total amount to be rendered is not greater than 0).

[0105] Based on the batch rendering mechanism of redraw cycle and document fragments, the system successfully solved the performance bottleneck problem in big data scenarios, and significantly improved the user experience while ensuring the integrity of functions.

[0106] This invention also provides a shopping cart time-segmented loading device, as described in the following embodiments. Since the principle by which this device solves the problem is similar to the shopping cart time-segmented loading method, the implementation of this device can refer to the implementation of the shopping cart time-segmented loading method; repeated details will not be elaborated further.

[0107] Figure 3 This is a schematic diagram of the shopping cart time-segmented loading device provided in an embodiment of the present invention, as shown below. Figure 3 As shown, the device includes:

[0108] The data acquisition module 301 is used to determine the upper limit of the data volume displayed on a single page of the shopping cart page and to obtain the total data volume to be rendered on the shopping cart page.

[0109] The loop loading module 302 is used to load the shopping cart page in a loop according to the following steps, until the total amount of data to be rendered on the shopping cart page is not greater than 0 after the loop, at which point the loop terminates:

[0110] Configure the single-page data volume based on the total amount of data to be rendered on the shopping cart page and the maximum amount of data to be displayed per page;

[0111] A callback function is executed before the redraw cycle when the shopping cart is loaded. The callback function contains a document fragment, which is used to delay the creation and filling of the document fragment until the next redraw cycle. The document fragment contains multiple list elements created in a loop based on the value of the single page data volume.

[0112] The total amount of data to be rendered on the new shopping cart page is calculated by subtracting the amount of data per page from the total amount of data to be rendered on the shopping cart page.

[0113] In one embodiment, the single-page data volume configuration module 301 is specifically used for:

[0114] The smaller of the total amount of data to be rendered on the shopping cart page and the maximum amount of data that can be displayed on a single page is used as the data volume per page.

[0115] In one embodiment, the loop loading module 302 is specifically used for:

[0116] Create a loop loading function, and configure the total amount of data to be rendered and the index in the loop loading function;

[0117] The number of iterations in the loop loading function is controlled based on the total amount of data to be rendered and the index.

[0118] Figure 4This is another schematic diagram of the shopping cart time-segmented loading device provided in an embodiment of the present invention, as shown below. Figure 4 As shown, the device also includes an index update module 401, specifically used for:

[0119] In each loop, the index value is increased by the amount of data per page to obtain the new index value.

[0120] Based on the aforementioned inventive concept, such as Figure 5 As shown, the present invention also proposes a computer device 500, including a memory 510, a processor 520, and a computer program 530 stored in the memory 510 and executable on the processor 520. When the processor 520 executes the computer program 530, it implements the aforementioned shopping cart time-slicing loading method.

[0121] This invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described shopping cart time-slicing loading method.

[0122] This invention also provides a computer program product, which includes a computer program that, when executed by a processor, implements the above-described shopping cart time-slicing loading method.

[0123] In summary, in this embodiment of the invention, the upper limit of the data volume displayed on a single page of the shopping cart page is determined, and the total data volume to be rendered on the shopping cart page is obtained. The shopping cart page is loaded in a loop according to the following steps until the total data volume to be rendered on the shopping cart page after the loop is not greater than 0, at which point the loop terminates: The single-page data volume is configured based on the total data volume to be rendered on the shopping cart page and the upper limit of the data volume displayed on a single page; a callback function is executed before the repaint cycle of the shopping cart loading, the callback function containing a document fragment, used to delay the creation and filling operations of the document fragment until before the next repaint cycle, the document fragment containing multiple list elements created in a loop based on the value of the single-page data volume; the total data volume to be rendered on the shopping cart page is subtracted from the single-page data volume to obtain the new total data volume to be rendered on the shopping cart page. By looping and loading in batches, it is ensured that only a portion of the data is processed before each repaint, reducing hardware requirements. Using document fragments reduces the number of operations on the DOM tree, preventing page reflow, improving shopping cart loading performance, and enhancing user experience.

[0124] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can 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, etc.) containing computer-usable program code.

[0125] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can 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, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0126] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0127] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0128] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A shopping cart time-segmented loading method, characterized in that, include: Determine the maximum amount of data to be displayed on a single page of the shopping cart page, and obtain the total amount of data to be rendered on the shopping cart page; The shopping cart page will be loaded in a loop following these steps, until the total amount of data to be rendered on the shopping cart page is no greater than 0 after the loop, at which point the loop will terminate: Configure the single-page data volume based on the total amount of data to be rendered on the shopping cart page and the maximum amount of data to be displayed per page; A callback function is executed before the shopping cart loading redraw cycle arrives. The callback function contains a document fragment, which is used to delay the creation and filling of the document fragment until the next redraw cycle arrives. The document fragment contains multiple list elements created in a loop based on the value of the single page data volume. The total amount of data to be rendered on the new shopping cart page is calculated by subtracting the amount of data per page from the total amount of data to be rendered on the shopping cart page.

2. The method as described in claim 1, characterized in that, Configure the data volume per page based on the total amount of data to be rendered on the shopping cart page and the maximum amount of data that can be displayed per page, including: The smaller of the total amount of data to be rendered on the shopping cart page and the maximum amount of data that can be displayed on a single page is used as the data volume per page.

3. The method as described in claim 1, characterized in that, Loop through the shopping cart page, including: Create a loop loading function, and configure the total amount of data to be rendered and the index in the loop loading function. The loop loading function is used to control the shopping cart page to complete the loop loading. The number of iterations in the loop loading function is controlled based on the total amount of data to be rendered and the index.

4. The method as described in claim 3, characterized in that, Also includes: In each loop, the index value is increased by the amount of data per page to obtain the new index value.

5. A shopping cart time-segmented loading device, characterized in that, include: The data volume acquisition module is used to determine the upper limit of the data volume displayed on a single page of the shopping cart page and to obtain the total data volume to be rendered on the shopping cart page. The loop loading module loads the shopping cart page in a loop according to the following steps, terminating the loop when the total amount of data to be rendered on the shopping cart page is no greater than 0: Configure the single-page data volume based on the total amount of data to be rendered on the shopping cart page and the maximum amount of data to be displayed per page; A callback function is executed before the redraw cycle when the shopping cart is loaded. The callback function contains a document fragment, which is used to delay the creation and filling of the document fragment until before the next redraw cycle. The document fragment contains multiple list elements created in a loop based on the value of the single page data volume. The total amount of data to be rendered on the new shopping cart page is calculated by subtracting the amount of data per page from the total amount of data to be rendered on the shopping cart page.

6. The apparatus as claimed in claim 5, characterized in that, The single-page data volume configuration module is specifically used for: The smaller of the total amount of data to be rendered on the shopping cart page and the maximum amount of data that can be displayed on a single page is used as the data volume per page.

7. The apparatus as claimed in claim 5, characterized in that, The loop loading module is specifically used for: Create a loop loading function, and configure the total amount of data to be rendered and the index in the loop loading function; The number of iterations in the loop loading function is controlled based on the total amount of data to be rendered and the index.

8. The apparatus as claimed in claim 7, characterized in that, It also includes an index update module, which is specifically used for: In each loop, the index value is increased by the amount of data per page to obtain the new index value.

9. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method of any one of claims 1 to 4.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method of any one of claims 1 to 4.

11. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the method of any one of claims 1 to 4.