Method for realizing dynamic complex data type fields in online table

By introducing metadata configuration and real-time calculation mechanisms into the online spreadsheet system, the shortcomings of cross-table data association, dynamic data reference and aggregate calculation are solved, efficient and flexible dynamic complex data type field management is achieved, and the system's adaptability and user experience are improved.

CN120763136APending Publication Date: 2025-10-10SHENZHEN LAIMI DATA INFORMATION TECHNOLOGY CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510867555.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-26
Publication Date
2025-10-10

AI Technical Summary

Technical Problem

When processing dynamic complex data type fields, existing online spreadsheet systems have problems such as complex cross-table data associations, limitations in dynamic data references, and insufficient flexibility in aggregate calculations, resulting in cumbersome operations, low efficiency, and difficulty in adapting to changing business needs.

Method used

By designing metadata configuration and real-time calculation mechanisms, the management of dynamic complex data type fields is achieved, including bidirectional associative storage of Link fields, dynamic reference of Lookup fields, and real-time aggregation calculation of Rollup fields. The metadata management module provides a unified interface for flexible control of tables and fields.

Benefits of technology

It improves the flexibility and usability of the online spreadsheet system, lowers the user threshold, optimizes storage space, improves query efficiency and system consistency, and adapts to complex business scenario requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120763136A_ABST
    Figure CN120763136A_ABST
Patent Text Reader

Abstract

The invention relates to a method for realizing a dynamic complex data type field by an online table, which comprises the following steps of: 1, defining the configuration of the online table by metadata Metadata, and defining the name and the field information of the data table by the metadata; 2, the table metadata and the field metadata of the table metadata are stored in a metadata collection metadata resource set in a database; 3, a table data storage module achieves efficient management through the database, and each table corresponds to one collection in the database and is used for storing all records in the table; and 4, on the basis of field metadata configuration, in combination with the incidence relation table, ensuring the accuracy and the real-time performance of the data through a dynamic calculation mechanism. The problem that the flexibility of cross-table data association, dynamic data reference and aggregation calculation is insufficient when dynamic complex data type fields are processed in an online table is solved. Complex field types can be easily defined, query efficiency is improved, storage space use is optimized, and system consistency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a data management and processing technology, and in particular to a method for supporting dynamic complex data type fields in an online table system. Background Art

[0002] With the rapid development of information technology, online spreadsheet systems have become widely used in various data management and processing scenarios, such as enterprise data management, project tracking, and financial analysis. In these systems, table fields typically include basic data types such as text, numbers, and dates. However, as demand continues to grow, support for fields with complex data types has become increasingly important. Existing online spreadsheet systems, in particular, have numerous shortcomings when it comes to cross-table joins, dynamic data references, and data aggregation calculations.

[0003] Traditional online spreadsheet systems typically support only static field types and lack flexible cross-table data references and aggregate calculation capabilities. When creating complex data relationships, users often need to manually configure complex logic or rely on external tools to implement these functions, resulting in low efficiency, cumbersome configuration, and poor system maintainability. Furthermore, existing systems lack a unified management approach for handling complex data fields of different types and are unable to quickly adapt to changing business needs.

[0004] Therefore, how to design an online table method that can dynamically support multiple complex data type fields (such as cross-table associations, dynamic references, and data aggregation) has become an urgent problem to be solved in current technology.

[0005] Related technologies have the following major problems when processing dynamic complex data type fields:

[0006] 1. Complexity of cross-table data association

[0007] Existing online spreadsheet systems require manual configuration of complex mapping rules when implementing cross-table data associations (Link fields), which is tedious and error-prone. Furthermore, existing systems lack efficient dynamic processing capabilities for multi-table association data models, resulting in high maintenance costs for these associations.

[0008] 2. Limitations of Dynamic Data References

[0009] In related technologies, users typically need to write scripts or call external tools to implement dynamic references (lookup fields). This approach is not only unfriendly to non-technical users, but also difficult to adapt to complex business scenarios. For example, when data sources change frequently, it is difficult to ensure the real-time and consistency of references.

[0010] 3. Insufficient flexibility in aggregate computing

[0011] Existing systems lack built-in support for scenarios requiring aggregation and analysis, such as summing and averaging rollup fields. Users often rely on external analysis tools or manual processing, which is inefficient and lacks real-time performance.

[0012] Based on the above problems, a new technical solution is urgently needed to automatically generate and manage dynamic complex data type fields in online tables to improve the flexibility and usability of the system while meeting the needs of changing business scenarios. Summary of the Invention

[0013] Aiming at the problem of insufficient flexibility in cross-table data association, dynamic data reference and aggregate calculation when processing dynamic complex data type fields in online tables, a method for implementing dynamic complex data type fields in online tables is proposed.

[0014] The technical solution of the present invention is:

[0015] A method for implementing dynamic complex data type fields in an online form, comprising the following steps:

[0016] Step 1: Design and configure table metadata

[0017] The configuration of online tables is defined by metadata. Metadata defines the name of the data table and the field information of the data table. Each type of field has its own corresponding metadata, which is stored in a metadata table. The metadata management module implements flexible control of the metadata of the table and its fields through a unified interface, supporting dynamic management of fields with complex data types.

[0018] Step 2: Metadata storage and management

[0019] Table metadata and its field metadata are stored in the metadata collection in the database. To implement the metadata management module, the following interfaces must be provided: GetMetadata: query the metadata configuration of a specified table; UpsertMetadata: add or update table metadata, including the field list and field configuration; AddCustomColumn: dynamically add new field configuration to a table; UpdateCustomColumn: modify the metadata configuration of an existing field; DeleteCustomColumn: remove the field configuration from a table.

[0020] Step 3: Storage and management of table data

[0021] The storage module of table data is efficiently managed through the database. Each table corresponds to a collection in the database, which is used to store all records in the table.

[0022] Step four: Real-time computer mechanism of dynamic field

[0023] The value of dynamic field Lookup and Rollup is not directly stored in the database, but generated by real-time calculation; based on field metadata configuration, combined with association table, through dynamic calculation mechanism to ensure the accuracy and real-time of data; the specific implementation is as follows:

[0024] Real-time calculation process of Lookup field

[0025] Lookup field references the data of association table through metadata configuration, and the calculation steps of its value include:

[0026] Step 4.1.1. Determine the dependent Link field: get the dependent Link field ID from the metadata of Lookup field; according to the configuration of Link field and the field value of current record, find all related records of association table;

[0027] Step 4.1.2. Load association table data: according to the association relationship, load all records in the association table that meet the conditions into the memory; form the mapping relationship between the current table record and the association table record;

[0028] Step 4.1.3. Locate the target field: read the "referenced target field ID" from the Lookup field metadata; in the related records of association table, extract the value of the corresponding field according to the target field ID;

[0029] Step 4.1.4. Return the value of Lookup field: take the extracted value as the value of Lookup field of current record;

[0030] Real-time calculation process of Rollup field

[0031] Rollup field is based on Lookup field, and performs aggregation calculation on multiple associated records; the value calculation steps are as follows:

[0032] Step 4.2.1. Get association table data based on Link field: same as Lookup field, first load all related records of association table into memory through Link field;

[0033] Step 4.2.2. Locate the target field: read the "referenced target field ID" from the Rollup field metadata; extract the value set of target field in all related records of association table;

[0034] Step 4.2.3. Perform aggregation calculation: read the configured aggregation function from the Rollup field metadata; apply the aggregation function to the extracted target field value set to calculate the result value;

[0035] Step 4.2.4. Return the Rollup field value: Use the calculation result as the Rollup field value of the current record.

[0036] Furthermore, in step 1, the metadata is as follows:

[0037] Table metadata structure. The metadata of each online table includes the following fields: Field 1: Table ID, the unique identifier of the table, used for internal reference in the system; Field 2: Table name, the collection name of the table in the database, used to uniquely identify the table; Field 3: Table display name, the table name displayed in the user interface for easy operation; Field 4: Table field metadata, a list of field metadata contained in the table;

[0038] Metadata description of complex type fields. Each field metadata contains the following configurations: Field 1: Field ID, the unique identifier of the field; Field 2: Field type, the basic type or complex type of the field. Complex types include Link, Lookup, and Rollup. Field 3: Field type configuration, which defines additional information about the field type. Different types of fields require different configuration fields. Field 4: Field name, the display name of the field in the interface.

[0039] Furthermore, the complex types are described as follows:

[0040] Link field configuration: Implements dynamic association of data between tables, including: 1) Association table ID: Indicates the target table to be associated; 2) Association table field ID: The field in the target table that serves as the association key; 3) Current table value field ID: The field in this table used for association; 4) Association relationship type: Supports one-to-one and many-to-many relationship modes; 5) Field ID to be displayed after association: Specifies the field to be extracted and displayed from the target table;

[0041] Lookup field configuration: references the associated table data through the Link field, including: 1) Link field ID: the dependent Link field identifier; 2) Referenced target field ID: the data field to be referenced in the target table; 3) Return value type: defines the format of the referenced data;

[0042] Rollup field configuration: performs aggregation calculations on related data, including: 1) Link field ID: the dependent Link field identifier; 2) Referenced target field ID: the data field in the target table that participates in the aggregation; 3) Return value type: defines the data type of the aggregation result; 4) Rollup function: specifies the aggregation logic.

[0043] Furthermore, in step one, the field information of the data table includes text, numbers, dates, amounts, labels, links, lookup references, and rollup aggregation type fields.

[0044] Furthermore, in step 2, the front-end page displays the table, calls the GetMetadata interface to obtain the table metadata and renders it as a table; creates or modifies the table, calls the UpsertMetadata interface to create or modify the table; adds fields to the table, calls the AddCustomColumn interface; modifies the table fields, calls the UpdateCustomColumn interface; deletes the table fields, calls the DeleteCustomColumn interface; and the metadata of each table is configured through a visual interface.

[0045] Furthermore, in step 3, the storage rules for different field types are as follows:

[0046] Data storage of common fields: For basic type fields, each record is stored in the collection of the corresponding table in the form of a key-value pair;

[0047] Data storage of the Link field: The Link field records the relationship between tables, and its data is independently stored in a relationships table. The relationships table structure includes: source table ID, source table related field ID, source table field value, target table ID, target table related field ID, and target field value. To implement bidirectional queries, each relationship needs to be recorded twice.

[0048] Data storage of Lookup and Rollup fields: Lookup fields dynamically reference the value of the target table field and perform calculations based on the association relationships in the association table without storing actual data. Rollup fields perform real-time aggregation calculations based on the association table data without storing the result data, and the calculation logic is executed at query time.

[0049] Table data management interface: Table data is the actual user data. The following is the definition of the add, delete, modify and query interface for table data: UpsertRecord: add or update records, including common fields and Link fields; DeleteRecord: delete the specified record and simultaneously clear the associations in the relationships table; GetTableData: query table data and dynamically calculate the values ​​of Link links, Lookup references, and Rollup aggregation dynamic complex fields.

[0050] The beneficial effects of the present invention are:

[0051] This method can be used for field types including but not limited to cross-table associations (Link), dynamic references (Lookup), and aggregate calculations (Rollup). Through the design, storage, and dynamic processing of table metadata and data content, the problems of insufficient management flexibility and poor scalability of dynamic data type fields (such as Link, Lookup, and Rollup) in related technologies are solved. The core idea is to configure data tables and fields in tables through configuration files, which we call metadata. Each type of field has its own unique configuration items. For example, the configuration items of the Link field include the associated table ID (indicating the target table to be associated), the associated relationship type (indicating one-to-one and many-to-many relationships), etc. The front-end and back-end implement the rendering and data access of different types of fields through agreed-upon table and table field configurations.

[0052] 1. Dynamic field configuration provides highly flexible field configuration rules, allowing you to easily define complex field types through configuration files.

[0053] 2. Bidirectional Association Design The bidirectional storage mechanism of the Link field significantly improves query efficiency and is suitable for complex data association scenarios.

[0054] 3. Real-time calculation and storage separation Dynamic fields (Lookup and Rollup) generate values ​​only through calculation without storing data, which optimizes storage space usage and improves system consistency.

[0055] 4. The visual configuration tool has a code-free operation interface, which lowers the threshold for users to create and manage dynamic tables. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] Figure 1 This is a diagram of the process of adding or updating table metadata (corresponding to the UpsertMetadata interface) of the present invention;

[0057] Figure 2 This is a diagram of the configuration process for dynamically adding new fields to a table (corresponding to the AddCustomColumn interface);

[0058] Figure 3 This is a diagram of the process of adding or updating table records (corresponding to the UpsertRecord interface) of the present invention;

[0059] Figure 4 This is a diagram of the table data query process (corresponding to the GetTableData interface) of the present invention. DETAILED DESCRIPTION

[0060] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments. This embodiment is implemented based on the technical solution of the present invention, and provides a detailed implementation method and specific operation process, but the protection scope of the present invention is not limited to the following embodiments.

[0061] A method for implementing dynamic complex data type fields in online tables is divided into detailed implementation steps, including table metadata design and configuration, metadata storage and management, table data storage and management, and a real-time calculation mechanism for dynamic fields.

[0062] Step 1: Table metadata design and configuration

[0063] The configuration of online tables is defined by metadata. Metadata defines information such as the name of the data table and the fields in the data table. Fields include text, numbers, dates, amounts, tags, links, lookup references, rollup aggregations, and other types of fields. Each type of field has its own corresponding metadata (the metadata for each type of field will be explained in detail below). Metadata is stored in a metadata table. The metadata management module uses a unified interface to achieve flexible control of the metadata of tables and fields in the tables, and supports dynamic management of fields with complex data types. The design details of the metadata are as follows:

[0064] Table metadata structure

[0065] The metadata for each online table includes the following fields: Field 1: Table ID, a unique identifier for the table, used for internal system reference. Field 2: Table Name, the name of the table's collection in MongoDB (a NoSQL database), used to uniquely identify the table. Field 3: Table Display Name, the table name displayed in the user interface for ease of operation. Field 4: Table Field Metadata, a list of the field metadata contained in the table.

[0066] Metadata description of complex type fields

[0067] Each field's metadata contains the following configuration: Field 1: Field ID, the field's unique identifier. Field 2: Field Type, the field's basic type (e.g., text, date, number) or complex type (e.g., link, lookup, rollup). Field 3: Field Type Configuration, which defines additional information about the field type (e.g., relationships, calculation rules, etc.). Different field types require different configuration fields. Field 4: Field Name, the field's display name in the interface.

[0068] Link field configuration: Implements dynamic data association between tables, including: 1) Association Table ID: Indicates the target table to be associated. 2) Association Table Field ID: The field in the target table that serves as the association key. 3) Current Table Value Field ID: The field in this table used for the association. 4) Association Relationship Type: Supports both one-to-one and many-to-many relationship modes. 5) Field ID to be displayed after association: Specifies the field to be extracted and displayed from the target table.

[0069] Lookup field configuration: References data in related tables through the Link field, including: 1) Link field ID: The identifier of the dependent Link field. 2) Referenced target field ID: The data field in the target table to be referenced. 3) Return value type: Defines the format of the referenced data (e.g., string, numeric, etc.).

[0070] Rollup field configuration: Performs aggregation calculations on related data, including: 1) Link field ID: The identifier of the dependent link field. 2) Referenced target field ID: The data field in the target table that participates in the aggregation. 3) Return value type: Defines the data type of the aggregation result. 4) Rollup function: Specifies the aggregation logic (such as sum, average, median, etc.).

[0071] Step 2: Metadata storage and management

[0072] Table metadata and its field metadata are stored in the metadata collection in MongoDB (others such as MySQL, TiDB, PostgreSQL, etc. are also acceptable). To implement the metadata management module, the following interfaces must be provided: GetMetadata: Query the metadata configuration of a specified table. UpsertMetadata: Add or update table metadata, including field lists and field configurations, such as Figure 1 AddCustomColumn: Dynamically add new field configuration to the table, such as Figure 2 UpdateCustomColumn: Modify the metadata configuration of an existing field. DeleteCustomColumn: Remove the field configuration from the table.

[0073] The front-end page allows you to display tables (by calling the GetMetadata interface to obtain table metadata and render it as a table), create or modify tables (by calling the UpsertMetadata interface to create or modify a table), add fields to tables (by calling the AddCustomColumn interface), modify table fields (by calling the UpdateCustomColumn interface), and delete table fields (by calling the DeleteCustomColumn interface). Each table's metadata is configured through a visual interface, allowing users to define table structure and field properties without writing code.

[0074] Step 3: Storage and management of table data

[0075] The table data storage module is efficiently managed through MongoDB. Each table corresponds to a collection in MongoDB, which is used to store all records in the table. The storage rules for different field types are as follows:

[0076] Data storage for common fields

[0077] For basic type fields such as text, date, and numeric values, each record is stored in the collection of the corresponding table as a key-value pair. For example:

[0078] {

[0079] "rec_id":"12345",

[0080] "name":"Zhang San",

[0081] "created_date":"2024-12-09"

[0082] Data storage of Link fields

[0083] The Link field records the relationship between tables, and its data is stored independently in a relationships table (relationship table). The relationships table structure includes: source table ID, source table related field ID, source table field value, target table ID, target table related field ID, and target field value. To implement bidirectional queries, each relationship is recorded twice. For example, if table A is linked to table B, the relationship will be stored as: 1. Table A → Table B (i.e., the source table ID in the relationships table is A, and the target table ID is B). 2. Table B → Table A (i.e., the source table ID in the relationships table is B, and the target table ID is A).

[0084] Data storage of Lookup and Rollup fields: Lookup fields: dynamically reference the values of target table fields, calculated based on the associations in the association table, without storing actual data. Rollup fields: perform real-time aggregation calculations (such as sum, count) based on association table data, without storing result data, and the calculation logic is executed at query time.

[0085] Table data management interface

[0086] Table data is actual user data, and the following are the insert, delete, update, and query interface definitions for table data: UpsertRecord: add or update records, including normal fields and Link fields (Lookup references, Rollup aggregation fields do not need to store data), as shown in Figure 3 DeleteRecord: delete specified records and synchronize the removal of associations in the relationships table. GetTableData: query table data, dynamically calculate the values of Link links, Lookup references, and Rollup aggregation dynamic complex fields.

[0087] Step four: real-time calculation mechanism for dynamic fields

[0088] The values of dynamic fields (Lookup and Rollup) are not directly stored in the database, but are generated through real-time calculation. Based on field metadata configuration and association tables, this invention designs an efficient dynamic calculation mechanism to ensure data accuracy and real-time performance. The specific process is as follows:

[0089] Real-time calculation process of Lookup field

[0090] Lookup fields reference the data of association tables through metadata configuration, and the calculation steps of their values include:

[0091] Step 4.1.1. Determine the dependent Link field: obtain the dependent Link field ID from the metadata of the Lookup field. Based on the configuration of the Link field and the field values of the current record, find all related records in the association table.

[0092] Step 4.1.2. Load association table data: according to the association relationship, load all records in the association table that meet the conditions into memory. Form a mapping relationship between the current table record and the association table record.

[0093] Step 4.1.3. Locate the target field: read the "referenced target field ID" from the Lookup field metadata. In the related records of the association table, extract the value of the corresponding field according to the target field ID.

[0094] Step 4.1.4. Return the Lookup field value: Use the extracted value as the Lookup field value of the current record.

[0095] Example

[0096] Assume that there is a record in table A with record_id:123, and its dependent Link field is associated with table B. The Lookup field references the "Amount" field in table B. The calculation process is:

[0097] Use the Link field to find the record in Table A with record_id:123, corresponding to the record in Table B with record_id:456. Extract the "Amount" field value (e.g., "Amount:500") from the record in Table B with record_id:456. Return 500 as the value of the Lookup field.

[0098] Real-time calculation process of the Rollup field

[0099] The Rollup field performs aggregate calculations on multiple related records based on the Lookup field. The calculation steps for its value are as follows:

[0100] Step 4.2.1. Get the associated table data based on the Link field: Similar to the Lookup field, first load all related records of the associated table into memory through the Link field.

[0101] Step 4.2.2. Locate the target field: Read the "referenced target field ID" from the Rollup field metadata. Extract the target field value set from all related records in the associated table.

[0102] Step 4.2.3. Perform aggregation calculation: Read the configured aggregation function (such as sum, average, median, etc.) from the Rollup field metadata. Apply the aggregation function to the extracted target field value set to calculate the result value.

[0103] Step 4.2.4. Return the Rollup field value: Use the calculation result as the Rollup field value of the current record.

[0104] Example

[0105] Assume that table A contains a record with record_id:123, and its dependent Link field is associated with table B. The Rollup field references the "Amount" field in table B and is configured with the Sum aggregate function. The calculation process is as follows:

[0106] Based on the Link field, find the set of records in Table B corresponding to record_id: 123 in Table A (e.g., record_id: 456, 789). Extract the values ​​of the "Amount" field in these two records (e.g., 500, 300). Perform a sum calculation, and the result is 500 + 300 = 800. Return 800 as the value of the Rollup field.

[0107] The above-described embodiment merely represents one embodiment of the present invention. While the description is relatively specific and detailed, it should not be construed as limiting the scope of the patent. It should be noted that a person skilled in the art would be able to make various modifications and improvements without departing from the spirit of the present invention, and these modifications and improvements fall within the scope of protection of the present invention. Therefore, the scope of protection of the patent for this invention shall be determined by the appended claims.

Claims

1. A method for implementing dynamic complex data type fields in an online form, characterized in that: The following steps are involved: Step 1: Table metadata design and configuration The configuration of online tables is defined by metadata. Metadata defines the name of the data table and the field information of the data table. Each type of field has its own corresponding metadata, which is stored in a metadata table. The metadata management module implements flexible control of the metadata of the table and its fields through a unified interface, supporting dynamic management of fields with complex data types. Step 2: Metadata storage and management The table metadata and its field metadata are stored in the metadata collection metadata resource collection in the database; To implement the metadata management module, the following interfaces must be provided: GetMetadata: query the metadata configuration of a specified table; UpsertMetadata: add or update table metadata, including field lists and field configurations; AddCustomColumn: dynamically add new field configurations to a table; UpdateCustomColumn: modify the metadata configuration of an existing field; DeleteCustomColumn: remove the field configuration from a table; Step 3: Storage and management of table data The storage module of table data is efficiently managed through the database. Each table corresponds to a collection in the database, which is used to store all records in the table. Step 4: Real-time calculation mechanism of dynamic fields The values ​​of dynamic fields Lookup and Rollup are not directly stored in the database but generated through real-time calculation. Based on the field metadata configuration and in conjunction with the relationship table, a dynamic calculation mechanism ensures data accuracy and real-time performance. The specific implementation is as follows: Real-time calculation process of Lookup fields The Lookup field references the data in the associated table through metadata configuration. The calculation steps for its value include: Step 4.1.

1. Determine the dependent Link field: Obtain the dependent Link field ID from the Lookup field's metadata. Based on the Link field configuration and the field value of the current record, find all related records in the associated table. Step 4.1.

2. Loading the associated table data: Based on the association relationship, load all records that meet the conditions in the associated table into memory; form a mapping relationship between the current table records and the associated table records; Step 4.1.

3. Locate the target field: Read the "referenced target field ID" from the Lookup field metadata; extract the value of the corresponding field in the related records of the associated table based on the target field ID; Step 4.1.

4. Return the Lookup field value: Use the extracted value as the Lookup field value of the current record; Real-time calculation process of the Rollup field The Rollup field performs aggregate calculations on multiple related records based on the Lookup field. The calculation steps for its value are as follows: Step 4.2.

1. Get the associated table data based on the Link field: Similar to the Lookup field, first load all related records of the associated table into memory through the Link field; Step 4.2.

2. Locate the target field: Read the "referenced target field ID" from the Rollup field metadata; extract the target field value set from all related records in the associated table; Step 4.2.

3. Perform aggregation calculation: Read the configured aggregation function from the Rollup field metadata; apply the aggregation function to the extracted target field value set to calculate the result value; Step 4.2.

4. Return the Rollup field value: Use the calculation result as the Rollup field value of the current record.

2. The method for implementing dynamic complex data type fields in an online form according to claim 1, characterized in that: In step 1, the metadata is as follows: Table metadata structure. The metadata of each online table includes the following fields: Field 1: Table ID, the unique identifier of the table, used for internal reference in the system; Field 2: Table name, the collection name of the table in the database, used to uniquely identify the table; Field 3: Table display name, the table name displayed in the user interface for easy operation; Field 4: Table field metadata, a list of field metadata contained in the table; Metadata description of complex type fields. Each field metadata contains the following configurations: Field 1: Field ID, the unique identifier of the field; Field 2: Field type, the basic type or complex type of the field. Complex types include Link, Lookup, and Rollup. Field 3: Field type configuration, which defines additional information about the field type. Different types of fields require different configuration fields. Field 4: Field name, the display name of the field in the interface.

3. The method for implementing dynamic complex data type fields in an online form according to claim 2, characterized in that: The complex types are described as follows: Link field configuration: Implements dynamic association of data between tables, including: 1) Association table ID: Indicates the target table to be associated; 2) Association table field ID: The field in the target table that serves as the association key; 3) Current table value field ID: The field in this table used for association; 4) Association relationship type: Supports one-to-one and many-to-many relationship modes; 5) Field ID to be displayed after association: Specifies the field to be extracted and displayed from the target table; Lookup field configuration: references the associated table data through the Link field, including: 1) Link field ID: the dependent Link field identifier; 2) Referenced target field ID: the data field to be referenced in the target table; 3) Return value type: defines the format of the referenced data; Rollup field configuration: performs aggregation calculations on related data, including: 1) Link field ID: the dependent Link field identifier; 2) Referenced target field ID: the data field in the target table that participates in the aggregation; 3) Return value type: defines the data type of the aggregation result; 4) Rollup function: specifies the aggregation logic.

4. The method for implementing dynamic complex data type fields in an online form according to claim 1, characterized in that: In step 1, the field information of the data table includes text, numbers, dates, amounts, labels, links, lookup references, and rollup aggregation type fields.

5. The method for implementing dynamic complex data type fields in an online form according to claim 1, characterized in that: In step 2, the front-end page displays the table by calling the GetMetadata interface to obtain the table metadata and render it as a table; to create or modify a table, the UpsertMetadata interface is called to create or modify the table; to add fields to the table, the AddCustomColumn interface is called; to modify table fields, the UpdateCustomColumn interface is called; to delete table fields, the DeleteCustomColumn interface is called; and the metadata of each table is configured through a visual interface.

6. The method for implementing dynamic complex data type fields in an online form according to claim 1, characterized in that: In step 3, the storage rules for different field types are as follows: Data storage of common fields: For basic type fields, each record is stored in the collection of the corresponding table in the form of a key-value pair; Data storage of Link field: Link field records the relationship between tables, and its data is independently stored in a relationships table; The relationships table structure includes: source table ID, source table related field ID, source table field value, target table ID, target table related field ID, target field value; to implement bidirectional query, each relationship needs to be recorded twice; Data storage of Lookup and Rollup fields: Lookup fields dynamically reference the value of the target table field and perform calculations based on the association relationships in the association table without storing actual data. Rollup fields perform real-time aggregation calculations based on the association table data without storing the result data, and the calculation logic is executed at query time. Table data management interface: Table data is the actual user data. The following is the definition of the add, delete, modify and query interface for table data: UpsertRecord: add or update records, including common fields and Link fields; DeleteRecord: delete the specified record and simultaneously clear the associations in the relationships table; GetTableData: query table data and dynamically calculate the values ​​of Link links, Lookup references, and Rollup aggregation dynamic complex fields.

Citation Information

Cited By

  • Metadata object column storage method and system based on slot management

    CN121029764A