DOM-based table configuration method, apparatus and device, and medium
Through the DOM-based table configuration method, table structure changes and data synchronization are automatically processed, which solves the shortcomings of traditional table tools in historical version tracking and permission management, and realizes efficient and reliable table configuration to adapt to dynamic business needs.
Patent Information
- Application Number
- CN202510698617.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-28
- Publication Date
- 2025-09-05
AI Technical Summary
Traditional spreadsheet tools lack the ability to track historical versions, requiring users to manually back up or memorize modified content. Adjusting table structures is inefficient, and manual operations can easily cause data dislocation or loss. Maintaining permission-column mapping relationships is complex, making it difficult to support the iterative needs of dynamic business scenarios.
By receiving the user ID to obtain the historical table and accessible column set, build a virtual document object model DOM, automatically identify new and unchanged fields, establish mapping relationships, realize the automation of table configuration and data synchronization, and reduce maintenance complexity.
It improves the efficiency of table configuration and user experience, supports the iterative needs of dynamic business scenarios, reduces the number of rearrangements and redraws, saves computing resources, and ensures data integrity.
Smart Images

Figure CN120597850A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing, and in particular to a DOM-based table configuration method, apparatus, device, and medium. Background Art
[0002] Traditional spreadsheet tools lack historical version tracking capabilities, forcing users to manually back up or memorize changes. Adjusting table structures requires manual full data migration, which is not only inefficient but also prone to data misalignment or loss. Furthermore, manual maintenance of permission-column mappings can easily lead to permission conflicts or unauthorized access due to oversight. This increases the complexity of maintaining table configurations, degrading the user experience and making it difficult for table configurations to support the iterative demands of dynamic business scenarios. Summary of the Invention
[0003] The embodiments of the present application provide a DOM-based table configuration method, apparatus, device, and medium for reducing the complexity of table configuration, improving user experience, and enabling table configuration to support the iterative requirements of dynamic business scenarios.
[0004] In a first aspect, an embodiment of the present application provides a DOM-based table configuration method, the method comprising:
[0005] Receive a user ID, obtain the history table and accessible column set corresponding to the user ID from the stored user data according to the user ID, and display the history table to the user, including the history table structure and column data of the user's most recent edit;
[0006] Receive a table change request from a user, and generate an initial structure of a target table based on the target column fields and target column coordinates in the table change request;
[0007] Compare the target column fields with the historical fields in the history table to identify newly added fields and unchanged fields;
[0008] Build a virtual document object model (DOM) for the target table, map the newly added and unchanged fields to virtual nodes, establish a mapping relationship between the full column data, virtual nodes, and data locations in the target table, determine the data corresponding to the newly added fields from the full column data, map the data corresponding to the newly added fields to the corresponding locations of the newly added fields in the target table, and copy the data corresponding to the unchanged fields from the historical table to the corresponding locations in the target table. The full column data includes all column data.
[0009] Present the target form to the user.
[0010] Optionally, the above step of obtaining the accessible column set corresponding to the user identifier from the stored user data according to the user identifier specifically includes:
[0011] According to the user identity, the accessible column set is determined through the role-based access control (RBAC) model. The RBAC model assigns permissions through roles and establishes a mapping relationship between roles and accessible column objects.
[0012] Optionally, the above method further includes:
[0013] If based on the user ID, it is determined that the user has no historical access records;
[0014] According to the user ID, the accessible column set corresponding to the user ID is obtained from the stored permission information, and an initial table consisting of all accessible columns is displayed to the user.
[0015] Optionally, if all column data is updated, the above method further includes:
[0016] Extract the updated data corresponding to the updated fields from the updated full column data, overwrite the corresponding positions of the updated fields in the target table, and retain the original data of the unchanged fields.
[0017] Optionally, the table change request further includes table layout adjustment parameters, and the method further includes:
[0018] Adjust the structure of the target table according to the table layout adjustment parameters.
[0019] Optionally, the target column fields are compared with the historical fields in the history table to identify newly added fields and unchanged fields, including:
[0020] Use a difference comparison algorithm to compare the target column fields with the historical fields in the history table to identify new fields and unchanged fields.
[0021] In a second aspect, an embodiment of the present application provides a DOM-based table configuration device, comprising:
[0022] A transceiver module, configured to receive a user identifier;
[0023] A processing module, configured to obtain, from the stored user data, a history table and a set of accessible columns corresponding to the user identifier according to the user identifier;
[0024] The display module is used to display the history table to the user. The history table includes the history table structure and column data edited by the user most recently.
[0025] The sending and receiving module is also used to receive the user's form change request;
[0026] The processing module is further configured to generate an initial structure of a target table based on the target column fields and target column coordinates in the table change request;
[0027] The processing module is also used to compare the target column fields with the historical fields in the history table and identify the newly added fields and the unchanged fields;
[0028] The processing module is further used to construct a virtual document object model DOM for the target table, map the newly added fields and the unchanged fields into virtual nodes, establish a mapping relationship between the full column data, the virtual nodes and the data positions in the target table, determine the data corresponding to the newly added fields from the full column data, map the data corresponding to the newly added fields to the positions corresponding to the newly added fields in the target table, and copy the data corresponding to the unchanged fields from the historical table to the corresponding positions in the target table. The full column data includes all column data.
[0029] The display module is also used to display the target form to the user.
[0030] In a third aspect, the present application provides an electronic device, comprising:
[0031] a memory for storing program instructions;
[0032] The processor is configured to call program instructions stored in the memory and execute the steps included in any one of the methods of the first aspect according to the obtained program instructions.
[0033] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a computer, the computer executes any one of the methods in the first aspect.
[0034] In a fifth aspect, the present application provides a computer program product, which includes: computer program code, which enables the computer to execute any one of the methods in the first aspect when the computer program code is run on a computer. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 A schematic diagram of a system architecture provided in an embodiment of the present application;
[0036] Figure 2 A flowchart of a DOM-based table configuration method provided in an embodiment of the present application;
[0037] Figure 3 A structural diagram of a DOM-based table configuration device provided in an embodiment of the present application;
[0038] Figure 4 A structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0039] In order to make the purpose, technical solutions and advantages of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application. Unless there is a conflict, the embodiments in the present application and the features in the embodiments can be combined with each other in any way. In addition, although a logical order is shown in the flowchart, in some cases, the steps shown or described can be performed in an order different from that here.
[0040] The terms "first" and "second" in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the term "comprising" and any of its variations are intended to cover non-exclusive protection. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units that are not listed, or optionally also includes other steps or units inherent to these processes, methods, products or devices. "Multiple" in this application can mean at least two, for example, two, three or more, and the embodiments of this application are not limited thereto.
[0041] The following description of exemplary embodiments of the present application is made in conjunction with the accompanying drawings, which include various details of the embodiments of the present application to facilitate understanding, and they should be considered as merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope disclosed in this application. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description. It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, which should be considered as exemplary, and their purpose is only to illustrate the feasibility of the implementation of the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.
[0042] In the technical solution of this application, the acquisition, transmission, storage, and use of data comply with the requirements of relevant national laws and regulations.
[0043] Before introducing the DOM-based table configuration method provided in the embodiment of the present application, in order to facilitate understanding, the technical background of the embodiment of the present application is first introduced in detail below.
[0044] Traditional spreadsheet tools lack historical version tracking capabilities, forcing users to manually back up or memorize changes. Adjusting table structures requires manual full data migration, which is not only inefficient but also prone to data misalignment or loss. Furthermore, manual maintenance of permission-column mappings can easily lead to permission conflicts or unauthorized access due to oversight. This increases the complexity of maintaining table configurations, degrading the user experience and making it difficult for table configurations to support the iterative demands of dynamic business scenarios.
[0045] Therefore, the present application provides a DOM-based table configuration method. The method includes: receiving a user identifier, obtaining a historical table and an accessible column set corresponding to the user identifier from the stored user data according to the user identifier, and displaying the historical table to the user, wherein the historical table includes the historical table structure and column data edited by the user most recently. Receive a table change request from the user, and generate the initial structure of the target table based on the target column field and the target column coordinates in the table change request. Compare the target column field with the historical fields in the historical table, and identify the newly added fields and the unchanged fields. Construct a virtual document object model DOM for the target table, map the newly added fields and the unchanged fields to virtual nodes, establish a mapping relationship between the full column data, the virtual nodes, and the data position in the target table, determine the data corresponding to the newly added fields from the full column data, map the data corresponding to the newly added fields to the corresponding position of the newly added fields in the target table, and copy the data corresponding to the unchanged fields from the historical table to the corresponding position in the target table. Among them, the full column data includes all column data. Display the target table to the user.
[0046] In the above method, determining the accessible column set through user identification can realize automatic binding of user permissions and accessible columns, thereby reducing maintenance costs. By storing the user's historical table structure and data, it supports the reuse of the latest version to avoid repeated input and version confusion. By comparing the historical fields with the target column fields, the newly added field data is automatically filled in and the unchanged fields are retained, thereby realizing the automation of structural changes and data synchronization. By introducing the virtual DOM mechanism, compared with the existing technology in which real DOM operations involve multiple browser rearrangements and redrawings, multiple DOM operations can be merged into one, significantly reducing the number of rearrangements and redrawings, saving computing resources and costs. Through field-level comparison and selective copying, the data integrity of unchanged fields is ensured to avoid misoperation. The complexity of table configuration is reduced, the user experience is improved, and the table configuration can support the iterative needs of dynamic business scenarios.
[0047] like Figure 1 As shown, a schematic diagram of an application scenario of an optional DOM-based table configuration method in an embodiment of the present application includes a server 100 and a terminal 101. The server 100 and the terminal 101 can be communicatively connected through a network to implement the DOM-based table configuration method of the present application.
[0048] The user can use the server 100 to interact with the terminal 101 via the network, such as receiving or sending messages, etc. Various client applications can be installed on the terminal 101, such as programming applications, web browser applications, search applications, etc.
[0049] Terminal 100 can be used to receive a user identifier, obtain a historical table and a set of accessible columns corresponding to the user identifier from the stored user data based on the user identifier, and display the historical table to the user. The historical table includes the historical table structure and column data that the user most recently edited. Receive a table change request from the user, generate a target table including target column fields based on the target column identifier and target column coordinates in the table change request, compare the target column fields of the target object in the target table with the historical fields in the historical table, and identify newly added fields and unchanged fields. Build a virtual document object model DOM for the target table, map newly added fields and unchanged fields to virtual nodes, establish a mapping relationship between full column data, virtual nodes, and data positions in the target table, determine the data corresponding to the newly added fields from the full column data, map the data corresponding to the newly added fields to the corresponding positions of the newly added fields in the target table, and copy the data corresponding to the unchanged fields from the historical table to the corresponding positions in the target table. The full column data includes all column data. Display the target table to the user.
[0050] It is understood that in the embodiment of the present application, the server 100 can be implemented as an independent server or a server cluster composed of multiple servers. The terminal 101 can be various electronic devices with a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, desktop computers, etc.
[0051] It should be noted that the above Figure 1 The structure shown is only an example and is not limited in the embodiment of the present invention.
[0052] like Figure 2 As shown in FIG, a flowchart of a DOM-based table configuration method provided in an embodiment of the present application may include the following steps.
[0053] Step S201: Receive a user identifier, obtain a history table and an accessible column set corresponding to the user identifier from stored user data according to the user identifier, and display the history table to the user.
[0054] The history table includes the history table structure and column data edited by the user most recently. The accessible column set includes multiple accessible columns.
[0055] It is understandable that the user identifier is used to identify the user's identity in a specific region. For example, the user identifier can be the character "Zhang San", the identity identifier, etc. The association relationship between the user's accessible column set and the user identifier is pre-stored in the user data. For example, the accessible column can include the accessible column name, data type, etc.
[0056] Optionally, before receiving the user identifier, user-level configuration isolation can be achieved through the sub-model (subModelName) identifier. For example, store the configurations of different users (such as table fields, permission rules) in independent namespaces, and distinguish different users by using subModelName as a prefix / suffix. In this way, user-level data filtering can be achieved in combination with subModelName, ensuring that the configuration modification of user A does not affect the table structure of user B.
[0057] In an optional embodiment, after receiving the user identifier, the accessible columns can be determined according to the user identifier through the role-based access control model RBAC. Among them, the RBAC model assigns permissions through roles and establishes a mapping relationship between roles and accessible column objects.
[0058] For example, based on the RBAC model, the automatic binding of user identifiers and user permissions can be achieved. Specifically, pre-define the association relationship between roles and column names in the permission system (such as {Role A: ["Column 1", "Column 3"], Role B: ["Column 2", "Column 4"]}), and bind the name field of the business column as the unique identifier to the role permissions. When the front end calls the checkRoleColumn(columnName) function, the current user role information and the column name to be verified are automatically sent to the permission service. The visible columns are filtered in real time by querying the checkRoleColumn function, and the visibility is synchronized in real time.
[0059] The above method integrates the column identifier with the RBAC model, solves the problem that traditional tools rely on manual maintenance of the permission mapping table, improves the accuracy of permission control, enables the system to have the ability to dynamically respond to permission changes, and provides fine-grained security protection for various data scenarios.
[0060] Optionally, if it is determined based on the user identifier that the user has no historical access records. Obtain the set of accessible columns corresponding to the user identifier from the stored permission information, and display an initial table composed of all accessible columns to the user.
[0061] In the above method, by determining that the user is accessing for the first time, the user can obtain a customized table view that matches the permissions, without manually checking columns or adjusting the layout, which can improve the user experience.
[0062] For example, the excludeVars parameter is introduced to mark expandable columns that require special handling. The entire list (columnAllList) is traversed, and columns requiring expansion are identified based on the excludeVars value. The primary key value (tabPkNumVal) is used to determine whether the current visit is the first. If so, an initial table is created of all accessible columns for the user. This initial table (defaultOptions and defaultCheck) is then displayed to the user.
[0063] For example, you can call the initData function $refs.columnSetting.initData(excludeVars) to get the initial table or history table. The default option set (defaultOptions) and the default check set (defaultCheck) are used to implement state control during interface initialization.
[0064] Step S202: Receive a table change request from the user, and generate an initial structure of the target table based on the target column fields and target column coordinates in the table change request.
[0065] For example, as shown in Table 1.0 below:
[0066]
[0067] Table 1.0 is the target table that includes target column fields. The target columns in the target table include "Name," "Age," and "Location." "Name" is in the first column and first row of the target table. "Age" is in the second column and first row of the target table. "Location" is in the third column and first row of the target table.
[0068] Optionally, the table change request may further include table layout adjustment parameters, and the structure of the target table may be adjusted according to the table layout adjustment parameters.
[0069] After obtaining the historical table and accessible column objects corresponding to the user ID from the stored user data based on the user ID, the visual configuration component (TableColumnSetting) can provide users with drag-and-drop sorting, column visibility control, and configuration preview functions, allowing users to preview the target table's structure in real time. Among them, the layout adjustment parameters that can be adjusted by users may include column width (width), whether to sort the column (sort), and whether to lock the column (fixed). Default parameters may include display text (label) and a unique identifier (name).
[0070] For example, the layout adjustment parameters received from the user could be {label:'column name', / / display text; name:'fieldKey', / / unique identifier; fixed:false, / / locked; width:150, / / initialize column width; sort:false, / / sort}. The column width is 150, sorting is false, and locking is false. In the default parameters, the display text is the column name, and the unique identifier is the field key.
[0071] In the above method, the user can set the table layout adjustment parameters, which can improve the flexibility of table configuration and enhance the user experience.
[0072] For example, as shown in Table 1.0 below:
[0073]
[0074] Table 1.0 is a target table including target column fields, wherein the target column fields in the target table include "name", "age" and "city".
[0075] For example, columns can be dynamically rendered based on the full column data (columnAllList) and permission status. Table components (el-table) based on the open source component library (Element UI) implement internal loops within the table. columnAllList determines whether to display a column based on whether it is marked as required (isCheck) in the column configuration and the permission function.
[0076]
[0077]
[0078] Step S203: Compare the target column fields with the historical fields in the history table to identify newly added fields and unchanged fields.
[0079] In an optional embodiment, a difference algorithm (Diff) may be used to compare the target column fields with the historical fields in the history table to identify newly added fields and unchanged fields.
[0080] For example, as shown in Table 1.0 and Table 2 below:
[0081]
[0082] Table 1.0 is the target table, including the target column fields. The target column fields in the target table include "Name," "Age," and "Location." Table 2 is the history table. The historical fields in the history table include "Name," "Gender," and "Age." Using the Diff algorithm to compare the target column fields of the target object in the target table with the historical fields in the history table, it can be identified that the newly added field is "Location," while the unchanged fields are "Name" and "Age."
[0083] Step S204: Build a virtual document object model DOM for the target table, map the newly added fields and unchanged fields into virtual nodes, establish a mapping relationship between the full column data, virtual nodes, and data positions in the target table, determine the data corresponding to the newly added fields from the full column data, map the data corresponding to the newly added fields to the corresponding positions of the newly added fields in the target table, and copy the data corresponding to the unchanged fields from the historical table to the corresponding positions in the target table.
[0084] Among them, full column data includes all column data.
[0085] In this method, by introducing a virtual DOM mechanism, multiple DOM operations can be combined into a single one, significantly reducing the number of reflows and redraws required by existing browsers, compared to the existing methods. This significantly reduces the number of reflows and redraws, saving computing resources and costs. By determining the data corresponding to the newly added fields, full data loading can be avoided, saving computing resources. By locating the field position, field-level difference processing can be achieved, enabling bidirectional compatibility between multiple versions of tables.
[0086] In some embodiments, a virtual document object model (DOM) can be constructed for the target table. Newly added fields and unchanged fields are mapped to virtual nodes. The DOM can include a field type identifier (tag) (e.g., 'th', 'td'). A unique field identifier (key) (e.g., a UUID is generated for newly added fields, while unchanged fields use the historical key). A pointer (dataRef) to the full column data (e.g., data[key]). A queue of DOM operations to be executed (patchOps).
[0087] After obtaining the virtual node, the full column data stored in the database is associated with the virtual node, and the row and column coordinates of the virtual node in the target table are stored through a key-index mapping table (e.g., {key:'field_123',row:0,col:2}, where key:'field_123' indicates that the unique identifier of the virtual node is field_123. Row:0 indicates that the row index of the virtual node in the target table is 0. Col:2 indicates that the column index of the virtual node in the target table is 2). The historical table and the target table are then associated with each other through a shared key namespace to obtain a mapping relationship between the full column data, the virtual node, and the data location in the target table.
[0088] After obtaining the mapping relationship between the full column data, virtual nodes, and data positions in the target table, for the newly added fields, extract the new data corresponding to the key from the full data (such as data['field_new']). Locate the target position (such as the third column) through the Key-Index mapping table. Generate a virtual node and insert it into the virtual DOM tree, and record the insertion operation (such as patchOps.push({type:'INSERT',pos:3,vnode}), which means inserting data into the third column). For unchanged fields, reuse the historical virtual nodes, only update the dataRef pointer, and copy the data corresponding to the unchanged fields from the historical table to the corresponding position in the target table.
[0089] For example, you can use the following code to determine the data corresponding to the newly added field from the stored full column data, and add the data corresponding to the newly added field to the corresponding position of the newly added field in the target table:
[0090]
[0091] For example, as shown in Table 1.0, Table 1.1, and Table 2 below:
[0092]
[0093] Table 1.0 is the target table, including the target column fields. The historical fields in the target table include "Name," "Age," and "Location." Table 2 is the history table. The historical fields in the history table include "Name," "Gender," and "Age." Using the Diff algorithm to compare the target column fields of the target object in the target table with the historical fields in the history table, it can be identified that the newly added field is "Location," while the unchanged fields are "Name" and "Age."
[0094] From the stored full column data, determine that the newly added field is the data corresponding to "city / district", add the data corresponding to the newly added field to the corresponding position of the newly added field in the target table, and copy the data corresponding to the unchanged fields "name" and "age" from the historical table to the target table to obtain the target table, that is, Table 1.1.
[0095] Step S205: Display the target table to the user.
[0096] Optionally, you can use a hash check or version number comparison algorithm to quickly identify changes to full column data. This difference comparison identifies updated fields in the full column data. If the full column data has been updated, extract the updated data corresponding to the updated fields from the updated full column data and overwrite the corresponding locations of the updated fields in the target table, retaining the original data of the unchanged fields.
[0097] In the above method, by updating only the data of the update field, compared with the method of updating all the data in the table in the prior art, the update time can be shortened, the efficiency can be improved, and the consumption of computing resources can be reduced.
[0098] It is understandable that the present application can display each table to the user through a visual configuration component (TableColumnSetting).
[0099] Figure 3 This is a schematic diagram of the structure of a DOM-based table configuration device provided in an embodiment of the present application. Figure 3 As shown, the device includes: a transceiver module 301, a processing module 302 and a display module 303.
[0100] The transceiver module 301 is used to receive a user identification;
[0101] Processing module 302, configured to obtain a history table and an accessible column set corresponding to the user identifier from stored user data according to the user identifier;
[0102] Display module 303, used to display the history table to the user, the history table including the history table structure and column data edited by the user most recently;
[0103] The transceiver module 301 is further configured to receive a user's form change request;
[0104] The processing module 302 is further configured to generate an initial structure of a target table based on the target column fields and target column coordinates in the table change request;
[0105] The processing module 302 is further used to compare the target column fields with the historical fields in the history table to identify the newly added fields and the unchanged fields;
[0106] Processing module 302 is further configured to construct a virtual document object model (DOM) for the target table, map the newly added fields and unchanged fields to virtual nodes, establish a mapping relationship between the full column data, the virtual nodes, and the data locations in the target table, determine the data corresponding to the newly added fields from the full column data, map the data corresponding to the newly added fields to the corresponding locations of the newly added fields in the target table, and copy the data corresponding to the unchanged fields from the historical table to the corresponding locations in the target table. The full column data includes all column data.
[0107] The display module 303 is further configured to display the target table to the user.
[0108] Optionally, based on the user identifier, the accessible column set corresponding to the user identifier is obtained from the stored user data. The processing module 302 is specifically configured to:
[0109] According to the user identity, the accessible columns are determined through the role-based access control model (RBAC). The RBAC model assigns permissions through roles and establishes a mapping relationship between roles and accessible column objects.
[0110] Optionally, the processing module 302 is further configured to:
[0111] If based on the user ID, it is determined that the user has no historical access records;
[0112] According to the user ID, the accessible column set corresponding to the user ID is obtained from the stored permission information, and an initial table consisting of all accessible columns is displayed to the user.
[0113] Optionally, if all column data is updated, the processing module 302 is further configured to:
[0114] Extract the updated data corresponding to the updated fields from the updated full column data, overwrite the corresponding positions of the updated fields in the target table, and retain the original data of the unchanged fields.
[0115] Optionally, the table change request also includes table layout adjustment parameters, and the processing module 302 is further configured to:
[0116] Adjust the structure of the target table according to the table layout adjustment parameters.
[0117] Optionally, the target column fields are compared with the historical fields in the history table to identify newly added fields and unchanged fields. The processing module 302 is specifically configured to:
[0118] Use a difference comparison algorithm to compare the target column fields with the historical fields in the history table to identify new fields and unchanged fields.
[0119] Based on the same technical concept, an electronic device is also provided in an embodiment of the present application. The electronic device can implement the functions of the aforementioned DOM-based table configuration device.
[0120] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0121] At least one processor 401, and a memory 402 connected to the at least one processor 401. The specific connection medium between the processor 401 and the memory 402 is not limited in the embodiment of the present application. Figure 4 In the example, the processor 401 and the memory 402 are connected via a bus 400. Figure 4 The bus 400 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 The diagram is represented by only one thick line, but this does not mean that there is only one bus or one type of bus. Alternatively, the processor 401 may also be referred to as a controller, without limitation to the name.
[0122] In the embodiment of the present application, the memory 402 stores instructions that can be executed by at least one processor 401. The at least one processor 401 can execute the angular momentum prediction method of a lunar orbit satellite discussed above by executing the instructions stored in the memory 402. The processor 401 can implement Figure 4 The functions of each module in the device shown.
[0123] Among them, the processor 401 is the control center of the device, which can use various interfaces and lines to connect the various parts of the entire control device, and monitor the device as a whole by running or executing instructions stored in the memory 402 and calling data stored in the memory 402, the various functions of the device and processing data.
[0124] In one possible design, processor 401 may include one or more processing units. Processor 401 may integrate an application processor and a modem processor. The application processor primarily processes the operating system, driver interface, and application programs, while the modem processor primarily handles wireless communications. It is understood that the modem processor may not be integrated into processor 401. In some embodiments, processor 401 and memory 402 may be implemented on the same chip. In some embodiments, they may also be implemented on separate chips.
[0125] The processor 401 can be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component, and can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the DOM-based table configuration method disclosed in the embodiments of the present application can be directly embodied as being executed by a hardware processor, or can be executed by a combination of hardware and software modules in the processor.
[0126] The memory 402 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The memory 402 may include at least one type of storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory, a random access memory (Random Access Memory, RAM), a static random access memory (Static Random Access Memory, SRAM), a programmable read-only memory (Programmable Read Only Memory, PROM), a read-only memory (Read Only Memory, ROM), an electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), a magnetic memory, a disk, an optical disk, etc. The memory 402 is any other medium that can be used to carry or store a desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory 402 in the embodiment of the present application can also be a circuit or any other device that can realize a storage function, for storing program instructions and / or data.
[0127] By designing and programming the processor 401, the code corresponding to the method for predicting the angular momentum of a lunar orbit satellite described in the above embodiment can be fixed into the chip, so that the chip can execute the code when running. Figure 2 The embodiment shown is a DOM-based table configuration method. How to design and program the processor 401 is a well-known technology to those skilled in the art and will not be described in detail here.
[0128] It should be noted here that the above-mentioned electronic device provided in the embodiment of the present application can implement all the method steps implemented in the above-mentioned method embodiment and can achieve the same technical effect. The parts and beneficial effects of this embodiment that are the same as those in the method embodiment will not be described in detail here.
[0129] An embodiment of the present application further provides a computer-readable storage medium, which stores computer-executable instructions. The computer-executable instructions are used to enable a computer to execute a DOM-based table configuration method in the above embodiment.
[0130] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0131] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 Process or processes and / or boxes Figure 1 A device that performs the functions specified in a box or multiple boxes.
[0132] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 Process or processes and / or boxes Figure 1 The function specified in the box or boxes.
[0133] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 Process or processes and / or boxes Figure 1 Steps to perform the functions specified in a box or boxes.
[0134] Obviously, those skilled in the art may make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalents, this application is intended to include these modifications and variations.
Claims
1. A table configuration method based on DOM, characterized in that: The method comprises: Receive a user identifier, obtain a history table and a set of accessible columns corresponding to the user identifier from stored user data according to the user identifier, and display the history table to the user, the history table including the history table structure and column data most recently edited by the user; Receive a table change request from a user, and generate an initial structure of a target table based on target column fields and target column coordinates in the table change request; Comparing the target column fields with the historical fields in the historical table to identify newly added fields and unchanged fields; Constructing a virtual document object model DOM for the target table, mapping the newly added fields and the unchanged fields to virtual nodes, establishing a mapping relationship between full column data, the virtual nodes, and data positions in the target table, determining data corresponding to the newly added fields from the full column data, mapping the data corresponding to the newly added fields to corresponding positions of the newly added fields in the target table, and copying data corresponding to unchanged fields from the historical table to corresponding positions in the target table, wherein the full column data includes all column data; The target form is presented to the user.
2. The method according to claim 1, characterized in that The step of obtaining the accessible column set corresponding to the user identifier from the stored user data according to the user identifier specifically includes: The accessible columns are determined according to the user identifier through a role-based access control (RBAC) model. The RBAC model assigns permissions through roles and establishes a mapping relationship between roles and accessible column objects.
3. The method according to claim 1, characterized in that The method further comprises: If, based on the user identifier, it is determined that the user has no historical access record; According to the user ID, a set of accessible columns corresponding to the user ID is obtained from the stored permission information, and an initial table consisting of all accessible columns is displayed to the user.
4. The method according to claim 1, wherein If the full column data is updated, the method further includes: The updated data corresponding to the updated fields are extracted from the updated full column data, and the updated data corresponding to the updated fields in the target table are overwritten, while the original data of the unchanged fields are retained.
5. The method according to claim 1, wherein The table change request further includes table layout adjustment parameters, and the method further includes: The structure of the target table is adjusted according to the table layout adjustment parameters.
6. The method according to claim 1, characterized in that Comparing the target column fields with the historical fields in the historical table to identify newly added fields and unchanged fields, specifically including: A difference comparison algorithm is used to compare the target column fields with the historical fields in the historical table to identify the newly added fields and the unchanged fields.
7. A table configuration device based on DOM, characterized in that: include: A transceiver module, configured to receive a user identifier; A processing module, configured to obtain, from stored user data according to a user identifier, a history table and an accessible column set corresponding to the user identifier; A display module, configured to display the history table to the user, wherein the history table includes the history table structure and column data most recently edited by the user; The transceiver module is further configured to receive a form change request from a user; The processing module is further configured to generate an initial structure of a target table based on the target column fields and target column coordinates in the table change request; The processing module is further configured to compare the target column fields with the historical fields in the historical table to identify newly added fields and unchanged fields; The processing module is further configured to construct a virtual document object model (DOM) for the target table, map the newly added fields and the unchanged fields to virtual nodes, establish a mapping relationship between full column data, virtual nodes, and data positions in the target table, determine data corresponding to the newly added fields from the full column data, map the data corresponding to the newly added fields to positions corresponding to the newly added fields in the target table, and copy data corresponding to unchanged fields from the historical table to corresponding positions in the target table, wherein the full column data includes all column data. The display module is further configured to display the target table to the user.
8. An electronic device, characterized in that: include: a memory for storing program instructions; A processor is configured to call the program instructions stored in the memory, and execute the steps included in the method according to any one of claims 1 to 6 according to the obtained program instructions.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions. When the program instructions are executed by a computer, the computer is caused to perform the method according to any one of claims 1 to 6.
10. A computer program product, characterized in that The computer program product comprises: a computer program code, and when the computer program code is run on a computer, the computer is caused to execute the method according to any one of claims 1 to 6.