A method, system, device, medium and electronic equipment for completing a list after deleting a paging list
By immediately removing data items from the local cache and calculating the target offset position to obtain the completion data after receiving a user's deletion operation in the paginated list, the problems of visual blanks and resource waste in the prior art are solved, achieving efficient and continuous list completion and improving the user interaction experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHEXIAOZHI (BEIJING) TECHNOLOGY CO LTD
- Filing Date
- 2026-01-20
- Publication Date
- 2026-05-29
AI Technical Summary
Existing technologies result in visual blanks, low interaction efficiency, broken data continuity, wasted network resources, and a lack of context-aware intelligent triggering mechanisms after deletion from a paginated list, which is particularly evident in mobile applications.
By receiving user deletion operations, the target data item is immediately removed from the local cache, and when the completion trigger condition is met, the target offset position is calculated, and a pagination query request is sent to the server to obtain the completion data, ensuring the continuity and efficiency of the list.
It achieves list completion with no visual blanks and low latency, saves network resources, improves the interactive experience, maintains data continuity and consistency, and conforms to user habits.
Smart Images

Figure CN122111286A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of computer software and human-computer interaction technology, and particularly relates to a method, system, device, medium and electronic device for completing a paginated list after deletion. Background Technology
[0002] In existing mobile applications, when a user deletes an item from a paginated list, the following problem exists:
[0003] Firstly, existing technologies often result in incomplete list display, creating visual blank areas. This occurs because existing solutions typically only remove an item from the local list after deletion, without actively adding new data. If the number of remaining items on the current page is less than the preset number to display per page (e.g., 10 items per page, only 9 remain after deletion), the interface will display blank areas. This incomplete page display disrupts the visual continuity of the list, giving users the illusion of "missing data" or "loading errors," thus reducing the user experience.
[0004] Secondly, existing technologies rely on manual user refresh, resulting in low interaction efficiency. To restore the complete list, current technologies require users to actively pull down to refresh or re-enter the page to trigger a full data reload. This not only increases the cognitive burden and operational steps for users but also violates the modern interaction design principle of "minimal operation." In high-frequency deletion scenarios (such as batch file cleanup), repeated refreshes significantly reduce operational efficiency.
[0005] Third, existing technologies suffer from data continuity breaks and weak context awareness. The essence of paginated lists is to display a logically continuous dataset sequentially. The current technology's mechanism of not filling in deleted items creates artificial gaps between the current page and the next. For example, page 2 should display items 11-20; after deleting item 15, only 9 items are displayed, and item 21 is not connected, making it impossible for users to intuitively perceive that "there is more content to follow," affecting browsing continuity and information completeness.
[0006] Fourth, existing technologies result in significant waste of network and server resources. While some improvement solutions attempt to address this issue by "reloading the entire page after deletion," this approach has obvious drawbacks: redundant data transmission: even if only one item is deleted, the entire page (e.g., 10 items) of data must be requested again, with 9 of them being duplicates; ineffective computational overhead: the server needs to repeatedly perform pagination queries, sorting, serialization, and other operations; increased bandwidth and power consumption: this is particularly detrimental to mobile users and violates the principles of green computing.
[0007] Fifth, existing technologies lack context-aware intelligent triggering mechanisms. Existing technologies employ a "one-size-fits-all" strategy: either never complete the function or reload it unconditionally. They fail to differentiate based on page hierarchy, data structure, or user intent. For example, the completion requirements after deletion may differ between the root directory and subfolders, but existing technologies do not differentiate between these, leading to unnecessary network requests or missed completions in critical scenarios. Summary of the Invention
[0008] In view of this, in order to overcome the shortcomings of the prior art, the purpose of the embodiments of the present invention is to provide a method, system, device, medium and electronic device for completing a paginated list after deletion.
[0009] In a first aspect, embodiments of the present invention provide a method for completing a paginated list after deletion, comprising:
[0010] Receive user requests to delete target data items in the current pagination list;
[0011] Send a deletion instruction to the server for the target data item, and remove the target data item from the locally cached list data;
[0012] The system retrieves the number of locally cached list data entries after deletion, determines whether the current page number meets the completion trigger condition, wherein the completion trigger condition includes: the number of locally cached list data entries after deletion plus 1 is less than the total number of list data entries on the server; in response to meeting the completion trigger condition, the system calculates the target offset position, and sends a pagination query request to the server based on the target offset position to determine the complete data;
[0013] Receive the completed data returned by the server and append the completed data to the end of the local list to complete the list.
[0014] Further, the calculation of the target offset position and the sending of a pagination query request to the server based on the target offset position to determine the complete data include:
[0015] Get the current page number and the number of items displayed per page. The target offset position is equal to the current page number multiplied by the number of items displayed per page.
[0016] A pagination query request is sent to the server based on the target offset position to determine the data completion.
[0017] Furthermore, sending a pagination query request to the server based on the target offset position to determine the complete data includes:
[0018] Retrieve the sorting rules, project identifier, parent identifier, and target offset position consistent with the current context;
[0019] Send a pagination query request to the server with the sorting rules consistent with the current context, item identifier, parent identifier, and target offset to determine the data completion.
[0020] Furthermore, the sorting rules include ascending order by node type, node name, and unique identifier to ensure that the completed data maintains sorting consistency with the original list.
[0021] Furthermore, the removal of the target data item from the locally cached list data adopts an optimistic update strategy, wherein the optimistic update strategy updates the interface before waiting for final confirmation from the server, and rolls back the local data if the subsequent deletion fails.
[0022] Furthermore, sending a pagination query request to the server based on the target offset position to determine the complete data includes:
[0023] Retrieve the sorting rules and target offset position consistent with the current context;
[0024] Send a pagination query request to the server with the sorting rules consistent with the current context and the target offset position to determine the data completion.
[0025] Secondly, embodiments of the present invention provide an interactive system, including:
[0026] The server is configured to receive deletion requests from clients, parse the target data item identifier carried in the deletion request, delete the corresponding record from the database, and return a deletion success response; the server is also configured to receive pagination query requests sent by clients, parse the target offset position and sorting rules in the pagination query request, retrieve the corresponding data record from the database, sort it according to the specified sorting rules, and return a record as supplementary data.
[0027] The client, which is a WeChat mini program, performs data interaction with the server by executing the method as described in any one of claims 1-6.
[0028] Thirdly, embodiments of the present invention provide an apparatus for completing a paginated list after deletion, comprising:
[0029] The user interaction module is used to capture user deletion operations on list items;
[0030] The network communication module is used to send deletion commands and pagination completion query requests to the server;
[0031] The autocomplete decision module is used to determine whether to trigger autocomplete based on the current page context and the list length.
[0032] The local data management module is used to maintain the cache of list data on the current page and to execute optimistic update strategies and data appending.
[0033] The UI rendering module is used to refresh the user interface in real time based on updated local data.
[0034] Fourthly, embodiments of the present invention provide a storage medium, comprising: computer program instructions for storing computer program instructions that, when executed by a processor, implement the method described in any of the preceding embodiments.
[0035] Fifthly, embodiments of the present invention provide an electronic device, including a memory and a processor, characterized in that the memory is used to store one or more computer program instructions, wherein the one or more computer program instructions are executed by the processor to describe the method described in any of the preceding embodiments.
[0036] The technical solution of this invention receives a user's request to delete a target data item in the current pagination list; sends a deletion instruction to the server for the target data item, removing the target data item from the locally cached list data; obtains the number of locally cached list data items after deletion, and determines whether the current page number meets the completion trigger condition, wherein the completion trigger condition includes: the number of locally cached list data items after deletion plus 1 is less than the total number of list data items on the server; in response to meeting the completion trigger condition, calculates the target offset position, sends a pagination query request to the server based on the target offset position to determine the completion data; receives the completion data returned by the server, and appends the completion data to the end of the local list to complete the list. Because this invention requests completion data from the server after the user deletes the item and appends the completion data to the end of the local list, no blank areas appear on the interface, preventing the user from visually experiencing "missing data" or "loading errors." This invention sends a deletion command for the target data item to the server. This operation does not wait for the server to return a success message, nor does it refresh the page and cause a reload of all data. Instead, it immediately removes the target data item from the locally cached list data, which is more in line with user interaction habits. This invention also avoids redirecting back to the homepage due to a reload of all data. The technique of immediately removing the target data item from the locally cached list data without loading all data effectively saves server resources. Therefore, the technical solution of this invention saves bandwidth and provides a better user experience. Attached Figure Description
[0037] The above and other objects, features and advantages of the present invention will become clearer from the following description of embodiments of the invention with reference to the accompanying drawings, in which:
[0038] Figure 1This is a schematic diagram of the interactive system according to an embodiment of the present invention;
[0039] Figure 2 This is a schematic diagram of a list of optional embodiments of the present invention;
[0040] Figure 3 This is a schematic diagram of a list of items for another optional embodiment of the present invention;
[0041] Figure 4 This is a flowchart of a method for completing a paginated list after deletion, according to an embodiment of the present invention;
[0042] Figure 5 This is a structural diagram of a device for completing a paginated list after deletion, according to an embodiment of the present invention.
[0043] Figure 6 This is a schematic diagram of an electronic device according to an embodiment of the present invention. Detailed Implementation
[0044] The present invention is described below based on embodiments, but the invention is not limited to these embodiments. In the detailed description of the invention below, certain specific details are described in detail. Those skilled in the art will fully understand the invention even without these details. To avoid obscuring the essence of the invention, well-known methods, processes, flows, elements, and circuits are not described in detail.
[0045] Furthermore, those skilled in the art should understand that the accompanying drawings provided herein are for illustrative purposes only and are not necessarily drawn to scale.
[0046] Unless the context explicitly requires it, words such as "including" or "contains" in the instruction manual should be interpreted as including rather than exclusive or exhaustive; that is, meaning "including but not limited to".
[0047] In the description of this invention, it should be understood that the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. Furthermore, in the description of this invention, unless otherwise stated, "a plurality of" means two or more.
[0048] Example 1
[0049] Figure 1 This is a schematic diagram of the interactive system according to an embodiment of the present invention.
[0050] Reference Figure 1 The interactive system of the present invention includes a client 10 and a server 20. In the WeChat mini-program on the client 10, the user triggers a deletion operation.
[0051] The list items of this invention include images, videos, etc., and can also be any data. See the attached diagram for a detailed illustration of the list items of this invention. Figure 2 and Figure 3 .
[0052] Figure 2 This is a schematic diagram of a list of items for an optional embodiment of the present invention.
[0053] Figure 3 This is a schematic diagram of a list of items for another optional embodiment of the present invention.
[0054] Please refer to Figure 2 In one optional embodiment of the present invention, the list items include list item 1100, list item 1200, list item 1300, and list item 1400. Each list item includes any data or a combination of data. For example, list item 1100 includes text 1120 and a button 1110, etc.
[0055] Please refer to Figure 3 In another optional embodiment of the present invention, the list items include list item 1500 and list item 1600, etc. List item 1500 includes folder 1510, and list item 1610 includes an image named 1.jpeg.
[0056] Combination Figure 2 and Figure 3 The list items of this invention can be any data or any combination of data, and this invention does not limit them.
[0057] Users can long-press or tap a list item to bring up an operation menu and trigger the deletion operation.
[0058] Client 10 sends a deletion request to server 20. Server 20 receives the deletion request from the client, parses the target data item identifier carried in the deletion request, deletes the corresponding record from the database, and returns a deletion success response.
[0059] Client 10 uses an objective update strategy to update the local list. That is, the interface of client 10 of this invention immediately removes the deleted item without waiting for the server 20 to return a successful deletion response via the network.
[0060] Client 10 determines whether to trigger autocomplete in the list. If the triggering condition is met, it sends a pagination query request to the server. Server 20 receives the pagination query request sent by client 10.
[0061] In one specific implementation of the present invention, the server 20 parses the target offset position and sorting rules in the pagination query request, retrieves the corresponding data record from the database, sorts it according to the specified sorting rules, and returns a record as supplementary data.
[0062] In another specific implementation of the present invention, the server 20 parses the target offset position, item identifier, parent identifier and sorting rule in the pagination query request, retrieves the corresponding data record from the database, sorts it according to the specified sorting rule, and returns a record as supplementary data.
[0063] The difference between the two specific implementation methods mentioned above lies in whether or not it is necessary to parse the project identifier and parent identifier. Please refer to... Figure 2 ,exist Figure 2 In the list items shown, list items 1100-1400 do not have item identifiers or parent identifiers. Please refer to... Figure 3 , Figure 3 List items 1500 and 1600 shown are the list items displayed after the user clicks on a specific folder. Therefore, list items 1500 and 1600 will carry the item identifier and the parent identifier of the list item.
[0064] Client 10 performs the completion operation.
[0065] Figure 4 This is a flowchart of a method for completing a paginated list after deletion, according to an embodiment of the present invention.
[0066] See Figure 4 A method for completing a paginated list after deletion according to an embodiment of the present invention includes steps 100-500.
[0067] Step 100: Receive a user's request to delete a target data item in the current pagination list;
[0068] Step 200: Send a deletion instruction to the server for the target data item, and remove the target data item from the locally cached list data;
[0069] Step 300: Obtain the number of locally cached list data after deletion, and determine whether the current page number meets the completion trigger condition. The completion trigger condition includes: the number of locally cached list data after deletion plus 1 is less than the total number of list data on the server.
[0070] Step 400: In response to the fulfillment triggering condition, calculate the target offset position, and send a pagination query request to the server based on the target offset position to determine the completed data;
[0071] Step 500: Receive the completion data returned by the server and append the completion data to the end of the local list to complete the list.
[0072] Steps 100-500 are described in detail below.
[0073] Step 100: Receive the user's request to delete the target data item in the current pagination list; please refer to... Figure 1 In one application scenario, a user uploads several list items, which can be any data or combination of data, such as images, videos, and folders. When a user deletes a list item on the mobile device, in one specific implementation, the user long-presses a file, and the client of this invention pops up an operation menu. The client of this invention calls a listener event to listen for the user's deletion command and receives the metadata of the item to be deleted. The client of this invention closes the current operation pop-up window and displays a confirmation dialog box.
[0074] Step 200: Send a deletion instruction to the server for the target data item, and remove the target data item from the locally cached list data;
[0075] Specifically, when a user long-presses an item (e.g., a PDF file with the ID 'file_123') on the file list page, an operation menu pops up, and the user clicks "Delete". This invention invokes the delete command, passing the data object of the list item (i.e., metadata, ID: 'file_123') as context. After the user clicks "Confirm", the client immediately sends a delete request to the server through the encapsulated network request module. The client of this invention immediately removes the target data item from the locally cached list data. That is, in a preferred technical solution, removing the target data item from the locally cached list data adopts an optimistic update strategy, wherein the optimistic update strategy updates the interface before waiting for final server confirmation, and rolls back the local data if subsequent deletion fails.
[0076] Using the method in step 200 of this invention, the user instantly receives the deletion result on the interface displayed to the user, without any lag or loading delay.
[0077] Step 300: Obtain the number of locally cached list data after deletion, and determine whether the current page number meets the completion trigger condition. The completion trigger condition includes: the number of locally cached list data after deletion plus 1 is less than the total number of list data on the server.
[0078] For example: Each page of the list displays 10 items, totaling 35 data items. If a user deletes one item on page 2, the number of locally cached list items after deletion becomes 19. Increasing this number by 1 gives 20. Comparing 20 with the total number of list items on the server (34), the result is less than 34; therefore, the completion trigger condition is met. In other words, the completion trigger condition of this invention is:
[0079] After deletion, the number of locally cached list data + 1 is less than the total number of list data on the server.
[0080] This invention uses the example of 10 list items displayed per page and 35 data items in the total list on the server as an illustrative example. The actual number of items displayed per page and the total amount of data are not limited.
[0081] In this embodiment, after a user deletes a target data item from the list in a WeChat mini-program, the present invention detects that the number of locally cached list data after deletion is still less than the total number of list data on the server, triggering the completion condition.
[0082] The beneficial effects of using the completion trigger condition in step 300 of this invention are: it does not distinguish whether the deleted target data item is on the homepage or not. As long as the completion trigger condition provided by step 300 of this invention is met, the empty space on the current page will be automatically filled. In addition, as long as the trigger condition in step 300 is true, it means that there is still data to be added. Users frequently delete list content, and the method provided by this invention will continuously and automatically fill in the list. Therefore, the method of filling in the paginated list after deletion provided by this invention has better interactivity.
[0083] Step 400: In response to the fulfillment of the completion trigger condition, calculate the target offset position, and send a pagination query request to the server based on the target offset position to determine the completed data. In this invention, after a user deletes a target data item from the list in a WeChat mini-program, the client detects that the current page meets the auto-completion trigger condition and completes the list.
[0084] Step 400 includes two sub-steps, namely step 410 and step 420.
[0085] Step 410: Obtain the current page number and the number of items displayed per page. The target offset position (represented by the variable `targetOffset`) is equal to the current page number (represented by the variable `current`) multiplied by the number of items displayed per page (represented by the variable `size`). The client reads the following parameters from the current page data context:
[0086] current=2: indicates that the page has been loaded to page 2 (page numbering starts from 1);
[0087] size=10: This means that 10 records are displayed per page.
[0088] According to the formula:
[0089] Target offset position = current page number × number of items displayed per page
[0090] The calculation yields:
[0091] targetOffset = 2 × 10 = 20.
[0092] The target offset of 20 indicates that in the globally sorted dataset, the first 20 records (records 1-20) have been loaded. The current list only displays 19 records due to deletions, so the 20th record needs to be added to maintain continuity. Since the backend uses an offset-based pagination model, the `current` parameter here actually represents the starting offset; therefore, `targetOffset` is used as the `current` value for new requests.
[0093] Step 420: Send a pagination query request to the server based on the target offset position to determine the data to be completed.
[0094] In one specific implementation of the present invention, step 420 includes two sub-steps, namely step 421 and step 422. Please refer to... Figure 3 Users can access the current list by clicking folder_456. The current list includes list item 1500 and list item 1600, etc.
[0095] Step 421: Obtain the sorting rules, project identifier, parent identifier, and target offset position consistent with the current context;
[0096] The client extracts the following context parameters from the locally cached list data to ensure that the completion request is completely consistent with the original list loading logic:
[0097] The sorting rules (ascs) are: "node_type,node_name,id", which means that the node type is sorted in ascending order first (e.g., folders first), then in alphabetical order by name, and finally in ascending order by unique ID.
[0098] Project ID (projectId): "proj_789", derived from the metadata of the currently active project: this.data.archivesCurrent.id;
[0099] Parent identifier (parentId): "folder_456", which is the ID of the current subfolder (this.data.folderId);
[0100] Target offset position (current): 20 (calculated from step 410);
[0101] Request size: 1, only one record is needed for completion.
[0102] The beneficial effects of the technical solution of the present invention are: ensuring that the completed data is generated under the same filtering conditions and the same sorting strategy, avoiding data misalignment or duplication due to inconsistent context.
[0103] Step 422 involves sending a pagination query request to the server, along with the sorting rules consistent with the current context, item identifier, parent identifier, and target offset, to determine the completed data. In one specific implementation, the sorting rules include ascending order by node type, node name, and unique identifier to ensure that the completed data maintains sorting consistency with the original list.
[0104] In step 422, the server returns the data item located at the 20th position after strict sorting. Therefore, because the sorting rules are exactly the same as the initial loading, the completed item is precisely the next item that should naturally follow after the original list is deleted, achieving seamless and continuous display.
[0105] This invention locates the position of the data to be completed by accurately calculating the target offset position (current×size), ensures the logical coherence of data through strong context consistency (reuse of items, parent, and sorting rules), and significantly reduces network overhead by minimizing the request granularity (size=1).
[0106] In another specific implementation of the present invention, step 420 includes steps 423 and 424. Please refer to... Figure 2 The current list does not include parent identifiers or item identifiers.
[0107] Step 423: Obtain the sorting rules and target offset positions consistent with the current context. The difference between step 423 and step 421 is that step 423 obtains the sorting rules and target offset positions, but does not obtain the project identifier or parent identifier.
[0108] Step 424 involves sending a pagination query request to the server with the sorting rules consistent with the current context and the target offset position to determine the data completion. The difference between step 424 and step 422 is that the pagination query request sent to the server in step 424 does not include the item identifier or parent identifier.
[0109] In other words, when a list item has neither a parent nor an item identifier, steps 423 and 424 are used.
[0110] Step 500: Receive the completion data returned by the server and append the completion data to the end of the local list to complete the list.
[0111] In this embodiment, the client has successfully sent a pagination completion request to the server (as described in step 422) and is now in the waiting and processing response phase. The system performs the following operation to complete the automatic completion of the list: appending the completed data to the end of the local list.
[0112] After successful verification, the client calls the `setData` method of the mini-program framework to append the new data to the end of the current `collectList` array and simultaneously update the total number of records.
[0113] Data binding mechanism: collectList is a reactive data field declared in the Page instance, and its changes will automatically trigger in WXML. <view wx:for="{{collectList}}">Partial re-rendering of the list;
[0114] Visual effects: The original list displayed 9 items (after deletion), and immediately became 10 items after completion, with the completed data added at the end, without flickering or full page refresh;
[0115] State consistency: The total value is updated from its original value (e.g., 35) to 34 to ensure that the pagination control (e.g., "Total 34 items") is consistent with the actual data.
[0116] Therefore, the technical solution of this invention provides a low-latency, highly consistent, and seamless list completion method, solving problems such as "blank space after deletion" and "manual refresh required" in existing technologies. The technical solution of this invention also avoids the waste of network and computing resources caused by full-page reloading.
[0117] Example 2
[0118] Reference Figure 5 Based on the same inventive concept as the above embodiments, the present invention also provides an apparatus for completing a paginated list after deletion, comprising:
[0119] The user interaction module is used to capture user deletion operations on list items; the user interaction module is used to capture user deletion operations on any data item in the paginated list. In this embodiment, the module is implemented through the event binding mechanism of WeChat Mini Program: bind bind:tap or long press menu event to each list item in the WXML template; when the user clicks the "Delete" button and confirms, the module obtains the unique identifier of the operated item (such as id = "file_123") and the current page context (including folderId, projectId, current page number, etc.), and passes this information to the local data management module and the network communication module.
[0120] The network communication module is used to send deletion commands and pagination completion query requests to the server; the network communication module is used to send two types of requests to the server:
[0121] (1) Delete command: Call the / api / sworker-writer / archiveNode / remove interface via an HTTP POST request, carrying the target item ID;
[0122] (2) Page completion query request: When the completion conditions are met, construct a GET request containing current (target offset position), size=1, parentId, projectId and sorting rules, and call the interface.
[0123] The completion decision module obtains the number of locally cached list data after deletion and determines whether the current page number meets the completion trigger condition. The completion trigger condition includes: the number of locally cached list data after deletion plus 1 is less than the total number of list data on the server.
[0124] The local data management module is used to maintain the list data cache of the current page and execute optimistic update strategies and data appending; the local data management module is responsible for maintaining the list data cache of the current page and performing two key operations:
[0125] (1) Optimistic update strategy: Remove the target item from the local cache array collectList immediately to achieve real-time feedback on the interface;
[0126] (2) Data appending: After receiving the supplementary data, the new data item is appended to the end of the collectList through the concat() operation, and the total number of records is updated synchronously.
[0127] In addition, this module also supports rollback in case of failure: if the deletion request returns an error, the deleted target data item is restored.
[0128] The UI rendering module is used to refresh the user interface in real time based on updated local data. This UI rendering module is implemented using WeChat Mini Program's responsive data binding mechanism.
[0129] It monitors changes to the data in the collectList;
[0130] Once the local data management module updates the list or totals via setData(), the module automatically triggers the WXML...<viewwx:for="{{collectList}}"> Partial re-rendering of the list;
[0131] The user interface then displays the latest status after deletion or a full-page list after completion, without any flickering or page refresh.
[0132] Figure 6 This is a schematic diagram of an electronic device according to an embodiment of the present invention.
[0133] like Figure 6 The illustrated electronic device 4 includes a general hardware architecture, comprising at least a processor 41 and a memory 42. The processor 41 and memory 42 are connected via a bus 43. The memory 42 is adapted to store instructions or programs executable by the processor 41. The processor 41 may be a standalone microprocessor or a collection of one or more microprocessors. Thus, the processor 41 executes the instructions stored in the memory 42 to perform the method flow of the embodiments of the present invention as described above, thereby realizing data processing and control of other devices. The bus 43 connects the aforementioned components together, and also connects these components to a display controller 44, a display device, and an input / output (I / O) device 45. The input / output (I / O) device 45 may be a mouse, keyboard, modem, network interface, touch input device, motion-sensing input device, printer, and other devices known in the art. Typically, the input / output device 45 is connected to the system via an input / output (I / O) controller 46.
[0134] Those skilled in the art will understand that embodiments of this application can provide methods, apparatus (devices), or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-readable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0135] This application is described with reference to flowchart illustrations of methods, apparatus (devices), and computer program products according to embodiments of this application. It should be understood that each step in the flowchart can be implemented by computer program instructions.
[0136] These computer program instructions may 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 an instruction means, the implementation process of which is described in the instruction means. Figure 1 The function specified in one or more processes.
[0137] These computer program instructions may also be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing device, produce instructions for implementing processes. Figure 1 A device for a function specified in one or more processes.
[0138] Another embodiment of the present invention relates to a non-volatile readable storage medium for storing a computer-readable program for use by a computer to perform embodiments of some or all of the above methods.
[0139] That is, those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program specifying the relevant hardware. This program is stored in a readable storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods described in the embodiments of this application. The aforementioned readable storage medium includes various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0140] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. For those skilled in the art, the present invention can be modified and varied in various ways. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principle of the present invention should be included within the scope of protection of the present invention.< / view>
Claims
1. A method for completing a paginated list after deletion, characterized in that, The method includes: Receive user requests to delete target data items in the current pagination list; Send a deletion instruction to the server for the target data item, and remove the target data item from the locally cached list data; Get the number of locally cached list data after deletion, and determine whether the current page number meets the completion trigger condition. The completion trigger condition includes: the number of locally cached list data after deletion plus 1 is less than the total number of list data on the server. In response to the fulfillment triggering condition, the target offset position is calculated, and a pagination query request is sent to the server based on the target offset position to determine the completed data; Receive the completed data returned by the server and append the completed data to the end of the local list to complete the list.
2. The method for completing a paginated list after deletion according to claim 1, characterized in that, The calculation of the target offset position, and the sending of a pagination query request to the server based on the target offset position to determine the data completion, includes: Get the current page number and the number of items displayed per page. The target offset position is equal to the current page number multiplied by the number of items displayed per page. A pagination query request is sent to the server based on the target offset position to determine the data completion.
3. The method for completing a paginated list after deletion according to claim 2, characterized in that, The step of sending a pagination query request to the server based on the target offset position to determine the data completion includes: Retrieve the sorting rules, project identifier, parent identifier, and target offset position consistent with the current context; Send a pagination query request to the server with the sorting rules consistent with the current context, item identifier, parent identifier, and target offset to determine the data completion.
4. The method for completing a paginated list after deletion according to claim 3, characterized in that, The sorting rules include ascending order by node type, node name, and unique identifier to ensure that the completed data maintains the same sorting as the original list.
5. The method for completing a paginated list after deletion according to claim 1, characterized in that, The removal of the target data item from the locally cached list data adopts an optimistic update strategy, which updates the interface before waiting for final confirmation from the server, and rolls back the local data if the subsequent deletion fails.
6. A method for completing a paginated list after deletion according to claim 2, characterized in that, The step of sending a pagination query request to the server based on the target offset position to determine the data completion includes: Retrieve the sorting rules and target offset position consistent with the current context; Send a pagination query request to the server with the sorting rules consistent with the current context and the target offset position to determine the data completion.
7. An interactive system, characterized in that, include: The server is configured to receive deletion requests from clients, parse the target data item identifier carried in the deletion request, delete the corresponding record from the database, and return a deletion success response; the server is also configured to receive pagination query requests sent by clients, parse the target offset position and sorting rules in the pagination query request, retrieve the corresponding data record from the database, sort it according to the specified sorting rules, and return a record as supplementary data. The client, which is a WeChat mini program, performs data interaction with the server by executing the method as described in any one of claims 1-6.
8. An apparatus for completing a paginated list after deletion, characterized in that, include: The user interaction module is used to capture user deletion operations on list items; The network communication module is used to send deletion commands and pagination completion query requests to the server; The autocomplete decision module is used to determine whether to trigger autocomplete based on the current page context and the list length. The local data management module is used to maintain the cache of list data on the current page and to execute optimistic update strategies and data appending. The UI rendering module is used to refresh the user interface in real time based on updated local data.
9. A computer-readable storage medium for storing computer program instructions, characterized in that, The computer program instructions, when executed by a processor, implement the method as described in any one of claims 1-6.
10. An electronic device comprising a memory and a processor, characterized in that, The memory is used to store one or more computer program instructions, wherein the one or more computer program instructions are executed by the processor to implement the method as described in any one of claims 1-6.