Web form processing method and device oriented to original structure invariability

By listening to user interaction events in the table area, filtering, editing, and status rollback operations are identified and executed. These operations are processed only at the presentation layer, solving the problems of irreversibility and compatibility in existing web table systems. This enables flexible table operations and lowers the barrier to entry for non-technical users.

CN122154649APending Publication Date: 2026-06-05XIAN SECLOVER INFORMATION TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
XIAN SECLOVER INFORMATION TECH CO LTD
Filing Date
2026-01-16
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing web form systems have shortcomings in terms of operational reversibility, system compatibility, and user interaction convenience. In particular, they are difficult for non-technical users to control in a flexible, visual, and rollback manner.

Method used

By listening to user interaction events in the table area, filtering, editing, and state rollback operations are identified and executed. These operations are only processed in the presentation layer to avoid modifying the original table structure, and the operation history is managed using a state stack.

Benefits of technology

It enables support for multiple operation types without changing the table structure, lowering the barrier to entry for non-technical users and improving the flexibility and adaptability of table processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122154649A_ABST
    Figure CN122154649A_ABST
Patent Text Reader

Abstract

The application discloses a kind of original structure invariant web form processing method and device, the method includes listening to the user interaction event corresponding to form area, obtains current user operation, determines the operation type corresponding to current user operation, obtains the operation flow corresponding based on operation type, based on operation flow, the independent operation processing of current web form is carried out in display layer, and the web form after processing is obtained.This scheme is only to the independent operation processing of current web form in display layer, without modifying the original form structure, realizes the automatic identification of current user operation type and operation flow distribution;And can not modify back-end data or business logic, reduces the use threshold of non-technical user;At the same time, a variety of operation types can be implemented to operate and process current web form, improve the flexibility and adaptability of form processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and in particular to a method and apparatus for processing Web tables with unchanged original structure. Background Technology

[0002] With the continuous development of Web technologies, table components have become core components in Web applications for displaying and managing structured data, and are widely used in scenarios such as back-end management systems, data analysis platforms, business operation systems, low-code platforms, and visual reporting systems. In actual use, when browsing and processing large amounts of table data, users often need to filter, reverse filter, search and locate, modify content, and make multiple adjustments to quickly focus on target data or correct the displayed content.

[0003] Existing web form systems typically implement related operations based on front-end frameworks or back-end interfaces. For example, they might return filtered data via a back-end pagination interface or re-render the table component using a front-end state-driven mechanism.

[0004] However, while the above methods can achieve basic filtering and editing functions, they still have obvious shortcomings in terms of reversibility, system compatibility, and ease of user interaction. In particular, for non-technical users, it is difficult to perform flexible, visual, and rollback-enabled operation control on existing page tables without relying on code or console operations. Summary of the Invention

[0005] This application aims to at least solve the technical problems existing in the prior art. To this end, the first aspect of this application proposes a method for processing Web tables with unchanged original structure, the method comprising: Listen for user interaction events corresponding to the table area to obtain the current user operation; Determine the operation type corresponding to the current user's operation, and obtain the corresponding operation flow based on the operation type; wherein, the operation type includes at least one of the following: filter operation type, edit operation type, and status rollback operation type; Based on the operation process, the current Web table is processed independently at the presentation layer to obtain the processed Web table.

[0006] In one possible implementation, the operation type is a filtering operation type. Based on the operation flow, the current Web table is independently processed at the presentation layer to obtain a processed Web table, including: Iterate through all rows in the current web table and read the content of the current cell for each row. For each row's current cell content, repeatedly execute the following steps: if the current cell content meets the preset filter criteria, set the display attribute of the current row corresponding to the current cell content to "keep displayed"; if the current cell content does not meet the preset filter criteria, modify the display attribute of the current row corresponding to the current cell content to "hide". Repeat this process until the display attributes of all rows have been set. The preset filter criteria are determined based on the current user operation corresponding to the filter operation type.

[0007] In one possible implementation, the method further includes: For all rows in the current Web table, record the state information of each row's display attributes before processing, mark the filtering operation type for rows whose display attributes have been modified, and record it in the preset state stack.

[0008] In one possible implementation, the operation type is an edit operation type. Based on the operation flow, the current Web table is independently processed at the presentation layer to obtain a processed Web table, including: Retrieve each cell node in the current web table; For each cell node, record the pre-edit state of the cell node and then switch to the edit state; In edit mode, the system receives the target content input by the user, and after the user confirms the editing operation, the target content is written into the display layer corresponding to the cell node, resulting in the processed web table.

[0009] In one possible implementation, the method further includes: Generate an edit state snapshot; the edit state snapshot includes cell nodes, the original content corresponding to the cell nodes, and the target content; Mark the edit operation type for the edited cell node and record it in the preset state stack.

[0010] In one possible implementation, the operation type is a state rollback operation type, which includes progressive undo operation type and one-click restore operation type. Based on the operation flow, the current Web table is independently processed at the presentation layer to obtain the processed Web table, including: When the state rollback operation type is the gradual undo operation type, retrieve the most recent historical operation record from the preset state stack and determine the operation type corresponding to the historical operation record; If the operation type corresponding to the historical operation record is a filter operation type, then restore the display attributes of each row to the corresponding state information before processing, and obtain the processed Web table; If the operation type corresponding to the historical operation record is an edit operation, then restore the original content of the edited cell node to obtain the processed Web table.

[0011] In one possible implementation, the process of independently manipulating the current Web table at the presentation layer based on the operation flow to obtain a processed Web table further includes: When the state rollback operation type is a one-click restore operation type, the contents of the preset state stack are cleared, and all rows and all cell nodes in the Web table are restored according to the preset initial cache state corresponding to each row element in the Web table, resulting in the processed Web table.

[0012] A second aspect of this application proposes a Web form processing apparatus that preserves the original structure, the apparatus comprising: The acquisition module is used to listen for user interaction events corresponding to the table area and obtain the current user operation. The determination module is used to determine the operation type corresponding to the current user operation and obtain the corresponding operation flow based on the operation type; wherein, the operation type includes at least one of the following: filter operation type, edit operation type, and status rollback operation type; The processing module is used to perform independent operations on the current Web table in the presentation layer based on the operation process, and obtain the processed Web table.

[0013] In one possible implementation, the operation type is a filtering operation type, and the above-mentioned processing module is specifically used for: Based on the operational flow, the current Web table is processed independently at the presentation layer to obtain the processed Web table, including: Iterate through all rows in the current web table and read the content of the current cell for each row. For each row's current cell content, repeatedly execute the following steps: if the current cell content meets the preset filter criteria, set the display attribute of the current row corresponding to the current cell content to "keep displayed"; if the current cell content does not meet the preset filter criteria, modify the display attribute of the current row corresponding to the current cell content to "hide". Repeat this process until the display attributes of all rows have been set. The preset filter criteria are determined based on the current user operation corresponding to the filter operation type.

[0014] In one possible implementation, the above-described processing module is further configured to: For all rows in the current Web table, record the state information of each row's display attributes before processing, mark the filtering operation type for rows whose display attributes have been modified, and record it in the preset state stack.

[0015] In one possible implementation, the operation type is an editing operation type, and the above-mentioned processing module is further used for: Retrieve each cell node in the current web table; For each cell node, record the pre-edit state of the cell node and then switch to the edit state; In edit mode, the system receives the target content input by the user, and after the user confirms the editing operation, the target content is written into the display layer corresponding to the cell node, resulting in the processed web table.

[0016] In one possible implementation, the above-described processing module is further configured to: Generate an edit state snapshot; the edit state snapshot includes cell nodes, the original content corresponding to the cell nodes, and the target content; Mark the edit operation type for the edited cell node and record it in the preset state stack.

[0017] In one possible implementation, the operation type is a state rollback operation type, which includes a gradual undo operation type and a one-click restore operation type. The aforementioned processing module is further used for: When the state rollback operation type is the gradual undo operation type, retrieve the most recent historical operation record from the preset state stack and determine the operation type corresponding to the historical operation record; If the operation type corresponding to the historical operation record is a filter operation type, then restore the display attributes of each row to the corresponding state information before processing, and obtain the processed Web table; If the operation type corresponding to the historical operation record is an edit operation, then restore the original content of the edited cell node to obtain the processed Web table.

[0018] In one possible implementation, the above-described processing module is further configured to: When the state rollback operation type is a one-click restore operation type, the contents of the preset state stack are cleared, and all rows and all cell nodes in the Web table are restored according to the preset initial cache state corresponding to each row element in the Web table, resulting in the processed Web table.

[0019] A third aspect of this application provides an electronic device comprising a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set, or an instruction set, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to implement the Web table processing method for maintaining the original structure as described in the first aspect.

[0020] The fourth aspect of this application proposes a computer-readable storage medium storing at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the Web table processing method for maintaining the original structure as described in the first aspect.

[0021] The embodiments of this application have the following beneficial effects: This application provides a method for processing web tables with an unchanged original structure. The method includes: listening to user interaction events corresponding to a table area, obtaining the current user operation, determining the operation type corresponding to the current user operation, obtaining the corresponding operation flow based on the operation type, wherein the operation type includes at least one of filtering, editing, and status rollback operations, and performing independent operation processing on the current web table at the presentation layer based on the operation flow to obtain the processed web table. This solution achieves automatic identification of the current user operation type and operation flow distribution without modifying the original table structure by performing independent operation processing on the current web table only at the presentation layer; it also lowers the usage threshold for non-technical users by eliminating the need to modify backend data or business logic; and it can implement multiple operation types to process the current web table, improving the flexibility and adaptability of table processing. Attached Figure Description

[0022] Figure 1 A block diagram of a computer device provided in an embodiment of this application; Figure 2 A flowchart illustrating the steps of a Web table processing method that preserves the original structure, as provided in this application embodiment; Figure 3 A flowchart illustrating the steps of a screening operation provided in this application embodiment; Figure 4 A flowchart illustrating the steps of an editing operation provided in this application embodiment; Figure 5 A flowchart illustrating the steps of a gradual undo operation is provided in this application embodiment; Figure 6 This is a structural block diagram of a Web table processing device that maintains the original structure, as provided in an embodiment of this application. Detailed Implementation

[0023] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0024] Existing web form systems typically implement related operations based on front-end frameworks or back-end interfaces. For example, they might return filtered data via a back-end pagination interface or re-render the table component using a front-end state-driven mechanism. While these methods can achieve basic filtering and editing functions, they have the following main shortcomings: 1. Destructive filtering problem: Existing front-end filtering technologies usually achieve filtering effects by rebuilding the Document Object Model (DOM) and deleting or rearranging nodes, which destroys the original table structure and cannot guarantee the consistency of row order, event binding and style; among them, nodes are HyperText Markup Language (HTML) tags that represent table rows.

[0025] 2. Irreversible operation: Once filtering or content modification is performed, there is a lack of a unified status recording and caching mechanism, and users cannot restore the table to its initial state or perform multiple undo operations.

[0026] 3. Strong dependence on data source and business logic: Most filtering and editing functions must be deeply bound to the backend interface or frontend data model, making it difficult to directly embed into existing systems and resulting in high transformation costs.

[0027] 4. High editing threshold: Modifying table text usually relies on HTML editors, code configurations, or developer tools, which is not user-friendly for non-programmers.

[0028] 5. Lack of a unified behavior management mechanism: Filtering, deselection, editing and other operations are independent and cannot be managed in a unified manner, and cannot support multi-round combined operations and batch restoration.

[0029] 6. Insufficient universality and compatibility: Existing solutions are usually bound to specific frameworks or components, making it difficult to adapt to third-party tables or native HTML tables.

[0030] Based on this, this application proposes a method for processing Web tables while maintaining their original structure. This method includes: listening to user interaction events corresponding to a table area, obtaining the current user operation, determining the operation type corresponding to the current user operation, obtaining the corresponding operation flow based on the operation type, wherein the operation type includes at least one of filtering, editing, and status rollback operations, and performing independent operation processing on the current Web table at the presentation layer based on the operation flow to obtain the processed Web table. This solution achieves automatic identification of the current user operation type and distribution of the operation flow by performing independent operation processing on the current Web table only at the presentation layer, without modifying the original table structure; it also lowers the barrier to entry for non-technical users by eliminating the need to modify backend data or business logic; furthermore, it allows for multiple operation types to be used to process the current Web table, improving the flexibility and adaptability of table processing.

[0031] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of embodiments of this disclosure, unless otherwise stated, "a plurality of" means two or more. Furthermore, the use of "based on" or "according to" implies openness and inclusiveness, because processes, steps, calculations, or other actions "based on" or "according to" one or more of the stated conditions or values ​​may in practice be based on additional conditions or beyond the stated values.

[0032] The Web table processing method provided in this application, which aims to preserve the original structure, can be applied to computer devices (electronic devices). The computer device can be a server or a terminal. The server can be a single server or a server cluster composed of multiple servers. This application does not specifically limit this. The terminal can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices.

[0033] Taking a computer device as an example, Figure 1 A block diagram of a server is shown, such as Figure 1 As shown, the server may include a processor and memory connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. When the computer program is executed by the processor, it implements a Web table processing method that maintains the original structure.

[0034] Those skilled in the art will understand that Figure 1 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the server to which the present application is applied. Optionally, the server may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.

[0035] It should be noted that the execution subject of the embodiments of this application can be a computer device or a Web form processing device with unchanged original structure. The following method embodiments will be described with a computer device as the execution subject.

[0036] Figure 2 This document provides a flowchart of a method for processing Web tables while preserving their original structure, as illustrated in an embodiment of this application. Figure 2 As shown, the method includes the following steps: Step 202: Listen for user interaction events corresponding to the table area and obtain the current user operation.

[0037] To differentiate and schedule different user operations, a user operation type judgment mechanism is set at the entry stage of listening to user interaction events. This mechanism listens to user interaction behaviors within the table area based on event delegation.

[0038] Optionally, a unified event listener can be registered on the parent node of the table to listen for user interaction events corresponding to the table area, including receiving click, double-click, input, or keyboard operation events triggered by the user.

[0039] Step 204: Determine the operation type corresponding to the current user operation, and obtain the corresponding operation process based on the operation type.

[0040] The operation type includes at least one of the following: filtering operation type, editing operation type, and status rollback operation type.

[0041] Optionally, a user operation type determination mechanism can be used to comprehensively analyze the event type, the event target node, and the current operation context to determine the operation type corresponding to the current user operation. Specifically, when the event source node corresponds to a header filter control or a filter input area, the system determines the operation as a filter operation type; when the event source node corresponds to a table data cell, the system determines the operation as an edit operation type; when the event source node corresponds to an undo or redo control entry, the system determines the operation as a status rollback operation type, thereby allowing the corresponding operation flow to be obtained based on the operation type.

[0042] This method enables automatic identification of user operation types and process distribution without modifying the original table structure.

[0043] Step 206: Perform independent operations on the current Web table in the presentation layer based on the operation process to obtain the processed Web table.

[0044] In some optional embodiments, if the operation type is a filtering operation type, such as Figure 3 As shown, Figure 3 A flowchart of a screening operation provided in this application embodiment includes: Step 302: Traverse all rows in the current Web table and read the content of the corresponding current cell for each row.

[0045] Step 304: For the current cell content of each row, repeat the steps of setting the display attribute of the current row corresponding to the current cell content to "keep displayed" if the current cell content meets the preset filter conditions, and modifying the display attribute of the current row corresponding to the current cell content to "hide" if the current cell content does not meet the preset filter conditions, until the display attribute of all rows has been set.

[0046] The preset filtering conditions are determined based on the current user operation corresponding to the filtering operation type. The current user operation can include filtering fields, preset filtering conditions, forward filtering mode, or reverse filtering mode.

[0047] When performing filtering operations, do not delete or rearrange the data in the table. node, Nodes and node, node, Nodes and The nodes represent table labels, table row labels, and table data cell labels, respectively.

[0048] Furthermore, after traversing all rows in the current web table and reading the content of the corresponding current cell for each row, the process repeats the steps of setting the display attribute of the current row corresponding to the current cell content to "keep displayed" if the current cell content meets the preset filter conditions, and modifying the display attribute of the current row corresponding to the current cell content to "hide" if the current cell content does not meet the preset filter conditions. In other words, the display and hiding of rows are controlled only by modifying the display attribute of the current row, until the display attribute of all rows has been set.

[0049] In addition, this process supports forward filtering (including conditions), reverse filtering (excluding conditions), and multi-field combination filtering. Optionally, for all rows in the current web table, the state information of the display attributes of each row before processing is recorded, and the filtering operation type of rows whose display attributes have been modified is marked and recorded in the preset state stack.

[0050] Optionally, before performing the filtering operation, the system records the display status of each row and saves the display status as the initial state of the filtering operation to the state management module.

[0051] Optionally, the process also supports undoing the filtering step by step in the order of operations, or restoring to the initial display state with one click. Optionally, the original row order, style, and event bindings of the table remain unchanged during the filtering and restoration process.

[0052] In this embodiment, the display attributes of each row element in the table are controlled independently, rather than deleting, inserting, or rearranging row nodes, thereby achieving the filtering effect while maintaining the original structure of the table. Furthermore, it can achieve forward or reverse filtering of table data without triggering table redrawing or affecting the original event binding and style structure, and supports the gradual undoing or overall restoration of filtering operations, thus solving the problem of irreversible filtering operations and easy destruction of structure in the prior art.

[0053] In some optional embodiments, if the operation type is an edit operation type, such as Figure 4 As shown, Figure 4 A flowchart of an editing operation provided in this application embodiment includes: Step 402: Obtain each cell node in the current Web table.

[0054] Step 404: For each cell node, record the pre-edit state of the cell node, and then switch to the edit state.

[0055] Step 406: In edit mode, receive the target content input by the user, and after the user confirms the editing operation, write the target content into the display layer corresponding to the cell node to obtain the processed Web table.

[0056] Specifically, after obtaining each cell node in the current Web table, the current cell content of each cell node is used as the original value, and the pre-edit state of the cell node is recorded.

[0057] Next, you can switch to edit mode, which allows you to replace cells with input controls or enable editable mode. In edit mode, you can receive the target content entered by the user. After the user confirms the editing operation, the target content is written to the display layer corresponding to the cell node, resulting in the processed web table.

[0058] Optionally, the way to trigger the edit event can include mouse hover or double-clicking the table cell. During the editing operation, the user can directly modify the text content of the cell without writing code, and the editing operation only modifies the text content of the front-end display layer and does not affect the back-end data source.

[0059] In some optional embodiments, an edit state snapshot can also be generated. This snapshot includes a cell node, its corresponding original content, and the target content. Edited cell nodes are marked with an edit operation type and recorded in a preset state stack. Furthermore, before entering the edit state, the original content of the cell is cached, and this cached content serves as the basis for rolling back the edit operation.

[0060] In this embodiment, the modification operation of text content in the table only replaces the text content of the target cell in the front-end display layer, without triggering back-end data updates or data model changes. In addition, it can realize visual editing of text content in table cells, while ensuring that the editing behavior does not affect the original data source, and supports undoing and reverting the editing operation, thereby reducing the technical threshold for users to modify the table display content and improving the security and controllability of the system.

[0061] In some optional embodiments, if the operation type is a state rollback operation type, the state rollback operation type includes a gradual undo operation type and a one-click restore operation type, as shown in Figure 5. Figure 5 A flowchart illustrating the steps of a gradual undo operation provided in this application embodiment includes: In case 502, when the state rollback operation type is the gradual undo operation type, retrieve the most recent historical operation record from the preset state stack and determine the operation type corresponding to the historical operation record.

[0062] If a 504 error occurs and the operation type corresponding to the historical operation record is a filter operation type, then the display attributes of each row are restored to the corresponding status information before processing, and the processed Web table is obtained.

[0063] In step 506, if the operation type corresponding to the historical operation record is an edit operation type, then restore the original content corresponding to the edited cell node to obtain the processed Web table.

[0064] In this state rollback operation, each user action is encapsulated as a state object and pushed onto a preset state stack. The state object can contain the operation type, operation target, and the state before the operation. Furthermore, the entire restoration process requires no page refresh and no network request.

[0065] In some optional embodiments, if the state rollback operation type is a one-click restore operation type, the current Web table is independently processed in the presentation layer based on the operation process to obtain the processed Web table. The process also includes: when the state rollback operation type is a one-click restore operation type, clearing the contents of the preset state stack, and restoring all rows and all cell nodes in the Web table according to the preset initial cache state corresponding to each row element in the Web table to obtain the processed Web table.

[0066] This embodiment constructs a unified state management module, which abstracts filtering and editing operations into state objects and stores them in a preset state stack according to the operation order. This enables unified management of multiple rounds of filtering and editing operations and supports gradual rollback or one-time restoration to the initial state according to the operation order, thereby solving the problem of scattered table operation states and inability to be uniformly restored in the prior art.

[0067] In some alternative embodiments, the method provided in this application can also adopt a non-intrusive integration approach, that is, it can be mounted on the existing HTML table parent node through event delegation; it does not require modification of the original table source code or introduction of front-end framework dependencies; it is compatible with native HTML tables and third-party table components; it can be deployed as an independent JavaScript plugin, with strong adaptability.

[0068] This embodiment enhances the functionality of the target table by combining event delegation and node parsing without modifying the original table code; it also enables unified enhancement of table components from different sources and frameworks, demonstrating good versatility and scalability.

[0069] This application provides a method for processing web tables while maintaining their original structure. The method includes: listening to user interaction events corresponding to a table area, obtaining the current user operation, determining the operation type corresponding to the current user operation, obtaining the corresponding operation flow based on the operation type, wherein the operation type includes at least one of filtering, editing, and status rollback operations, and performing independent operation processing on the current web table at the presentation layer based on the operation flow to obtain the processed web table. This solution achieves automatic identification of the current user operation type and operation flow distribution without modifying the original table structure by performing independent operation processing on the current web table only at the presentation layer; it also lowers the barrier to entry for non-technical users by requiring no modification to backend data or business logic; furthermore, it allows for multiple operation types to be used to process the current web table, improving the flexibility and adaptability of table processing.

[0070] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0071] Figure 6 This is a structural block diagram of a Web table processing device that maintains the original structure, as provided in an embodiment of this application.

[0072] like Figure 6 As shown, the Web form processing apparatus 600, which aims to maintain the original structure, includes: The acquisition module 602 is used to listen for user interaction events corresponding to the table area and obtain the current user operation.

[0073] The determination module 604 is used to determine the operation type corresponding to the current user operation and obtain the corresponding operation process based on the operation type; wherein, the operation type includes at least one of the following: filtering operation type, editing operation type, and status rollback operation type.

[0074] The processing module 606 is used to perform independent operations on the current Web table in the presentation layer based on the operation process, so as to obtain the processed Web table.

[0075] Regarding the apparatus in the above embodiments, the specific methods by which each module performs its operations have been described in detail in the embodiments related to the method, and will not be elaborated upon here. Each module in the above-described Web form processing apparatus with unchanged original structure can be implemented entirely or partially through software, hardware, or a combination thereof. Each module can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations of each module.

[0076] In one embodiment of this application, a computer device is provided, the computer device including a memory and a processor, the memory storing a computer program, and the processor executing the computer program to perform the following steps: Listen for user interaction events corresponding to the table area to obtain the current user operation; Determine the operation type corresponding to the current user's operation, and obtain the corresponding operation flow based on the operation type; wherein, the operation type includes at least one of the following: filter operation type, edit operation type, and status rollback operation type; Based on the operation process, the current Web table is processed independently at the presentation layer to obtain the processed Web table.

[0077] In one embodiment of this application, the processor further performs the following steps when executing the computer program: Iterate through all rows in the current web table and read the content of the current cell for each row. For each row's current cell content, repeatedly execute the following steps: if the current cell content meets the preset filter criteria, set the display attribute of the current row corresponding to the current cell content to "keep displayed"; if the current cell content does not meet the preset filter criteria, modify the display attribute of the current row corresponding to the current cell content to "hide". Repeat this process until the display attributes of all rows have been set. The preset filter criteria are determined based on the current user operation corresponding to the filter operation type.

[0078] In one embodiment of this application, the processor further performs the following steps when executing the computer program: For all rows in the current Web table, record the state information of each row's display attributes before processing, mark the filtering operation type for rows whose display attributes have been modified, and record it in the preset state stack.

[0079] In one embodiment of this application, the processor further performs the following steps when executing the computer program: Retrieve each cell node in the current web table; For each cell node, record the pre-edit state of the cell node and then switch to the edit state; In edit mode, the system receives the target content input by the user, and after the user confirms the editing operation, the target content is written into the display layer corresponding to the cell node, resulting in the processed web table.

[0080] In one embodiment of this application, the processor further performs the following steps when executing the computer program: Generate an edit state snapshot; the edit state snapshot includes cell nodes, the original content corresponding to the cell nodes, and the target content; Mark the edit operation type for the edited cell node and record it in the preset state stack.

[0081] In one embodiment of this application, the processor further performs the following steps when executing the computer program: When the state rollback operation type is the gradual undo operation type, retrieve the most recent historical operation record from the preset state stack and determine the operation type corresponding to the historical operation record; If the operation type corresponding to the historical operation record is a filter operation type, then restore the display attributes of each row to the corresponding state information before processing, and obtain the processed Web table; If the operation type corresponding to the historical operation record is an edit operation, then restore the original content of the edited cell node to obtain the processed Web table.

[0082] In one embodiment of this application, the processor further performs the following steps when executing the computer program: When the state rollback operation type is a one-click restore operation type, the contents of the preset state stack are cleared, and all rows and all cell nodes in the Web table are restored according to the preset initial cache state corresponding to each row element in the Web table, resulting in the processed Web table.

[0083] The computer device provided in this application embodiment has a similar implementation principle and technical effect to the above method embodiment, and will not be described again here.

[0084] In one embodiment of this application, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, it performs the following steps: Listen for user interaction events corresponding to the table area to obtain the current user operation; Determine the operation type corresponding to the current user's operation, and obtain the corresponding operation flow based on the operation type; wherein, the operation type includes at least one of the following: filter operation type, edit operation type, and status rollback operation type; Based on the operation process, the current Web table is processed independently at the presentation layer to obtain the processed Web table.

[0085] In one embodiment of this application, the computer program, when executed by a processor, further performs the following steps: Iterate through all rows in the current web table and read the content of the current cell for each row. For each row's current cell content, repeatedly execute the following steps: if the current cell content meets the preset filter criteria, set the display attribute of the current row corresponding to the current cell content to "keep displayed"; if the current cell content does not meet the preset filter criteria, modify the display attribute of the current row corresponding to the current cell content to "hide". Repeat this process until the display attributes of all rows have been set. The preset filter criteria are determined based on the current user operation corresponding to the filter operation type.

[0086] In one embodiment of this application, the computer program, when executed by a processor, further performs the following steps: For all rows in the current Web table, record the state information of each row's display attributes before processing, mark the filtering operation type for rows whose display attributes have been modified, and record it in the preset state stack.

[0087] In one embodiment of this application, the computer program, when executed by a processor, further performs the following steps: Retrieve each cell node in the current web table; For each cell node, record the pre-edit state of the cell node and then switch to the edit state; In edit mode, the system receives the target content input by the user, and after the user confirms the editing operation, the target content is written into the display layer corresponding to the cell node, resulting in the processed web table.

[0088] In one embodiment of this application, the computer program, when executed by a processor, further performs the following steps: Generate an edit state snapshot; the edit state snapshot includes cell nodes, the original content corresponding to the cell nodes, and the target content; Mark the edit operation type for the edited cell node and record it in the preset state stack.

[0089] In one embodiment of this application, the computer program, when executed by a processor, further performs the following steps: When the state rollback operation type is the gradual undo operation type, retrieve the most recent historical operation record from the preset state stack and determine the operation type corresponding to the historical operation record; If the operation type corresponding to the historical operation record is a filter operation type, then restore the display attributes of each row to the corresponding state information before processing, and obtain the processed Web table; If the operation type corresponding to the historical operation record is an edit operation, then restore the original content of the edited cell node to obtain the processed Web table.

[0090] In one embodiment of this application, the computer program, when executed by a processor, further performs the following steps: When the state rollback operation type is a one-click restore operation type, the contents of the preset state stack are cleared, and all rows and all cell nodes in the Web table are restored according to the preset initial cache state corresponding to each row element in the Web table, resulting in the processed Web table.

[0091] The computer-readable storage medium provided in this embodiment is similar in principle and technical effect to the method embodiment described above, and will not be repeated here.

[0092] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.

[0093] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.

[0094] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.

Claims

1. A method for processing Web tables while preserving their original structure, characterized in that, The method includes: Listen for user interaction events corresponding to the table area to obtain the current user operation; Determine the operation type corresponding to the current user operation, and obtain the corresponding operation flow based on the operation type; wherein, the operation type includes at least one of the following: filtering operation type, editing operation type, and status rollback operation type; Based on the aforementioned operation process, the current Web table is processed independently at the presentation layer to obtain the processed Web table.

2. The method according to claim 1, characterized in that, The operation type is a filtering operation type. The step of independently processing the current Web table at the presentation layer based on the operation flow to obtain the processed Web table includes: Iterate through all rows in the current Web table and read the content of the current cell for each row. For each row corresponding to the current cell content, the following steps are repeated: if the current cell content meets the preset filtering conditions, set the display attribute of the current row corresponding to the current cell content to remain displayed; if the current cell content does not meet the preset filtering conditions, modify the display attribute of the current row corresponding to the current cell content to be hidden, until the display attributes of all rows are set; wherein, the preset filtering conditions are determined based on the current user operation corresponding to the filtering operation type.

3. The method according to claim 2, characterized in that, The method further includes: For all rows in the current Web table, record the state information of the display attributes of each row before processing, mark the filtering operation type of the rows whose display attributes have been modified, and record them in the preset state stack.

4. The method according to any one of claims 1-3, characterized in that, The operation type is an editing operation type. The step of independently processing the current Web table at the presentation layer based on the operation flow to obtain the processed Web table includes: Retrieve each cell node in the current web table; For each cell node, after recording the pre-edit state of the cell node, switch to the edit state; In the editing state, the target content input by the user is received, and after the user confirms the editing operation, the target content is written into the display layer corresponding to the cell node to obtain the processed Web table.

5. The method according to claim 4, characterized in that, The method further includes: Generate an edit state snapshot; wherein the edit state snapshot includes the cell node, the original content corresponding to the cell node, and the target content; Mark the edit operation type for the edited cell node and record it in the preset state stack.

6. The method according to any one of claims 1-3, characterized in that, The operation type is a state rollback operation type, which includes a gradual undo operation type and a one-click restore operation type. The step of independently processing the current Web table at the presentation layer based on the operation flow to obtain the processed Web table includes: When the state rollback operation type is a gradual undo operation type, the most recent historical operation record with the current time is obtained from the preset state stack, and the operation type corresponding to the historical operation record is determined; If the operation type corresponding to the historical operation record is a filtering operation type, then restore the display attributes of each row to the corresponding state information before processing to obtain the processed Web table; If the operation type corresponding to the historical operation record is an edit operation type, then the original content corresponding to the edited cell node is restored to obtain the processed Web table.

7. The method according to claim 6, characterized in that, The step of independently processing the current Web table at the presentation layer based on the aforementioned operation flow to obtain the processed Web table further includes: When the state rollback operation type is a one-click restore operation type, the contents of the preset state stack are cleared, and all rows and all cell nodes in the Web table are restored according to the preset initial cache state corresponding to each row element in the Web table, so as to obtain the processed Web table.

8. A Web table processing device that maintains the original structure unchanged, characterized in that, The device includes: The acquisition module is used to listen for user interaction events corresponding to the table area and obtain the current user operation. The determination module is used to determine the operation type corresponding to the current user operation and obtain the corresponding operation flow based on the operation type; wherein, the operation type includes at least one of the following: filtering operation type, editing operation type, and status rollback operation type; The processing module is used to perform independent operations on the current Web table in the presentation layer based on the operation process, so as to obtain the processed Web table.

9. An electronic device, characterized in that, The electronic device includes a processor and a memory, the memory storing at least one instruction, at least one program, code set, or instruction set, the at least one instruction, the at least one program, the code set, or the instruction set being loaded and executed by the processor to implement the Web table processing method for maintaining the original structure as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The storage medium stores at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, the at least one program, the code set, or instruction set is loaded and executed by a processor to implement the Web table processing method for maintaining the original structure as described in any one of claims 1-7.