Design and analysis method and system for general data storage form configuration file

By designing a general form configuration file for data storage and generating configuration files for SQL statements, the problem of lack of table structure association in the existing technology of data storage is solved, efficient data storage and query of dynamic forms is realized, and data analysis and statistics are simplified.

CN119621754AInactive Publication Date: 2025-03-14科来网络技术股份有限公司
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510169737.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-17
Publication Date
2025-03-14
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing technology lacks table structure correlation when data is entered into the database, which makes data analysis, aggregation and searching very troublesome and time-consuming, and it is difficult to meet the complex functional form configuration requirements.

Method used

A general form configuration file for data storage is designed, and dynamic form configuration file data generation is used for SQL statements to realize the storage and query of form filling data. This configuration file includes dynamic form table name, field name, foreign key field name and table table name, and supports one-to-one and one-to-many form configuration and data association query.

Benefits of technology

It realizes direct data entry and query of dynamic forms, simplifies data analysis and statistics, facilitates data migration and extraction, and meets the needs of complex form configuration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119621754A_ABST
    Figure CN119621754A_ABST
Patent Text Reader

Abstract

The invention provides a design and analysis method and system for a general form configuration file for data storage, and the method comprises the steps: each dynamic form corresponds to dynamic form configuration file data, generating an SQL statement through the dynamic form configuration file data, and completing the data storage and query; wherein the dynamic form comprises a single form control and / or table control, the dynamic form configuration file data comprises a dynamic form name, a field name, a foreign key field name and a table name, and each dynamic form name and each table name correspond to one data table; the dynamic forms are in one-to-one correspondence with the table names of the dynamic forms, and all controls in the dynamic forms are in one-to-one correspondence with field names in the corresponding dynamic forms; the table control corresponds to the table name, and meanwhile the incidence relation between the table and the dynamic form table is established through the foreign key field name. According to the method, when the dynamic form is subjected to data filling and storage, the SQL statement is directly generated through the configuration field for data direct storage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of visual data storage, and in particular to a design and analysis method and system for a general form configuration file for data storage. Background Art

[0002] Among the functions of interface visualization, there is a part called dynamic form. The current solutions generally involve two parts: configuration and storage. There are two common solutions to realize the functions of these two parts: Solution 1: Commonly used in mobile activity information collection, it provides multiple form controls to achieve fast interface drag and drop to generate activity page effects, and stores form configuration and form filling content in JSON data format. The solution does not directly manage the database and store data in the data table.

[0003] The disadvantage of this solution is that the application scenario is single and the form configuration is simple, which cannot meet the complex functional form configuration requirements. The data is stored in json format without table structure association, which makes data analysis, aggregation search and other requirements very troublesome and time-consuming. The configuration file is json data, and does not consider how to fill in and save the form data and how to use the database storage strategy for complex data relationships in conjunction with the constraints of the configuration file.

[0004] Solution 2: Commonly used in the form interface configuration of the backend management system, there are single forms and complex forms added by combining single forms with batch forms. Use json-schema technology to drag and drop the form design and generate a json configuration file for storage. When filling out the form, a corresponding json data record is generated through the json configuration file for string conversion, and a json string field is stored in the database. There is no table association in the relational database. If the table association needs to be stored in the library, a customized strategy is required to extract the mapping field and store it through the attribute key value of the form configuration.

[0005] This solution can support relatively complex form design and filling scenarios, but it also stores data in json format, without table structure association, which is very troublesome and time-consuming to perform data analysis, aggregation search, etc. It is very troublesome to perform data migration and extraction. The configuration file is json data, and it does not consider how to save the form data and use the constraints of the configuration file for database storage strategies with complex data relationships. Summary of the invention

[0006] In view of the problems existing in the prior art, a design and parsing method and system for a general form configuration file for data entry are provided. Based on the database, one-to-one and one-to-many form configuration, form display, associated database data associated query storage and data echo functions of dynamic forms can be realized.

[0007] The first aspect of the present invention proposes a method for designing a general form configuration file for data storage, comprising: Each dynamic form corresponds to dynamic form configuration file data, and SQL statements are generated through the dynamic form configuration file data to complete the storage and query of form filling data; Among them, the dynamic form includes a single form control and / or table control, the dynamic form configuration file data includes the dynamic form table name, field name, foreign key field name and table name, each dynamic form table name corresponds to a data table; each dynamic form corresponds to the dynamic form table name one by one, all controls in the dynamic form correspond to the field names in the corresponding dynamic form table one by one; the table control corresponds to the table name one by one, and at the same time, the association relationship between the table and the dynamic form table is established through the foreign key field name.

[0008] As a preferred solution, the dynamic form configuration file data is stored in JSON data format.

[0009] As a preferred solution, when the dynamic form includes only a single form control, the dynamic form configuration file data specifically includes: The dynamic form table name field is used to identify the database entry table name information; Primary key field, used in business scenarios for adding, deleting, modifying, and obtaining data details when filling out data in a form; Configuration data field, stored in JSON array format, used to record the configuration of each form control; For each form control, including the field name, it is used to identify the field information of the filled-in form data to be stored in the database, and is parsed into SQL statements by the form engine and stored in the database.

[0010] As a preferred solution, when the dynamic form includes both a single form control and a table control, the dynamic form configuration file data specifically includes: The dynamic form table name field is used to identify the dynamic form table name information entered into the database; Primary key field, used in business scenarios for adding, deleting, modifying, and obtaining data details when filling out data in a form; Configuration data fields, stored in JSON array format, are used to record the configuration of each form control and table control; For each form control, including the field name, it is used to identify the field information of the filled-in form data to be stored in the database, and is parsed into SQL statements by the form engine and stored in the database; For table controls, they include identification fields, table name fields, foreign key fields, and sub-table fields. The identification field is used to identify that the control belongs to the table control; the table name field is used to bind the data table corresponding to the newly added sub-forms in batches; the foreign key field is used to associate the relationship between the table and the dynamic form table; the sub-table field originates from the field in the associated table and is used to identify the field information for subsequent filling in of table control data into the database.

[0011] The second aspect of the present invention proposes a method for parsing a data storage universal form configuration file, which is implemented based on the design method of the data storage universal form configuration file described in the first aspect, and includes: Add new data, combine the data filled in the dynamic form and the data in the dynamic form configuration file, and parse the form engine and write it into the database; To delete data, the form engine uses the primary key field, foreign key field and dynamic form table name field in the dynamic form configuration file data to perform SQL statement parsing and deletion; To query data, the form engine uses the primary key field, foreign key field and dynamic form table name field in the dynamic form configuration file data to perform SQL statement parsing and deletion.

[0012] As a preferred solution, the specific process of parsing and writing the form engine into the database includes: By identifying the field, determine whether the dynamic form contains a table control. If not, directly parse the dynamic form configuration file data through the form engine to complete the data entry; if it does, first complete the data entry of a single form control in the dynamic form through the form engine, and then complete the data entry of the table control.

[0013] As a preferred solution, the data storage is completed by directly parsing the dynamic form configuration file data through the form engine, which specifically includes: Based on the UUID rule, the primary key field data is generated, the dynamic form filled data is combined with the configured field name and the dynamic form table name field to perform SQL statement parsing, and the SQL statement is executed to perform data storage operations.

[0014] As a preferred solution, the data storage of a single form control in a dynamic form is first completed by the form engine, and then the data storage of the table control is completed, which specifically includes: Temporarily store the data filled in the form in the cache; Generate primary key field data based on UUID rules, parse SQL statements by combining the data filled in a single form control in the dynamic form with the configured field name and the dynamic form table name field, and execute SQL statements to store data in the database; After completing the data entry into the dynamic form table, assign the primary key field data generated by the dynamic form table to the foreign key field, merge the data filled in the form control through the table name field, sub-table field and foreign key field configured by the form control to perform SQL statement parsing, and execute the SQL statement to enter the data filled in by multiple form controls into the database.

[0015] The third aspect of the present invention proposes a system including a memory and a processor, wherein the memory stores a computer program corresponding to the method for designing a universal form configuration file for data entry as described in the first aspect and capable of being loaded and executed by the processor.

[0016] A fourth aspect of the present invention proposes a system including a memory and a processor, wherein the memory stores a computer program corresponding to the method for parsing a general form configuration file for data entry as described in the second aspect and which can be loaded and executed by the processor.

[0017] Compared with the prior art, the beneficial effect of adopting the above technical solution is as follows: the present invention adds table field mapping relationship configuration on the basis of supporting relatively complex one-to-one and one-to-many form filling. By configuring the dynamic form table name, field name, and foreign key name, the configured dynamic form can directly save the SQL statement generated by the configured field when filling in the data and directly enter the data into the database. When the data is echoed, the SQL statement can also be generated by configuring the field to query the data and generate preview data. In addition, since the table fields of the relational database are stored in the database, it is convenient for later query and statistics of the data, and data migration and extraction are also very convenient. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 This is a schematic diagram of the design method of the general form configuration file for data storage proposed by the present invention.

[0019] Figure 2 A schematic diagram of a dynamic form of “data identification rules” in one embodiment of the present invention.

[0020] Figure 3 This is a schematic diagram of a dynamic form of a “user-associated role list” in one embodiment of the present invention. DETAILED DESCRIPTION

[0021] Embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar modules or modules with the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be construed as limitations on the present application. On the contrary, the embodiments of the present application include all changes, modifications and equivalents that fall within the spirit and connotation of the appended claims.

[0022] In order to solve the problem that traditional solutions are difficult to meet the database storage strategy of data analysis, aggregated query and complex data relationships, the embodiment of the present invention proposes a design method for a general form configuration file for data entry. Please refer to Figure 1 It mainly constructs the dynamic form configuration file data corresponding to the dynamic form, generates SQL statements through the dynamic form configuration file data, and completes the storage and query of form filling data.

[0023] In this embodiment, the dynamic form may include only a single form control, or may include a table control on the basis of including a single form control, and the table control is used to form data in batches. Generally, the dynamic form configuration file data includes the dynamic form table name, field name, foreign key field name and table name, each dynamic form table name and table name correspond to a data table; each dynamic form corresponds to the dynamic form table name one by one, and all controls in the dynamic form correspond to the field names in the corresponding dynamic form table one by one; the table control corresponds to the table name one by one, and the association relationship between the table and the dynamic form table is established through the foreign key field name.

[0024] In the following, this embodiment is described by respectively taking a dynamic form having only a single form control and a dynamic form having both a single form control and a table control.

[0025] 1. Contains only a single form control The entire dynamic form profile data is stored in JSON data format, and its contents include: (1) The dynamic form table name field tableName is used to identify the database entry table name information; (2) The primary key field primaryKey, in this embodiment, is set to "id" by default and is used in business scenarios such as adding data, deleting data, modifying data, and obtaining data details when filling out form data. This field is the unique identifier of the table and is required for configuration.

[0026] (3) The configuration data field configData is stored in the form of a JSON array and is used to record the configuration of each form control; (4) Field name field, corresponding to each form control, is placed in the configuration data field configData. It is mainly used to identify the field information of the filled-in form data to be stored in the database, and is parsed into SQL statements by the form engine and stored in the database; It should be noted that, in this embodiment, only key field information is mentioned in the dynamic form configuration file data, which can be deleted or added as needed in practice. For example, for each form control information in the configuration data field configData, in addition to the field name field, it can also include the type type used to represent the generation form of the data and the theme title used to represent the theme information of the data.

[0027] Next, for Figure 2 The following figure shows a dynamic form that configures "data identification rules". This example is used to explain the dynamic form configuration file data (the configuration file only illustrates key configuration items, and the actual business scenario is more complex and has more constraints): { "id": "7c9fd198-25c8-429b-8361-05f4f0c888eb", "name": "Data Identification Rules", "tableName": "data_match_rule", "primaryKey":"id", "configData": { "rule": [ { "type": "input", "field": "name", "title": "Name" }, { "type": "select", "field": "type", "title": "Data Classification" }, { "type": "select", "field": "level", "title": "Data Classification" }, { "type": "input", "field": "location", "title": "Identify Location" }, { "type": "input", "field": "status", "title": "Recognition Status" } ] } } (ii) Contains both a single form control and a table control Among them, the table control is a control for adding sub-forms in batches. The form configuration for adding sub-forms in batches does not need to consider the technology stack type of the interface implementation, but only needs to consider the key constraint fields, which can be used by the form engine to use strategies to parse the form configuration file and store the form filled data. Its main contents are as follows: (1) The dynamic form table name field tableName is used to identify the database entry table name information; (2) The primary key field primaryKey, in this embodiment, is set to "id" by default and is used in business scenarios such as adding data, deleting data, modifying data, and obtaining data details when filling out form data. This field is the unique identifier of the table and is required for configuration.

[0028] (3) The configuration data field configData is stored in the form of a JSON array and is used to record the configuration of each form control; (4) Field name field, corresponding to each form control, is placed in the configuration data field configData. It is mainly used to identify the field information of the filled-in form data to be stored in the database, and is parsed into SQL statements by the form engine and stored in the database; (5) Identify the field dataType, which mainly determines whether there is a form control in the dynamic form by judging whether the field is configured as "multiple". Generally, when filling in form data in a form control, the form engine marks the corresponding data with the identifier "multiple".

[0029] (6) The table name field children is used to bind the data table corresponding to the newly added subforms in batches.

[0030] (7) The foreign key field foreignKey is used to associate the table table with the dynamic form table.

[0031] (8) The sub-table field filed1 originates from the field in the associated table and is used to identify the field information for subsequent filling in of table control data into the database.

[0032] Similar to the configuration file data that only contains a single form control, the above record only describes that only key field information is mentioned in the dynamic form configuration file data, which can be deleted or added as needed. For example, for each form control information in the configuration data field configData, in addition to the field name field, it can also contain the type type used to represent the data generation format and the subject title used to represent the subject information of the data.

[0033] It should be noted that the foreign key field name and table name are generated when there is a table control in the dynamic form.

[0034] Next, for Figure 3 The following figure shows the dynamic form for configuring the "user-associated role list". This figure takes it as an example to explain the dynamic form configuration file data (the configuration file only illustrates key configuration items, and the actual business scenario is more complex and has more constraints): { "id": "7c9fd198-25c8-429b-8361-05f4f0c888eb", "name": "User-associated role list", "tableName": "user", "configData": { "rule": [ { "type": "input", "field": "name", "title": "User Name" }, { "type": "select", "field": "type", "title": "User Type" }, { "type": "tableForm", "tableName": "role", "title": "User Role List", "foreignKey":"user_id", "children":[ { "type": "input", "field": "name", "title": "Role name" }, { "type": "select", "field": "type", "title": "Role Type" }, { "type": "select", "field": "permission", "title": "Role Permissions" } ] } ] } } The design method of the data entry general form configuration file proposed in the embodiment of the present invention can perform one-to-one or one-to-many form configuration, form display, associated database data associated query storage and data echo functions based on the database.

[0035] Furthermore, the embodiment of the present invention also proposes a method for parsing a data storage universal form configuration file, which is implemented based on the aforementioned design method of the data storage universal form configuration file, and includes: Add new data, combine the data filled in the dynamic form and the data in the dynamic form configuration file, and parse the form engine and write it into the database; To delete data, the form engine uses the primary key field primaryKey, the foreign key field foreignKey and the dynamic form table name field tableName in the dynamic form configuration file data to perform SQL statement parsing and deletion; To query data, the form engine uses the primary key field primaryKey, the foreign key field foreignKey and the dynamic form table name field tableName in the dynamic form configuration file data to perform SQL statement parsing and deletion.

[0036] Among them, for the process of adding new data, data is entered into the database in two ways mainly depending on whether the dynamic form contains table controls.

[0037] In this embodiment, whether the dynamic form includes a table control is mainly determined by the identification field in the configuration file, that is, whether the identification field is "multiple" is determined. If so, it means it exists, otherwise it means it does not exist.

[0038] If there is no table control in the dynamic form, the form engine will directly parse the dynamic form configuration file data to complete the data entry. Specifically, based on the UUID rule, the primary key field primaryKey data is generated, the dynamic form filled data is combined with the configured field name field and the dynamic form indicated field tableName to perform SQL statement parsing, and then the SQL statement is executed to perform the database entry operation (the form engine automatically generates SQL statements compatible with different database types according to different database types).

[0039] If there is a table control in the dynamic form, the data entry of a single form control in the dynamic form will be completed through the form engine first, and then the data entry of the table control will be completed. Specifically, it will be necessary to prioritize the data with the identification field dataType of "multiple" in the data filled in the form and temporarily store it in the cache. This process is the data processing strategy of the form engine. For example, if the control type in the form is tableForm, that is, a table control, the data filled in and submitted by the user will be marked with the data identification dataType of "multiple" in the form engine. The form configuration file is used for UI presentation, and the filled in data will be parsed and processed in the form engine in combination with the configuration.

[0040] Then, based on the UUID rule, the primary key field primaryKey data is generated, the form data is combined with the configured field name field and the dynamic form table name field tableName to perform SQL statement parsing, and then the SQL statement is executed to perform database storage operations (the form engine automatically generates SQL statements compatible with different databases based on different database types).

[0041] After the dynamic form table data is successfully entered into the database, the primary key field primaryKey data generated by the main form is assigned to the foreign key field foreignKey, and then the data filled in the table control is merged through the table name field children, the sub-table field field, and the foreign key field foreignKey configured by the table control; then based on the UUID rule, the form engine generates the primaryKey field data, combines the form filled data with the configured field field and tableName field to perform SQL statement parsing, and then executes the SQL statement to perform database storage operations on multiple sub-form filled data.

[0042] Based on the design and parsing method of the universal form configuration file proposed in the present invention, the development and implementation of the form engine can be carried out across platforms and technology stacks. Because it is based on JSON data configuration, data can be filled in, saved, and directly parsed and written into the database for storage as long as the key field constraints of the design are met.

[0043] An embodiment of the present invention further proposes a system, including a memory and a processor, wherein the memory stores a computer program corresponding to the design method of the aforementioned data entry general form configuration file, which can be loaded and executed by the processor.

[0044] The embodiment of the present invention further proposes a system, including a memory and a processor, wherein the memory stores a computer program corresponding to the parsing method of the aforementioned data entry general form configuration file that can be loaded and executed by the processor.

[0045] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer readable medium, and the computer program includes a program code for executing the method shown in the flowchart.

[0046] It should be noted that the computer-readable medium shown in the embodiment of the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate, or transmit programs for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0047] The flowchart and block diagram in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the system, method and computer program product according to various embodiments of the present application. Wherein, each box in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0048] The units involved in the embodiments described in this application may be implemented by software or hardware, and the units described may also be set in a processor. The names of these units do not, in some cases, constitute limitations on the units themselves.

[0049] As another aspect, the present application also provides a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. A processor of a computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the method for designing a general form configuration file for data entry or the method for parsing a general form configuration file for data entry described in the above embodiment.

[0050] As another aspect, the present application also provides a computer-readable medium, which may be included in the electronic device described in the above embodiment; or may exist independently without being assembled into the electronic device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by an electronic device, the electronic device implements the design method of the data entry general form configuration file or the parsing method of the data entry general form configuration file described in the above embodiment.

[0051] It should be noted that, although several modules or units of the equipment for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.

[0052] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software, or by combining software with necessary hardware. Therefore, the technical solution according to the implementation method of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the implementation method of the present application.

[0053] For those skilled in the art, the specific meanings of the above terms in the present invention can be understood in specific situations; the drawings in the embodiments are used to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings herein can be arranged and designed in various different configurations.

[0054] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations on the present application. Ordinary technicians in this field can change, modify, replace and modify the above embodiments within the scope of the present application.

Claims

1. A method for designing a general form configuration file for data storage, characterized in that: include: Each dynamic form corresponds to dynamic form configuration file data, and SQL statements are generated through the dynamic form configuration file data to complete the storage and query of form filling data; Among them, the dynamic form includes a single form control and / or table control, the dynamic form configuration file data includes the dynamic form table name, field name, foreign key field name and table name, each dynamic form table name and table name correspond to a data table; each dynamic form corresponds to the dynamic form table name one by one, all controls in the dynamic form correspond to the field names in the corresponding dynamic form table one by one; the table control corresponds to the table name one by one, and at the same time, the association relationship between the table and the dynamic form table is established through the foreign key field name.

2. The method for designing a general form configuration file for data storage according to claim 1, characterized in that: The dynamic form configuration file data is stored in JSON data format.

3. The method for designing a general form configuration file for data storage according to claim 1 or 2, characterized in that: When the dynamic form includes only a single form control, the dynamic form configuration file data specifically includes: The dynamic form table name field is used to identify the database entry table name information; Primary key field, used in business scenarios for adding, deleting, modifying, and obtaining data details when filling out data in a form; Configuration data field, stored in JSON array format, used to record the configuration of each form control; For each form control, including the field name, it is used to identify the field information of the filled-in form data to be stored in the database, and is parsed into SQL statements by the form engine and stored in the database.

4. The method for designing a general form configuration file for data storage according to claim 1 or 2, characterized in that: When the dynamic form includes both a single form control and a table control, the dynamic form configuration file data specifically includes: The dynamic form table name field is used to identify the dynamic form table name information entered into the database; Primary key field, used in business scenarios for adding, deleting, modifying, and obtaining data details when filling out data in a form; Configuration data fields, stored in JSON array format, are used to record the configuration of each form control and table control; For each form control, including the field name, it is used to identify the field information of the filled-in form data to be stored in the database, and is parsed into SQL statements by the form engine and stored in the database; For table controls, they include identification fields, table name fields, foreign key fields, and sub-table fields. The identification field is used to identify that the control belongs to the table control; the table name field is used to bind the data table corresponding to the newly added sub-forms in batches; the foreign key field is used to associate the relationship between the table and the dynamic form table; the sub-table field originates from the field in the associated table and is used to identify the field information for subsequent filling in of table control data into the database.

5. A method for parsing a general form configuration file for data storage, characterized in that: The design method of the data storage general form configuration file according to any one of claims 1 to 4 is implemented, comprising: Add new data, combine the data filled in the dynamic form and the data in the dynamic form configuration file, and parse the form engine and write it into the database; To delete data, the form engine uses the primary key field, foreign key field and dynamic form table name field in the dynamic form configuration file data to perform SQL statement parsing and deletion; To query data, the form engine uses the primary key field, foreign key field and dynamic form table name field in the dynamic form configuration file data to perform SQL statement parsing and deletion.

6. The method for parsing a data storage general form configuration file according to claim 5, characterized in that: The specific process of parsing and writing the form engine into the database includes: By identifying the field, determine whether the dynamic form contains a table control. If not, directly parse the dynamic form configuration file data through the form engine to complete the data entry; if it does, first complete the data entry of a single form control in the dynamic form through the form engine, and then complete the data entry of the table control.

7. The method for parsing a data storage general form configuration file according to claim 6, characterized in that: The data storage is completed by directly parsing the dynamic form configuration file data through the form engine, specifically including: Based on the UUID rule, the primary key field data is generated, the dynamic form filled data is combined with the configured field name and the dynamic form table name field to perform SQL statement parsing, and the SQL statement is executed to perform data storage operations.

8. The method for parsing a data storage general form configuration file according to claim 6, characterized in that: The data storage of a single form control in the dynamic form is first completed by the form engine, and then the data storage of the table control is completed, which specifically includes: Temporarily store the data filled in the form in the cache; Generate primary key field data based on UUID rules, parse SQL statements by combining the data filled in a single form control in the dynamic form with the configured field name and the dynamic form table name field, and execute SQL statements to store data in the database; After completing the data entry into the dynamic form table, assign the primary key field data generated by the dynamic form table to the foreign key field, merge the data filled in the form control through the table name field, sub-table field and foreign key field configured by the form control to perform SQL statement parsing, and execute the SQL statement to enter the data filled in by multiple form controls into the database.

9. A system, characterized in that: It comprises a memory and a processor, wherein the memory stores a computer program corresponding to the method for designing a universal form configuration file for data entry as described in any one of claims 1 to 4, which can be loaded by the processor and executed.

10. A system, characterized in that: It comprises a memory and a processor, wherein the memory stores a computer program corresponding to the method for parsing a general form configuration file for data entry as described in any one of claims 5 to 8, which can be loaded by the processor and executed.

Citation Information

Patent Citations

  • Form configuration method and device

    CN113051269A

  • Dynamic form generation system

    CN115858690A

  • BIM project data customization form configuration method and device

    CN116956381A