Table editing method and device, electronic equipment and readable storage medium
By assigning unique identifiers and validation rules to data items in banking business system tables, the problems of cumbersome traditional table operations and data interference have been solved, achieving the effects of simplified operation and improved user experience.
Patent Information
- Application Number
- CN202511343885.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-19
- Publication Date
- 2025-11-21
AI Technical Summary
Traditional banking systems employ cumbersome table-based operations with data inconsistencies between rows, failing to meet business needs.
A table editing method is provided, which allows users to directly edit data items by assigning them unique identifiers. The system records the editing operations and responds to the edits based on validation rules, avoiding data crosstalk and simplifying the operation steps.
It simplifies table operations within the banking system, improves the stability and convenience of table usage, avoids data interference, and enhances the user experience.
Smart Images

Figure CN120996001A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a table editing method, apparatus, electronic device, readable storage medium, and program product. Background Technology
[0002] In business operations involving data statistics, operators will make reservations within the system based on product revenue and user preferences. A single reservation requires submitting multiple pieces of information on one interface. Since there is a limit to the total amount of product reservations, each reservation needs to consider the amount corresponding to each reservation to ensure that the total amount of all reservations does not exceed the pre-set limit.
[0003] Traditional banking systems have significant limitations when it comes to making business appointments using spreadsheets. They require operators to select the corresponding function keys in the order of "pop-up operation - data field input - data writing" before they can fill in the appointment information in the spreadsheet, making the process cumbersome.
[0004] Furthermore, the existing operating model causes data to affect each other when data is deleted or added, which cannot meet the corresponding business needs. Summary of the Invention
[0005] This application provides a table editing method, apparatus, electronic device, readable storage medium, and program product, which can simplify the operation steps of tables in banking business systems. Moreover, when data is deleted or added, the data in different rows will not affect each other, which can improve the user experience.
[0006] To achieve the above objectives, the embodiments of this application adopt the following technical solutions:
[0007] Firstly, a table editing method is provided, comprising: when a user opens a table, copying multiple original data rows from a selected first list stored in the background to a second list operable by the user, so as to display the second list in the interface. Each original data row contains data items that are original components with editing functionality, and each original component has a validation rule and a unique original identifier. In response to a user deleting a first data row from the second list, the first data row is deleted, resulting in first updated data for the first list. Based on the first identifier and original identifier of each first component in the first data row, first operation information is updated. The first operation information includes information about newly added or deleted data rows. Based on the first updated data and the first operation information, the second list is updated and displayed. Subsequently, in response to an editing operation on a first data item in the second list, it is checked whether the editing operation satisfies the data type and / or data range corresponding to the validation rule. If the validation rule is satisfied, the data content of the first data item is modified in response to the editing operation.
[0008] The table editing method provided in this application can assign a unique identifier to each data item. When a user edits a table, the system records the editing operation on the data item based on the unique identifier of the component. The component can be directly edited by the user, and the user's operation can be updated to the second editable list to simplify the user's operation steps. At the same time, it avoids data interference caused by duplicate component identifiers, thereby improving the stability and convenience of table use.
[0009] In one possible implementation of the first aspect, before copying multiple data rows from the first list to the second list, the table editing method further includes: rendering multiple original data rows from the first list, rendering data items in the multiple original data rows as original components with editing capabilities, and assigning a unique original identifier to each original component.
[0010] Based on the above method, before updating the original data rows in the first list to the second list, the data items are rendered as editable components, such as dropdown components and input components. This allows users to directly edit the second table after copying, improving the flexibility of table operations.
[0011] In another possible implementation of the first aspect, deleting the first data row in the first list to obtain the first updated data of the first list can be achieved as follows: Delete the first data row in the first list to obtain the remaining data rows. Shift the order of the remaining data rows after the first data row forward to obtain the first updated data of the first list.
[0012] Based on the above embodiments, when a user performs the operation of deleting a data row, if there are other data rows after the data row, the table will automatically move the data rows after the data row to the front, without the user having to manually move these tables, which is more user-friendly and improves the user experience when using the deletion function.
[0013] In another possible implementation of the first aspect, the first operation information is updated based on the first identifier and the original identifier of each component in the first data row. This can be achieved as follows: If the original identifier includes the first identifier (i.e., the deleted data row is an original data row), the first deletion information is recorded to obtain the first operation information, which indicates the deletion of the first data row. If the original identifier does not include the first identifier (i.e., the deleted data row is not an original data row), the first addition information is removed to obtain the first operation information, which indicates the addition of the first data row.
[0014] Based on the above embodiments, when performing a deletion operation, the original data row and the newly added first data row are distinguished. For the deletion operation of the newly added first data row, the newly added record of the data row is removed, without having to add the corresponding deletion record, which reduces unnecessary data generation and improves the rationality of the records.
[0015] In another possible implementation of the first aspect, recording the first deletion information can be achieved as follows: The first deletion information is recorded in a deletion table, which records information about deleted data rows, specifically those deleted from multiple original data rows. Removing the first addition information can be achieved as follows: The first addition information is removed from an addition table, which records information about newly added data rows, specifically those added compared to the multiple original data rows.
[0016] Based on the above embodiments, by adding and deleting tables, users' deletion and addition operations can be recorded in the form of deleted information and added information, so as to accurately record each addition and deletion operation of the table and ensure the accuracy of the list's response to user operations.
[0017] In another possible implementation of the first aspect, after displaying the second list, the table editing method further includes: in response to a user's operation of adding a second data row to the second list, adding a second data row to the first list, obtaining second updated data for the first list, and updating the obtained second operation information, which includes second added information. Wherein, the data items of the second data row in the second updated data are second components with editing functionality, and each second component has a unique second identifier; the second added information indicates the addition of a second data row; and based on the second updated data and the second operation information, updating and displaying the second list.
[0018] Based on the above embodiments, by assigning a unique second identifier to the newly added data row, the newly added data row can be distinguished from the original data row. At the same time, in response to the user's new operation, the newly added editable data row is updated to the second list to complete the addition of the data row, so that the user can view the newly added data row and directly edit the second component.
[0019] In another possible implementation of the first aspect, the second operation information is updated and obtained in the following way: the second new information is added from the new table, which is used to record the information of the new data row, and the new data row is specifically a new data row compared to multiple original data rows.
[0020] Based on the above embodiments, the new information of the new data row is recorded in the new table to accurately record the addition operation relative to the original data row, so as to synchronize the corresponding operation to the second list and realize the real-time update of user operation.
[0021] In another possible implementation of the first aspect, after adding a second data row to the first list, the table editing method further includes: determining the maximum length to be rendered based on the row and column positions of the multiple data rows in the first list, wherein the maximum length represents the maximum number of columns in the first list; wherein the multiple data rows include multiple original data rows and second data rows; rendering the second data row based on the maximum length, rendering the data items in the second data row as second components with editing functions, and assigning a unique second identifier to each second component.
[0022] Based on the above embodiments, after determining the maximum rendering length, the newly added data rows can be rendered so that users can edit the newly added data rows, allowing users to directly operate on the data rows, simplifying user operations and improving the user experience.
[0023] In another possible implementation of the first aspect, before adding a second data row to the first list, the table editing method further includes: querying the value of an adder counter, which is used to count the difference between the number of newly added data rows and the number of deleted data rows; detecting whether the value of the adder counter is less than a first threshold; adding a second data row to the first list can be achieved as follows: if the value of the adder counter is less than the first threshold, add a second data row to the first list.
[0024] Based on the above embodiments, the number of data rows in the first list is limited by an adder counter, which avoids the user being unable to submit the data even after adding data rows because the number of data rows exceeds the limit. This reduces unnecessary operations, improves the efficiency of users filling in data, and enhances the user experience.
[0025] In another possible implementation of the first aspect, if the value of the addend counter is greater than or equal to the first threshold, no second data row is added to the first list, and no processing to update the second operation information is performed.
[0026] Based on the above embodiments, when the number of data rows in the current first list reaches a predetermined value, the user is prevented from adding more data rows, so as to prompt the user that no more data rows can be added at present. This eliminates the need for the user to count manually, reduces the user's operational burden, and improves the user experience.
[0027] Secondly, embodiments of this application provide a table editing device, the device comprising:
[0028] The copy module is used to copy multiple original data rows from the first list to the second list, configure validation rules for the data items of each original data row in the second list, and display the second list; wherein, the data items of each original data row are original components with editing functions, and each original component has a unique original identifier;
[0029] The processing module is configured to respond to the operation of deleting a first data row from a second list, delete the first data row from the first list, obtain the first updated data of the first list, and update the first operation information based on the first identifier and the original identifier of each first component in the first data row; wherein the first operation information includes information about the newly added data row or information about the deleted data row;
[0030] The copy module is also used to update and display the second list based on the first update data and the first operation information.
[0031] The processing module is further configured to, in response to an editing operation on a first data item in the second list, detect whether the editing operation satisfies the data type and / or data range corresponding to the validation rules of the first data item, wherein the editing operation is used to modify the data content of the first data item; if the data type and / or data range corresponding to the validation rules of the first data item are satisfied, modify the data content in the first data item based on the editing operation.
[0032] Thirdly, embodiments of this application provide an electronic device, the method comprising: a memory and at least one processor. The memory is communicatively connected to the processor. The memory is used to store computer program code, the computer program code including computer instructions. When the processor executes the computer instructions, it causes the electronic device to perform the method as described in the first aspect and any possible implementation thereof.
[0033] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer instructions. When these computer instructions are executed by a processor, they are used to implement the method as described in the first aspect and any possible implementation thereof.
[0034] Fifthly, embodiments of this application provide a computer program product that, when run on a computer or executed by the computer's processor, implements the methods described in the first aspect and any possible implementation thereof. The computer may be the table editing device described in the second aspect and any possible implementation thereof.
[0035] Understandably, the beneficial effects that can be achieved by the second to fifth aspects provided above can be referred to as the beneficial effects of the first aspect and any of its possible implementations, which will not be repeated here. Attached Figure Description
[0036] Figure 1 A flowchart illustrating a table editing method provided in an embodiment of this application;
[0037] Figure 2 This is a schematic diagram of the structure of a table editing device provided in an embodiment of this application;
[0038] Figure 3 This is a schematic diagram of another table editing device provided in an embodiment of this application;
[0039] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0040] 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 technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this embodiment, unless otherwise stated, "a plurality of" means two or more.
[0041] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0042] The technical solutions provided in this application, including the collection, storage, use, processing, transmission, provision, and disclosure of financial data or user data, comply with relevant laws and regulations and do not violate public order and good morals.
[0043] It should be noted that in the embodiments of this application, certain software, components, models and other existing solutions in the industry may be mentioned. These should be regarded as exemplary and are only intended to illustrate the feasibility of implementing the technical solution of this application. However, it does not mean that the applicant has used or necessarily used the solution.
[0044] The following describes the application scenarios of the embodiments of this application.
[0045] In banking, when a bank launches a new product, branch staff will make reservations in the bank's product reservation system based on the product's yield and the customer's risk appetite. A single reservation often requires submitting multiple contracts on one interface. Due to the limit on the total product reservation amount, a single reservation requires considering the reservation amount of each contract and monitoring the total of these reservation amounts in real time to ensure that it does not exceed the pre-set upper limit for the total product reservation amount.
[0046] However, the traditional form-based operation mode has obvious limitations when making product appointments. It requires business personnel to follow the order of "pop-up operation - data field input - data writing" in order to complete the filling of business data. Not only are the steps cumbersome, but they are also difficult to adapt to the high-efficiency requirements of modern banking business.
[0047] Furthermore, the native editable tables provided under the existing framework have certain defects. When operating on multiple rows of data, the logic between components is inconsistent, causing the data in each row to affect each other. This not only undermines data consistency but also affects the normal operation of the business and fails to meet the needs of the corresponding business.
[0048] In view of this, this application provides a table editing method, which aims to simplify the operation process of business personnel and avoid mutual interference between rows of editable tables.
[0049] Figure 1 This is a flowchart illustrating a table editing method provided in an embodiment of this application, such as... Figure 1 As shown, it includes S101-S105:
[0050] S101. Copy multiple original data rows from the first list to the second list, configure validation rules for the data items of each original data row in the second list, and display the second list.
[0051] In this system, each original data row contains editable original components, each with configured validation rules and a unique original identifier. The validation rules restrict editing operations on data items in the second list, specifically limiting data types and / or data ranges. For example, a cell can be restricted to accepting only text, numbers, letters, and special symbols. Similarly, for data items limited to text, the number of characters can be limited to a maximum of eight.
[0052] During the operation of business personnel, the completed tables are saved and stored in the backend. When business personnel need to operate on the table again, the saved table is used as the initial table source for loading and display. In this embodiment, the table stored in the backend is defined as a data table, i.e., the first list.
[0053] When business personnel need to continue operating on the data table, they will select the data table to continue operating on. After receiving the instruction, the system will load the data table onto the business personnel's operation interface. Here, the editable table displayed on the operation interface is defined as the initial table, also known as the second list.
[0054] The data rows in the first list are defined as the original data rows. The original data rows include multiple data items, i.e., original data items. The original data items contain data or are empty data items. Specifically, the data items in the original data rows are original components with editing functions. The original components here are different from newly added components.
[0055] It should be noted that the components in the embodiments of this application can be Document Object Model (DOM) components. Specifically, they can be components with different editing functions, such as dropdown components, input components, and filter components.
[0056] Each original component has a unique original identifier, which is different from the identifier of newly added components. Each original identifier is different, and the form of the original identifier is not limited. It can be a character encoding or a timestamp, etc.
[0057] For example, the first list contains 10 original data rows, each with 10 data items. Rows can be sorted numerically, e.g., the first row is 1, the second is 2, the third is 3, and so on. Columns can be sorted alphabetically, e.g., the first column is A, the second is B, the third is C, and so on. If there are more than 26 columns, they can be named using different combinations of letters, such as AA, AB, AC, etc. Specific identifiers can be 1Aα, 1Bα, 1Cα, etc., where 1A, 1B, etc., indicate the position of the data item in the first list, and α serves as a marker indicating that the data item is an original data item; subsequent data rows will not have the α marker.
[0058] S102. In response to the operation of deleting the first data row from the second list, the first data row in the first list is deleted, the first updated data of the first list is obtained, and the first operation information is updated based on the first identifier and the original identifier of each first component in the first data row.
[0059] The first operation information includes information about newly added or deleted data rows.
[0060] The second list is a table displayed on the user interface that users can directly edit. For example, if a user right-clicks on a data row to be deleted and clicks "Delete" in the drop-down menu, the system will receive the user's operation to delete the data row from the second list. At this point, the data row to be deleted is defined as the first data row. In response to the user's deletion operation, the system first deletes the first data row from the first list, resulting in the updated data in the first list (also known as the first updated data).
[0061] Wherein, if the first data row is an original data row, then the first identifier is the original identifier. If the first data row is not an original data row, then the first identifier is not the original identifier. Based on the identifier of the deleted data row (i.e., the first identifier), the first operation information can be obtained. The first operation information includes information about the deleted data row, specifically including the identifier of the data row (i.e., the first identifier) and the position of the data item corresponding to the first identifier.
[0062] For example, if the deleted data row is identified as 1Aα-1Jα, then the first row in the original data row is deleted. At this time, the first identifier includes 1Aα-1Jα, which corresponds to the original identifier of the first row in the original data row, and the first operation information records 1Aα-1Jα.
[0063] S103. Based on the first update data and the first operation information, update and display the second list.
[0064] Specifically, the first updated data records the operation type of the user's operation. For example, if the user performs the operation of deleting a row, the first updated data will also record the operation performed by the user at this time, the operation type is "delete data row", and can also record how many rows the user deleted. The record format can be "delete data row - delete 1 row".
[0065] Based on the identifier recorded in the first operation information and the position of the data item corresponding to that identifier, the corresponding data row is deleted from the second list. For example, if the first update data records that the operation is to delete a row, and the first operation information records 1Aα, then the data item identified as 1Aα-1Jα in the second list is deleted.
[0066] In some embodiments, an upload table is defined to combine the first update data and the first operation information to synchronize the changed content of the first list to the second list. It should be noted that the upload table can be used to synchronize the deletion, addition and modification operations of the first list to the second list.
[0067] S104. In response to an editing operation on the first data item in the second list, detect whether the editing operation satisfies the data type and / or data range corresponding to the validation rules of the first data item.
[0068] The edit operation is used to modify the data content of the first data item.
[0069] For example, the first data item represents the data item for which an edit operation instruction is made to modify / edit. For instance, the validation rules corresponding to the first data item restrict the data type of the input to numbers, with the range of numbers determined based on the numbers of other data items in the second list. For example, when applying for a project, if the total amount that can be applied for is fixed, the application amount entered in the current data item depends on the application amounts already entered in other data items in the second list. For example, if the total amount is 100,000 and the current balance is 20,000, then the data range for the data item is 0-2000.
[0070] For example, if the data type of the first data item is limited to date, the input range can be limited to dates no earlier than the edit date. For example, if the edit date is September 1, 2025, then the input range is September 1, 2025, and later dates.
[0071] S105. If the data type and / or data range corresponding to the verification rules of the first data item are satisfied, modify the data content in the first data item based on the edit operation.
[0072] If the data entered during the editing operation conforms to the validation rules, the editing operation will be responded to, and the data content of the data item will be modified. If the data entered during the editing operation does not conform to the validation rules, the editing operation will not be responded to, and an error warning will be displayed, such as "The data type you entered is incorrect" or "The data range you entered does not meet the requirements," etc. It may also suggest the correct entry rules, such as "Please enter a number between 0 and 2000," etc.
[0073] The table editing method provided in this application can assign a unique identifier to each data item. When a user edits a table, the system records the editing operation on the data item based on the unique identifier of the component and verifies the editing operation based on the configured verification rules. After the verification is passed, the system responds to the editing operation, and the component can be directly edited by the user. The system can also update the user's operation to the second editable list to simplify the user's operation steps. At the same time, it avoids data crosstalk caused by duplicate component identifiers and data content that does not meet the requirements due to editing operations, thereby improving the stability of table use and the compliance of data entry.
[0074] In some embodiments, prior to S101 above, the table editing method further includes:
[0075] Render multiple raw data rows in the first list, render the data items in the multiple raw data rows as raw components with editing functions, and assign a unique raw identifier to each raw component.
[0076] Specifically, users can customize the required functional components to render the corresponding data items as original components with corresponding editing functions during rendering. If the user does not select any, the data items in the original data row can be rendered as original components with full editing functions by default, and a unique original identifier will be assigned to the original components during the rendering process.
[0077] In some embodiments, if the first list loaded is an edited list, then the original data items in the list have been rendered as original components in the previous editing process, and the original data rows in the first list have been rendered as original components, so there is no need to render them again. It should be noted that in the embodiments of this application, the rendered components all have unique identifiers.
[0078] In some embodiments, when business personnel retrieve data from the backend to form a first list that has been loaded into a second list, the data items in the first list are not yet rendered. Therefore, they need to be rendered during the first load.
[0079] Based on the above embodiments, before loading the original data rows in the first list, the data items are rendered as components to ensure that after the original data rows are loaded into the second list, each data item displayed in the second list is editable; and, by assigning a unique identifier to each data item, logical conflicts can be avoided, thus ensuring the user experience.
[0080] In some embodiments, S102 can be implemented as S1021:
[0081] S1021. Delete the first data row in the first list to obtain the remaining data rows; move each data row in the remaining data rows after the first data row up to obtain the first updated data of the first list.
[0082] The remaining data rows that have not been deleted are defined as the remaining data rows.
[0083] If the first data row deleted by the user is not the bottom row (i.e., the last data row) in the first list, the remaining data rows that are listed after the first data row are shifted up to obtain the first updated data in the first list. Specifically, if the user deletes one data row, it is shifted up one row; if two data rows are deleted, it is shifted up two rows, and so on.
[0084] If the data row deleted by the user is the bottom data row in the first list, then there is no need to move the remaining data rows.
[0085] Based on the above embodiments, when a user deletes a data row located in the middle, the integrity of the entire list is maintained by moving the data row below the deleted data row, resulting in a better user visual experience.
[0086] In some embodiments, S102 can also be implemented as S1022:
[0087] S1022. If the original identifier includes the first identifier, record the first deletion information to obtain the first operation information. The first deletion information indicates that the first data row is deleted. If the original identifier does not include the first identifier, remove the first addition information to obtain the first operation information. The first addition information indicates that the first data row is added.
[0088] For example, the original identifier includes a first identifier indicating that the deleted data line is the original data line, and records first deletion information, which is used to indicate that the first data line is deleted from the first list.
[0089] If the original identifier does not include the first identifier, it means that the deleted data row (i.e., the first data row) is not an original data row. In other words, the deleted data row is a newly added data row other than the original data row, such as a previously added data row. In this case, the first newly added information corresponding to that new row is deleted. It's understandable that when a user instructs the addition of a row, corresponding newly added information is generated, indicating that a new row has been added to the first list. When a newly added data row is deleted, it means that the action of adding that data row did not occur, so the newly added information corresponding to that new row needs to be removed.
[0090] Based on the above embodiments, when performing a deletion operation, the original data row and the newly added first data row are distinguished. For the deletion operation of the newly added first data row, the newly added record of the data row is removed, without having to add the corresponding deletion record. This reduces unnecessary data generation, simplifies the record data, and makes the table operation records more accurate.
[0091] In some embodiments, recording the first deletion information can be achieved by recording the first deletion information in a deletion table, whereby the deletion table is used to record information about deleted data rows, specifically data rows deleted from multiple original data rows.
[0092] Here we need to define a deletion table to record the deletion information of the original data rows that are deleted. It should be noted that if the deleted data row is a newly added data row, the deletion information of the newly added data row will not be recorded in the deletion table.
[0093] For example, if there are 10 original data rows and 1 newly added data row, when an original data row is deleted, the deletion table records the first deletion information, including the original identifier and position of each data item in the deleted original data row. For example, if the 10th original data row with 10 data items is deleted, the deletion table records the identifier and position of each data item in the deleted original data row, such as 10Aα to 10Jα. If the deleted data row is a newly added data row, it is not necessary to record the corresponding deletion information in the deletion table.
[0094] The first newly added information can be removed as follows: Remove the first newly added information from the newly added table. The newly added table is used to record the information of newly added data rows. Specifically, the newly added data rows are the data rows that are added compared to the multiple original data rows.
[0095] Here, we define an addition table to record the new information of newly added data rows. When a newly added data row is deleted, the corresponding new information of the deleted new row needs to be removed from the addition table. If an original data row is deleted, and a fourth data row with the same content as the previously deleted original data row is added, if the fourth data row is deleted, the new information of the fourth data row also needs to be removed from the addition table.
[0096] For example, after the operation of adding a new row is completed, the corresponding first new information will be recorded in the new table. If the data items of the new row are identified as 11A to 11J, the corresponding identifiers will be recorded in the new table. If the new data row is deleted at this time, the corresponding new information will be removed from the new table, that is, the identifiers 11A to 11J will be removed from the record.
[0097] Based on the above embodiments, by adding and deleting tables, users' deletion and addition operations can be recorded in the form of deleted information and added information, so as to accurately record each addition and deletion operation of the table and ensure the accuracy of the list's response to user operations.
[0098] In some embodiments, in response to the operation of adding a second data row to a second list, a second data row is added to a first list to obtain second updated data of the first list, and second operation information is updated to include second added information; wherein, the data items of the second data row in the second updated data are second components with editing functions, and each second component has a unique second identifier, and the second added information indicates the addition of a second data row; based on the second updated data and the second operation information, the second list is updated and displayed.
[0099] Specifically, when a user right-clicks in the second list and selects "Add Row" from the drop-down menu, the system responds to the user's action by adding a data row to the first list. This newly added data row is defined as the second data row. The second updated data represents the content of the user-added data row, and the second operation information includes the second identifier and corresponding position of each data item in the second data row. Based on the content of the user-added data row in the second updated data, and the addition operation indicated by the second operation information and the second identifier and corresponding position of each data item in the second data row, the second list is updated. The user's addition operation is then synchronized to the user's visible interface.
[0100] For example, if a user adds a row at the bottom of the second list, such as right-clicking below row 10 and clicking "Add Row" in the drop-down menu, row 11 will be added. The second update data synchronously records the operation of adding a row, and the second operation information records the identifiers of each data item in row 11. For example, if there are already 10 data items, the second operation information will record 11A-11J. In one possible implementation, the second identifier can be set to be different from the identifiers of all previously existing data items (including deleted data items). The operation recorded in the second update data is the operation of adding a row, and combined with the position recorded in the second operation information, row 11 is added below row 10. A new row is generated below row 10 in the second list, or row 11 in the first list is copied to the position below row 10 in the second list to update the second list.
[0101] Based on the above embodiments, by assigning a unique second identifier to the newly added data row, the newly added data row can be distinguished from the original data row. At the same time, in response to the user's new operation, the value of the second list of the newly added data row is updated to complete the addition of the new data row.
[0102] In some embodiments, the second operation information is updated, which can be achieved by adding second new information from the new table, where the new table is used to record information about newly added data rows, and the newly added data rows are specifically new data rows compared to multiple original data rows.
[0103] Specifically, the second data table is a newly added data table, and its corresponding new information needs to be recorded in the new data table. The information of the new data row should at least include the second identifier and position of the data item in the new data row. The new data row is the data row other than the original data row.
[0104] One possible implementation is that if a new row is to be added from the middle of multiple original data rows, the original data row below the position of the new data row needs to be moved down before adding the new row.
[0105] It should be noted that if an original data row is deleted first, and then a new data row with the same content as the deleted data row is added, it is still considered as a new data row, and a unique identifier is assigned to it.
[0106] Based on the above embodiments, the new information of the new data row is recorded in the new table to accurately record the addition operation relative to the original data row, so as to synchronize the corresponding operation to the second list and realize the real-time update of user operation.
[0107] In some embodiments, after adding a second data row to the first list, the table editing method further includes: determining the maximum length to be rendered based on the row and column positions of the multiple data rows in the first list, wherein the maximum length includes the maximum number of columns; wherein the multiple data rows include multiple original data rows and second data rows; rendering the second data row based on the maximum length, rendering the data items in the second data row as second components with editing functions, and assigning a unique second identifier to each second component.
[0108] Here, a counting table can be defined to record the position of each data item in a data row, such as which data row the data item belongs to, and its position in the first or second list, including which row and column it is located in. Alternatively, the position of the data item can be described in other ways, but this is limited here.
[0109] Specifically, based on the row and column positions of multiple data rows in the first list, the number of columns in each row and the number of rows in the data row are determined, thus determining the maximum rendering length. It should be noted that when rendering data items in a data row, a loop rendering method is used, that is, rendering each data item one by one according to column order; the number of columns is the maximum rendering length. Based on the maximum rendering length, the number of data items to be rendered in the second data row is determined, and each data item in the second data row is rendered. It should be noted that when rendering any data item, the user can select the function to be rendered, such as a dropdown list or an input box. During the rendering process, corresponding restriction rules are configured for the data items, such as a numeric input range of 0-999 or allowing only text input. During the rendering process, a unique second identifier is assigned to the second component. This second identifier can be used to distinguish different second components and also to distinguish the second component from the original component.
[0110] It should be noted that newly added data rows can be empty data items without any data. If the user copies data rows from other data tables, the newly added data rows can include data.
[0111] Based on the above embodiments, after determining the maximum rendering length, the newly added data rows can be rendered so that users can edit the newly added data rows, allowing users to directly operate on the data rows, simplifying user operations and improving the user experience.
[0112] In some embodiments, before adding a second data row to the first list, the table editing method further includes:
[0113] Query the value of the adder counter, which is used to count the difference between newly added data rows and deleted data rows; check if the value of the adder counter is less than the first threshold.
[0114] Here, an adder counter is defined to count the number of data rows in the current second list and the first list. The specific calculation method is to subtract the number of deleted data rows from the number of newly added data rows. Before each add operation, it is necessary to check whether the value of the adder counter is less than the first threshold. The first threshold can be the maximum number of data rows that the second list can hold, or it can be the maximum number of data rows set according to the business.
[0115] To add a second data row to the first list, you can do so as follows:
[0116] If the value of the adder counter is less than the first threshold, add a second data row to the first list.
[0117] Specifically, if the value of the adder counter is less than the first threshold, it means that the number of rows in the current data row of the second list has not reached the specified upper limit, and it is allowed to continue adding data rows.
[0118] Based on the above embodiments, the number of data rows in the first list is limited by an adder counter, which avoids the user being unable to submit the data even after adding data rows because the number of data rows exceeds the limit. This reduces unnecessary operations, improves the efficiency of users filling in data, and enhances the user experience.
[0119] In some embodiments, if the value of the adder counter is greater than or equal to a first threshold, a second data row is not added to the first list, and the process of updating to obtain the second operation information is not performed.
[0120] Specifically, if the value of the adder counter is greater than or equal to the first threshold, it indicates that the number of rows in the current data row has exceeded the upper limit of the list or the second list. In this case, the user's data row addition operation will not be responded to, and the processing of the second operation information will not be executed. If the user deletes one or more data rows, causing the value of the adder counter to fall below the first threshold, then the user's data row addition operation will be responded to, and the processing of the second operation information will be executed.
[0121] In some embodiments, when loading the first list to the second list, the adder counter counts the number of original data rows in the first list as the initial value of the adder counter, and subsequent increments and decrements are calculated based on this value.
[0122] Based on the above embodiments, the number of data rows in the first list is limited by an adder counter, which avoids the user being unable to submit the data even after adding data rows because the number of data rows exceeds the limit. This reduces unnecessary operations, improves the efficiency of users filling in data, and enhances the user experience.
[0123] In some embodiments, the contents of the data table can also be modified. It should be noted that the modification here only applies to the original data rows, and the modification of newly added data rows is regarded as an addition operation.
[0124] For example, a user can modify any data item by double-clicking it. After double-clicking, the data item becomes editable, allowing the user to edit its content, including modifying, deleting, and adding. When the user edits an original data row, third update data is generated to record the user's editing operation, and third operation information is generated simultaneously to record the identifier, position, and edited content of the edited data item. Combining the operation type of the third update data with the data item identifier, position, and edited content of the third operation information, the corresponding data item content is updated. For example, if the modified data item is a first data item, fourth update data is generated to record the user's addition operation, and fourth operation information is generated simultaneously to record the identifier, position, and edited content of the edited data item. It should be noted that modifying a first data item is not considered a modification of that data item, but rather an addition relative to the original data row. Therefore, the fourth update data replaces the first update data corresponding to that data item, and the fourth operation information replaces the first operation information corresponding to that data item.
[0125] Figure 2 This is a schematic diagram of the structure of a table editing device provided in an embodiment of this application. Figure 2 As shown, the table editing device 200 includes: a copying module 201 and a processing module 202.
[0126] The copy module 201 is used to copy multiple original data rows from the first list to a second list, configure validation rules for the data items in each original data row in the second list, and display the second list. Each data item in each original data row is an original component with editable functionality, and each original component has a unique original identifier.
[0127] The processing module 202 is configured to respond to the operation of deleting the first data row from the second list, delete the first data row from the first list, obtain the first updated data of the first list, and update the first operation information based on the first identifier and the original identifier of each first component in the first data row; wherein the first operation information includes information about the newly added data row or information about the deleted data row.
[0128] The copy module 201 is also used to update and display the second list based on the first update data and the first operation information.
[0129] In some embodiments, such as Figure 3 As shown, the table editing device 200 also includes a rendering module 203, which renders multiple original data rows in the first list, renders the data items in the multiple original data rows as original components with editing functions, and assigns a unique original identifier to each original component.
[0130] The processing module 202 is further configured to, in response to an editing operation on a first data item in the second list, detect whether the editing operation satisfies the data type and / or data range corresponding to the validation rules of the first data item, wherein the editing operation is used to modify the data content of the first data item; if the data type and / or data range corresponding to the validation rules of the first data item are satisfied, modify the data content in the first data item based on the editing operation.
[0131] In other embodiments, the processing module 202 is further configured to delete the first data row in the first list to obtain the remaining data rows. Each data row in the remaining data rows that follows the first data row is then moved up to obtain the first updated data of the first list.
[0132] In other embodiments, the processing module 202 is further configured to, when the original identifier includes the first identifier, record first deletion information to obtain first operation information, wherein the first deletion information indicates the deletion of the first data row. When the original identifier does not include the first identifier, remove first addition information to obtain first operation information, wherein the first addition information indicates the addition of the first data row.
[0133] In other embodiments, the processing module 202 is further configured to record first deletion information in a deletion table, which records information about deleted data rows, specifically data rows deleted from multiple original data rows. First addition information is removed from an addition table, which records information about newly added data rows, specifically data rows added compared to the multiple original data rows.
[0134] In other embodiments, the copy module 201 is further configured to, in response to an operation of adding a second data row to a second list, add a second data row to the first list to obtain second updated data of the first list, and update second operation information, which includes second added information; wherein, the data items of the second data row in the second updated data are second components with editing functions, and each second component has a unique second identifier, and the second added information indicates the addition of a second data row. Based on the second updated data and the second operation information, the second list is updated and displayed.
[0135] In other embodiments, the processing module 202 is further configured to determine the maximum length for rendering based on the row and column positions of multiple data rows in the first list, wherein the maximum length includes the maximum number of columns; wherein the multiple data rows include multiple original data rows and second data rows. The second data rows are rendered based on the maximum length, and the data items in the second data rows are rendered as second components with editing capabilities, and each second component is assigned a unique second identifier.
[0136] In other embodiments, the processing module 202 is further configured to query the value of an adder counter, which is used to calculate the difference between newly added data rows and deleted data rows. It then checks whether the value of the adder counter is less than a first threshold. If the value of the adder counter is less than the first threshold, a second data row is added to the first list. If the value of the adder counter is greater than or equal to the first threshold, a second data row is not added to the first list, and the process of updating to obtain the second operation information is not performed.
[0137] The table editing device provided in this application embodiment can execute the method shown in the above method embodiment. Its implementation principle and beneficial effects can be referred to the relevant description in the method embodiment, and will not be repeated here.
[0138] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 4 As shown, the electronic device 400 includes a memory 401 and at least one processor 402.
[0139] The memory 401 is used to store computer program code, which includes computer instructions. These computer instructions run in the aforementioned electronic device to implement the method shown in the above-described method embodiments. For example, the memory may include high-speed random access memory (RAM), and may also include non-volatile memory (NVM), such as at least one disk storage device, or a USB flash drive, portable hard drive, read-only memory, magnetic disk, or optical disk, etc.
[0140] Processor 402 can be a general-purpose processor, including a Central Processing Unit (CPU), a network processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. Processor 402 can also be other general-purpose processors. The general-purpose processor can be a microprocessor or any conventional processor.
[0141] The memory 401 and processor 402 are communicatively connected. For example, the memory 401 can be connected to the processor 402 via a system bus and communicate with it. The system bus can be a peripheral component interconnect (PCI) bus, an extended industry standard architecture (EISA) bus, an industry standard architecture (ISA) bus, etc. The system bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one line is used to represent it in the figure, but this does not mean that there is only one bus or one type of bus.
[0142] Optionally, the memory 401 can be either standalone or integrated with the processor 402. When the memory 401 is set up independently, it is connected to the processor 402 via a system bus.
[0143] This application also provides a chip for executing instructions, which is used to execute the table editing method described in the above embodiments.
[0144] This application also provides a computer-readable storage medium storing computer instructions. When these computer instructions are executed by a processor, they are used to implement the technical solution of the table editing method described in the above embodiments. Specifically, when the computer instructions are executed by a processor, the electronic device can perform the technical solution of the table editing method described in the above embodiments.
[0145] This application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. At least one processor can read the computer program from the computer-readable storage medium, and when the at least one processor executes the computer program, it can implement the technical solution of the table editing method in the above embodiments.
[0146] The aforementioned computer-readable storage medium can be implemented from any type of volatile or non-volatile storage device or a combination thereof, such as Static Random-Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The computer-readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.
[0147] An exemplary computer-readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the storage medium. Of course, the computer-readable storage medium can also be a component of the processor. The processor and the computer-readable storage medium can reside in an application-specific integrated circuit (ASIC). Alternatively, the processor and the computer-readable storage medium can exist as discrete components in an electronic control unit or main control device; this application does not limit this.
[0148] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or modules, and may be electrical, mechanical, or other forms.
[0149] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to implement the solution of this embodiment according to actual needs.
[0150] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing unit, or each module can exist physically separately, or two or more modules can be integrated into one unit. The unit composed of the above modules can be implemented in hardware or in the form of hardware plus software functional units.
[0151] The integrated modules described above, implemented as software functional modules, can be stored in a computer-readable storage medium. These software functional modules, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute some steps of the methods of the various embodiments of this application.
[0152] It should be understood that the steps of the method disclosed in the embodiments of this application can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in the processor.
[0153] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0154] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A table editing method, characterized in that, include: Copy multiple original data rows from the first list to the second list, configure validation rules for the data items in each original data row in the second list, and display the second list; wherein, the data items in each original data row are original components with editing functions, and each original component has a unique original identifier, and the validation rules are used to restrict the data type and / or data range of each data item; In response to the operation of deleting a first data row from the second list, the first data row in the first list is deleted, resulting in first updated data for the first list. Furthermore, based on the first identifier of each first component in the first data row and the original identifier, first operation information is updated to be obtained; wherein the first operation information includes information about newly added data rows or information about deleted data rows. Based on the first updated data and the first operation information, update and display the second list; In response to an edit operation on a first data item in the second list, it is detected whether the edit operation satisfies the data type and / or data range corresponding to the validation rules of the first data item, wherein the edit operation is used to modify the data content of the first data item; If the data type and / or data range corresponding to the validation rules of the first data item are satisfied, the data content in the first data item is modified based on the editing operation.
2. The method according to claim 1, characterized in that, Before copying multiple data rows from the first list to the second list, the method further includes: Render the multiple original data rows in the first list, render the data items in the multiple original data rows as original components with editing functions, and assign a unique original identifier to each original component.
3. The method according to claim 1 or 2, characterized in that, The step of deleting the first data row from the first list to obtain the first updated data of the first list includes: Delete the first data row from the first list to obtain the remaining data rows; The remaining data rows that are located after the first data row are moved up to obtain the first updated data of the first list.
4. The method according to claim 3, characterized in that, The step of updating the first operation information based on the first identifier of each component in the first data row and the original identifier includes: If the original identifier includes the first identifier, first deletion information is recorded to obtain the first operation information, wherein the first deletion information indicates that the first data row is deleted. If the original identifier does not include the first identifier, the first newly added information is removed to obtain the first operation information, and the first newly added information indicates the addition of the first data row.
5. The method according to claim 4, characterized in that, The first deletion information recorded includes: The first deletion information is recorded in the deletion table, which is used to record the information of the deleted data rows. The deleted data rows are specifically the data rows deleted from the multiple original data rows. The removal of the first newly added information includes: Remove the first newly added information from the newly added table, which is used to record information about newly added data rows. Specifically, the newly added data rows are data rows that are added compared to the multiple original data rows.
6. The method according to claim 5, characterized in that, After displaying the second list, the method further includes: In response to the operation of adding a second data row to the second list, the second data row is added to the first list to obtain the second updated data of the first list, and the second operation information is updated to include the second added information; wherein, the data items of the second data row in the second updated data are second components with editing functions, and each second component has a unique second identifier, and the second added information indicates the addition of the second data row; Based on the second updated data and the second operation information, the second list is updated and displayed.
7. The method according to claim 6, characterized in that, The update obtains second operation information, including: The second new information is added to the new table, which is used to record information about the new data rows. Specifically, the new data rows are new data rows compared to the multiple original data rows.
8. The method according to claim 6 or 7, characterized in that, After adding the second data row to the first list, the method further includes: The maximum length for rendering is determined based on the row and column positions of multiple data rows in the first list, wherein the maximum length includes the maximum number of columns; wherein the multiple data rows include the multiple original data rows and the second data row; The second data row is rendered based on the maximum length, and the data items in the second data row are rendered as second components with editing functions, and each second component is assigned a unique second identifier.
9. The method according to claim 8, characterized in that, Before adding the second data row to the first list, the method further includes: Query the value of the adder counter, which is used to count the difference between newly added data rows and deleted data rows; Detect whether the value of the adder counter is less than a first threshold; The step of adding the second data row to the first list includes: If the value of the adder counter is less than the first threshold, a second data row is added to the first list.
10. The method according to claim 9, characterized in that, If the value of the adder counter is greater than or equal to the first threshold, the second data row will not be added to the first list, and the process of updating the second operation information will not be performed.
11. A table editing device, characterized in that, include: The copy module is used to copy multiple original data rows from the first list to the second list, configure validation rules for the data items of each original data row in the second list, and display the second list; wherein, the data items of each original data row are original components with editing functions, and each original component has a unique original identifier; The processing module is configured to respond to an operation of deleting a first data row from the second list, delete the first data row from the first list, obtain first updated data of the first list, and update first operation information based on the first identifier of each first component in the first data row and the original identifier; wherein the first operation information includes information about the newly added data row or information about the deleted data row; The copying module is further configured to update and display the second list based on the first updated data and the first operation information; The processing module is further configured to, in response to an editing operation on a first data item in the second list, detect whether the editing operation satisfies the data type and / or data range corresponding to the validation rules of the first data item, wherein the editing operation is used to modify the data content of the first data item; if the data type and / or data range corresponding to the validation rules of the first data item are satisfied, modify the data content in the first data item based on the editing operation.
12. An electronic device, characterized in that, include: A memory and at least one processor; the memory is communicatively connected to the processor; the memory is used to store computer program code, the computer program code including computer instructions; when the processor executes the computer instructions, the electronic device performs the method as described in any one of claims 1-10.
13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed by a processor, are used to implement the method as described in any one of claims 1-10.
14. A computer program product, characterized in that, When the computer program product is run on a computer / executed by the computer's processor, it implements the method as described in any one of claims 1-10.